Skyward boardcore
|
Base class for anything that can be drawn on the screen and interacted with. More...
#include <View.h>
Public Types | |
using | OnInteractionListener = std::function<void(View*, Interaction)> |
Public Member Functions | |
View () | |
virtual | ~View () |
virtual void | setBounds (Bounds bounds) |
Sets the bounds in which the view will be drawn. | |
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 | draw (mxgui::DrawingContext &dc) |
Draw the view in its bounds. | |
virtual std::vector< View * > | getChilds () |
Returns the list of childs. | |
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) |
Protected Member Functions | |
bool | isInvalidated () |
Base class for anything that can be drawn on the screen and interacted with.
using Boardcore::View::OnInteractionListener = std::function<void(View*, Interaction)> |
|
inline |
|
inlinevirtual |
Draw the view in its bounds.
dc | Reference to a drawingcontext |
Reimplemented in Boardcore::GridLayout, Boardcore::ImageView, Boardcore::OptionView, Boardcore::TextView, and Boardcore::VerticalLayout.
|
inlinevirtual |
|
inlinevirtual |
Returns the list of childs.
Reimplemented in Boardcore::GridLayout, Boardcore::OptionView, and Boardcore::VerticalLayout.
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Sets the bounds in which the view will be drawn.
Reimplemented in Boardcore::GridLayout, Boardcore::OptionView, and Boardcore::VerticalLayout.
|
inline |
|
inline |