25 #ifndef JUCE_JUSTIFICATION_H_INCLUDED
26 #define JUCE_JUSTIFICATION_H_INCLUDED
65 inline bool testFlags (
int flagsToTest)
const noexcept {
return (flags & flagsToTest) != 0; }
79 template <
typename ValueType>
81 ValueType spaceX, ValueType spaceY, ValueType spaceW, ValueType spaceH)
const noexcept
85 else if ((flags &
right) != 0) x += spaceW - w;
89 else if ((flags &
bottom) != 0) y += spaceH - h;
94 template <
typename ValueType>
98 ValueType x = areaToAdjust.getX(), y = areaToAdjust.getY();
100 targetSpace.getX(), targetSpace.getY(), targetSpace.getWidth(), targetSpace.getHeight());
101 return areaToAdjust.withPosition (x, y);
189 #endif // JUCE_JUSTIFICATION_H_INCLUDED
int getFlags() const noexcept
Definition: juce_Justification.h:60
Justification(const Justification &other) noexcept
Definition: juce_Justification.h:46
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_Justification.h:175
Definition: juce_Justification.h:38
Definition: juce_Justification.h:113
Definition: juce_Justification.h:124
Definition: juce_Justification.h:110
bool operator==(const Justification &other) const noexcept
Definition: juce_Justification.h:55
Definition: juce_Rectangle.h:36
int getOnlyHorizontalFlags() const noexcept
Definition: juce_Justification.h:71
const Rectangle< ValueType > appliedToRectangle(const Rectangle< ValueType > &areaToAdjust, const Rectangle< ValueType > &targetSpace) const noexcept
Definition: juce_Justification.h:95
Definition: juce_Justification.h:145
Justification(int justificationFlags) noexcept
Definition: juce_Justification.h:43
Definition: juce_Justification.h:170
int getOnlyVerticalFlags() const noexcept
Definition: juce_Justification.h:68
Definition: juce_Justification.h:180
Definition: juce_Justification.h:150
Definition: juce_Justification.h:128
void applyToRectangle(ValueType &x, ValueType &y, ValueType w, ValueType h, ValueType spaceX, ValueType spaceY, ValueType spaceW, ValueType spaceH) const noexcept
Definition: juce_Justification.h:80
Definition: juce_Justification.h:160
Definition: juce_Justification.h:140
Definition: juce_Justification.h:165
Definition: juce_Justification.h:121
bool operator!=(const Justification &other) const noexcept
Definition: juce_Justification.h:56
Definition: juce_Justification.h:155
bool testFlags(int flagsToTest) const noexcept
Definition: juce_Justification.h:65
Definition: juce_Justification.h:117
Definition: juce_Justification.h:134
Justification & operator=(const Justification &other) noexcept
Definition: juce_Justification.h:49
Flags
Definition: juce_Justification.h:106