Home | Libraries | People | FAQ | More |
boost::ui::button — Widget with label that generate event when clicked on.
// In header: <boost/ui/button.hpp> class button : public boost::ui::widget { public: // construct/copy/destruct explicit button(widget &, const uistring &); button(); // public member functions template<typename F, class ... Args> button & on_press(F &&, Args &&...); // private member functions void on_press_raw(const boost::function< void()> &); };
Usage example:
class button_dialog : public ui::dialog { public: button_dialog() : ui::dialog("Button usage dialog") { ui::button(*this, "&Press me") .on_press(&button_dialog::on_press_me, this); show_modal(); } private: void on_press_me() { ui::info_dialog("Hello"); } };
See Also:
button
public
construct/copy/destructbutton
public member functionstemplate<typename F, class ... Args> button & on_press(F && f, Args &&... args);Connects button press handler.