77 template <
typename ValueType>
92 template <
typename ValueType>
Represents a type of justification to be used when positioning graphical items.
Flags
Flag values that can be combined and used in the constructor.
@ centredRight
Indicates that the item should be centred vertically but placed on the right hand side.
@ horizontallyJustified
Indicates that lines of text should be spread out to fill the maximum width available,...
@ centredBottom
Indicates that the item should be centred horizontally and placed at the bottom.
@ centred
Indicates that the item should be centred vertically and horizontally.
@ left
Indicates that the item should be aligned against the left edge of the available space.
@ centredLeft
Indicates that the item should be centred vertically but placed on the left hand side.
@ horizontallyCentred
Indicates that the item should be placed in the centre between the left and right sides of the availa...
@ centredTop
Indicates that the item should be centred horizontally and placed at the top.
@ bottom
Indicates that the item should be aligned against the bottom edge of the available space.
@ verticallyCentred
Indicates that the item should be placed in the centre between the top and bottom sides of the availa...
@ top
Indicates that the item should be aligned against the top edge of the available space.
@ right
Indicates that the item should be aligned against the right edge of the available space.
@ bottomLeft
Indicates that the item should be placed in the bottom-left corner.
@ bottomRight
Indicates that the item should be placed in the bottom-left corner.
@ topLeft
Indicates that the item should be placed in the top-left corner.
@ topRight
Indicates that the item should be placed in the top-right corner.
const Rectangle< ValueType > appliedToRectangle(const Rectangle< ValueType > &areaToAdjust, const Rectangle< ValueType > &targetSpace) const noexcept
Returns the new position of a rectangle that has been justified to fit within a given space.
void applyToRectangle(ValueType &x, ValueType &y, ValueType w, ValueType h, ValueType spaceX, ValueType spaceY, ValueType spaceW, ValueType spaceH) const noexcept
Adjusts the position of a rectangle to fit it into a space.
int getOnlyVerticalFlags() const noexcept
Returns just the flags from this object that deal with vertical layout.
Justification(const Justification &)=default
Creates a copy of another Justification object.
int getOnlyHorizontalFlags() const noexcept
Returns just the flags from this object that deal with horizontal layout.
Justification & operator=(const Justification &)=default
Copies another Justification object.
int getFlags() const noexcept
Returns the raw flags that are set for this Justification object.
Justification(int justificationFlags) noexcept
Creates a Justification object using a combination of flags from the Flags enum.
bool testFlags(int flagsToTest) const noexcept
Tests a set of flags for this object.
Manages a rectangle and allows geometric operations to be performed on it.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...