TextArea.hpp
Specs for the TextArea widget.
- Todo:
Callback does a lot of string-copies at the moment; should be streamlined.
-
class TextArea : public internal::WidgetFacet<TextArea>
- #include <TextArea.hpp>
An input field for text data. A function provided at creation time will be called each time the contents of the TextWidget are changed. The current text contents can also always be accessed with the GetText() member function.
Public Types
-
using INFO_TYPE = TextAreaInfo
Public Functions
-
inline TextArea(std::function<void(const std::string&)> in_cb, const std::string &in_id = "")
Build a text area with a specified function to call with every change.
-
inline virtual ~TextArea()
-
inline TextArea &SetCallback(const std::function<void(const std::string&)> &in_cb)
Change the callback function for this TextArea.
-
inline bool HasAutofocus() const
Does this widget have auto focus set?
-
inline bool IsDisabled() const
Is this widget currently disabled?
Protected Functions
-
inline TextAreaInfo *Info()
-
inline const TextAreaInfo *Info() const
-
inline TextArea(TextAreaInfo *in_info)
Friends
- friend class TextAreaInfo
-
using INFO_TYPE = TextAreaInfo