$#include "Text.h" class Text : public UIElement { public: // Methods: Text(Context* context); virtual ~Text(); bool SetFont(const String& fontName, int size = DEFAULT_FONT_SIZE); bool SetFont(const String& fontName); bool SetFont(Font* font, int size = DEFAULT_FONT_SIZE); bool SetFont(Font* font); void SetText(const String& text); void SetTextAlignment(HorizontalAlignment align); void SetRowSpacing(float spacing); void SetWordwrap(bool enable); void SetSelection(unsigned start, unsigned length = M_MAX_UNSIGNED); void SetSelection(unsigned start); void ClearSelection(); void SetSelectionColor(const Color& color); void SetHoverColor(const Color& color); Font* GetFont() const; int GetFontSize() const; const String& GetText() const; HorizontalAlignment GetTextAlignment() const; float GetRowSpacing() const; bool GetWordwrap() const; unsigned GetSelectionStart() const; unsigned GetSelectionLength() const; const Color& GetSelectionColor() const; const Color& GetHoverColor() const; int GetRowHeight() const; unsigned GetNumRows() const; // Properties: tolua_property__get_set Font* font; tolua_readonly tolua_property__get_set int fontSize; tolua_property__get_set String& text; tolua_property__get_set HorizontalAlignment textAlignment; tolua_property__get_set float rowSpacing; tolua_property__get_set bool wordwrap; tolua_readonly tolua_property__get_set unsigned selectionStart; tolua_readonly tolua_property__get_set unsigned selectionLength; tolua_property__get_set Color& selectionColor; tolua_property__get_set Color& hoverColor; tolua_readonly tolua_property__get_set int rowHeight; tolua_readonly tolua_property__get_set unsigned numRows; };