1 #ifndef AETHER_CONTROLCONTAINER_HPP 2 #define AETHER_CONTROLCONTAINER_HPP 4 #include "Aether/base/Container.hpp" 47 void repositionItems();
void returnAllElements()
Removes (but does not delete) all children elements.
bool removeElement(Element *e)
Attempt to delete given child element.
A container is an element that contains other elements. It implements the required behaviour to navig...
Definition: Container.hpp:16
void setH(int h)
Set the height of the container.
void setW(int w)
Set the width of the container.
void setEnabledColour(const Colour colour)
Set the colour to tint enabled controls with.
void setDisabledColour(const Colour colour)
Set the colour to tint disabled controls with.
void disableControl(const Button btn)
Disables the requested control item. Does nothing if the button has not been added.
int w()
Returns width of element.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
void addElement(Element *e)
Adds new element a child.
void addControl(const Button btn, const std::string &label)
Adds a new control to the left of the bar with the given attributes. Does nothing if one already exis...
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
A container holding control elements (and nothing else) which automatically arranges them at the bott...
Definition: ControlBar.hpp:16
bool returnElement(Element *e)
Attempt to remove the given child element.
void moveControl(const Button btn, const Button before)
Moves a control to another position. Provide 'NO_BUTTON' as the 'before' button to move to the very r...
void removeAllControls()
Remove all controls from the container.
An item used by and updated by the ControlBar element. It shows a button icon and label...
Definition: ControlItem.hpp:11
bool removeControl(const Button btn)
Remove the control for the given button.
void updateControl(const Button btn, const std::string &label)
Update the label associated with the button.
void enableControl(const Button btn)
Enables the requested control item. Does nothing if the button has not been added.
Button
Enum class for buttons Avoids confusion with SDL/libnx names.
Definition: Types.hpp:12
ControlBar()
Constructs a new empty ControlBar. It automatically positions itself at the bottom of the screen...
void removeAllElements()
Deletes all children elements.