Skyward boardcore
|
Positions the childs in a vertical grid. The height of each child is dictated by its weight parameter. More...
#include <VerticalLayout.h>
Public Member Functions | |
VerticalLayout (short int spacing=0) | |
Creates a new VerticalLayout. | |
void | addView (View *view, float weight) |
Adds a view to the layout. | |
void | setBounds (Bounds bounds) override |
Sets the bounds in which the view will be drawn. | |
void | draw (mxgui::DrawingContext &dc) override |
Draw the view in its bounds. | |
virtual std::vector< View * > | getChilds () override |
Returns the list of childs. | |
![]() | |
View () | |
virtual | ~View () |
Bounds | getBounds () |
void | invalidate () |
Signal that what has been previously drawn is now invalid and has to be redrawn. | |
void | invalidateTree () |
Invalidate the view tree which has this view as a root. | |
virtual void | setBackgroundColor (mxgui::Color color) |
virtual mxgui::Color | getBackgroundColor () |
void | setSelectedColor (mxgui::Color color) |
void | setSelectable (bool selectable) |
bool | isSelectable () |
void | setSelected (bool selected) |
bool | isSelected () |
void | addOnInteractionListener (OnInteractionListener listener) |
virtual void | performInteraction (Interaction action) |
Additional Inherited Members | |
![]() | |
using | OnInteractionListener = std::function<void(View*, Interaction)> |
![]() | |
bool | isInvalidated () |
Positions the childs in a vertical grid. The height of each child is dictated by its weight parameter.
Definition at line 34 of file VerticalLayout.h.
|
inline |
Creates a new VerticalLayout.
spacing | Vertical space between each child in pixels |
Definition at line 42 of file VerticalLayout.h.
|
inline |
Adds a view to the layout.
view | Pointer to the view to be added |
weight | Relative weight of the view to determine its display height |
Definition at line 50 of file VerticalLayout.h.
|
inlineoverridevirtual |
Draw the view in its bounds.
dc | Reference to a drawingcontext |
Reimplemented from Boardcore::View.
Definition at line 71 of file VerticalLayout.h.
|
inlineoverridevirtual |
Returns the list of childs.
Reimplemented from Boardcore::View.
Definition at line 79 of file VerticalLayout.h.
|
inlineoverridevirtual |
Sets the bounds in which the view will be drawn.
Reimplemented from Boardcore::View.
Definition at line 64 of file VerticalLayout.h.