|
| LayoutSplitter (juce::ValueTree &node) |
|
virtual | ~LayoutSplitter () |
|
void | setRelativePosition (float position, juce::UndoManager *undo=nullptr) |
| Set the position in normalized form. More...
|
|
float | getRelativePosition () const |
| Return the position in normalized form. More...
|
|
void | setMinimumRelativePosition (const float min, juce::UndoManager *undo=nullptr) |
| Set the minimum relative position in normalized coordinates. More...
|
|
void | setMaximumRelativePosition (const float max, juce::UndoManager *undo=nullptr) |
| Set the maximum relative position in normalized coordinates. More...
|
|
float | getMinimumRelativePosition () const |
| Return the minimum normalized position. More...
|
|
float | getMaximumRelativePosition () const |
| Return the maximum normalized position. More...
|
|
bool | isHorizontal () const |
| Return, if parent is horizontal. More...
|
|
void | setBounds (juce::Rectangle< int > b) |
| Set the bounds of the splitters component. More...
|
|
| LayoutItem (LayoutItem::Orientation o) |
| Create an empty layout as root node. More...
|
|
| LayoutItem (juce::ValueTree state) |
| Instanciate a LayoutItem from it's state. More...
|
|
virtual | ~LayoutItem () |
|
bool | isValid () |
| Return if the layout item has a valid type. More...
|
|
void | setOrientation (const Orientation, juce::UndoManager *undo=nullptr) |
| Changes the orientation of the layout. More...
|
|
Orientation | getOrientation () const |
| Returns the orientation including direction. More...
|
|
bool | isHorizontal () const |
| Returns true if orientation is leftToRight or rightToLeft. More...
|
|
bool | isVertical () const |
| Returns true if orientation is topDown or BottomUp. More...
|
|
int | isOverlay () const |
| If overlay is set the item will be placed over an earlier defined item. More...
|
|
void | setIsOverlay (const int overlay) |
|
float | getOverlayWidth () const |
| Overlay width and overlay height are given in relative sizes to the referenced item. More...
|
|
void | setOverlayWidth (float w) |
| Overlay width and overlay height are given in relative sizes to the referenced item. More...
|
|
float | getOverlayHeight () const |
| Overlay width and overlay height are given in relative sizes to the referenced item. More...
|
|
void | setOverlayHeight (float h) |
| Overlay width and overlay height are given in relative sizes to the referenced item. More...
|
|
int | getOverlayJustification () const |
| overlayJustification defines, where the item is placed inside the referenced item More...
|
|
void | setOverlayJustification (int j) |
| overlayJustification defines, where the item is placed inside the referenced item More...
|
|
juce::Component * | getComponent () const |
| Return the managed component. More...
|
|
juce::String | getComponentID () const |
| Return the componentID. More...
|
|
bool | hasComponent () const |
| Returns true, if a component is set and available as pointer. More...
|
|
juce::Component * | getWrappedComponent () const |
| Return the wrapped component as pointer. More...
|
|
void | setComponent (juce::Component *ptr, bool owned=false, juce::UndoManager *undo=nullptr) |
| Replace the component pointer. More...
|
|
LayoutItem::SharedLayoutData * | getOrCreateData (juce::UndoManager *undo=nullptr) |
| Get or create a shared layout data blob. More...
|
|
bool | isSpacerItem () const |
|
bool | isComponentItem () const |
|
bool | isSplitterItem () const |
|
bool | isSubLayout () const |
|
void | setLabelText (const juce::String &text, juce::UndoManager *undo=nullptr) |
| Set the text for an automatically recreated Label as property. More...
|
|
void | getStretch (float &w, float &h) const |
| Return the stretch value of an item. More...
|
|
void | setStretch (float w, float h, juce::UndoManager *undo=nullptr) |
| Used to set stretch factors for the wrapped component. More...
|
|
void | setMinimumWidth (const int w, juce::UndoManager *undo=nullptr) |
| Set constraints to the items size. More...
|
|
void | setMaximumWidth (const int w, juce::UndoManager *undo=nullptr) |
| Set the maximum width. More...
|
|
void | setMinimumHeight (const int h, juce::UndoManager *undo=nullptr) |
| Set the minimum height. More...
|
|
void | setMaximumHeight (const int h, juce::UndoManager *undo=nullptr) |
| Set the maximum height. More...
|
|
int | getMinimumWidth () const |
| Returns the minimum width. More...
|
|
int | getMaximumWidth () const |
| Returns the maximum width. More...
|
|
int | getMinimumHeight () const |
| Returns the minimum height. More...
|
|
int | getMaximumHeight () const |
| Returns the maximum height. More...
|
|
virtual void | getSizeLimits (int &minW, int &maxW, int &minH, int &maxH) |
| Return the size limits of the item. More...
|
|
void | setPaddingTop (const int p, juce::UndoManager *undo=nullptr) |
| Set a padding value for the wrapped component or item to it's calculated top bounds. More...
|
|
void | setPaddingLeft (const int p, juce::UndoManager *undo=nullptr) |
| Set a padding value for the wrapped component or item to it's calculated left bounds. More...
|
|
void | setPaddingRight (const int p, juce::UndoManager *undo=nullptr) |
| Set a padding value for the wrapped component or item to it's calculated right bounds. More...
|
|
void | setPaddingBottom (const int p, juce::UndoManager *undo=nullptr) |
| Set a padding value for the wrapped component or item to it's calculated bottom bounds. More...
|
|
void | setPadding (const int p, juce::UndoManager *undo=nullptr) |
| Set one value to all bounaries. More...
|
|
int | getPaddingTop () const |
| Returns the padding value for the wrapped component or item to it's calculated top bounds. More...
|
|
int | getPaddingLeft () const |
| Returns the padding value for the wrapped component or item to it's calculated left bounds. More...
|
|
int | getPaddingRight () const |
| Returns the padding value for the wrapped component or item to it's calculated right bounds. More...
|
|
int | getPaddingBottom () const |
| Returns the padding value for the wrapped component or item to it's calculated bottom bounds. More...
|
|
void | setFixedWidth (const int w, juce::UndoManager *undo=nullptr) |
| Sets fixed width as minimum width = maximum width. More...
|
|
void | setFixedHeight (const int h, juce::UndoManager *undo=nullptr) |
| Sets fixed height as minimum height = maximum height. More...
|
|
void | setFixedSize (const int w, const int h, juce::UndoManager *undo=nullptr) |
| Convenience method to set fixed width and height in one call. More...
|
|
void | setAspectRatio (const float ratio, juce::UndoManager *undo=nullptr) |
| Set an aspect ratio to constrain the bounds. More...
|
|
float | getAspectRatio () const |
| Set an aspect ratio to constrain the bounds. More...
|
|
void | setItemParameters (float inStretchX, float inStretchY, int inMinWidth, int inMinHeight, int inMaxWidth, int inMaxHeight, int inPaddingTop, int inPaddingLeft, int inPaddingRight, int inPaddingBottom, float inAspectRatio, juce::UndoManager *undo=nullptr) |
| Convenience method to set all parameters in one line. More...
|
|
void | constrainBounds (juce::Rectangle< int > &bounds, bool &changedWidth, bool &changedHeight, bool preferVertical) |
| Applies the size constraints to the items. More...
|
|
void | setItemBounds (juce::Rectangle< int > b) |
| This property is dynamically calculated each time updateGeometry is called. More...
|
|
void | setItemBounds (int x, int y, int w, int h) |
| Convenience method to save creation of a rectangle struct. More...
|
|
juce::Rectangle< int > | getItemBounds () const |
| returns the calculated bounds of the item or layout. More...
|
|
juce::Rectangle< int > | getPaddedItemBounds () const |
| Returns the computed bounds reduced by the specified padding of the item. More...
|
|
void | setBoundsAreFinal (bool final) |
| set the flag that the bounds are adapted with size limits and shall not change This is computed on each updateGeometry and should not be set More...
|
|
bool | getBoundsAreFinal () const |
| This is computed on each updateGeometry and should not be set. More...
|
|
void | setWrappedComponentID (const juce::String &name, bool setComp) |
| Set the wrapped components componentID and the item's componentID property. More...
|
|
virtual void | fixUpLayoutItems () |
| Chance for LayoutItems to fix properties that might have changed for saving. More...
|
|
virtual void | realize (juce::ValueTree &node, juce::Component *owningComponent, Layout *layout) |
| Hook to component or create an owned component. More...
|
|
void | addListener (Listener *newListener) |
| Registers a listener to receive events when this button's state changes. More...
|
|
void | removeListener (Listener *listener) |
| Removes a previously-registered button listener. More...
|
|
void | callListenersCallback (juce::Rectangle< int > newBounds) |
| Call the callbacks of LayoutItem::Listeners. More...
|
|
void | callListenersCallback (float relativePosition, bool final) |
| Call the callbacks of LayoutItem::Listeners when splitter moved. More...
|
|
|
enum | ItemType {
Invalid = 0,
ComponentItem,
LabeledComponentItem,
SplitterItem,
SpacerItem,
LineItem,
SubLayout
} |
|
enum | Orientation {
Unknown = 0,
LeftToRight,
TopDown,
RightToLeft,
BottomUp
} |
|
static Orientation | getOrientationFromName (juce::Identifier name) |
|
static juce::Identifier | getNameFromOrientation (LayoutItem::Orientation o) |
|
static
LayoutItem::SharedLayoutData * | getOrCreateData (juce::ValueTree &node, juce::UndoManager *undo=nullptr) |
| Get or create a shared layout data blob for state node. More...
|
|
static LayoutItem | makeSubLayout (juce::ValueTree &parent, Orientation orientation, int idx=-1, juce::UndoManager *undo=nullptr) |
| create a sub layout under the node parent with the given orientation. More...
|
|
static LayoutItem | makeChildComponent (juce::ValueTree &parent, juce::Component *component, bool owned=false, int idx=-1, juce::UndoManager *undo=nullptr) |
| create a component container under the node parent. More...
|
|
static LayoutItem | makeLabeledChildComponent (juce::ValueTree &parent, juce::Component *component, juce::String text, LayoutItem::Orientation o=LayoutItem::TopDown, bool owned=false, int idx=-1, juce::UndoManager *undo=nullptr) |
| create a sub layout under the node parent with a child component and a label component. More...
|
|
static LayoutSplitter | makeChildSplitter (juce::ValueTree &parent, float position, int idx=-1, juce::UndoManager *undo=nullptr) |
| create a splitter under the node parent. More...
|
|
static LayoutItem | makeChildSpacer (juce::ValueTree &parent, float stretchX=1.0, float stretchY=1.0, int idx=-1, juce::UndoManager *undo=nullptr) |
| create a spacer under the node parent. More...
|
|
static void | removeComponent (juce::ValueTree &parent, juce::Component *c, juce::UndoManager *undo=nullptr) |
| Remove a component item from a specific layout level. More...
|
|
static juce::ValueTree | getLayoutItem (juce::ValueTree &node, juce::Component *) |
| Retrieve the LayoutItem for a component. More...
|
|
static juce::ValueTree | getLayoutItem (juce::ValueTree &node, juce::String &componentID) |
| Retrieve the LayoutItem for a component by componentID. More...
|
|
static void | paintBounds (const juce::ValueTree &node, juce::Graphics &g) |
| paint the bounds of the item and sub items for debugging More...
|
|
static int | updateGeometry (juce::ValueTree &node, juce::Rectangle< int > bounds) |
| Recompute the geometry of all components. More...
|
|
static int | updateGeometry (juce::ValueTree &node, juce::Rectangle< int > bounds, int start, int end) |
| Recompute the geometry of all components. More...
|
|
static void | getStretch (const juce::ValueTree &node, float &w, float &h, int start=0, int end=-1) |
| Cummulates all stretch factors inside the nested layout. More...
|
|
static void | getSizeLimits (const juce::ValueTree &node, int &minW, int &maxW, int &minH, int &maxH, int start, int end) |
| Compute size limits over all child nodes. More...
|
|
juce::ValueTree | state |
| The layout item's node in the ValueTree. More...
|
|
A splitter is a handle to drag boundaries inside the layout.