The base class for all components that can be put into a floating panel. More...
Public Types | |
enum | PanelPropertyId { Type = 0, Title , ColourData, LayoutData, Font, FontSize } |
Public Member Functions | |
String | getBestTitle () const |
This returns the title that is supposed to be displayed. More... | |
String | getCustomTitle () const |
If you set a custom title, this will return it. More... | |
FloatingTile * | getParentShell () |
Returns the parent shell. More... | |
void | setCustomTitle (String newCustomTitle) |
Set a custom title to the panel that will be displayed in tabs, etc. More... | |
void | setDynamicTitle (const String &newDynamicTitle) |
Sets a title that is supposed to change during runtime. More... | |
virtual bool | showTitleInPresentationMode () const |
Overwrite this method if your component should hide the "title" when not in layout mode. More... | |
virtual void | siblingAmountChanged () |
Override this method when you want to be notified when the amount of siblings change. More... | |
![]() | |
void | resetObject (DynamicObject *objectToClear) |
Clears the given object and sets all defaultable properties to their initial values. More... | |
Protected Member Functions | |
FloatingTileContent (FloatingTile *parent_) | |
Creates a new floating panel. More... | |
virtual int | getFixedHeight () const |
Overwrite this method if the component has a fixed height. More... | |
virtual int | getFixedWidth () const |
Overwrite this method if the component has a fixed width. More... | |
The base class for all components that can be put into a floating panel.
In order to use it:
You can use the ValueTree methods to save / restore the state.
Description
ID | Description |
---|---|
ColourData::textColour | the text colour |
ColourData::bgColour | the background colour |
ColourData::itemColour1 | the first item colour |
Font | the font |
FontSize | the font size |
|
strong |
|
inlineprotected |
Creates a new floating panel.
You must supply a FloatingShellComponent at initialisation to prevent the requirement for lazy initialisation.
|
inline |
This returns the title that is supposed to be displayed.
|
inline |
If you set a custom title, this will return it.
|
inlineprotectedvirtual |
Overwrite this method if the component has a fixed height.
|
inlineprotectedvirtual |
Overwrite this method if the component has a fixed width.
|
inline |
Returns the parent shell.
Unlike getParentComponent(), this always returns non nullptr, so you can use it in the constructor.
|
inline |
Set a custom title to the panel that will be displayed in tabs, etc.
void setDynamicTitle | ( | const String & | newDynamicTitle | ) |
Sets a title that is supposed to change during runtime.
It will not be stored in the JSON data.
|
inlinevirtual |
Overwrite this method if your component should hide the "title" when not in layout mode.
This will make the parent shell use the full area for this component so make sure it doesn't interfer with the shell buttons.
|
inlinevirtual |
Override this method when you want to be notified when the amount of siblings change.