Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class text_box_base

boost::ui::text_box_base — Abstract text editor widget.

Synopsis

// 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;
};

Description

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 construct/copy/destruct

  1. text_box_base();

text_box_base public member functions

  1. void clear();
    Clears the contents.
  2. text_box_base & text(const uistring & text);
    Sets text into the editor.
  3. uistring text() const;
    Returns text from the editor.

text_box_base private member functions

  1. void on_edit_raw(const boost::function< void()> & handler);
  2. detail_impl * get_impl();
  3. const detail_impl * get_impl() const;

PrevUpHomeNext