Represents a type of justification to be used when positioning graphical items. More...
#include <juce_Justification.h>
Public Types | |
enum | Flags { left = 1 , right = 2 , horizontallyCentred = 4 , top = 8 , bottom = 16 , verticallyCentred = 32 , horizontallyJustified = 64 , centred = 36 , centredLeft = 33 , centredRight = 34 , centredTop = 12 , centredBottom = 20 , topLeft = 9 , topRight = 10 , bottomLeft = 17 , bottomRight = 18 } |
Flag values that can be combined and used in the constructor. More... | |
Represents a type of justification to be used when positioning graphical items.
e.g. it indicates whether something should be placed top-left, top-right, centred, etc.
It is used in various places wherever this kind of information is needed.
Flag values that can be combined and used in the constructor.
|
noexcept |
Creates a Justification object using a combination of flags from the Flags enum.
|
default |
Creates a copy of another Justification object.
|
default |
Copies another Justification object.
|
noexcept |
|
noexcept |
|
noexcept |
Returns the raw flags that are set for this Justification object.
Tests a set of flags for this object.
|
noexcept |
Returns just the flags from this object that deal with vertical layout.
References bottom, top, and verticallyCentred.
|
noexcept |
Returns just the flags from this object that deal with horizontal layout.
References horizontallyCentred, horizontallyJustified, left, and right.
|
noexcept |
Adjusts the position of a rectangle to fit it into a space.
The (x, y) position of the rectangle will be updated to position it inside the given space according to the justification flags.
References bottom, h, horizontallyCentred, right, verticallyCentred, w, x, and y.
Referenced by appliedToRectangle().
|
noexcept |
Returns the new position of a rectangle that has been justified to fit within a given space.
References applyToRectangle(), x, and y.