Home | Libraries | People | FAQ | More |
boost::ui::widget — Base class for all widgets.
// In header: <boost/ui/widget.hpp> class widget { public: // types typedef void * native_handle_type; // Implementation-defined widget type. // construct/copy/destruct widget(); ~widget(); // public member functions ui::layout::item layout(); widget & resize(coord_type, coord_type); coord_type x() const; coord_type y() const; coord_type width() const; coord_type height() const; point pos() const; size dimensions() const; rect bounds() const; widget & enable(bool = true); widget & disable(); bool is_enabled() const; widget & show(bool = true); widget & hide(); bool is_shown() const; widget & tooltip(const uistring &); uistring tooltip() const; widget & font(const ui::font &); ui::font font() const; bool native_valid() const noexcept; // private member functions void delete_last_detail_impl(); void on_resize_raw(const boost::function< void()> &); void on_key_press_raw(const boost::function< void()> &); void on_key_press_event_raw(const boost::function< void(key_event &)> &); void on_key_down_raw(const boost::function< void()> &); void on_key_down_event_raw(const boost::function< void(key_event &)> &); void on_key_up_raw(const boost::function< void()> &); void on_key_up_event_raw(const boost::function< void(key_event &)> &); void on_left_mouse_down_raw(const boost::function< void()> &); void on_left_mouse_down_event_raw(const boost::function< void(mouse_event &)> &); void on_left_mouse_up_raw(const boost::function< void()> &); void on_left_mouse_up_event_raw(const boost::function< void(mouse_event &)> &); void on_right_mouse_down_raw(const boost::function< void()> &); void on_right_mouse_down_event_raw(const boost::function< void(mouse_event &)> &); void on_right_mouse_up_raw(const boost::function< void()> &); void on_right_mouse_up_event_raw(const boost::function< void(mouse_event &)> &); void on_middle_mouse_down_raw(const boost::function< void()> &); void on_middle_mouse_down_event_raw(const boost::function< void(mouse_event &)> &); void on_middle_mouse_up_raw(const boost::function< void()> &); void on_middle_mouse_up_event_raw(const boost::function< void(mouse_event &)> &); void on_left_mouse_double_click_raw(const boost::function< void()> &); void on_left_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> &); void on_right_mouse_double_click_raw(const boost::function< void()> &); void on_right_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> &); void on_middle_mouse_double_click_raw(const boost::function< void()> &); void on_middle_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> &); void on_mouse_move_raw(const boost::function< void()> &); void on_mouse_move_event_raw(const boost::function< void(mouse_event &)> &); void on_mouse_drag_raw(const boost::function< void()> &); void on_mouse_drag_event_raw(const boost::function< void(mouse_event &)> &); void on_mouse_enter_raw(const boost::function< void()> &); void on_mouse_enter_event_raw(const boost::function< void(mouse_event &)> &); void on_mouse_leave_raw(const boost::function< void()> &); void on_mouse_leave_event_raw(const boost::function< void(mouse_event &)> &); void on_context_menu_raw(const boost::function< void()> &); void on_context_menu_event_raw(const boost::function< void(mouse_event &)> &); void on_mouse_wheel_raw(const boost::function< void()> &); void on_mouse_wheel_event_raw(const boost::function< void(wheel_event &)> &); };
See Also:
See Also:
List of graphical user interface elements (Wikipedia)
widget
public member functionsui::layout::item layout();Returns
layout::item
with this widget. widget & resize(coord_type width, coord_type height);Changes widget size to specified values.
coord_type x() const;Returns x coordinate relative to the parent widget client area.
coord_type y() const;Returns y coordinate relative to the parent widget client area.
coord_type width() const;Returns widget width.
coord_type height() const;Returns widget height.
point pos() const;Returns widget position relative to the parent widget client area.
size dimensions() const;Returns widget size.
rect bounds() const;Returns widget bounds in client coordinates.
widget & enable(bool do_enable = true);Enables widget if do_enable is true, disables otherwise.
widget & disable();Disables widget.
bool is_enabled() const;Returns true if widget is enabled, false otherwise.
widget & show(bool do_show = true);Shows widget if do_show is true, hides otherwise.
widget & hide();Hides widget.
bool is_shown() const;Returns true if widget is shown on screen, false otherwise.
widget & tooltip(const uistring & text);Sets tooltip text.
See Also:
uistring tooltip() const;Returns tooltip text.
widget & font(const ui::font & f);Sets font.
ui::font font() const;Returns font.
bool native_valid() const noexcept;Returns true only if native widget was created.
widget
private member functionsvoid delete_last_detail_impl();
void on_resize_raw(const boost::function< void()> & hanlder);
void on_key_press_raw(const boost::function< void()> & handler);
void on_key_press_event_raw(const boost::function< void(key_event &)> & handler);
void on_key_down_raw(const boost::function< void()> & handler);
void on_key_down_event_raw(const boost::function< void(key_event &)> & handler);
void on_key_up_raw(const boost::function< void()> & handler);
void on_key_up_event_raw(const boost::function< void(key_event &)> & handler);
void on_left_mouse_down_raw(const boost::function< void()> & handler);
void on_left_mouse_down_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_left_mouse_up_raw(const boost::function< void()> & handler);
void on_left_mouse_up_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_right_mouse_down_raw(const boost::function< void()> & handler);
void on_right_mouse_down_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_right_mouse_up_raw(const boost::function< void()> & handler);
void on_right_mouse_up_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_middle_mouse_down_raw(const boost::function< void()> & handler);
void on_middle_mouse_down_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_middle_mouse_up_raw(const boost::function< void()> & handler);
void on_middle_mouse_up_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_left_mouse_double_click_raw(const boost::function< void()> & handler);
void on_left_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_right_mouse_double_click_raw(const boost::function< void()> & handler);
void on_right_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_middle_mouse_double_click_raw(const boost::function< void()> & handler);
void on_middle_mouse_double_click_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_mouse_move_raw(const boost::function< void()> & handler);
void on_mouse_move_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_mouse_drag_raw(const boost::function< void()> & handler);
void on_mouse_drag_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_mouse_enter_raw(const boost::function< void()> & handler);
void on_mouse_enter_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_mouse_leave_raw(const boost::function< void()> & handler);
void on_mouse_leave_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_context_menu_raw(const boost::function< void()> & handler);
void on_context_menu_event_raw(const boost::function< void(mouse_event &)> & handler);
void on_mouse_wheel_raw(const boost::function< void()> & handler);
void on_mouse_wheel_event_raw(const boost::function< void(wheel_event &)> & handler);