|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Represents a type of justification to be used when positioning graphical items. More...
#include "juce_Justification.h"
Public Types | |
| enum | Flags { left , right , horizontallyCentred , top , bottom , verticallyCentred , horizontallyJustified , centred , centredLeft , centredRight , centredTop , centredBottom , topLeft , topRight , bottomLeft , bottomRight } |
| Flag values that can be combined and used in the constructor. More... | |
Public Member Functions | |
| Justification (int justificationFlags) noexcept | |
| Creates a Justification object using a combination of flags from the Flags enum. | |
| Justification (const Justification &)=default | |
| Creates a copy of another Justification object. | |
| Justification & | operator= (const Justification &)=default |
| Copies another Justification object. | |
| bool | operator== (const Justification &other) const noexcept |
| bool | operator!= (const Justification &other) const noexcept |
| int | getFlags () const noexcept |
| Returns the raw flags that are set for this Justification object. | |
| bool | testFlags (int flagsToTest) const noexcept |
| Tests a set of flags for this object. | |
| int | getOnlyVerticalFlags () const noexcept |
| Returns just the flags from this object that deal with vertical layout. | |
| int | getOnlyHorizontalFlags () const noexcept |
| Returns just the flags from this object that deal with horizontal layout. | |
| template<typename ValueType > | |
| 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. | |
| template<typename ValueType > | |
| 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. | |
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.
@tags{Graphics}
Definition at line 40 of file juce_Justification.h.
Flag values that can be combined and used in the constructor.
Definition at line 104 of file juce_Justification.h.
|
noexcept |
Creates a Justification object using a combination of flags from the Flags enum.
Definition at line 45 of file juce_Justification.h.
|
noexcept |
Returns the new position of a rectangle that has been justified to fit within a given space.
Definition at line 93 of file juce_Justification.h.
|
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.
Definition at line 78 of file juce_Justification.h.
|
noexcept |
Returns the raw flags that are set for this Justification object.
Definition at line 58 of file juce_Justification.h.
|
noexcept |
Returns just the flags from this object that deal with horizontal layout.
Definition at line 69 of file juce_Justification.h.
|
noexcept |
Returns just the flags from this object that deal with vertical layout.
Definition at line 66 of file juce_Justification.h.
|
noexcept |
Definition at line 54 of file juce_Justification.h.
|
noexcept |
Definition at line 53 of file juce_Justification.h.
Tests a set of flags for this object.
Definition at line 63 of file juce_Justification.h.