|
HikoGUI
A low latency retained GUI
|
Topics | |
| Delegates | |
| Utilities | |
Files | |
| file | abstract_button_widget.hpp |
| Defines abstract_button_widget. | |
| file | async_widget.hpp |
| Defines async_widget. | |
| file | audio_device_widget.hpp |
| Defines audio_device_widget. | |
| file | checkbox_widget.hpp |
| Defines checkbox_widget. | |
| file | grid_widget.hpp |
| Defines grid_widget. | |
| file | icon_widget.hpp |
| Defines icon_widget. | |
| file | label_widget.hpp |
| Defines label_widget. | |
| file | menu_button_widget.hpp |
| Defines menu_button_widget. | |
| file | momentary_button_widget.hpp |
| Defines momentary_button_widget. | |
| file | overlay_widget.hpp |
| Defines overlay_widget. | |
| file | radio_widget.hpp |
| Defines radio_widget. | |
| file | scroll_aperture_widget.hpp |
| Defines scroll_aperture_widget. | |
| file | scroll_bar_widget.hpp |
| Defines scroll_bar_widget. | |
| file | scroll_widget.hpp |
| Defines scroll_widget. | |
| file | selection_widget.hpp |
| Defines selection_widget. | |
| file | spacer_widget.hpp |
| Defines spacer_widget. | |
| file | system_menu_widget.hpp |
| Defines system_menu_widget. | |
| file | tab_widget.hpp |
| Defines tab_widget. | |
| file | text_field_widget.hpp |
| Defines text_field_widget. | |
| file | text_widget.hpp |
| Defines text_widget. | |
| file | toggle_widget.hpp |
| Defines toggle_widget. | |
| file | toolbar_button_widget.hpp |
| Defines toolbar_button_widget. | |
| file | toolbar_tab_button_widget.hpp |
| Defines toolbar_tab_button_widget. | |
| file | toolbar_widget.hpp |
| Defines toolbar_widget. | |
| file | widget.hpp |
| Defines widget. | |
| file | window_controls_macos_widget.hpp |
| Defines window_controls_macos_widget. | |
| file | window_controls_win32_widget.hpp |
| Defines window_controls_win32_widget. | |
| file | window_widget.hpp |
| Defines window_widget. | |
| file | with_label_widget.hpp |
| Defines with_label_widget. | |
Data Structures | |
| class | hi::v1::abstract_button_widget |
| Base class for implementing button widgets. More... | |
| class | hi::v1::async_widget |
| A GUI widget that permits the user to make a binary choice. More... | |
| class | hi::v1::audio_device_widget |
| Audio device configuration widget. More... | |
| class | hi::v1::checkbox_widget |
| A GUI widget that permits the user to make a binary choice. More... | |
| class | hi::v1::grid_widget |
| A GUI widget that lays out child-widgets in a grid with variable sized cells. More... | |
| class | hi::v1::icon_widget |
| An simple GUI widget that displays an icon. More... | |
| class | hi::v1::label_widget |
| The GUI widget displays and lays out text together with an icon. More... | |
| class | hi::v1::menu_button_widget< ButtonWidget > |
| Add menu-button around a small-button. More... | |
| class | hi::v1::momentary_button_widget |
| A momentary button widget. More... | |
| class | hi::v1::overlay_widget |
| A GUI widget which may exist anywhere on a window overlaid above any other widget. More... | |
| class | hi::v1::scroll_aperture_widget |
| A scroll aperture widget. More... | |
| class | hi::v1::scroll_bar_widget< Axis > |
Scroll bar widget This widget is used in a pair of a vertical and horizontal scrollbar as a child of the scroll_widget. More... | |
| class | hi::v1::scroll_widget< Axis > |
| The scroll widget allows a content widget to be shown in less space than is required. More... | |
| class | hi::v1::selection_widget |
| A graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options. More... | |
| class | hi::v1::spacer_widget |
| This GUI widget is used as a spacer between other widget for layout purposes. More... | |
| class | hi::v1::system_menu_widget |
| The system menu widget. More... | |
| class | hi::v1::tab_widget |
| A graphical element that shows only one of a predefined set of mutually exclusive child widgets. More... | |
| class | hi::v1::text_field_widget |
| A single line text field. More... | |
| class | hi::v1::text_widget |
| A text widget. More... | |
| class | hi::v1::toggle_widget |
| A GUI widget that permits the user to make a binary choice. More... | |
| class | hi::v1::toolbar_button_widget |
| A momentary button used as a child in the toolbar. More... | |
| class | hi::v1::toolbar_tab_button_widget |
A graphical control element that allows the user to choose only one of a predefined set of mutually exclusive views of a tab_widget. More... | |
| class | hi::v1::toolbar_widget |
| A toolbar widget is located at the top of a window and lays out its children horizontally. More... | |
| class | hi::v1::widget |
| An interactive graphical object as part of the user-interface. More... | |
| class | hi::v1::window_controls_macos_widget |
| Window control button widget. More... | |
| class | hi::v1::window_controls_win32_widget |
| Window control button widget. More... | |
| class | hi::v1::window_widget |
| The top-level window widget. More... | |
| class | hi::v1::with_label_widget< ButtonWidget > |
| Add labels to a button. More... | |
Typedefs | |
| using | hi::v1::vertical_scroll_widget = scroll_widget<axis::vertical> |
| Vertical scroll widget. | |
| using | hi::v1::horizontal_scroll_widget = scroll_widget<axis::horizontal> |
| Horizontal scroll widget. | |
Graphical elements of interaction.
Widget are graphical elements which are shown inside a window and often can be interacted with using the mouse and keyboard, such as various kinds of buttons, text fields and selection boxes.
Many widgets such as the grid_widget, tab_widget, row_column_widget or the scroll_widget are containers for other widgets. The top level window_widget of a window for example contains two containers a grid_widget for the content area and a toolbar_widget for the toolbar at the top of the window.
In the example below we are adding 4 widgets to the content area of the window.
The gui_window::content() function returns a reference to the grid_widget, and we use its emplace<>() function to add new widgets. The template argument is the type of widget to instantiate and the first argument is the spreadsheet-like coordinate within the grid_widget. The rest of the arguments are passed to the constructor of the new widget.
There are often two different ways to construct a widget: with a delegate or with an observer. In the example above we use an observer<int> for the radio buttons to monitor and update. Sharing the same observer allows the radio buttons to act as a set.
Many widgets are controlled by a delegate, such as all the button widgets, the text_widget, text_field_widget, selection_widget and tab_widget.
For these widgets you may use their delegate's base class to implement your own delegate and pass a std::shared_ptr to the delegate to the constructor of that widget. For more information about delegates see: Delegates.
If instead you pass an observer to a widget's constructor, it will instantiate a default-delegate which uses the observer to control the widget.
An observer is a type that observes a value, it will use a callback to notify listeners when the observed value changes. For more information see: observer.
Observers are used for many member variables of a widget, including the hi::widget::enabled, hi::widget::visible members and various labels.
| using hi::v1::horizontal_scroll_widget = scroll_widget<axis::horizontal> |
Horizontal scroll widget.
A scroll widget that only scrolls horizontally.
| using hi::v1::vertical_scroll_widget = scroll_widget<axis::vertical> |
Vertical scroll widget.
A scroll widget that only scrolls vertically.