Skyward boardcore
|
Simple view to display text on screen. More...
#include <TextView.h>
Public Member Functions | |
TextView (std::string text="", mxgui::Color textColor=mxgui::white, uint8_t padding=1) | |
Creates a new TextView. | |
void | setVerticalAlignment (VertAlignment alignment) |
void | setHorizontalAlignment (HorizAlignment alignment) |
void | setAlignment (HorizAlignment horizAlign, VertAlignment vertAlign) |
void | setText (std::string text) |
std::string | getText () |
virtual void | setTextColor (mxgui::Color color) |
mxgui::Color | getTextColor () |
virtual void | draw (mxgui::DrawingContext &dc) override |
Draw the view in its bounds. | |
void | setFont (mxgui::Font font) |
mxgui::Font | getFont () |
![]() | |
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 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 | |
short int | getTextWidth (std::string text) |
![]() | |
bool | isInvalidated () |
Additional Inherited Members | |
![]() | |
using | OnInteractionListener = std::function<void(View*, Interaction)> |
Simple view to display text on screen.
Definition at line 36 of file TextView.h.
|
inline |
Creates a new TextView.
text | Text |
textColor | Text color |
padding | Spacing from view bounds in pixels |
Definition at line 46 of file TextView.h.
|
inlineoverridevirtual |
Draw the view in its bounds.
dc | Reference to a drawingcontext |
Reimplemented from Boardcore::View.
Definition at line 92 of file TextView.h.
|
inline |
Definition at line 151 of file TextView.h.
|
inline |
Definition at line 79 of file TextView.h.
|
inline |
Definition at line 90 of file TextView.h.
|
inlineprotected |
Definition at line 154 of file TextView.h.
|
inline |
Definition at line 64 of file TextView.h.
|
inline |
Definition at line 145 of file TextView.h.
|
inline |
Definition at line 58 of file TextView.h.
|
inline |
Definition at line 70 of file TextView.h.
|
inlinevirtual |
Definition at line 81 of file TextView.h.
|
inline |
Definition at line 52 of file TextView.h.