mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
ShapedTextOptions: Add equality operators
This commit is contained in:
parent
d72df5faa3
commit
50863c144e
1 changed files with 23 additions and 0 deletions
|
|
@ -44,7 +44,30 @@ enum class TextDirection
|
|||
|
||||
class ShapedTextOptions
|
||||
{
|
||||
private:
|
||||
auto tie() const
|
||||
{
|
||||
return std::tie (justification,
|
||||
readingDir,
|
||||
maxWidth,
|
||||
height,
|
||||
fontsForRange,
|
||||
language,
|
||||
firstLineIndent,
|
||||
leading,
|
||||
additiveLineSpacing,
|
||||
baselineAtZero,
|
||||
allowBreakingInsideWord,
|
||||
trailingWhitespacesShouldFit,
|
||||
maxNumLines,
|
||||
ellipsis);
|
||||
}
|
||||
|
||||
public:
|
||||
bool operator== (const ShapedTextOptions& other) const { return tie() == other.tie(); }
|
||||
bool operator!= (const ShapedTextOptions& other) const { return tie() != other.tie(); }
|
||||
|
||||
//==============================================================================
|
||||
[[nodiscard]] ShapedTextOptions withJustification (Justification x) const
|
||||
{
|
||||
return withMember (*this, &ShapedTextOptions::justification, x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue