|
PNTK
|
#include <gui_widget.h>
Public Member Functions | |
| virtual void | init (bool visible=true) |
| virtual void | set_configuration (gui_configuration &configuration) |
| virtual gui_configuration | get_configuration () |
| virtual void | set_position (gui_point pos) |
| virtual void | set_actual_position (gui_point pos) |
| gui_point | get_position () |
| gui_point | get_actual_position () |
| gui_point | get_screen_position () |
| virtual void | set_size (gui_size size) |
| virtual void | set_actual_size (gui_size size) |
| virtual gui_size | get_size () |
| gui_size | get_actual_size () |
| virtual gui_size | get_min_size () |
| virtual gui_size | get_actual_min_size () |
| virtual void | show (bool state) |
| virtual bool | is_owned () |
| virtual void | set_border (int border) |
| virtual int | get_border () |
| virtual void | set_border_style (int style) |
| virtual int | get_border_style () |
| virtual void | set_weight (int weight) |
| virtual int | get_weight () |
| virtual void | set_alignment (int alignment) |
| virtual int | get_alignment () |
| virtual void | set_style (int style) |
| virtual int | get_style () |
| virtual void | set_font (gui_font *font) |
| virtual gui_font * | get_font () |
| virtual void | set_system_cursor (gui_system_cursors cursor) |
| virtual gui_widget * | get_parent () |
| gui_widget * | get_sibling (bool next) |
| gui_widget * | get_sequential (bool next, bool wrap=false) |
| virtual void | reparent (gui_widget *parent) |
| virtual bool | is_container () |
| virtual native_widget | get_native_widget () |
| virtual std::string | get_self_name () |
| virtual widget_types | get_self_type () |
| virtual void | set_bg_color (gui_color color) |
| virtual void | set_fg_color (gui_color color) |
| virtual gui_color | get_bg_color () |
| virtual gui_color | get_fg_color () |
| virtual void | set_label (const std::string &text) |
| virtual std::string | get_label () |
| virtual void | set_enabled (bool state) |
| virtual bool | get_enabled () |
| virtual bool | is_visible () |
| virtual bool | is_ok () |
| virtual void | refresh (int flags=0, const gui_rect *area=nullptr) |
| gui_extra_data & | get_extra_data () |
| virtual void | set_focus () |
| virtual bool | has_focus () |
| void | set_default () |
| gui_size | bound_by_requested (gui_size size) |
| void | feed_mouse (int base_event, int events, bool &veto, gui_point cursor, int button) |
| virtual void | set_tooltip (std::string label) |
| virtual std::string | get_tooltip () |
| virtual void | __internal_set_size (gui_size size, bool propagate_to_os=true) |
| virtual void | __internal_set_actual_size (gui_size size, bool propagate_to_os=true) |
| virtual void | __internal_set_os_actual (gui_size size) |
Public Member Functions inherited from pntk::gui_object | |
| void | set_data (void *user_data) |
| void * | get_data () |
| virtual void | connect (gui_event_listener *call_back, void *data=nullptr, bool managed=false) |
| virtual void | disconnect (gui_event_listener *call_back, void *data=nullptr) |
| pntk::gui_listener_chain * | __internal_disconnect (pntk::gui_listener_chain *matching_chain) |
Static Public Member Functions | |
| static void | get_widget_geometry (int alignment, gui_point base, gui_size max, gui_point &child_pos, gui_size &child_size) |
Public Attributes | |
| gui_font * | font |
| gui_system_cursors | system_cursor |
| gui_size | requested_size |
| gui_size | extent |
| gui_extra_data | extra_data |
Additional Inherited Members | |
Public Types inherited from pntk::gui_object | |
| typedef std::map< gui_object *, gui_listener_chain * > | event_map |
Static Public Attributes inherited from pntk::gui_object | |
| static event_map | windowing_events |
An abstract foundational widget from which all widgets must inherit.
Takes a size value and returns a version of that size that is within the minimum/maximum size requested by the user.
| void pntk::gui_widget::feed_mouse | ( | int | base_event, |
| int | events, | ||
| bool & | veto, | ||
| gui_point | cursor, | ||
| int | button | ||
| ) |
Feed raw mouse events into this function to automatically handle propogation of specific events.
|
virtual |
Returns minimum size of the widget (without any border padding).
Reimplemented in pntk::gui_graphic_listbox, pntk::gui_dataless_listbox, pntk::gui_notebook, pntk::gui_container, pntk::gui_combobox, pntk::gui_window, pntk::gui_sizer, pntk::gui_separator, and pntk::gui_canvas.
| gui_point pntk::gui_widget::get_actual_position | ( | ) |
Returns the position of the widget within its container (ignoring all border padding).
| gui_size pntk::gui_widget::get_actual_size | ( | ) |
Returns the extent of the widget (ignoring the border padding).
|
virtual |
Returns the alignment value of the widget.
|
virtual |
Returns the widgets background color.
|
virtual |
Returns the border/padding size of the widget.
|
virtual |
Returns the current border style of the widget.
Reimplemented in pntk::gui_sizer.
|
virtual |
Returns if the widget is enabled.
| gui_extra_data& pntk::gui_widget::get_extra_data | ( | ) |
Returns a gui_extra_data structure for this widget.
|
virtual |
Returns the widgets foreground color.
|
virtual |
Returns the widgets font.
|
virtual |
Returns the text on the label of the widget.
Reimplemented in pntk::gui_window, pntk::gui_tool, pntk::gui_radiobutton, pntk::gui_togglebutton, pntk::gui_frame, pntk::gui_label, pntk::gui_button, and pntk::gui_checkbox.
|
virtual |
Returns minimum size of the widget (including all border padding).
Reimplemented in pntk::gui_sizer, and pntk::gui_custom.
|
virtual |
Returns the underlaying native widget implementation.
|
virtual |
Returns the widgets parent if it has one.
| gui_point pntk::gui_widget::get_position | ( | ) |
Returns the position of the widget within its container (including all border padding).
| gui_point pntk::gui_widget::get_screen_position | ( | ) |
Returns the position of the widget within the screen.
|
virtual |
Returns the human readable name associated with the widget class type.
Reimplemented in pntk::gui_graphic_listbox, pntk::gui_dataless_listbox, pntk::gui_notebook, pntk::gui_container, pntk::gui_combobox, pntk::gui_sizer, pntk::gui_window, pntk::gui_spacer, pntk::gui_separator, and pntk::gui_canvas.
|
virtual |
Returns the type of widget: GUI_TYPE_WIDGET.
Reimplemented in pntk::gui_graphic_listbox, pntk::gui_dataless_listbox, pntk::gui_notebook, pntk::gui_container, pntk::gui_combobox, pntk::gui_sizer, pntk::gui_window, pntk::gui_spacer, pntk::gui_separator, and pntk::gui_canvas.
| gui_widget* pntk::gui_widget::get_sequential | ( | bool | next, |
| bool | wrap = false |
||
| ) |
Returns the next/previous (based on next) widget from the sequence of them in the window if there is one. Specify true for wrap to wrap around and thus always return a value.
| gui_widget* pntk::gui_widget::get_sibling | ( | bool | next | ) |
Returns the widgets next/previous sibling if it has one.
|
virtual |
Returns the extent of the widget (including all border padding).
Reimplemented in pntk::gui_container, and pntk::gui_sizer.
|
virtual |
Returns the widgets style flag.
|
virtual |
Returns the widgets weight/scale factor.
|
static |
Calculates the width, height, and position of the given alignment, the offset as base, the @ max size, the current child_pos and then minimum child_size.
|
virtual |
Returns a boolean that indicates if this widget has the keyboard focus.
Reimplemented in pntk::gui_graphic_listbox, pntk::gui_dataless_listbox, and pntk::gui_notebook.
|
virtual |
Initializes the widget, setting default values to its members.
Reimplemented in pntk::gui_sizer.
|
virtual |
Returns whether or not this widget is a container, or subclassed from container.
Reimplemented in pntk::gui_container.
|
virtual |
Returns a boolean that represents the state of the internal native widget. If the native widget is instantiated correctly, this is true, false otherwise.
|
virtual |
Returns whether or not the widget has a parent.
|
virtual |
Returns if the widget is visible.
|
virtual |
Forces the window to repaint.
Reimplemented in pntk::gui_custom.
|
virtual |
Removed the widget from its current parent container and puts it in the given parent container with the same alignment and size requests.
|
virtual |
Sets the position (top left corner) of the widget (ignoring all border padding) within its container to the given pos.
|
virtual |
Sets the extent of the widget (not counting the border padding) to the given size.
Reimplemented in pntk::gui_container, and pntk::gui_window.
|
virtual |
Sets the widgets alignment (if it has a parent) to the given alignment value. Alignments include GUI_ALIGN_RIGHT, GUI_ALIGN_LEFT, GUI_ALIGN_TOP, GUI_ALIGN_BOTTOM, GUI_ALIGN_CENTER_H, GUI_ALIGN_CENTER_V, GUI_EXPAND_H, GUI_EXPAND_V
|
virtual |
Sets the widgets background to the given color.
Reimplemented in pntk::gui_graphic_listbox, and pntk::gui_dataless_listbox.
|
virtual |
Sets the border/padding size of the widget.
|
virtual |
Sets the border/padding style of the widget. Styles include GUI_BORDER_NONE, GUI_BORDER_TOP, GUI_BORDER_BOTTOM, GUI_BORDER_LEFT, GUI_BORDER_RIGHT, GUI_BORDER_ALL
| void pntk::gui_widget::set_default | ( | ) |
Sets this widget as the default widget that is activated when the user presses Enter on the window.
|
virtual |
Sets enabled state of the widget to the given state
|
virtual |
Sets the widgets foreground to the given color.
Reimplemented in pntk::gui_graphic_listbox, and pntk::gui_dataless_listbox.
|
virtual |
Sets the keyboard focus to this widget if it is a focusable widget.
Reimplemented in pntk::gui_graphic_listbox, pntk::gui_dataless_listbox, and pntk::gui_notebook.
|
virtual |
Sets the widgets font.
Reimplemented in pntk::gui_custom.
|
virtual |
Changes the text on the label of the widget.
Reimplemented in pntk::gui_window, pntk::gui_tool, pntk::gui_radiobutton, pntk::gui_togglebutton, pntk::gui_frame, pntk::gui_label, pntk::gui_button, and pntk::gui_checkbox.
|
virtual |
Sets the position (top left corner) of the widget (including all border padding) within its container to the given pos.
Reimplemented in pntk::gui_window.
|
virtual |
Sets the extent of the widget (including all border padding) to the given size.
|
virtual |
Sets the widgets style flag to the give style
Reimplemented in pntk::gui_textbox, pntk::gui_radiobutton, pntk::gui_label, pntk::gui_checkbox, pntk::gui_listbox, pntk::gui_togglebutton, pntk::gui_check_listbox, and pntk::gui_combobox.
|
virtual |
Sets the widgets system cursor.
|
virtual |
Sets the widgets weight/scale factor (if it has a parent) to the given weight
|
virtual |
Sets visibility of the widget to the given state
1.8.15