A floating tile container is the base class for components that can host other floating tiles in various arrangements. More...
Public Member Functions | |
void | addFloatingTile (FloatingTile *newComponent) |
Adds a floating tile to the container. More... | |
void | clear () |
Deletes all floating tiles in this container. More... | |
FloatingTileContainer (FloatingTile *parent) | |
Creates a new floating tile container. More... | |
const FloatingTile * | getComponent (int index) const |
Returns the FloatingTile at the given index. More... | |
FloatingTile * | getComponent (int index) |
Returns the FloatingTile at the given index. More... | |
virtual Rectangle< int > | getContainerBounds () const =0 |
This returns the area that can be populated with content. More... | |
int | getIndexOfComponent (const FloatingTile *componentToLookFor) const |
Returns the index of the given component or -1 if its not found. More... | |
int | getNumComponents () const |
Returns the number of floating tiles in this container. More... | |
virtual void | refreshLayout () |
This will be called whenever the layout needs to be updated eg. More... | |
void | removeFloatingTile (FloatingTile *componentToRemove) |
Removes and deletes the given FloatingTile. | |
Public Member Functions inherited from FloatingTileContent | |
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 void | siblingAmountChanged () |
Override this method when you want to be notified when the amount of siblings change. More... | |
Public Member Functions inherited from ObjectWithDefaultProperties | |
void | resetObject (DynamicObject *objectToClear) |
Clears the given object and sets all defaultable properties to their initial values. More... | |
Additional Inherited Members | |
Public Types inherited from FloatingTileContent | |
enum | PanelPropertyId { Type = 0, Title , ColourData, LayoutData, Font, FontSize } |
Protected Member Functions inherited from FloatingTileContent | |
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... | |
A floating tile container is the base class for components that can host other floating tiles in various arrangements.
|
inline |
Creates a new floating tile container.
You have to supply the parent tile.
void addFloatingTile | ( | FloatingTile * | newComponent | ) |
Adds a floating tile to the container.
This takes ownership of this floating tile and calls componentAdded() to give subclasses the possibility of implement their arrangement.
It also causes the root tile to refresh its layout so that the container can be resized accordingly.
void clear | ( | ) |
Deletes all floating tiles in this container.
const FloatingTile * getComponent | ( | int | index | ) | const |
Returns the FloatingTile at the given index.
FloatingTile * getComponent | ( | int | index | ) |
Returns the FloatingTile at the given index.
|
pure virtual |
This returns the area that can be populated with content.
Usually this will be the full size minus the title bar if visible.
int getIndexOfComponent | ( | const FloatingTile * | componentToLookFor | ) | const |
Returns the index of the given component or -1 if its not found.
int getNumComponents | ( | ) | const |
Returns the number of floating tiles in this container.
|
virtual |
This will be called whenever the layout needs to be updated eg.
when a new floating tile is added or the resizers were dragged.