1
0
Fork 0
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:
attila 2025-02-03 12:34:54 +01:00 committed by Attila Szarvas
parent d72df5faa3
commit 50863c144e

View file

@ -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);