Home | Libraries | People | FAQ | More |
boost::ui::text_box_base — Abstract text editor widget.
// In header: <boost/ui/text_box.hpp> class text_box_base : public boost::ui::widget { public: // construct/copy/destruct text_box_base(); // public member functions void clear(); text_box_base & text(const uistring &); uistring text() const; // private member functions void on_edit_raw(const boost::function< void()> &); detail_impl * get_impl(); const detail_impl * get_impl() const; };
Usage example:
ui::string_box string_box = ui::string_box(parent, "Initial text"); string_box.on_edit([&] { ui::log::info() << "Edited text: " << string_box.text(); });
text_box_base
public member functionsvoid clear();Clears the contents.
text_box_base & text(const uistring & text);Sets text into the editor.
uistring text() const;Returns text from the editor.