|
LibCXXW 0.32.1
LibCXX Widget Toolkit
|
LibCXXW library namespace. More...
Namespaces | |
| namespace | fontconfig |
| namespace | metrics |
| The metrics namespace defines rules for computing a widget's size. | |
| namespace | ui |
Classes | |
| struct | alert_message_config |
| Optional parameters for a main window's alert_message(). More... | |
| struct | all_key_events_is_not_copyable |
| all_key_events_t is not copyable. More... | |
| class | always_visible_elementObj |
| A mixin for an always-visible widget implementation object. More... | |
| class | always_visibleObj |
| A mixin for an always-visible container implementation object. More... | |
| struct | appearance_wrapper |
| A wrapper for an appearance object. More... | |
| class | appearanceObj |
| Implementation object. More... | |
| class | background_color_1elementObj |
| Attach one background color mixin. More... | |
| class | background_color_element |
| Helper class for using tags to attach multiple background color objects to elements. More... | |
| class | background_color_element_implObj |
| Attach a tag to a background_colorObj. More... | |
| class | background_colorObj |
| An abstract handle for a "background colors". More... | |
| struct | background_colors_element_types |
| struct | background_colors_element_types< base, arg > |
| Helper template used by background_color_elementObj. More... | |
| struct | background_colors_element_types< base, arg1, arg2, args... > |
| Helper template used by background_color_elementObj. More... | |
| class | book_appearance_base |
| Base class for a book appearance specification. More... | |
| struct | book_appearance_properties |
| Actual properties inherited by x::w::book_appearance. More... | |
| class | book_appearanceObj |
| Implementation object. More... | |
| class | book_lock |
| Lock the book layout manager. More... | |
| struct | book_status_info_t |
| Parameters passed to a book layout manager's on_opened() callback. More... | |
| class | booklayoutmanagerObj |
| Implementation object. More... | |
| class | bookpage_appearance_base |
| Base class for a bookpage appearance specification. More... | |
| struct | bookpage_appearance_properties |
| Actual properties inherited by x::w::bookpage_appearance. More... | |
| class | bookpage_appearanceObj |
| Implementation object. More... | |
| class | bookpagefactoryObj |
| Implementation object. More... | |
| class | border_impl_base |
| Base class for border implementation objects. More... | |
| class | border_implObj |
| A border implementation. More... | |
| struct | border_info |
| The type of a border. More... | |
| struct | border_infomm |
| A border of an widget in a grid. More... | |
| class | bordercontainer_elementObj |
| A mixin for inheriting from a widget, and a bordercontainer_implObj. More... | |
| class | bordercontainer_implObj |
| A mixin for a container that uses the border layout manager. More... | |
| class | borderlayoutmanagerObj |
| Implementation object. More... | |
| class | busy |
| Factory for busy mcguffins. More... | |
| class | button_appearance_base |
| Base class for a button appearance specification. More... | |
| struct | button_appearance_properties |
| Actual properties inherited by x::w::button_appearance. More... | |
| class | button_appearanceObj |
| Implementation object. More... | |
| struct | button_config |
| Button configuration. More... | |
| class | button_event |
| A pointer button event. More... | |
| class | buttonObj |
| Button implementation object. More... | |
| struct | callback_trigger_is_not_copyable |
| callback_trigger_t is not copyable. More... | |
| struct | canvas_config |
| Canvas options. More... | |
| struct | canvas_init_params |
| Additional parameters to the canvas implementation object. More... | |
| class | canvasObj |
| An empty widget, perhaps with a background color. More... | |
| struct | child_element_init_params |
| Additional constructor parameters. More... | |
| class | child_elementObj |
| An element that has a parent widget. More... | |
| class | clip_region_set |
| Clip drawing operation to draw_info.element_viewport. More... | |
| class | color_picker_appearance_base |
| Base class for a color_picker appearance specification. More... | |
| struct | color_picker_appearance_properties |
| Actual properties inherited by x::w::color_picker_appearance. More... | |
| class | color_picker_appearanceObj |
| Implementation object. More... | |
| struct | color_picker_config |
| Initial color picker configuration. More... | |
| struct | color_picker_config_appearance |
| Wrapper for input field appearance. More... | |
| class | color_pickerObj |
| Implementation object. More... | |
| class | combobox_appearance_base |
| Base class for a combobox appearance object. More... | |
| struct | combobox_appearance_properties |
| Actual properties inherited by x::w::combobox_appearance. More... | |
| class | combobox_appearanceObj |
| Implementation object. More... | |
| class | composite_text_stream |
| Output of font's glyphs_to_stream(). More... | |
| class | connectionBase |
| Base class for display server connections. More... | |
| class | connectionObj |
| A connection to the server. More... | |
| class | const_input_lock |
| Lock on a constant input field. More... | |
| class | const_list_lock |
| Lock the list layout manager. More... | |
| class | const_standard_combobox_lock |
| Block all other threads from making changes to this combo-box. More... | |
| class | container_elementObj |
| A mixin for inheriting from a widget and a containerObj::implObj. More... | |
| class | container_visible_elementObj |
| Make the whole container visible, not just its child widget. More... | |
| class | containerObj |
| Methods common to all display containers. More... | |
| class | containers_2_recalculate_map |
| class | copy_cut_paste_menu_itemsObj |
| Implementation object. More... | |
| struct | create_dialog_args |
| An additional parameter for create_dialog() and create_custom_dialog(). More... | |
| class | current_border_implObj |
| A current border. More... | |
| class | current_fontcollectionObj |
| A current collection of fonts. More... | |
| struct | custom_combobox_selection_changed_info_t |
| Information passed to the custom combo-box selection changed callback. More... | |
| struct | custom_combobox_selection_search_info_t |
| Information passed to the custom combo-box selection search callback. More... | |
| class | custom_comboboxlayoutmanagerObj |
| Custom combo-box layout manager object. More... | |
| struct | cut_copy_paste |
| Placeholder for a cut/copy/paste event. More... | |
| class | date_input_field_appearance_base |
| Base class for a date_input_field appearance specification. More... | |
| struct | date_input_field_appearance_properties |
| Actual properties inherited by x::w::date_input_field_appearance. More... | |
| class | date_input_field_appearanceObj |
| Implementation object. More... | |
| struct | date_input_field_config |
| Custom visual appearance of a date input field. More... | |
| class | date_input_fieldObj |
| Implementation object. More... | |
| struct | default_new_value_function |
| class | delayed_input_focusObj |
| Implementation object. More... | |
| struct | detect_input_field_string_validation_function |
| Helper for the input_field_string_validation_function concept. More... | |
| class | dialogObj |
| Implementation object. More... | |
| struct | dim_arg |
| A dimension specification. More... | |
| struct | dim_arg_string_init |
| Helper class for constructing a dim_arg from a char string. More... | |
| struct | dim_axis_arg |
| Horizontal/vertical axis dimensions. More... | |
| class | dim_base |
| Tag used by dim_t. More... | |
| struct | draw_info |
| Information that's needed to draw an widget. More... | |
| class | drawableObj |
| A drawable object. More... | |
| struct | editable_combobox_selection_changed_info_t |
| Information passed to the editable combo-box selection changed callback. More... | |
| class | editable_comboboxlayoutmanagerObj |
| Implementation object. More... | |
| class | element_drawObj |
| Scratch buffer-based widget draw interface. More... | |
| class | element_popup_appearance_base |
| Base class for a element_popup appearance specification. More... | |
| struct | element_popup_appearance_properties |
| Actual properties inherited by x::w::element_popup_appearance. More... | |
| class | element_popup_appearanceObj |
| Implementation object. More... | |
| struct | element_state |
| Information passed to a widget's state update callback. More... | |
| struct | element_visibility_t |
| What we want for ensure_visibility() to accomplish. More... | |
| class | elementObj |
| Methods common to all widgets. More... | |
| struct | end_hotspot |
| A placeholder that marks the end of a hotspot. More... | |
| class | factoryObj |
| A factory of widgets. More... | |
| class | file_dialog_appearance_base |
| Base class for a file dialog appearance specification. More... | |
| struct | file_dialog_appearance_properties |
| Actual properties inherited by x::w::file_dialog_appearance. More... | |
| class | file_dialog_appearanceObj |
| Implementation object. More... | |
| struct | file_dialog_config |
| The configuration of a file dialog. More... | |
| class | file_dialogObj |
| Implementation object. More... | |
| class | focus_border_appearance_base |
| Base class for a focus_border appearance specification. More... | |
| struct | focus_border_appearance_properties |
| Actual properties inherited by x::w::focus_border_appearance. More... | |
| class | focus_border_appearanceObj |
| Implementation object. More... | |
| class | focusable_container_ownerObj |
| A focusable container that owns its focusable implementation. More... | |
| class | focusable_containerObj |
| A focusable widget that's implemented as an internal container. More... | |
| class | focusable_elementObj |
| A mixin for inherting from a widget, and a focusableObj::implObj. More... | |
| struct | focusable_label_config |
| Focusable label configuration. More... | |
| class | focusable_labelObj |
| Implementation object. More... | |
| class | focusableObj |
| Methods common to all widgets that can receive input focus. More... | |
| class | focusframecontainer_elementObj |
| A mixin for inheriting from a widget, and a focusframecontainer_implObj. More... | |
| class | focusframecontainer_implObj |
| A mixin for a container that uses the focus frame layout manager. More... | |
| struct | font |
| A font specification. More... | |
| class | font_picker_appearance_base |
| Base class for a font_picker appearance specification. More... | |
| struct | font_picker_appearance_properties |
| Actual properties inherited by x::w::font_picker_appearance. More... | |
| class | font_picker_appearanceObj |
| Implementation object. More... | |
| struct | font_picker_config |
| struct | font_picker_config_appearance |
The appearance member inherited by font_picker_config. More... | |
| struct | font_picker_config_settings |
| Initial font picker configuration. More... | |
| struct | font_picker_group_id |
| Font picker grouping. More... | |
| class | font_pickerObj |
| Implementation object. More... | |
| class | fontcollectionObj |
| A collection of fonts. More... | |
| class | frame_appearance_base |
| Base class for a frame appearance specification. More... | |
| struct | frame_appearance_properties |
| Actual properties inherited by x::w::frame_appearance. More... | |
| class | frame_appearanceObj |
| Implementation object. More... | |
| class | freetypefontObj |
| An actual discrete font opened via the freetype library. More... | |
| class | gcBase |
| Base class for graphic contexts. More... | |
| class | gcObj |
| A graphic context. More... | |
| class | generic_window_appearance_base |
| Base class for a generic_window appearance specification. More... | |
| struct | generic_window_appearance_properties |
| Actual properties inherited by x::w::generic_window_appearance. More... | |
| class | generic_window_appearanceObj |
| Implementation object. More... | |
| class | generic_windowBase |
| Base class for generic windows. More... | |
| class | generic_windowObj |
| Generic window facilities. More... | |
| struct | get_new_items |
| Save handles for new items. More... | |
| class | get_window_handlerObj |
| Common superclass for objects that implement get_window_handler() More... | |
| class | gridfactoryObj |
| Implement a factory for the grid layout manager. More... | |
| class | gridlayoutmanagerObj |
| The grid layout manager. More... | |
| struct | hierindent |
| Indentation level. More... | |
| class | hotspot_bgcolorObj |
| Methods common to all widgets that change background color when activated. More... | |
| class | hotspotObj |
| Methods common to all widgets that can be activated. More... | |
| struct | hotspots_create |
| create_richtextstring: hotspots are allowed More... | |
| struct | hotspots_none |
| create_richtextstring: no hotspots are allowed More... | |
| struct | hotspots_update |
| create_richtextstring: updating an existing hotspot More... | |
| class | iconObj |
| An instantiated icon. More... | |
| class | image_button_appearance_base |
| Base class for a image_button appearance specification. More... | |
| struct | image_button_appearance_properties |
| Actual properties inherited by x::w::image_button_appearance. More... | |
| class | image_button_appearanceObj |
| Implementation object. More... | |
| class | image_buttonObj |
| A loaded image_button. More... | |
| struct | image_color |
| An image-based color specification. More... | |
| struct | image_param |
| A list item that's an image. More... | |
| class | imageObj |
| A loaded image. More... | |
| class | inactive_shortcut |
| Inactive shortcut. More... | |
| struct | initial |
| Placeholder for an initial callback. More... | |
| struct | input_autocomplete_info_t |
| Information passed to the input_field's on_autocomplete() callback. More... | |
| struct | input_change_info_t |
| Information passed to the input_field's on_changed() callback. More... | |
| struct | input_dialog_ok_args |
| Parameter passed to standard input dialog's ok callback. More... | |
| class | input_dialogObj |
| Implementation object. More... | |
| class | input_field_appearance_base |
| Base class for a input_field appearance specification. More... | |
| struct | input_field_appearance_properties |
| Actual properties inherited by x::w::input_field_appearance. More... | |
| class | input_field_appearanceObj |
| Implementation object. More... | |
| struct | input_field_config |
| The configuration of an input field. More... | |
| struct | input_field_config_appearance |
| Wrapper for input field appearance. More... | |
| class | input_field_detect_validator_functor_parameter |
| Determine the type of the first parameter to an input_field validator. More... | |
| class | input_field_detect_validator_functor_parameter< validator_functor, std::void_t< decltype(std::declval< validator_functor && >()(std::declval< THREAD_CALLBACK >(), std::declval< const std::string & >(), std::declval< input_lock & >(), std::declval< const callback_trigger_t & >()))> > |
Specialization: the input field validator takes a std::string parameter. More... | |
| class | input_field_detect_validator_functor_parameter< validator_functor, std::void_t< decltype(std::declval< validator_functor && >()(std::declval< THREAD_CALLBACK >(), std::declval< const std::u32string & >(), std::declval< input_lock & >(), std::declval< const callback_trigger_t & >()))> > |
Specialization: the input field validator takes a std::u32string parameter. More... | |
| struct | input_field_filter_info |
| Parameter to the input field filter callback. More... | |
| class | input_field_get_for_validator |
| Determine the first parameter to an input field validator. More... | |
| class | input_field_get_for_validator< std::string > |
Specialization: the input field validator takes a std::string parameter. More... | |
| class | input_field_get_for_validator< std::u32string > |
Specialization: the input field validator takes a std::u32string parameter. More... | |
| struct | input_field_search_info |
| Parameter to the search callback. More... | |
| class | input_field_setObj |
| Common methods employed by input fields and editable combo-boxes. More... | |
| class | input_field_validator_ret_t |
| Determine the value returned by the input field validator. More... | |
| class | input_field_validator_ret_t< std::optional< type > > |
The input field validator must return a std::optional. More... | |
| class | input_fieldObj |
| A text input_field object. More... | |
| class | input_lock |
| Lock the input field in order to access its contents. More... | |
| class | input_mask |
| Key and button mask. More... | |
| struct | internal_focusable_group |
| struct | is_numeric_or_string |
| Determine the appropriate variant index of dim_arg's constructor. More... | |
| struct | is_numeric_or_string< T, std::enable_if_t< is_numeric_type< T >::is_specialized > > |
| Specialization for constructing a dim_arg for a numeric value. More... | |
| struct | is_numeric_or_string< T, std::void_t< decltype(dim_arg_string_init{std::declval< T && >()})> > |
| Specialization for constructing a dim_arg for a string name. More... | |
| struct | is_numeric_type |
| Helper for avoiding ill-formed usage of numeric_limits with arrays. More... | |
| struct | is_numeric_type< T[n]> |
| Array types are not basic numeric values. More... | |
| class | item_button_appearance_base |
| Base class for a item_button appearance specification. More... | |
| struct | item_button_appearance_properties |
| Actual properties inherited by x::w::item_button_appearance. More... | |
| class | item_button_appearanceObj |
| Implementation object. More... | |
| class | item_layout_appearance_base |
| Base class for a item_layout appearance specification. More... | |
| struct | item_layout_appearance_properties |
| Actual properties inherited by x::w::item_layout_appearance. More... | |
| class | item_layout_appearanceObj |
| Implementation object. More... | |
| class | itemlayout_lock |
| Acquire a lock on the items managed by the layout manager. More... | |
| class | itemlayoutmanagerObj |
| Implementation object. More... | |
| class | key_event |
| Parsed information about a key press or release event. More... | |
| struct | keyfocus_move |
| Placeholder for a forced keyboard focus move. More... | |
| struct | label_config |
| Optional custom configuration parameters for a label widget. More... | |
| class | labelObj |
| A text label. More... | |
| class | layoutmanagerObj |
| Methods common to all layout managers. More... | |
| struct | linear_gradient |
| A linear gradient for a widget's background color. More... | |
| struct | linear_gradient_values |
| Values of a linear gradient. More... | |
| class | list_appearance_base |
| Base class for a list appearance object. More... | |
| struct | list_appearance_properties |
| Actual properties inherited by x::w::list_appearance. More... | |
| class | list_appearanceObj |
| Implementation object. More... | |
| struct | list_item_param |
| New list item parameter. More... | |
| struct | list_item_status_info_t |
| Parameters passed to a list item status change callback. More... | |
| class | list_lock |
| Lock the list layout manager. More... | |
| class | listitemhandleObj |
| Implementation object. More... | |
| class | listlayoutmanagerObj |
| Implementation object. More... | |
| class | main_window_appearance_base |
| Base class for a main_window appearance specification. More... | |
| struct | main_window_appearance_properties |
| Actual properties inherited by x::w::main_window_appearance. More... | |
| class | main_window_appearanceObj |
| Implementation object. More... | |
| struct | main_window_config |
| Optional configuration of a main application window. More... | |
| struct | main_window_position |
| class | main_windowBase |
| Base class for main application windows. More... | |
| class | main_windowObj |
| Main application window. More... | |
| class | menubarfactoryObj |
| Implementation object. More... | |
| class | menubarlayoutmanagerObj |
| Implementation object. More... | |
| class | menuObj |
| Implementation object. More... | |
| struct | menuoption |
| This is a selectable menu option. More... | |
| class | motion_event |
| A motion event. More... | |
| struct | named_element_factory |
| class | new_booklayoutmanager |
| Create a new container with a book layout manager. More... | |
| class | new_borderlayoutmanager |
| class | new_custom_comboboxlayoutmanager |
| class | new_editable_comboboxlayoutmanager |
| class | new_focusable_layoutmanager |
| A new focusable layout manager. More... | |
| class | new_gridlayoutmanager |
| Create a new container with a grid layout manager. More... | |
| class | new_itemlayoutmanager |
| struct | new_items_ret |
| Saved handles for new items. More... | |
| class | new_layoutmanager |
| A new layout manager. More... | |
| class | new_list_or_combobox_layoutmanager |
| class | new_listlayoutmanager |
| class | new_pagelayoutmanager |
| Create a new container that uses the page layout manager. More... | |
| class | new_panelayoutmanager |
| Create a new container with a pane layout manager. More... | |
| class | new_peepholelayoutmanager |
| Create a new container that uses the peephole layout manager. More... | |
| class | new_scrollable_peepholelayoutmanager |
| Create a new container that uses the peephole layout manager, with provided scroll-bars. More... | |
| class | new_standard_comboboxlayoutmanager |
| class | new_tablelayoutmanager |
| class | new_toolboxlayoutmanager |
| Create a container that uses the toolbox layout manager. More... | |
| struct | next_key |
| Placeholder for an tab key. More... | |
| class | nonrecursive_visibilityObj |
| An widget that does not implement recursive visibility changes. More... | |
| struct | ok_cancel_callback_args |
| Parameters passed to the ok/cancel callback of a standard dialog. More... | |
| class | page_lock |
| A lock on the contents of the page layout manager. More... | |
| class | pagefactoryObj |
| Implementation object. More... | |
| class | pagelayoutmanagerObj |
| Implementation object. More... | |
| class | pane_appearance_base |
| Base class for a pane appearance specification. More... | |
| struct | pane_appearance_properties |
| Actual properties inherited by x::w::pane_appearance. More... | |
| class | pane_appearanceObj |
| Implementation object. More... | |
| class | pane_layout_appearance_base |
| Base class for a pane layout appearance specification. More... | |
| struct | pane_layout_appearance_properties |
| Actual properties inherited by x::w::pane_layout_appearance. More... | |
| class | pane_layout_appearanceObj |
| Implementation object. More... | |
| class | panefactoryObj |
| Implementation object. More... | |
| class | panelayoutmanagerObj |
| Implementation object. More... | |
| class | peephole_appearance_base |
| Base class for a peephole appearance specification. More... | |
| struct | peephole_appearance_properties |
| Actual properties inherited by x::w::peephole_appearance. More... | |
| class | peephole_appearanceObj |
| Implementation object. More... | |
| struct | peephole_style |
| Peephole style. More... | |
| class | peepholed_focusableObj |
| A focusable in a peephole. More... | |
| class | peepholelayoutmanagerObj |
| Implementation object. More... | |
| struct | pictform_s |
| Rendering type. More... | |
| class | pictformatObj |
| Available picture formats. More... | |
| class | pictureBase |
| Base class of pictures. More... | |
| class | pictureObj |
| A picture object. More... | |
| class | pixmap_with_pictureObj |
| Implementation object. More... | |
| class | pixmapObj |
| Generic window facilities. More... | |
| struct | pointerfocus_move |
| Placeholder for a forced pointer focus move. More... | |
| class | popup_list_appearance_base |
| Base class for a popup list appearance object. More... | |
| struct | popup_list_appearance_properties |
| Actual properties inherited by x::w::popup_list_appearance. More... | |
| class | popup_list_appearanceObj |
| Implementation object. More... | |
| class | popupObj |
| A popup "public" object. More... | |
| struct | prev_key |
| Placeholder for an back-tab key. More... | |
| struct | print_callback_info |
| Parameter passed to the print dialog's callback. More... | |
| class | print_dialog_appearance_base |
| Base class for a print_dialog appearance specification. More... | |
| struct | print_dialog_appearance_properties |
| Actual properties inherited by x::w::print_dialog_appearance. More... | |
| class | print_dialog_appearanceObj |
| Implementation object. More... | |
| struct | print_dialog_config |
| The configuration of a print dialog. More... | |
| struct | print_dialog_config_appearance |
| Wrapper for the print dialog's appearance. More... | |
| struct | print_dialog_config_settings |
| Print dialog configuration's basic settings. More... | |
| class | print_dialogObj |
| Implementation object. More... | |
| class | progressbar_appearance_base |
| Base class for a progressbar appearance specification. More... | |
| struct | progressbar_appearance_properties |
| Actual properties inherited by x::w::progressbar_appearance. More... | |
| class | progressbar_appearanceObj |
| Implementation object. More... | |
| struct | progressbar_config |
| Progress bar configuration. More... | |
| class | progressbarObj |
| Implementation object. More... | |
| struct | radial_gradient |
| A radial gradient for a widget's background color. More... | |
| struct | radial_gradient_values |
| Values of a radial gradient. More... | |
| struct | rectangle |
| A rectangle, pretty much it. More... | |
| class | rectangle_hash |
| A hash for rectangle structures. More... | |
| class | rgb |
| RGB color, with an alpha channel. More... | |
| struct | richtext_options |
| Options for a new richtext object. More... | |
| class | richtextcursorlocationownerObj |
| Implementation object. More... | |
| class | richtextiteratorObj |
| Rich text iterator implementation object. More... | |
| class | richtextmeta |
| Metadata for each consecutive range of characters in some text, somewhere. More... | |
| class | richtextObj |
| A rich text object. More... | |
| class | richtextstring |
| A unicode string, marked up by a richtextmeta. More... | |
| class | scratch_and_mask_buffer_draw |
| class | scratch_and_mask_buffer_draw_impl |
| Implementation class for scratch_and_mask_buffer_draw. More... | |
| class | scratch_buffer_draw |
| class | scratch_buffer_draw_impl |
| Implementation class for scratch_buffer_draw. More... | |
| class | scratch_bufferObj |
| A shared picture object. More... | |
| class | screen_positionsBase |
| Base class for screen_positions. More... | |
| class | screen_positionsObj |
| Implementation object. More... | |
| class | screenBase |
| Base class for screens. More... | |
| class | screenObj |
| A screen on the display server. More... | |
| class | scrollbar_appearance_base |
| Base class for a scrollbar appearance specification. More... | |
| struct | scrollbar_appearance_properties |
| Actual properties inherited by x::w::scrollbar_appearance. More... | |
| class | scrollbar_appearanceObj |
| Implementation object. More... | |
| struct | scrollbar_config |
| Scroll-Bar's initial configuration. More... | |
| class | scrollbar_images_appearance_base |
| Base class for a scrollbar_images appearance specification. More... | |
| struct | scrollbar_images_appearance_properties |
| Actual properties inherited by x::w::scrollbar_images_appearance. More... | |
| class | scrollbar_images_appearanceObj |
| Implementation object. More... | |
| struct | scrollbar_info_t |
| Information passed to scroll-bar callbacks. More... | |
| class | scrollbarObj |
| Implementaiton object. More... | |
| struct | selected |
| This list item is initially selected. More... | |
| struct | separator |
| This is a separator. More... | |
| class | shortcut |
| A keyboard shortcut for a hotspot. More... | |
| class | singletonlayoutmanagerObj |
| Implementation object. More... | |
| class | splash_window_config |
| Create a splash window instead of a regular main_window. More... | |
| class | standard_combobox_lock |
| Block all other threads from making changes to this combo-box. More... | |
| struct | standard_combobox_selection_changed_info_t |
| Information passed to the standard combo-box selection changed callback. More... | |
| class | standard_comboboxlayoutmanagerObj |
| Standard combo-box layout manager object. More... | |
| struct | standard_dialog_args |
| Parameters for a new dialog. More... | |
| struct | start_hotspot |
| A placeholder that marks the beginning of a hotspot. More... | |
| struct | static_tooltip_config |
| Optional settings for a static tooltip. More... | |
| struct | stop_message_config |
| Optional parameters for a main window's stop_message(). More... | |
| struct | submenu |
| This is a menu item entry for a sub menu. More... | |
| struct | submenu_appearance |
| A superclass of submenu that holds the submenu's appearance. More... | |
| struct | submenu_creator |
| A superclass of submenu that holds the creator callback. More... | |
| class | synchronized_axisObj |
| Implementation object. More... | |
| class | table_appearance_base |
| Base class for a table appearance specification. More... | |
| struct | table_appearance_properties |
| Actual properties inherited by x::w::table_appearance. More... | |
| class | table_appearanceObj |
| Implementation object. More... | |
| class | tablelayoutmanagerObj |
| Implementation object. More... | |
| class | text_param |
| A text parameter for a new widget. More... | |
| class | textlabelObj |
| A text label interface. More... | |
| struct | theme_color |
| A distinct type for a name of a color specified by the current theme. More... | |
| struct | theme_font |
| A distinct type for a name of a font specified by the current theme. More... | |
| class | theme_font_1elementObj |
| One tagged theme font. More... | |
| struct | theme_font_element_types |
| struct | theme_font_element_types< base, arg > |
| Helper template used by theme_font_elementObj. More... | |
| struct | theme_font_element_types< base, arg1, arg2, args... > |
| Helper template used by theme_font_elementObj. More... | |
| class | theme_font_tag |
| Attach a tag to a theme_fontObj. More... | |
| class | theme_fontObj |
| A mixin for attaching a theme-based font to a widget. More... | |
| struct | theme_option |
| Screen themes have options. More... | |
| struct | theme_text |
| class | themeborder1_elementObj |
| One themeborder_element instance mixin. More... | |
| class | themeborder_element_impl |
| Attach a tag to a themeborder_element_implObj. More... | |
| class | themeborder_element_implObj |
| Mixin for a current_border_impl used by a widget. More... | |
| struct | themeborder_element_types |
| Helper template used by themeborder_elementObj. More... | |
| struct | themeborder_element_types< base, arg > |
| Helper template used by themeborder_elementObj. More... | |
| struct | themeborder_element_types< base, arg1, arg2, args... > |
| Helper template used by themeborder_elementObj. More... | |
| class | themedim_axis_heightObj |
| Vertical metrics axis specification mixin. More... | |
| class | themedim_axis_widthObj |
| Horizontal metrics axis specification mixin. More... | |
| class | themedim_element |
| Attach a tag to a themedimObj. More... | |
| class | themedimObj |
| A theme-specified dimension. More... | |
| class | themedims_elementObj |
| Multiply inherit from the element and all themedims_elements. More... | |
| struct | themedims_elements |
| class | toolboxfactoryObj |
| Implementation object. More... | |
| class | toolboxlayoutmanagerObj |
| Implementation object. More... | |
| class | tooltip_appearance_base |
| Base class for a tooltip appearance specification. More... | |
| struct | tooltip_appearance_properties |
| Actual properties inherited by x::w::tooltip_appearance. More... | |
| class | tooltip_appearanceObj |
| Implementation object. More... | |
| class | tooltip_border_appearance_base |
| Base class for a tooltip_border appearance specification. More... | |
| struct | tooltip_border_appearance_properties |
| Actual properties inherited by x::w::tooltip_border_appearance. More... | |
| class | tooltip_border_appearanceObj |
| Implementation object. More... | |
| class | tooltip_factory |
| class | transparent_splash_window_config |
| Creates a splash window with a rounded border. More... | |
| class | types_base |
| Base class for custom types. More... | |
| struct | uielements |
| class | uigeneratorsBase |
| Base class for parsed UI generators. More... | |
| class | uigeneratorsObj |
| Implementation object. More... | |
| struct | updated_position_info |
| Extra parameter to process_updated_position() More... | |
| struct | updated_position_move_info |
| struct | user_mod |
| Placeholder for a user modify event. More... | |
| class | valid_add_op |
| class | valid_add_op< coord_squared_t, dim_squared_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< coord_squared_t, dim_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< coord_t, coord_t > |
| Adding a coordinate to a coordinate. More... | |
| class | valid_add_op< coord_t, dim_squared_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< coord_t, dim_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< dim_squared_t, coord_squared_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< dim_squared_t, coord_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< dim_squared_t, dim_squared_t > |
| Adding dimensions together. More... | |
| class | valid_add_op< dim_squared_t, dim_t > |
| Adding dimensions together. More... | |
| class | valid_add_op< dim_t, coord_squared_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< dim_t, coord_t > |
| Adding a dimension to a coordinate. More... | |
| class | valid_add_op< dim_t, dim_squared_t > |
| Adding dimensions together. More... | |
| class | valid_add_op< dim_t, dim_t > |
| Adding dimensions together. More... | |
| class | valid_divmod_op |
| class | valid_divmod_op< dim_squared_t, dim_squared_t > |
| Dimensions can be divided by each other. More... | |
| class | valid_divmod_op< dim_squared_t, dim_t > |
| Dimensions can be divided by each other. More... | |
| class | valid_divmod_op< dim_t, dim_squared_t > |
| Dimensions can be divided by each other. More... | |
| class | valid_divmod_op< dim_t, dim_t > |
| Dimensions can be divided by each other. More... | |
| class | valid_mul_op |
| class | valid_mul_op< dim_squared_t, dim_squared_t > |
| Dimensions can be multiplied with each other. More... | |
| class | valid_mul_op< dim_squared_t, dim_t > |
| Dimensions can be multiplied with each other. More... | |
| class | valid_mul_op< dim_t, dim_squared_t > |
| Dimensions can be multiplied with each other. More... | |
| class | valid_mul_op< dim_t, dim_t > |
| Dimensions can be multiplied with each other. More... | |
| class | valid_sub_op |
| class | valid_sub_op< coord_squared_t, coord_t > |
| class | valid_sub_op< coord_t, coord_t > |
| Coordinates can be subtracted from each one. More... | |
| class | valid_sub_op< coord_t, dim_t > |
| A dimension can be subtracted from a coordinate. More... | |
| class | valid_sub_op< dim_squared_t, dim_squared_t > |
| Dimensions can be subtracted from each other. More... | |
| class | valid_sub_op< dim_squared_t, dim_t > |
| Dimensions can be subtracted from each other. More... | |
| class | valid_sub_op< dim_t, dim_squared_t > |
| Dimensions can be subtracted from each other. More... | |
| class | valid_sub_op< dim_t, dim_t > |
| Dimensions can be subtracted from each other. More... | |
| class | validated_input_field_contents_baseObj |
| Implementation object. More... | |
| class | validated_input_field_contentsObj |
| Implementation object. More... | |
| class | validated_input_field_implObj |
| Implement the input field validation object. More... | |
| class | validated_input_fieldObj |
| Implementation object. More... | |
| class | values_and_mask |
| Assemble a list of values, and a mask flagging the numbers in the list. More... | |
Concepts | |
| concept | factory_processor |
| A factory creator takes a factory as a parameter. | |
| concept | container_processor |
| A container creator takes a container as a parameter. | |
| concept | focusable_container_processor |
| A focusable_container creator takes a container as a parameter. | |
| concept | listlayoutmanager_processor |
| A listlayoutmanager creator takes a container as a parameter. | |
| concept | main_window_processor |
| Concept of a main window creator function. | |
| concept | internal_focusable_cb_t |
| concept | is_get_window_handler |
| A ref or a ptr to something that's derived from get_window_handler. | |
| concept | is_list_item_status_change_callback |
| This is a list item status change callback. | |
| concept | scratch_buffer_callback |
| Callback passed to scratch_buffer's get(). | |
| concept | text_param_constructible |
| concept | input_field_validation_function |
| An input field validation function. | |
| concept | input_field_string_validation_function |
| An input field validation function based on a parsed string. | |
Enumerations | |
| enum class | halign { left , center , right , fill } |
| Horizontal alignment. More... | |
| enum class | valign { top , middle , bottom , fill } |
| Vertical alignment. More... | |
| enum class | dialog_position { default_position , on_the_left , on_the_right , above , below } |
| Position of a new dialog with respect to its parent window. More... | |
| enum class | cut_or_copy_op { available , copy , cut } |
| Cut or copy option. More... | |
| enum class | file_dialog_type { existing_file , write_file , create_file } |
| Sets the behavior of a file dialog after selecting a file. More... | |
| enum class | focus_change { gained , lost , child_gained , child_lost , child_moved , gained_from_child , lost_to_child , focus_movement_complete } |
| Reported keyboard and pointer focus changes. More... | |
| enum class | temperature { cold , warm , hot } |
| Current temperature of an activatable widget. More... | |
| enum class | enabled_for { input_focus , shortcut_activation } |
| The purpose of calling enabled() More... | |
| enum class | richtext_dir : unsigned char { lr , rl , both } |
| Rich text direction. More... | |
| enum class | bidi_format { none , embedded , automatic } |
| Unicode bi-directional formatting to apply to retrieved text. More... | |
| enum class | input_filter_type { inserting , deleting , replacing , move_only } |
| Identifies the kind of a filtering event. More... | |
| enum class | input_change_type { deleted , inserted , set } |
| Identifies what kind of a change the input field change callback gets invoked for. More... | |
| enum class | bidi { automatic , left_to_right , right_to_left } |
| Bi-directional text direction. More... | |
| enum class | themedimaxis { width , height } |
| Whether the theme dimension is width or height. More... | |
| enum class | motion_event_type { real_motion , button_event , button_action_event , enter_event , keyboard_action_event } |
| Motion events are, sometimes, reported for other than real pointer motions. More... | |
| enum class | peephole_scroll { minimal , centered } |
| How a peephole scrolls elements that gain focus into view. More... | |
| enum class | peephole_algorithm { automatic , stretch_peephole } |
| Peephole sizing algorithm. More... | |
| enum class | icon_scale { nearest , atleast , nomore } |
| How to scale an icon. More... | |
| enum class | new_location { lr , bidi } |
| How to intepret a specified cursor location, a location in richtext. More... | |
| enum class | get_location { lr , bidi } |
| Get the location index offset. More... | |
| enum class | scrollbar_visibility { never , always , automatic , automatic_reserved } |
| Specify when a scroll-bar is visible. More... | |
| enum class | text_decoration { none =0 , underline =1 } |
| Optional text decorations. More... | |
| enum class | attached_to { below_or_above , above_or_below , right_or_left , tooltip_right , tooltip_left } |
| How a static tooltip, or a popup, gets attached to its widget. More... | |
| enum class | visual_class_t { static_gray =0 , gray_scale =1 , static_color =2 , pseudo_color =3 , true_color =4 , direct_color =5 } |
| Visual class. More... | |
Functions | |
| const button_config & | normal_button () |
| Returns default appearance of a normal button. | |
| const button_config & | default_button () |
| Returns default appearance of a default button. | |
| std::string | themedirroot () |
| Location of the directory with all the themes. | |
| std::ostream & | operator<< (std::ostream &o, const element_state &) |
| bool | in_focus (focus_change f) |
| Convert a very detailed focus_change to a simple boolean value. | |
| std::ostream & | operator<< (std::ostream &, const font &) |
| Overload << operator. | |
| font | operator""_font (const char *, size_t) |
| image_param | operator""_image (const char *p, size_t n) |
| "foo"_image specifies an image icon to be used in a list. | |
| bool | is_next_key (const key_event &) |
| Return true if this key event is for advancing focus to the next field. | |
| bool | next_key_pressed (const key_event &) |
| Return true if keypress, and next_key(). | |
| bool | is_prev_key (const key_event &) |
| Return true if this key event is for advancing focus to the previous field. | |
| bool | prev_key_pressed (const key_event &) |
| Return true if keypress, and prev_key(). | |
| bool | next_page_key (const key_event &) |
| Return true if this key event is for advancing focus to the next page. | |
| bool | next_page_key_pressed (const key_event &) |
| Return true if keypress, and next_page_key(). | |
| bool | prev_page_key (const key_event &) |
| Return true if this key event is for advancing focus to the previous page. | |
| bool | prev_page_key_pressed (const key_event &) |
| Return true if keypress, and prev_page_key(). | |
| bool | select_key (const key_event &) |
| Return true if this key event is for selecting something. | |
| bool | select_key_pressed (const key_event &) |
| Return true if keypress, and select_key(). | |
| void | get_focus_before_in_thread (ONLY IN_THREAD, const focusable &me, const focusable &other) |
| void | get_focus_after_in_thread (ONLY IN_THREAD, const focusable &me, const focusable &other) |
| void | get_focus_impl_after_in_thread (ONLY IN_THREAD, const focusable &me, const focusable_impl &a) |
| template<typename ... Args> | |
| void | process_focusable_impls (const function< internal_focusable_cb > &cb, Args &&...args) |
| Fixed list of focusable elements in a single group. | |
| void | process_focusable_impls_from_focusables (const function< internal_focusable_cb > &cb, const std::vector< focusable > &v) |
| Take a vector of focusables, extract their implementations, invoke the callback. | |
| focusable_container_owner | create_focusframe_container_owner (const container_impl &parent_container, const ref< focusframecontainer_implObj > &impl, const element &e, const focusable_impl &element_focusable_impl) |
| Create a focusable_container_owner for a standard focusframe. | |
| container | create_focusframe_container (const ref< focusframecontainer_implObj > &impl, const element &e) |
| Create a container for a standard focusframe. | |
| always_visible_focusframe_ref_t | create_always_visible_focusframe_impl (const container_impl &parent_container, const const_focus_border_appearance &, const dim_arg &hpad, const dim_arg &vpad, const std::optional< color_arg > &bgcolor={}) |
| Create an always_visibleObj focus frame. | |
| nonrecursive_visibility_focusframe_ref_t | create_nonrecursive_visibility_focusframe_impl (const container_impl &parent_container, const const_focus_border_appearance &, const dim_arg &hpad, const dim_arg &vpad, const std::optional< color_arg > &bgcolor={}) |
| Create an nonrecursive_visibilityObj focus frame. | |
| unicode_bidi_level_t | default_paragraph_embedding_level () |
| std::u32string | bidi_override (const std::u32string_view &, bidi direction) |
| Force text direction. | |
| std::string | bidi_override (const std::string_view &, bidi direction) |
| Force text direction. | |
| const listlayoutstyle_impl & | list_style_by_name (const std::string_view &) |
| Return a list layout style by name. | |
| rectarea | add (const rectarea &, const rectarea &, coord_t offsetx=0, coord_t offsety=0) |
| Add two rectangle sets together. | |
| rectarea | intersect (const rectarea &, const rectarea &, coord_t offsetx=0, coord_t offsety=0) |
| Return an intersection set of two rectangle sets. | |
| rectarea | intersect (const rectarea &, const rectangle &, coord_t offsetx=0, coord_t offsety=0) |
| Return an intersection set of two rectangle sets. | |
| rectarea | subtract (const rectarea &, const rectarea &, coord_t ofssetx=0, coord_t offsety=0) |
| Subtract two rectangle sets. | |
| rectangle | bounds (const rectarea &) |
| Return a bounding rectangle for the given rectangle set. | |
| std::ostream & | operator<< (std::ostream &, const rectangle &) |
| Dump the rectangle into an output stream. | |
| std::ostream & | operator<< (std::ostream &, const rgb &) |
| Overload << operator. | |
| dim_t | adjust_descender_for_underline (dim_t ascender, dim_t descender) |
| void | preserve_screen_number (bool flag) |
| Memorize screen number as part of the window's positions. | |
| std::vector< new_tablelayoutmanager::header_factory_t > | table_headers (const table_headers_param_t &table_headers_param) |
| theme_font | operator""_theme_font (const char *, size_t) |
| Theme font name. | |
| theme_color | operator""_color (const char *, size_t) |
| Theme color name. | |
| text_decoration | operator""_decoration (const char *, size_t) |
| Text decorations. | |
| start_hotspot | operator""_hotspot (const char *, size_t) |
| Text hotspot identifier. | |
| start_hotspot | operator""_hotspot (unsigned long long) |
| Text hotspot identifier. | |
| functionref< void(THREAD_CALLBACK, const tooltip_factory &)> | create_label_tooltip (const text_param &, const label_config &) |
| Create a default tooltip factory consisting of a label. | |
| template<input_field_validation_function validation_function, typename canonical_format_functor , typename new_value_functor > | |
| auto | create_validated_input_field_contents (validation_function &&validator, canonical_format_functor &&formatter, const std::optional< input_field_validation_function_type< validation_function > > &initial_value, new_value_functor &&new_value) -> create_validator_ret_t< validation_function > |
| template<typename T , input_field_string_validation_function< T > validation_function, typename canonical_format_functor , typename new_value_functor > | |
| auto | create_string_validated_input_field_contents (validation_function &&validator, canonical_format_functor &&canonical_format, const std::optional< T > &initial_value, new_value_functor &&new_value) -> create_string_validator_ret_t< T > |
Variables | |
| const char | halign_names [4][8] |
| halign text strings | |
| const char | valign_names [4][8] |
| valign text strings | |
| constexpr size_t | callback_trigger_key_event =1 |
| callback_trigger_t has a const x::w::key_event *. | |
| constexpr size_t | callback_trigger_button_event =2 |
| callback_trigger_t has a const x::w::button_event *. | |
| constexpr size_t | callback_trigger_motion_event =3 |
| std::variant index where one might find a motion_event. | |
| constexpr size_t | callback_trigger_initial =4 |
| callback_trigger_t initial invocation. | |
| constexpr size_t | callback_trigger_prev =5 |
| callback_trigger_t has a const x::w::prev_key &. | |
| constexpr size_t | callback_trigger_next =6 |
| callback_trigger_t has a const x::w::next_key &. | |
| constexpr size_t | callback_trigger_cut_copy_paste =7 |
| callback_trigger_t indicating a cut/copy/paste operation | |
| constexpr size_t | callback_trigger_user_mod =8 |
| callback_trigger_t indicating an user modification | |
| constexpr size_t | callback_trigger_keyfocus_move =9 |
| callback_trigger_t indicating a forced keyboard focus move. | |
| constexpr size_t | callback_trigger_pointerfocus_move =10 |
| callback_trigger_t indicating a forced pointer focus move. | |
| static constexpr redraw_priority_t | clear_area =0 |
| This widget is expected to draw a clear area. | |
| static constexpr redraw_priority_t | widget_area =1 |
| Garden-variety widget. | |
| const char | bidi_format_names [3][16] |
| For internal use. | |
| const char | bidi_names [3][16] |
| For internal use. | |
| const listlayoutstyle_impl & | highlighted_list |
| The list highlights items to indicate they're selected. | |
| const listlayoutstyle_impl & | bulleted_list |
| A bullet is to the left of each selected item. | |
| const list_selection_type_cb_t | single_selection_type |
| Single selection list. | |
| const list_selection_type_cb_t | single_optional_selection_type |
| Single, but optional, selection list. | |
| const list_selection_type_cb_t | multiple_selection_type |
| Multiple selection list. | |
| const list_selection_type_cb_t | no_selection_type |
| No-selection list. | |
| const char | selection_type_str [4][16] |
| constexpr rgb | transparent {0, 0, 0, 0} |
| Transparent color. | |
| constexpr rgb | black {0, 0, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | gray {rgb::maximum/2+1, rgb::maximum/2+1, rgb::maximum/2+1} |
| Standard HTML 3.2 color. | |
| constexpr rgb | silver |
| Standard HTML 3.2 color. | |
| constexpr rgb | white {rgb::maximum, rgb::maximum, rgb::maximum} |
| Standard HTML 3.2 color. | |
| constexpr rgb | maroon {rgb::maximum/2+1, 0, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | red {rgb::maximum, 0, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | olive {rgb::maximum/2+1, rgb::maximum/2+1, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | yellow {rgb::maximum, rgb::maximum, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | green {0, rgb::maximum/2+1, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | lime {0, rgb::maximum, 0} |
| Standard HTML 3.2 color. | |
| constexpr rgb | teal {0, rgb::maximum/2+1, rgb::maximum/2+1} |
| Standard HTML 3.2 color. | |
| constexpr rgb | aqua {0, rgb::maximum, rgb::maximum} |
| Standard HTML 3.2 color. | |
| constexpr rgb | navy {0, 0, rgb::maximum/2+1} |
| Standard HTML 3.2 color. | |
| constexpr rgb | blue {0, 0, rgb::maximum} |
| Standard HTML 3.2 color. | |
| constexpr rgb | fuchsia {rgb::maximum, 0, rgb::maximum} |
| Standard HTML 3.2 color. | |
| constexpr rgb | purple {rgb::maximum/2+1, 0, rgb::maximum/2+1} |
| Standard HTML 3.2 color. | |
| const char | scrollbar_visibility_names [4][20] |
| scrollbar_visibility text strings | |
| const char *const | rgb_color_names [] |
| HTML 3.2 rgb color names. | |
| const rgb | rgb_colors [] |
| HTML 3.2 rgb colors. | |
| const size_t | n_rgb_colors |
| How many rgb_colors there are. | |
LibCXXW library namespace.
| typedef std::variant<const key_event *, const std::u32string_view *, all_key_events_is_not_copyable> x::w::all_key_events_t |
Key event callback.
There are two alternative key events. An actual key press or release, that's reported as a x::w::key_event; and text entered via the X Input Method server, that comes in as a std::u32string_view. The key event callback may receive one or the other. Its argument is a variant of pointers to the possible events.
| typedef std::map<size_t, updated_position_widgets_t > x::w::all_updated_position_widgets_t |
Temporary list of all repositioned widgets, by their nesting level.
| typedef std::tuple<all_updated_position_widgets_t::iterator, updated_position_widgets_t::iterator > x::w::all_updated_position_widgets_t_iterator |
Where to find a widget in a temporary list of repositioned widgets.
A typical implementation of a focusframecontainer always_visibleObj mixin.
| typedef always_visibleObj<focusframecontainer_elementObj< container_visible_elementObj< container_elementObj< child_elementObj> > > > x::w::always_visible_focusframe_t |
A typical implementation of a focusframecontainer always_visibleObj mixin.
| typedef ref<appearanceObj> x::w::appearance |
Appearance object.
An object that describes the visual appearance of properties of some widget.
This is a base class that widget-specific appearance objects derived from.
A parsed theme file's get_appearance() method returns a const_appearance object. The appearance objects are always const objects, in order to be thread-safe because they can be referenced by the connection thread at any time. The only time a regular appearance object is exposed is when one gets modify()ed to create a new appearance object.
| typedef ptr<appearanceObj> x::w::appearanceptr |
A nullable pointer reference to an appearance object.
| typedef ref<background_colorObj> x::w::background_color |
A background color, possibly dependent on the current theme.
This object produces, on demand, a "background color".
get_current_color() returns the picture for the background color. theme_updated() gets invoked when the screen's theme changes. If this is a theme-dependent background color, all subsequent calls to get_current_color() will return a new picture.
This is a slight misnomer. The resulting picture can be used for any purpose, not just drawing the background color. Foreground colors, sideways colors, etc...
The background color objects are automcally cached. Background color objects individually created for the same underlying color will end up being the same object. recycled_pixmaps contains caches for both theme- dependent and theme-independent background colors.
| using x::w::background_color_elementObj = typedef typename background_colors_element_types<base, arg1, args...>::type |
Template for attaching one or more background_colors, as mixins, to a widget.
The first template parameter is a subclass of elementObj::implObj. background_color_elementObj multiply-inherits from the template parameter and a background_color_element_implObj via an intermediate background_color_element template, using the tag specified by the optional second template parameter (which defaults to void ).
The tag is used to create a distinct type only, and is not otherwise used. Additional template parameters may follow, specifying additional tags. This result in multiple inheritances, each one is referenced as background_color_element<tag>.
The end result is a multiple inheritance from the first template parameter and background_color_element<T>, with T specified by the remaining template parameters to background_color_elementObj. If none are specified, beyond the parent class, a single inheritance from background_color_element<void> results.
Each background_color_element<T> inherits from background_color_element_implObj, which implements methods for each mixed-in background color.
The initial set of parameters to the constructor are color_args, one for each background_color_element<T> mixin. The remaining constructor parameters get forwarded to the parent elementObj::implObj superclass.
Background color processing occurs whenever it's possible for a background_color to change due to the element's size changing (i.e. gradient background color).
The background_color_element_recalculated template mixin defines a callback for those cases.
background_color_element<T>::get(IN_THREAD) returns the associated tag's background_color.
A nullable pointer reference to a background color.
| typedef ref<batch_queueObj> x::w::batch_queue |
Batches execution batch_queue for the connection thread.
| typedef ptr<batch_queueObj> x::w::batch_queueptr |
A nullable pointer reference to the batch_queue object.
Appearance of a book.
Specifies various properties of a container that uses the book layout manager. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. Use modify() to make a copy of an existing constant appearance object, and pass it to a closure to customize it.
A nullable pointer reference to a book container's appearance.
The book layout manager.
x::w::new_booklayoutmanager creates a container that uses the book layoutmanager, which is an enhanced version of the page layout manager. Like the pagelayoutmanager, the book layout manager arranges its elements in individual pages, with one page visible at a time. On top of that, the book layout manager adds a row of tabs above the currently shown page, one tab for each page in the book; and clicking on a page's tab opens that page.
Also, horizontal scrolling arrows appear on the left and the right side of the tab row. They, respectively, open the previous and the next page.
A x::w::book_lock objects blocks all other execution threads from accessing the book layout manager's container, while the lock exists.
append() returns a factory that adds new pages to the book after all existing pages. insert() returns a factory that adds new pages to the book before an existing page, and remove() removes a page from the book. Like the page layout manager, all pages in the book get automatically numbered, starting with 0 for the first page; and the pages get automatically renumbered when pages get added or removed from the book.
pages() returns the number of pages in the book. open() makes another page visible instead of the current one. close() closes the currently visible page without showing any other page from the book. opened() indicates which page is currently open.
on_opened() installs a callback that gets executed whenever the book layout manager opens a new page, either as a result of selecting one of the tabs, or by a call to open().
generate() creates new contents from the loaded theme file. See the tutorial for more information.
| typedef functionref<void (const booklayoutmanager &, uielements &) > x::w::booklayoutmanager_generator |
Generate something with the book layout manager.
A nullable pointer reference to a book layout manager.
Appearance of book's page tabs.
Specifies various properties of a book's page's tab. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::bookpage_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a book page tab appearance.
| typedef ref<bookpagefactoryObj> x::w::bookpagefactory |
A factory that adds another page to a container with a book layout manager.
Each page in a book consists of a tab, shown above the page container, and the page itself, a widget.
When a book's pages have different sizes, the smaller pages get centered in the larger book by default. add() can be called more than once, adding multiple pages to the book at a time. halign() and valign() overrides the alignment only for the next add()ed page.
The factory's appearance class member specifies the visual appearance of the new pages' tabs.
set_appearance() installs a new appearance member, and is equivalent to setting the appearance class member directly.
add() is overloaded. The first version of add takes the following parameters:
The page's tab is nearly always a short text label but any non-focusable widget can serve as a tab. This is done by using the second version of the overloaded add() without the label's parameter; and the callable object receives two factory objects as its parameters instead of one. The first factory is for creating the widget that represents the new page's; which may even a container with multiple elements (although big tabs won't look very pretty). The second factory is for creating the new page's element.
The closure must invoke both of the factories exactly once, using each factory to create one widget. The callable object is responsible for show()ing both new elements.
The factory initializes several (non thread-safe) members to the default appearance of each new tab, from the current display theme; which may be updated if needed.
Since the default appearance is theme controlled, the best approach involves specifying all these theme-specified values (together with a few additional settings in the x::w::new_booklayoutmanager).
| typedef functionref<void (const bookpagefactory &, uielements &) > x::w::bookpagefactory_generator |
Generate something using a book page factory.
A nullable pointer reference to a book page factory.
| typedef std::variant<border_infomm, std::string> x::w::border_arg |
A border that's specified as either a border_infomm, or a theme border.
Specifies the visual appearance of a border, as an explicit border_infomm, or a label referencing a border from the current display theme.
| typedef ref<border_implObj, border_impl_base> x::w::border_impl |
A border implementation.
An object that contains specifications for a border, and the logic to draw it.
A nullable pointer reference to a border implementation.
Draw a border around an element.
A subclass of the singleton layout manager that draws a border around the widget.
The same effect can be obtained by using the grid layout manager, but this is more efficient.
Passing a new_borderlayoutmanager to a factory's create_container() creates a container that uses the border layout manager.
update_title() replaces the title shown in the upper-left corner. An empty string removes the title. update_title()'s parameter is an x::w::text_param.
update_border() changes the shown border. update_borders() individually specified the left, right, top, and bottom borders.
generate() generates the contents of the border layout manager's container from a theme file
| typedef functionref<void (const borderlayoutmanager &, uielements &) > x::w::borderlayoutmanager_generator |
Generate something in the border layout manager.
A nullable pointer reference to a border layout manager.
| typedef ref<buttonObj> x::w::button |
A clickable button.
on_activate() installs a callback that gets invoked by clicking on the button.
get_layoutmanager() returns the singleton layout manager for accessing or replacing the button's contents.
Appearance of the button_config.
Specifies various properties of a button. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::button_appearance::base::normal_theme() and x::w::button_appearance::base::default_theme() return a cached default theme appearance.
A nullable pointer reference to a button appearance.
| typedef bool x::w::button_event_callback_t(THREAD_CALLBACK, const button_event &, bool, const busy &) |
Signature of a button event callback.
The callback returns true if it processed the button event. The first parameter is the button event.
The second parameter indicates whether the button press or release is considered to be "activation" of that button.
Generally, if it's the same as button_event.press, then do something.
| typedef ptr<buttonObj> x::w::buttonptr |
A nullable pointer reference to an button.
| typedef std::variant<std::monostate, const key_event *, const button_event *, const motion_event *, initial, prev_key, next_key, cut_copy_paste, user_mod, keyfocus_move, pointerfocus_move, callback_trigger_is_not_copyable > x::w::callback_trigger_t |
What triggered a callback activation.
This parameter specifies the reason for a callback's activation: a key event, a button event, or something else. The default (monostate) value indicates a default reason that does not have any associated metadata, for example a list item getting deselected because it's getting removed from the list.
| typedef ref<canvasObj> x::w::canvas |
A mostly empty widget.
The canvas object gets constructed, with specified horizontal and vertical metrics.
Update the canvas object's horizontal and vertical metrics.
| typedef ptr<canvasObj> x::w::canvasptr |
A nullable pointer reference to an canvas.
| typedef ref<child_elementObj> x::w::child_element |
| typedef std::variant<rgb, std::string, linear_gradient, radial_gradient, image_color> x::w::color_arg |
A color specification.
One of the following:
std::string | typedef ref<color_pickerObj> x::w::color_picker |
Color picker widget.
A small widget for initializing colors. Displays a small rectangle in the current color, an x::w::rgb value, and a button next to it. The button opens a popup for individually adjusting the color's red, green, and blue components.
x::w::rgb 's alpha component.The color popup's main area has a large square filled with gradient color. Initially, the gradient square's horizontal axis represents the red color component, and the vertical axis represents the green component. A horizontal strip above the gradient square and a vertical one to the left of it, show the red and the green gradients represented by the square's axi.
Clicking anywhere in the gradient square adjusts the color picker's current color's components to correspond to the click's location.
A third horizontal strip appears below the gradient square, and initially represents the color picker's blue component. Clicking on it adjusts the color picker's component to correspond to the click's location on the bottom strip.
Clicking on the top and the left strips swaps that strip's component with the one on the bottom strip, and updates the gradient square to represent the new combination of the horizontal and vertical gradient components. At all times the gradient square represents the color combination of two of the three red, green, and blue components, and the bottom strip represents the color combinations of the third one.
Input fields on the right half of the popup provide the means of specifying color values with the keyboard. The first three set of input fields are for entering explicit red, green, and blue components. The next three set of input fields are for entering explicit hue, saturation, and value components. The "hexadecimal" button below them enables specifying the values in hexadecimal instead of decimal.
The "Full Precision" option enables specifying each color component as a 16 bit value. Most display servers use 8-bit values for red, green, and blue color components. x::w::rgb always carries the red, green, and blue color component values with full levels of color precision. Entering an 8 bit value into the input field quietly scales the value to the entire full color precision.
The "Cancel" button closes the color picker popup and restores the original color if it was changed. "Ok" closes the popup and saves the current color if it was changed. Closing the color picker popup in any other way (the "Esc" key, or clicking outside of it with the pointer) is equivalent to a "Cancel".
current_color() returns or sets the the color picker's most recently saved value. This is the color value saved by the popup's "Ok" button.
on_color_update() installs a callback that gets executed by the color picker popup's "Ok" button. A newly-installed callback gets initially executed by the library's internal connection thread passing a x::w::initial{} value for the trigger parameter. This specifies the picker's current color value at the time the callback gets installed. The callback then gets invoked by the "Ok" button, or by current_color() setting a new color.
Only one color picker callback is active at any time. Installing another color picker callback replaces the previous one.
x::w::initial{} call. The x::w::initial{} call indicates the removal of the previous callback.Passing a x::w::color_picker_config to a factory's create_color_picker() method allows setting the callback when the color picker gets created. The x::w::initial{} callback invocation does not happen in that case.
Assigns a unique label to the color picker widget that's used to restore its previous state. All color pickers in a main window must have unique labels.
Appearance of the color_picker.
Specifies various properties of a color picker. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::color_picker_appearance::base::theme() returns a cached default theme appearance.
| typedef ptr<color_picker_appearanceObj, color_picker_appearance_base> x::w::color_picker_appearanceptr |
A nullable pointer reference to a color picker appearance.
| typedef void x::w::color_picker_callback_t(THREAD_CALLBACK, const rgb &new_color, const callback_trigger_t &trigger, const busy &mcguffin) |
Signature for the color picker's callback.
| typedef ptr<color_pickerObj> x::w::color_pickerptr |
A nullable pointer reference to a color picker.
Combobox appearance
Visual appearance of a combo-box.
Derived from x::w::popup_list_appearance which sets the visual appearance of the combo-box popup.
The default popup appearance properties for combo-boxes are specified by the current display theme, and the default appearance object is cached for speed, and that's the reason why it's constant.
Like x::w::list_appearance, and x::w::popup_list_appearance, use modify() creates a copy of the appearance object, which can be modified further by the callable object, before returning a new constant appearance object that can be safely accessed by the connection thread.
A nullable pointer reference to a combo-box appearance settings.
| typedef ref<connectionObj, connectionBase> x::w::connection |
A connection to the display server.
Creates an object representing a connection to the display SERVER.
mcguffin() returns an opaque object representing the underlying connection to the display server. Even after all public objects related to a connection go out of scope and get destroyed, a background thread will briefly run, just long enough to wind up its business, before the connection to the display server is truly closed.
mcguffin() returns an opaque mcguffin. When the mcguffin gets destroyed the underlying display server connection is truly gone, and all resources have been released.
Returns the identifier for the current theme, and the scaling factor percentage.
in_thread() returns immediately, and executes the passed-in callable object by the internal connection thread. The callback gets executed after repositioning and resizing any widgets due to any pending metric and size changes, but before processing X display server messages or updating the display.
in_thread() returns immediately, and executes the passed-in callable object by the internal connection thread. The callback gets executed after all other activity gets processed; after processing any X display server messages, and updating the display with any unprocessed changes.
Returns an indication whether the given selection has an owner window. This checks where GetSelectionOwner() returns a window handle.
| typedef ref<connection_threadObj> x::w::connection_thread |
Internal library execution thread.
| typedef ptr<connectionObj, connectionBase> x::w::connectionptr |
A nullable pointer reference to a display server connection.
| typedef const_ref<appearanceObj> x::w::const_appearance |
A constant appearance object.
A nullable pointer reference to a const appearance object.
Constant book container's appearance.
A nullable pointer reference to a const book container's appearance.
A constant book layout manager.
A nullable pointer reference to a const book layout manager.
Constant book page tab appearance.
Alias.
| typedef const_ptr<bookpage_appearanceObj, bookpage_appearance_base> x::w::const_bookpage_appearanceptr |
A nullable pointer reference to a const book page tab appearance.
A constant book page factory.
A nullable pointer reference to a const book page factory.
A constant border implementation object.
A nullable pointer reference to a constant border implementation object.
A constant border layout manager.
A nullable pointer reference to a const border layout manager.
| typedef const_ref<buttonObj> x::w::const_button |
A reference to a constant button.
Constant button appearance.
A nullable pointer reference to a const button appearance.
| typedef const_ptr<buttonObj> x::w::const_buttonptr |
A nullable pointer reference to a constant button.
| typedef const_ref<canvasObj> x::w::const_canvas |
A reference to a constant canvas object.
| typedef const_ptr<canvasObj> x::w::const_canvasptr |
A nullable pointer reference to a constant canvas object.
A constant color picker.
| typedef const_ref<color_picker_appearanceObj, color_picker_appearance_base> x::w::const_color_picker_appearance |
Constant color picker appearance.
| typedef appearance_wrapper<const_color_picker_appearance> x::w::const_color_picker_appearance_wrapper |
Alias.
| typedef const_ptr<color_picker_appearanceObj, color_picker_appearance_base> x::w::const_color_picker_appearanceptr |
A nullable pointer reference to a const color picker appearance.
A nullable pointer reference to a const color picker.
Constant combo-box appearance settings.
Alias.
| typedef const_ptr<combobox_appearanceObj, combobox_appearance_base> x::w::const_combobox_appearanceptr |
A nullable pointer reference to a const combo-box appearance settings.
A constant connection to the display server.
A nullable pointer reference to a constant connection to display server connection.
| typedef const_ref<containerObj> x::w::const_container |
A constant container.
A nullable pointer reference to a constant container.
Constant copy/cut/paste menu items.
A nullable pointer reference to const copy/cut/paste menu items.
A constant current border object.
A nullable pointer reference to a constant current border object.
Constant current font collection.
A nullable pointer reference to constant current font collection.
| typedef const_ref<current_selection_handlerObj> x::w::const_current_selection_handler |
A constant X selection handler.
| typedef const_ptr<current_selection_handlerObj> x::w::const_current_selection_handlerptr |
A nullable pointer reference to a const X selection handler.
| typedef const_ref<cursor_pointerObj> x::w::const_cursor_pointer |
A constant cursor_pointer.
| typedef const_ptr<cursor_pointerObj> x::w::const_cursor_pointerptr |
A nullable cursor_pointer reference to a const cursor_pointer.
A constant combox-box layout manager.
A nullable pointer reference to a const combox-box layout manager.
A constant date input field.
| typedef const_ref<date_input_field_appearanceObj, date_input_field_appearance_base> x::w::const_date_input_field_appearance |
Constant date input field appearance.
| typedef appearance_wrapper<const_date_input_field_appearance> x::w::const_date_input_field_appearance_wrapper |
Alias.
| typedef const_ptr<date_input_field_appearanceObj, date_input_field_appearance_base> x::w::const_date_input_field_appearanceptr |
A nullable pointer reference to a const date input field appearance.
A nullable pointer reference to a const date input field.
| typedef const_ref<defaultthemeObj, defaultthemeBase> x::w::const_defaulttheme |
A constant loaded application theme.
| typedef const_ptr<defaultthemeObj, defaultthemeBase> x::w::const_defaultthemeptr |
A constant nullable pointer reference to a loaded application theme.
A constant WHATITIS.
A nullable pointer reference to a const WHATITIS.
| typedef const_ref<dialogObj> x::w::const_dialog |
A constant dialog window.
| typedef const_ptr<dialogObj> x::w::const_dialogptr |
A nullable pointer reference to a const dialog window.
| typedef const_ref<drawableObj> x::w::const_drawable |
A constant drawable to the server.
| typedef const_ptr<drawableObj> x::w::const_drawableptr |
A nullable pointer reference to a constant drawable to the server.
A constant editable combo-box layout manager.
A nullable pointer reference to a const editable combo-box layout manager.
| typedef const_ref<elementObj> x::w::const_element |
A reference to a constant widget.
| typedef const_ref<element_popup_appearanceObj, element_popup_appearance_base> x::w::const_element_popup_appearance |
Constant attached popup appearance.
| typedef appearance_wrapper<const_element_popup_appearance> x::w::const_element_popup_appearance_wrapper |
Alias.
| typedef const_ptr<element_popup_appearanceObj, element_popup_appearance_base> x::w::const_element_popup_appearanceptr |
A nullable pointer reference to a const attached popup appearance.
| typedef const_ptr<elementObj> x::w::const_elementptr |
A nullable pointer reference to a constant widget.
| typedef const_ref<factoryObj> x::w::const_factory |
A constant factory.
| typedef const_ptr<factoryObj> x::w::const_factoryptr |
A nullable pointer refereance to a constant factory.
A constant file dialog.
| typedef const_ref<file_dialog_appearanceObj, file_dialog_appearance_base> x::w::const_file_dialog_appearance |
Constant file dialog appearance settings.
Alias.
| typedef const_ptr<file_dialog_appearanceObj, file_dialog_appearance_base> x::w::const_file_dialog_appearanceptr |
A nullable pointer reference to a const file dialog appearance settings.
A nullable pointer reference to a const file dialog.
| typedef const_ref<focus_border_appearanceObj, focus_border_appearance_base> x::w::const_focus_border_appearance |
Constant WHATITIS.
| typedef appearance_wrapper<const_focus_border_appearance> x::w::const_focus_border_appearance_wrapper |
Alias.
| typedef const_ptr<focus_border_appearanceObj, focus_border_appearance_base> x::w::const_focus_border_appearanceptr |
A nullable pointer reference to a const WHATITIS.
| typedef const_ref<focusableObj> x::w::const_focusable |
A reference to a constant focusable widget.
A constant focusable container.
A constant focusable container owner.
A nullable pointer reference to a constant focusable container owner.
A nullable pointer reference to a constant focusable container.
A constant focusable label.
A nullable pointer reference to a const focusable label.
A nullable pointer reference to a constant focusable widget.
A constant font selection picker.
| typedef const_ref<font_picker_appearanceObj, font_picker_appearance_base> x::w::const_font_picker_appearance |
Constant font picker appearance.
Alias.
| typedef const_ptr<font_picker_appearanceObj, font_picker_appearance_base> x::w::const_font_picker_appearanceptr |
A nullable pointer reference to a const font picker appearance.
A nullable pointer reference to a const font selection pickery.
Constant font collection.
A nullable pointer reference to constant font collection.
Constant border frame.
A nullable pointer reference to a const border frame.
A constant font.
A nullable pointer reference to a constant font.
| typedef const_ref<gcObj, gcBase> x::w::const_gc |
A constant graphic context.
| typedef const_ptr<gcObj, gcBase> x::w::const_gcptr |
A nullable pointer reference to a constant graphic context.
A constant generic window handler.
| typedef const_ref<generic_window_appearanceObj, generic_window_appearance_base> x::w::const_generic_window_appearance |
Constant top level window appearance.
| typedef appearance_wrapper<const_generic_window_appearance> x::w::const_generic_window_appearance_wrapper |
Alias.
| typedef const_ptr<generic_window_appearanceObj, generic_window_appearance_base> x::w::const_generic_window_appearanceptr |
A nullable pointer reference to a const top level window appearance.
A constant grid layout manager.
A nullable pointer reference to a constant grid layout manager.
| typedef const_ref<hotspotObj> x::w::const_hotspot |
A reference to a constant activatable widget.
A reference to a constant hotspot with colors.
A nullable pointer reference to a constant hotspot with colors.
| typedef const_ptr<hotspotObj> x::w::const_hotspotptr |
A nullable pointer reference to a constant activatable widget.
| typedef const_ref<iconObj> x::w::const_icon |
A reference to a constant icon.
| typedef const_ptr<iconObj> x::w::const_iconptr |
A nullable pointer reference to a constant icon.
| typedef const_ref<imageObj> x::w::const_image |
A reference to a constant image.
A reference to a constant image button.
| typedef const_ref<image_button_appearanceObj, image_button_appearance_base> x::w::const_image_button_appearance |
Constant image button appearance.
| typedef appearance_wrapper<const_image_button_appearance> x::w::const_image_button_appearance_wrapper |
Alias.
| typedef const_ptr<image_button_appearanceObj, image_button_appearance_base > x::w::const_image_button_appearanceptr |
A nullable pointer reference to a const image button appearance.
A nullable pointer reference to a constant image button.
| typedef const_ptr<imageObj> x::w::const_imageptr |
A nullable pointer reference to a constant image.
A constant input dialog window.
A nullable pointer reference to a const input dialog window.
A reference to a constant input_field object.
| typedef const_ref<input_field_appearanceObj, input_field_appearance_base> x::w::const_input_field_appearance |
Constant input field appearance.
Alias.
| typedef const_ptr<input_field_appearanceObj, input_field_appearance_base> x::w::const_input_field_appearanceptr |
A nullable pointer reference to a const input field appearance.
A nullable pointer reference to a constant input_field object.
| typedef const_ref<item_button_appearanceObj, item_button_appearance_base> x::w::const_item_button_appearance |
Constant item button appearance.
Alias.
| typedef const_ptr<item_button_appearanceObj, item_button_appearance_base> x::w::const_item_button_appearanceptr |
A nullable pointer reference to a const item button appearance.
| typedef const_ref<item_layout_appearanceObj, item_layout_appearance_base> x::w::const_item_layout_appearance |
Constant item layout manager appearance.
Alias.
| typedef const_ptr<item_layout_appearanceObj, item_layout_appearance_base> x::w::const_item_layout_appearanceptr |
A nullable pointer reference to a const item layout manager appearance.
A constant item layout manager.
A nullable pointer reference to a const item layout manager.
| typedef const_ref<labelObj> x::w::const_label |
A reference to a constant label object.
| typedef const_ref<label_forObj> x::w::const_label_for |
A reference to a constant label link.
| typedef const_ptr<label_forObj> x::w::const_label_forptr |
A nullable pointer reference to a constant label link.
| typedef const_ptr<labelObj> x::w::const_labelptr |
A nullable pointer reference to a constant label object.
Alias.
Alias.
A constant generic layout manager.
Constant list appearance properties.
A nullable pointer reference to a const list appearance properties.
A constant WHATITIS.
A nullable pointer reference to a const WHATITIS.
A constant text-only list layout manager.
A nullable pointer reference to a const text-only list layout manager.
A reference to a constant main application window.
| typedef const_ref<main_window_appearanceObj, main_window_appearance_base> x::w::const_main_window_appearance |
Constant main window appearance.
Alias.
| typedef const_ptr<main_window_appearanceObj, main_window_appearance_base> x::w::const_main_window_appearanceptr |
A nullable pointer reference to a const main window appearance.
A nullable pointer reference to a constant main application window.
| typedef const_ref<menuObj> x::w::const_menu |
A constant menu button.
A constant menu bar factory.
A nullable pointer reference to a const menu bar factory.
A constant menu bar layout manager.
A nullable pointer reference to a const menu bar layout manager.
| typedef const_ptr<menuObj> x::w::const_menuptr |
A nullable pointer reference to a const menu button.
A constant element factory for the page layout manager.
A nullable pointer reference to a const element factory for the page layout manager.
A constant page layout manager.
A nullable pointer reference to a const page layout manager.
| typedef const_ref<pagetabgridlayoutmanagerObj> x::w::const_pagetabgridlayoutmanager |
A constant book page tab grid layoutmanager.
| typedef const_ptr<pagetabgridlayoutmanagerObj> x::w::const_pagetabgridlayoutmanagerptr |
A nullable pointer reference to a const book page tab grid layoutmanager.
Constant pane appearance.
A nullable pointer reference to a const pane appearance.
| typedef const_ref<pane_layout_appearanceObj, pane_layout_appearance_base> x::w::const_pane_layout_appearance |
Constant pane layout appearance.
Alias.
| typedef const_ptr<pane_layout_appearanceObj, pane_layout_appearance_base> x::w::const_pane_layout_appearanceptr |
A nullable pointer reference to a const pane layout appearance.
A constant pane factory.
A nullable pointer reference to a const pane factory.
A constant pane layout manager.
A nullable pointer reference to a const pane layout manager.
Constant peephole appearance.
Alias.
| typedef const_ptr<peephole_appearanceObj, peephole_appearance_base> x::w::const_peephole_appearanceptr |
A nullable pointer reference to a const peephole appearance.
A constant peephole layout manager.
A nullable pointer reference to a const peephole layout manager.
| typedef const_ref<pictformatObj> x::w::const_pictformat |
A constant pictformat to the server.
A nullable pointer reference to a constant pictformat to the server.
| typedef const_ref<pictureObj, pictureBase> x::w::const_picture |
A constant picture.
| typedef ref<pictureObj::implObj> x::w::const_picture_internal |
A constant internal implementation object of a picture.
| typedef const_ref<pixmapObj> x::w::const_pixmap |
A constant pixmap.
| typedef const_ptr<pixmapObj> x::w::const_pixmapptr |
A nullable pointer to a constant pixmap.
| typedef const_ref<popup_list_appearanceObj, popup_list_appearance_base> x::w::const_popup_list_appearance |
Constant popup list appearance properties.
Alias.
| typedef const_ptr<popup_list_appearanceObj, popup_list_appearance_base> x::w::const_popup_list_appearanceptr |
A nullable pointer reference to a const popup list appearance properties.
A constant print dialog.
| typedef const_ref<print_dialog_appearanceObj, print_dialog_appearance_base> x::w::const_print_dialog_appearance |
Constant print dialog appearance.
| typedef appearance_wrapper<const_print_dialog_appearance> x::w::const_print_dialog_appearance_wrapper |
Alias.
| typedef const_ptr<print_dialog_appearanceObj, print_dialog_appearance_base> x::w::const_print_dialog_appearanceptr |
A nullable pointer reference to a const print dialog appearance.
A nullable pointer reference to a const print dialog.
A constant progress bar.
| typedef const_ref<progressbar_appearanceObj, progressbar_appearance_base> x::w::const_progressbar_appearance |
Constant progressbar appearance.
Alias.
| typedef const_ptr<progressbar_appearanceObj, progressbar_appearance_base> x::w::const_progressbar_appearanceptr |
A nullable pointer reference to a const progressbar appearance.
A nullable pointer reference to a const progress bar.
A constant richtextcursorlocationowner.
A nullable pointer reference to a const richtextcursorlocationowner.
Reference to a constant rich text fragment.
A constant reference to a rich text iterator.
A constant scratch buffer.
A nullable pointer reference to a constant scratch buffer.
| typedef const_ref<screenObj, screenBase> x::w::const_screen |
A constant screen.
Constant memorized screen positions.
Constant screen_positions_handle.
A nullable pointer reference to const screen_positions_handle.
A nullable pointer reference to const memorized screen positions.
| typedef const_ref<scrollbarObj> x::w::const_scrollbar |
| typedef const_ref<scrollbar_appearanceObj, scrollbar_appearance_base> x::w::const_scrollbar_appearance |
Constant scrollbar appearance.
Alias.
| typedef const_ptr<scrollbar_appearanceObj, scrollbar_appearance_base> x::w::const_scrollbar_appearanceptr |
A nullable pointer reference to a const scrollbar appearance.
| typedef const_ref<scrollbar_images_appearanceObj, scrollbar_images_appearance_base> x::w::const_scrollbar_images_appearance |
Constant WHATITIS.
| typedef appearance_wrapper<const_scrollbar_images_appearance> x::w::const_scrollbar_images_appearance_wrapper |
Alias.
| typedef const_ptr<scrollbar_images_appearanceObj, scrollbar_images_appearance_base> x::w::const_scrollbar_images_appearanceptr |
A nullable pointer reference to a const WHATITIS.
A constant singleton layout manager.
A nullable pointer reference to a const singleton layout manager.
A constant standard combox-box layout manager.
A nullable pointer reference to a const standard combox-box layout manager.
A constant synchronized axis.
A nullable pointer reference to a const synchronized axis.
Constant table header row appearance.
A nullable pointer reference to a const table header row appearance.
A constant table layout manager.
A nullable pointer reference to a const table layout manager.
| typedef const_ref<textlabelObj> x::w::const_textlabel |
A reference to a constant text label object.
A nullable pointer reference to a constant text label object.
| typedef const_ref<themedimObj> x::w::const_themedim |
A constant theme specified dimension.
A constant toolbox factory.
A nullable pointer reference to a const toolbox factory.
A constant toolboxlayoutmanager.
A nullable pointer reference to a const toolboxlayoutmanager.
Constant tooltip appearance.
A nullable pointer reference to a const tooltip appearance.
| typedef const_ref<tooltip_border_appearanceObj, tooltip_border_appearance_base> x::w::const_tooltip_border_appearance |
Constant WHATITIS.
| typedef appearance_wrapper<const_tooltip_border_appearance> x::w::const_tooltip_border_appearance_wrapper |
Alias.
| typedef const_ptr<tooltip_border_appearanceObj, tooltip_border_appearance_base> x::w::const_tooltip_border_appearanceptr |
A nullable pointer reference to a const WHATITIS.
Constant compiled widget generators.
A nullable pointer reference to const compiled widget generators.
| using x::w::const_validated_input_field = typedef const_ref<validated_input_fieldObj<type> > |
A constant validated input field value.
| using x::w::const_validated_input_field_contents = typedef const_ref<validated_input_field_contentsObj<type> > |
A constant validated input field contents.
| using x::w::const_validated_input_field_contentsptr = typedef const_ptr<validated_input_field_contentsObj<type> > |
A nullable pointer reference to a const validated input field contents.
| using x::w::const_validated_input_fieldptr = typedef const_ptr<validated_input_fieldObj<type> > |
A nullable pointer reference to a const validated input field value.
| typedef ref<containerObj> x::w::container |
Methods common to all display containers.
A container contains other widgets, and a layout manager object that manages them.
Creating a widget that's a container requires that a new layout manager gets created first, then used to create the container.
get_layoutmanager() returns the container's layout manager.
gridlayout(), tablelayout(), and other aliases are shortcuts for calling get_layoutmanager() and converting it to the corresponding type, such as x::w::gridlayoutmanager and x::w::tablelayoutmanager.
And exception gets thrown if the container uses a different layout manager.
| typedef ref<containerObj::implObj> x::w::container_impl |
Alias.
Alias.
| typedef ptr<containerObj> x::w::containerptr |
A nullable pointer reference to a container.
| typedef number<int64_t, coord_squared_tag, types_base> x::w::coord_squared_t |
The unit type that can accomodate coord_t + dim_t.
| typedef number<int32_t, coord_tag, types_base> x::w::coord_t |
Internal unit type for positions: x and y coordinates.
Standard "Copy"/"Cut"/"Paste" menu items.
This object gets returned by the list layout manager's append_copy_paste() method which creates default "Cut", "Copy", and "Paste" menu items, which are enabled by default.
It is desirable to enable the individual items only if the corresponding operation is possible (there's an available selection). This is done by taking the return object and calling its update() method. update() enables or disables these menu items, accordingly.
The typical approach is to take the object that append_copy_paste() returns, and call its update() just before the menu becomes visible, using on_popup_state_update().
A copy_cut_paste_menu_items does maintain strong references to the created "Cut", "Copy", and "Paste" menu items, only weak references. The weak references follow these items in their menu, if other menu items get added or delete from the menu. update() does nothing if its menu items, or their entire menu, get removed.
A nullable pointer reference to copy/cut/paste menu items.
The options for a book page factory's add().
The options for a book page factory's add().
The options for a factory's create_button().
| typedef optional_argconstrefs<label_config, button_config, shortcut> x::w::create_button_with_label_args_t |
The options for a factory's create_button().
| typedef optional_argconstrefs<new_layoutmanager, static_tooltip_config > x::w::create_static_tooltip_args_t |
Optional parameters to element's create_static_tooltip().
| using x::w::create_string_validator_ret_t = typedef std::tuple< input_field_validation_callback, validated_input_field_contents<T> > |
Defines create_string_validated_input_field_contents() return type
Helper template that defines what create_validated_stromg+input_field_contents() returns.
| using x::w::create_validator_ret_t = typedef std::tuple< input_field_validation_callback, validated_input_field_contents< input_field_validation_function_type<validation_function> > > |
Defines create_validated_input_field_contents() return type
Helper template that defines what create_validated_input_field_contents() returns.
Current border around a widget.
Provides a border implementation object, and a theme_updated() method that rebuilds it, after a theme change.
A nullable pointer reference to a current border.
A font collection based on the current theme.
A font collection that's accessible only to the library execution thread.
The theme_font_elementObj mixin template attaches one or more of these to a widget, updating the font collection when the display theme changes.
theme_updated() recreates the font collection after a new theme is installed.
This is an internal object that's visible through the public library API. A font descriptor gets converted to this handle, internally, with the handle still visible as part of other temporary classes that are used in the API, hence this handle must be visible in the API.
A nullable pointer reference to current font collection.
| typedef ref<current_selection_handlerObj> x::w::current_selection_handler |
Base class for received X selection.
A conversion_handler that gets installed if convert_selection() gives the green light.
Handles the converted data. generic_windowObj::handlerObj implements the conversion callbacks from window_handlerObj, and invokes the corresponding methods in the base class, passing in *this, and letting a subclass implement the entire conversion process.
| typedef ptr<current_selection_handlerObj> x::w::current_selection_handlerptr |
A nullable pointer reference to an X selection handler.
| typedef mpobj<const_defaulttheme, std::recursive_mutex> x::w::current_theme_t |
Current theme, mutex protected.
The current theme must be consulted when constructing new widgets, and it is also accessed by the connection thread as well.
| typedef ref<cursor_pointerObj> x::w::cursor_pointer |
A cursor pointer.
A cursor pointer created from an icon.
Do not create this object directly. Use icon's create_cursor(), which implements a cache.
Implements initialize() and theme_updated(). initialize() should be called before using the icon in the connection thread for the first time. And the connection thread calls theme_updated() when the display theme changes.
Both initialize() and theme_updated() return the same icon object if the theme hasn't changed, or a new icon object.
| typedef ptr<cursor_pointerObj> x::w::cursor_pointerptr |
A nullable cursor_pointer reference to a cursor_pointer.
| typedef functionref<void (THREAD_CALLBACK, const custom_combobox_selection_changed_info_t &) > x::w::custom_combobox_selection_changed_t |
Callback that gets invoked when a combo-box selection is made.
| typedef functionref<void (ONLY IN_THREAD, const custom_combobox_selection_search_info_t &) > x::w::custom_combobox_selection_search_t |
Callback that gets invoked when a combo-box selection is made.
Custom combo-box layout managager.
The layout manager for a custom combo-box.
This is just a list layout manager with a current_selection() method that returns the display elemet for the currently selected combo-box item.
A nullable pointer reference to a combox-box layout manager.
| typedef ref<date_input_fieldObj> x::w::date_input_field |
A date input field.
A text input field with a button that opens a monthly calendar popup. Selecting a day from a popup fills the text input field with the calendar date. A calendar date may be directly typed in.
The x::ymd class represents calendar dates. get() returns the current date, if there is one. No value gets returned if there's no date entered, or the entered text does not parse as a valid date. set() sets the date shown in the date input field, or clears the field if the date is not provided.
on_change() installs a new callback that gets executed whenever a new date is entered into the field. Its first parameter is the new date; an empty new_date value indicates that the date input field is empty or does not contain a valid date.
The trigger parameter indicates the reason the callback gets invoked. The new callback gets immediately invoked upon installation to report the current date in the field (if any), with the trigger set to x::w::initial; then the trigger gets invoked whenever the date input field's content change.
| typedef ref<date_input_field_appearanceObj, date_input_field_appearance_base> x::w::date_input_field_appearance |
Appearance of the date_input_field.
Specifies various properties of a date_input_field. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::date_input_field_appearance::base::theme() returns a cached default theme appearance.
| typedef ptr<date_input_field_appearanceObj, date_input_field_appearance_base> x::w::date_input_field_appearanceptr |
A nullable pointer reference to a date input field appearance.
| typedef functionref<void (THREAD_CALLBACK, const std::optional<ymd> &, const callback_trigger_t &) > x::w::date_input_field_callback_t |
Callback that gets invoked when the date input field's value changes.
A nullable pointer reference to a date input field.
| typedef ref<defaultthemeObj, defaultthemeBase> x::w::defaulttheme |
A loaded application theme.
| typedef ptr<defaultthemeObj, defaultthemeBase> x::w::defaultthemeptr |
A nullable pointer reference to a loaded application theme.
Widget that requested input focus that has been delayed.
This gets placed into scheduled_input_focus weak pointer. process_focus_updates() checks if the widget can now receive input focus.
A nullable pointer reference to a WHATITIS.
| typedef number<uint8_t, depth_tag> x::w::depth_t |
The unit type for bit depth of windows, drawables...
| typedef ref<dialogObj> x::w::dialog |
A dialog pop-up from another main window (or of a parent dialog).
A dialog gets created by using one of main_window's methods, like create_ok_cancel_dialog():
A dialog itself is like a top level widget, appearing on the desktop like a main_window. In fact, the class contains a dialog_window member which is the dialog's x::w::main_window. This means that each dialog can have its own dialogs, too.
Several x::w::main_window methods, like create_ok_cancel_dialog() construct stock, theme-specified dialogs.
set_dialog_position() specifies where the dialog should appear with respect to its parent main window. This is effective only before the dialog is shown for the first time; or while the dialog is hidden, and its position and size gets reset to this default position.
| typedef ptr<dialogObj> x::w::dialogptr |
A nullable pointer reference to a dialog window.
| typedef number<uint64_t, dim_squared_tag, types_base> x::w::dim_squared_t |
The unit type that can accomodate dim_t squared.
| typedef number<uint32_t, dim_tag, dim_base> x::w::dim_t |
Internal unit type for dimensions: width or height.
| typedef ref<drawableObj> x::w::drawable |
A drawable object.
A common superclass of generic windows and pixmaps.
get_screen() returns the drawable's screen.
Create a picture object for this drawable.
Create a pixmap, with the same bit depth as the drawable. An optional third parameter specifies a different pictformat for the new pixmap.
The optional third parameter may also be a depth_t, which picks an alpha-channel only pictformat with the given bit depth. This parameter can only be 1, 4, or 8.
Returns this drawable's size.
Creates a new X protocol GraphicContext object for this drawable. This is mostly for internal use.
| typedef ptr<drawableObj> x::w::drawableptr |
A nullable pointer reference to a drawable to the server.
| typedef functionref<void (THREAD_CALLBACK, const editable_combobox_selection_changed_info_t &) > x::w::editable_combobox_selection_changed_t |
Callback that gets invoked when an editable combo-box's selection changes.
Editable combo-box layout managager.
A subclass of a standard combo-box layout manager that uses an editable input_field instead of a read-only label for the currently selected combo-box item.
Typing in the combo-box's input field auto-completes the closest matching list item, if possible; but it's possible to type in something that does not match any combo-box list item.
x::w::new_editable_comboboxlayoutmanager creates a focusable container that uses the editable combo-box layout manager.
This subclass also implements access to the underlying input_field, inheriting the following methods:
This is equivalent to invoking on_validate() on the undertlying input field. Additionally, set_validator() and set_string_validator() are also available.
| typedef functionref<void (const editable_comboboxlayoutmanager &, uielements &) > x::w::editable_comboboxlayoutmanager_generator |
Generate something in the editable combobox layout manager.
A nullable pointer reference to a editable combo-box layout manager.
| typedef ref<elementObj> x::w::element |
Methods common to all widgets.
appdata is an opaque object pointer for the application's use. The library does not use it in any way.
get_screen() returns the element's screen object.
show() and hide() displays or hides the widget. show_all() and hide_all() also shows or hides any other widgets contained in this one (this widget is a container).
Scrolls this widget into view if it's currently hidden inside a peephole.
set_background_color() sets this element's background to an x::rgb-specified color, or to a theme color of the given name. remove_background_color() removes the element's existing background color, reverting it to the default one.
get_shade_busy_mcguffin() and get_wait_busy_mcguffin() return a mcguffin that blocks processing of all keyboard or pointer button press events, until the last reference to the mcguffin goes out of scope and it gets destroyed.
get_shade_busy_mcguffin() is equivalent to get_wait_busy_mcguffin() on display screens that don't support alpha compositing.
connection_mcguffin() returns a mcguffin for the underlying connection to the display server. Installing a destructor callback on this mcguffin results in the callback getting invoked when the connection to the underlying display server is closed and the internal execution thread, for the connection, stops.
Installs a callback that reports the element's pointer focus state (when the pointer moves in and out of the widget).
The callback also gets invoked immediately to report the element's current focus state, after the callback gets installed.
The callback receives a focus_change parameter that indicates the new status of pointer focusability. The trigger parameter is mostly unused with pointer callbacks, it's provided mostly for consistency with a focusable element's on_keyboard_focus() callbacks. With pointer callbacks the trigger has only one possible value: initial, indicating the initial callback upon installation, and the default monostate value in most other instances, which are result of pointer movement.
Only one callback may get installed at a time. Installing a callback replaces the previous callback. Since the callbacks are handled by the aforementioned internal execution thread, it is possible that the previous callback still gets invoked after on_pointer_focus() returns, if the execution thread was about to call it. In any case, after the execution thread invokes the replacement callback once, the previous one is a distant memory.
on_button_event() installs a callback that gets invoked whenever a pointer button gets pressed or released with the pointer inside the element.
The callback gets invoked only if no other action occurs in response to the button event.
on_motion_event() installs a callback that gets invoked each time the mouse pointer moves inside the widget.
on_metrics_callback() installs a callback that gets invoked with the element's current metrics. The callback gets invoked with the element's current metrics, and then every time the metrics change. Only one metrics callback can be installed at the same time, installing another callback replaces the existing one.
The state update callback reports changes to the widget's visibility, and receives the x::w::element_state.
Each widget has an optional "context popup". An element's context popup gets opened by right clicking on it with the right pointer button. An optional keyboard shortcut also makes the popup visible if its widget is visible.
create_popup_menu() creates a context popup as a menu. Its parameter is a creator that gets invoked with a list layout manager, and is expected to create the popup menu's items. create_popup_menu() returns a container object representing the popup menu.
create_popup_menu()'s optional second parameter is an x::w::popup_list_appearance that specifies custom visual appearance of the popup menu.
The popup menu always appears next to the pointer. The expected way to make the popup menu appear is to install a context popup callback.
install_contextpopup_callback()'s parameter is a callback that gets in response the right pointer button click. The expected behavior is to simply show() the context popup container, which makes it visible next to the pointer's currnet position. install_contextpopup_callback()'s optional second parameter is a keyboard shortcut that also invokes the callback.
The callback's first parameter is the element it's attached to. Its remaining parameters are:
remove_context_popup() removes the element's current context popup callback. Each widget can only have one context popup installed, at a time. Installing a new context popup callback automatically removes the previously installed context popup callback; and remove_context_popup() explicitly removes the currently installed one.
in_thread() returns immediately, and executes the passed-in callable object by the internal connection thread that's responsible for updating the visual appearance of this widget. The callback gets executed after repositioning and resizing any widgets (not just this one) due to any pending metric and size changes, but before processing X display server messages or updating the display.
in_thread_idle() returns immediately, and executes the passed-in callable object by the internal connection thread. The callback gets executed after all other activity gets processed; after processing any X display server messages, and updating the display with any unprocessed changes.
A widget has an optional regular tooltip or a static tooltip.
A regular tooltip is a popup that appears when the mouse pointer hovers over a widget. The library automatically show()s and hide()s the tooltip, as needed. create_tooltip() creates a default tooltip from a text label (which is a x::w::text_param that can use custom fonts), and an optional x::w::label_config. The resulting tooltip appears automatically when the pointer pauses over the widget, and disappears when it moves again.
create_custom_tooltip() provides the means of creating a custom regular tooltip. Its parameter is a callable object that gets invoked whenever the tooltip gets slated to appear, and receives a x::w::tooltip_factory object. This is a callable object that takes a creator lambda, and an object specifying the new tooltip's layout manager. Invoking the tooltip factory creates a container that gets passed to the creator lambda, which is responsible for creating the contents of the container.
In this manner, the tooltip's contents get created each time the tooltip becomes visible, and may show something different each time.
A static tooltip appears next to the widget, instead of directly next to the pointer's position, and the application controls the tooltip's visibility, with some restrictions:
Static tooltips should be used only with focusable widgets; and get typically show()n and hide()n by the focusable element's on_keyboard_focus() callbacks, becoming visible when the widget has keyboard focus.
create_static_tooltip() has one required parameter, a creator lambda that's responsible for creating the contents of the tooltip, and an optional parameter that specifies a pair of options.
create_static_tooltip()'s optional 2nd parameter is a x::w::create_static_tooltip_args_t. This implements the following optional function arguments. Each one of the following arguments is optional, but the arguments, if specified, must appear in the following order:
The static tooltip gets created in advance. show() or show_all() makes it visible, hide() or hide_all() hides it.
A tooltip is considered to be a child element of the widget it's attached to, for the purpose of the object reference hierarchy.
remove_tooltip() removes a regular or a static tooltip.
| typedef ref<elementObj::implObj> x::w::element_impl |
Alias.
| typedef ptr<elementObj::implObj> x::w::element_implptr |
Alias.
| typedef ref<element_popup_appearanceObj, element_popup_appearance_base> x::w::element_popup_appearance |
Appearance of a widget with a button that opens an attached popup.
Specifies various properties of a widget that has a button that opens an attached popup. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::element_popup_appearance::base::theme() returns a cached default theme appearance.
| typedef ptr<element_popup_appearanceObj, element_popup_appearance_base> x::w::element_popup_appearanceptr |
A nullable pointer reference to a attached popup appearance.
| typedef void x::w::element_state_callback_t(THREAD_CALLBACK, const element_state &, const busy &) |
Callback type for updates to the element_state.
| typedef ptr<elementObj> x::w::elementptr |
A nullable pointer reference to an widget.
| typedef functionref<void (const uielements * const &)> x::w::elements_generator |
Generate something using already-generated elements.
| typedef std::unordered_set<std::string> x::w::enabled_theme_options_t |
Which options are enabled for the given theme.
| typedef ref<factoryObj> x::w::factory |
A widget factory
A factory object gets created by layout managers.
Depending on the layout manager, the same factory object can be used to repetitively create multiple widgets; or a factory object can be used for creating no more than one widget, with unspecified results (a thrown exception is typical) if the factory object gets reused.
The factory provides various methods to create different kinds of widgets. Each method returns the newly-created widget, and some methods' first argument is a "creator lambda".
The creator lambda gets invoked just before the factory method finishes creating the new widget, and the parameter to the lambda is the newly- created widget. The lambda's job is to finalize any needed initialization of the new widget. This results in optimal performance. The new widget's container integrates the new widget after the creator returns and before the factory method itself returns. The container generally ignores the new widget until its creator returns.
If the lambda does not initialize the contents of the new widget (where appropriate), and that occurs after the factory method returns, the new widget's container will often need to make expensive recalculations if the new widget's size changes (likely). By having the lambda handle the initialization, these calculation occur, for the first time, after the creator returns with a fully-initialized widget,
create_canvas() creates an empty widget that does nothing but take up its alloted space. This is typically used to fill in the unused widgets in a grid.
create_canvas()'s optional parameter is a canvas_config, which provides the size of the canvas, its width and height, as well as an optional background color.
An overloaded create_canvas() with no parameters returns a canvas that's adjustable to any size. It is equivalent to specify a minimum width and height of 0, and no bounds to the maximum width and height.
create_container() creates a new widget that is, itself, another container.
A grid layout manager's sophisticated layout capabilities are simply not enough sometimes. For those situations, one of its widgets can simply be another layout manager, such as the grid layout manager.
Also, many specialized widgets, such as combo-boxes, are actually containers with a specialized layout manager, as described below.
The first parameter is a lambda that initializes the new container before it's attached to its parent widget. The lambda receives a single parameter, the new x::w::container and the lambda gets invoked just before create_container() returns.
The second parameter specifies the layout manager for the new container. It can be one of:
create_focusable_container() is similar to create_container(), but creates a container that handles input focus. Its second parameter can be one of:
An editable combo-box layout manager uses an input field for editing, and this creates one, containing a validated value, by passing the return value from create_validated_input_field_contents() or create_string_validated_input_field_contents(). This overload returns two values, the new combo-box container, and a validated input field object.
create_label() creates a text label widget. The first parameter is a x::w::text_param that sets the label's text.
Newline characters in the label create a multi-line label. An optional second parameter sets the label's width, specified in millimeters. The label's text gets word-wrapped to fit within the given width; otherwise only newlines introduce linebreaks.
A word-wrapped label's width is flexible. The optional second parameter only sets the suggested width. When placed in a container with other widgets, the label adjusts its width to fit within its alloted space, if additional space is available. If the label's width is not spcified, the label's size remains fixed.
An optional third parameter sets the label's alignment.
create_focusable_label() creates a new focusable label widget.
created_bordered_element() creates a container with a single widget that has a border drawn around it. The container uses a special-purpose border layout manager that's optimized for this specific purpose. Using the grid layout manager with a bordered cell results in the same appearance, but with more overhead.
A clickable button. This is a container with one widget, with a border drawn around it. The first parameter to create_button() is a creator lambda that gets invoked to create the contents of the button. The callable object must use the passed-in factory object to create exactly one widget. This is what the button looks like.
Alternatively, specifying a x::w::text_param for the first parameter creates a typical button containing a text label. This is equivalent to using a creator lambda that does a create_label().
As with all other widgets, it is necessary to show() the widget, at some point. The created widget can be a container with other, multiple, widgets.
create_button() has an optional second parameter that sets the new button's options:
The second optional parameter is a x::w::create_button_with_label_args_t when the first parameter is a text_param, or a x::w::create_button_args_t if the first parameter is a callable object.
These are templates that implement the following optional function arguments:
Each one of the following arguments is optional, but the arguments, if specified, must appear in the following order:
create_button_with_label_args_t that's used when the first parameter is a text_param, and gets forwarded to create_label().create_input_field() creates an input_field. The first parameter to create_input_field is a text_param that sets the input field's initial contents.
The text_param may not contain any special formatting, just plain text, This provides the means of setting the initial contents of the input field as either a string or a unicode string.
The second parameter to create_input_field() is optional. It is an input_field_config that sets the width of the text input field, and various other properties.
Passing the return value from create_validated_input_field_contents() or create_string_validated_input_field_contents() creates a validated input field, and returns two values: the input field and a validated input field object.
This creates a new date input field.
This creates an x::w::image that shows an image loaded from a file.
create_checkbox() creates a simple checkbox widget.
create_radio() creates a radio button group that's identified by a label. All buttons created in the window with the same label form a radio group. Selecting one of the buttons in the radio group deselects the previously- selected button.
create_progressbar() creates an x::w::progressbar which is a horizontal swath that visually indicates the progress of an ongoing process. The horizontal swath has a colored stripe that moves from its left margin to its right margin, to indicate the progress of an operation.
The progress bar is a container with a layout manager, a grid layout manager by default. create_progressbar()'s first parameter is a creator lambda that creates the contents of the progress bar. Each one of the remaining parameters are optional. If both are specified they must appear in the following order:
The description inside the progress bar is typically just a centered label, but can be any arbitrary widget. The creator lambda constructs a single label for the initial status of the progress bar.
The factory automatically supplies standard scroll-bars to widgets that use them. create_horizontal_scrollbar() and create_vertical_scrollbar() create an independent scroll-bar, a convenient user interface for specifying an integer value in a consecutive range.
The first parameter is the new scrollbar's configuration. The remaining two parameters are optional. Either of the following parameters is optional, but they must be specified in the given order:
scrollbar_config's minimum_size sets the scroll-bar's minimum size in millimeters. The scroll-bar's actual size may be also adjusted by its layout manager. Irrespective of the scroll-bar's ultimate size, the reported scroll-bar values get scaled to its configured range and page size.
create_color_picker() returns x::w::color_picker. This is a widget that provides an interactive approach for specifying an x::w::rgb value. create_color_picker()'s optional x::w::color_picker_config parameter sets the initial appearance of the color-picker.
create_font_picker() returns x::w::font_picker. This is a widget that provides an interactive approach for setting a x::w::font specification. create_font_picker()'s optional x::w::font_picker_config parameter sets the initial appearance of the font-picker.
| typedef functionref<void (const factory &, uielements &) > x::w::factory_generator |
Generate something using a base factory.
| typedef ptr<factoryObj> x::w::factoryptr |
A nullable pointer refereance to a factory.
| typedef ref<file_dialogObj> x::w::file_dialog |
This object gets returned by create_file_dialog, representing a simple dialog for browsing folders, and choosing a file to create or open.
The complexity of the task at hand means that a plain dialog object is not sufficient. The file dialog is represented by a discrete file_dialog object.
the_dialog() returns the dialog widget, for directly invoking its methods, such as set_window_title() and show_all(). create_file_dialog() constructs the complete dialog and all of the individual widgets that make it up; requiring a call to show_all() to make all of that visible.
x::w::file_dialog_config's appearance member is a const x::w::file_dialog_appearance object (actually a const_file_dialog_appearance), that contains many settings that control the visual appearance of the file dialog (fonts and colors).
Customized file dialog properties are specified by using modify() to create a copy of the appearance member, and invoke the passed-in callable object or a closure that can access the temporarily modifiable appearance object, and then replacing the original constant appearance object.
This calling convention ensures thread-safety by contract: while running, an existing file dialog safely accesses the constant appearance object that created it, and any subsequent changes to the file dialog appearance always use a new, modified appearance object.
Appearance of the file dialog.
Specifies various properties of a file dialog. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::file_dialog_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a file dialog appearance settings.
| typedef ptr<file_dialogObj> x::w::file_dialogptr |
A nullable pointer reference to a file dialog.
Appearance of a focus border.
Specifies a pair of borders, one border when there's no input focus, and a border when there is an input focus. The default properties are set by the current display theme. Typically, when there's no input focus the border is an invisible border with the same size as the regular input focus border; but some focus borders have a visible no-focus border, too.
The default properties are set by the current display theme, and are cached for speed. x::w::focus_border_appearance::base::theme() returns a cached default theme appearance for an invisible focus off border, and a visible focus on border. x::w::focus_border_appearance::base::menu_theme() returns a cached default theme appearance for menu bar buttons.
x::w::focus_border_appearance::base::thin_theme() returns a cached fefault theme appearance for a smaller version of the default theme(), thta's used for small checkboxes and radio buttons.
x::w::focus_border_appearance::base::visible_thin_theme() returns a cached default theme appearance for a smaller version of the default theme(), but with a visible input focus off boder, so that the border is visible all the time, and not only when the input focus gets shown.
x::w::focus_border_appearance::base::slider_theme() returns a cached default theme appearance for a focus border for pane sliders.
x::w::focus_border_appearance::base::combobox_button_theme() returns a cached default theme appearance for combo-box buttons.
x::w::focus_border_appearance::base::input_field_theme() returns a cached default theme appearance for input fields.
x::w::focus_border_appearance::base::list_theme() returns a cached default theme appearance for lists.
x::w::focus_border_appearance::base::visible_list_theme() returns a cached default theme appearance for lists that's always visible.
x::w::focus_border_appearance::base::attached_button_theme() returns a cached default theme appearance for focus borders of miscellaneous buttons that open attached popups.
x::w::focus_border_appearance::base::scrollbar_theme() returns a cached default theme appearance for scroll-bars.
x::w::focus_border_appearance::base::none_theme() returns a cached default theme appearance for 0-width focus off and on borders, this can be used to effectively remove visible focus borders.
| typedef ptr<focus_border_appearanceObj, focus_border_appearance_base> x::w::focus_border_appearanceptr |
A nullable pointer reference to a WHATITIS.
| typedef void x::w::focus_callback_t(THREAD_CALLBACK, focus_change, const callback_trigger_t &) |
Focus callback.
| typedef ref<focusableObj> x::w::focusable |
Methods common to all widget that can receive keyboard focus.
A widget with keyboard input focus receives and processes all keyboard input. All widgets capable of processing keyboard input are kept in an internal list. TAB and BACK-TAB transfers keyboard focus to the next or the previous element in the list.
set_enabled(false) blocks this widget from receiving keyboard focus. The keyboard focus gets moved to another widget if this element has keyboard focus at the time it is disabled.
set_enabled(true) makes this focusable element enabled for processing keyboard and button press events.
Disabled focusable elements are drawn at half intensity. set_enabled() redraws the widgets accordingly.
The parameter to get_focus_after() and get_focus_before() is another focusable widget in the same window. These functions move the tabbing order of this widget.
get_focus_after() sets this focusable element's tabbing order to be after the other widget's. When the other focusable has keyboard focus, TAB moves the focus to this focusable, then whichever other element originally followed the other element in the tabbing order. In other words, other's tabbing order with respect to all other elements does not change, except that this focusable now gets tabbed to after this one, instead of its original tabbing order.
get_focus_before() sets this focusable element's tabbing order to be before the other widget's. The other focusable's tabbing order with respect to all other elements does not change, except that a TAB from the previous focusable in the tabbing order first goes to this focusable, than the other one.
get_focus_first() moves this focusable element's tabbing order to be the first tabbable widget in its window.
get_focus_after_me() and get_focus_before_me() efficiently rearranges the tabbing order of multiple widgets. The second parameter is a std::vector of focusable objects. These methods do not change this focusable's tabbing order with respect to other focusables. They change the tabbing order of the focusables that get passed in the vector.
get_focus_after_me() sets their tabbing order to follow this element's position in the tabbing order, in order of appearance in the vector. get_focus_before_me() sets the tabbing order to precede this element's position in the tabbing order (TAB-ing from the last element in the vector lands on this focusable).
The behavior of having duplicate focusables in the vector, or having this focusable in the vector too, is unspecified.
request_focus() moves the current keyboard focus to this focusable element, if it's enabled and visible. An optional bool parameter of true indicates that nothing should happen if the focusable element cannot receive focus (it is disabled on not visible). By default, if the widget cannot received keyboard focus it's presumed this is because it's just been created, and all the moving pieces to make it visible and ready to receive input focus did not happen yet, and the keyboard focus change occurs as soon as the widget is visible and enabled. Note that this builds a mousetrap if the widget is explicitly not focusable. The mousetrap gets sprung when the widget gets enabled later (unless some other widget requests keyboard focus first, explicitly or implicitly).
The IN_THREAD overloads can only be invoked in the connection thread. Additionally, the IN_THREAD overloads return an indication if the focus was successfully moved.
on_keyboard_focus() installs a callback that reports the widget's focus change events. Immediately upon installation, the callback gets invoked to report the element's most recent focus change event, and gets invoke to report all future ones.
Only one focus callback can be installed. Installing another keyboard focus change callback replaces any existing one.
The callback receives a focus_change parameter that indicates the new status of keyboard focusability. The trigger parameter indicates what event triggered the focus change, which can range between: a button click on the focusable element; prev_key and next_key indicate focus navigation via the TAB key.
on_key_event() installs a callback that receives key events. There are two possible key events: a key press and release event, or text entered via an X Input Method server, that comes in as a std::u32string_view. The parameter to a callback is a std::variant of the two, defined as a x::w::all_key_events_t. This callback gets invoked only when the widget has keyboard focus. The on_key_event() callback should return true if the key event has been processed/consumed by the callback, and will not result in any further processing. Returning false results in the default processing for the respective key/text input.
The second bool parameter specifies whether this key event is considered to be an "activation" of that key. Key event callbacks get executed for both key press and release events, as specified in the x::w::key_event. This flag gets set based on whether the key press, or the release, is considered to be "activating", that is, whether a corresponding action associated with the key should take places. This flag gets set either for a key press or the release, depending on the widget. The flag is always set for a pasted std::u32string_view.
autofocus() sets whether the widget is eligible for automatically getting the keyboard focus when its main window gets shown. The first widget with autofocus gets the keyboard focus.
The default autofocus() setting depends on the widget.
focusable_cut_or_copy_selection() or focusable_receive_selection() is equivalent to invoking cut_or_copy_selection() or receive_selection() on the top level window object, except that the top level window object executes the operation for whichever element in the top level window currently has keyboard focus; and focusable_cut_or_copy_selection() or focusable_receive_selection() does this only if this focusable element currently receives the keyboard focus, and does nothing otherwise.
A focusable widget that's implemented as an internal container.
Base class for widgets that multiply-inherit from a container and a focusable.
Use the factory's create_focusable_container() to create these widgets, instead of create_container().
The following helper functions require the focusable container with the appropriate layout manager, otherwise an exception gets thrown.
This is equivalent to using get_layoutmanager() to obtain the combo-box layout manager, then using current_selection() to retrieve the combo-box's element widget that represents the combo-box's current value.
Return an editable combo-box's input field (this focusable_container is an editable combo-box).
A focusable container that's the registered owner of its focusable.
Multiply inherits from focusable_container and a focusable implementation owner.
A nullable pointer reference to a focusable container owner.
A nullable pointer reference to a focusable container.
| typedef std::list<focusable_impl> x::w::focusable_fields_t |
A list of all focusable fields.
| typedef ref<focusableObj::implObj> x::w::focusable_impl |
A focusable implementation mixin.
A widget that can received pointer or keyboard focus.
There must be exactly one owner object that officially owns a reference to the focusable object.
A list of focusable fields is stored in the top level window handler objects. This creates a circular reference, since widgets own strong references to their parent widget, and the list becomes a circular reference from the topmost widget to its child elements.
The focusable owner object is responsible for creating the circular reference in its constructor and removing it in the destructor.
This focusable implementation object handles the mechanics of switching keyboard input focus to the next/previous focusable object.
A nullable pointer reference to a focusable object.
| typedef ref<focusable_labelObj> x::w::focusable_label |
A label that processes input focus.
A label label that has a focus frame and offers callbacks for processing keyboard input.
It also inherits from a container object, this is for internal use only.
This widget implements the shown current value in combo-boxes.
Creates a focusable label widget, a label with clickable parts. The first parameter is a x::w::text_param with clickable parts designated by hotspot markers.
create_focusable_label()'s second parameter is a x::w::label_hotspots_t container that maps hotspot identifiers to hotspot handler callbacks.
create_focusable_label()'s optional third parameter is a x::w::focusable_label_config.
Focusable labels' update() sets the label's new contents and any hotspot callbacks. text_param_literals.H imports user defined literals:
These user-defined literals construct a start_hotspot parameter, from a literal string or an int value. Additionally the x::w::end_hotspot placeholder gets imported from the x::w namespace.
A nullable pointer reference to a focusable label.
| typedef ptr<focusableObj> x::w::focusableptr |
A nullable pointer reference to a focusable widget.
| typedef std::variant<font, theme_font> x::w::font_arg |
A font may be specified directly, or as a reference to a theme font.
| typedef ref<font_pickerObj> x::w::font_picker |
Font picker widget.
The font picker widget provides the means of specifying most values of a x::w::font specification.
The widget itself shows only the name of the font, with a button next to it. Clicking the popup opens an interactive popup for modifying the font's family, size, and style (bold, italicized, etc...)
The "Cancel" button closes the font picker popup and restores the original font if it was changed. "Ok" closes the popup and saves the current font if it was changed. Closing the font picker popup in any other way (the "Esc" key, or clicking outside of it with the pointer) is equivalent to a "Cancel".
current_font() returns the font picker's most recently saved font, or sets the font picker's current and saved font. current_font() checks the new font for validity. Unknown font families are quietly ignored. The underlying freetype library handles font with fractional font sizes, but the popup accepts only whole point sizes, so the passed in point size gets rounded off. The font popup ignores x::w::font style, scaled size, pixel size, and spacing values.
The font picker popup lists all available system fonts in alphabetical order, except for the "most recently used" fonts, which appear first. most_recently_used() returns the most recently used font list, or sets the new list.
x::w::font_picker_group_id is an identifier for a system font; just its name and maybe its foundry.
on_font_update() installs a callback that gets executed by the font picker popup's "Ok" button. A newly-installed callback gets initially executed by the library's internal connection thread passing a x::w::initial{} value for the trigger parameter. This specifies the picker's current font at the time the callback gets installed. The callback then gets invoked by the "Ok" button, or by current_font() setting a new font.
Only one font picker callback is active at any time. Installing another font picker callback replaces the previous one.
The font picker callback's parameter include:
nullptr.Assigns a unique label to the font picker widget that's used to restore its previous state. All font pickers in a main window must have unique labels.
Appearance of the font picker dialog.
Specifies various properties of a font picker. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::font_picker_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a font picker appearance.
| typedef void x::w::font_picker_callback_t(THREAD_CALLBACK, const font &new_font, const font_picker_group_id *new_font_group, const font_picker &myself, const callback_trigger_t &trigger, const busy &mcguffin) |
Parameters for the font picker's callback.
Signature for the font picker's callback.
| typedef ptr<font_pickerObj> x::w::font_pickerptr |
A nullable pointer reference to a font selection picker.
| typedef ref<fontcollectionObj> x::w::fontcollection |
A collection of fonts.
This object holds a collection of fonts for rendering text. A single font specification may require loading multiple fonts in order to render every character in the rendered text. The fontconfig library prepares a list of fonts, to be searched in order for rendering specific characters.
The actual list of fonts is stored in the fontconfig::sortedlist, this object implements the logic for searching the font list.
The methods in this class take a sequence of unicode characters specified by a beginning and an ending iterator, then processes them as follows:
load_glyphs() looks up the fonts for the specified characters, then invokes each freetypefont's load_glyphs() method.
glyphs_size_and_kernings() computes the size and the kerning of each character.
lookup() is a generic function that invokes a callback, passing a beginning and an ending iterator to the callback together with a freetypefont for rendering the text. If the entire text sequence is renderable by one font, the callback gets invoked only one time; otherwise the callback gets repeatedly invoked for each portion of the text range that's renderable by its individual font, from the font collection.
The fontcollection object also exposes some composite metrics: ascender, descender, etc... These metrics are derived only from the currently loaded fonts, so they may actually change, if the fontcollection object must load additional fonts in order to render characters.
| typedef ptr<fontcollectionObj> x::w::fontcollectionptr |
A nullable pointer reference to font collection.
| typedef std::list<richtextcursorlocation> x::w::fragment_cursorlocations_t |
Container for locations in a given richtextfragment.
Appearance of the border layout manager's frame.
Specifies various properties of the frame drawn by the border layout manager. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::frame_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a border frame.
| typedef ref<freetypefontObj> x::w::freetypefont |
A loaded freetype font.
Loaded by a fontcollection, one font suitable for rendering selected characters.
Implements load_glyphs(), that loads characters' bitmaps into an X glyphset, after which they can be collected into a composite text stream using glyphs_to_stream().
glyphs_size_and_kernings() computes the size and the kerning of each glyph.
| typedef ptr<freetypefontObj> x::w::freetypefontptr |
A nullable pointer reference to an font.
A graphic context
Implements primitive graphic context operations, as described in the X protocol extension. This library uses this low-level object mostly to compose alpha masks in a pixmap.
Various overloaded versions of these methods implement optional features of each X protocol drawing request. These methods require a x::w::gc::base::properties object that specify the particular graphic context settings which apply for that operation.
| typedef ptr<gcObj, gcBase> x::w::gcptr |
A nullable pointer reference to an graphic context.
Generic top level window methods.
x::w::main_window is the object that represents a top-level window. Some of its functionality is implemented in this superclass.
set_window_title() sets the top level window's title, that gets specified as either a UTF-8 or a Unicode string.
set_window_class() explicitly sets the top level window's WM_CLASS property. This is used with some window managers to set up application and window- specific configurations. set_window_class()'s parameters are the instance and the resource identifiers.
The default resource identifier is the executing program's name. The default instance identifier is the main window's or the dialog's name. Popups specify a "popup.w.libcxx.com" as their resource identifiers, and instance may be one of: "date_input", "element_popup", "menu", "combobox", or "tooltip".
set_window_type() overrides the _NET_WM_WINDOW_TYPE property. Its argument is a comma/whitespace separated list of known window types:
Installs a callback that gets invoked if the connection to the X server gets shut down unexpectedly.
on_stabilized() arranges for its callback to get invoked after the window becomes visible and its screen position and size is computed and fixed.
The callback gets invoked with no delay if this already occured.
A generic window is also a container and a drawable.
Moves this window above all other windows, or below all other windows.
For convenience, this is forwarded to this screen's connection.
Returns true if the current keyboard focus is in a display widget that's capable of receiving a converted X selection. Currently, only input fields accept converted X selections as pasted text.
Presumably we've checked if selection_can_be_received(), so this starts the process of converting the X selection into the widget.
cut_or_copy_selection() executes a cut or a copy operation specified by the parameter.
true if the current input focus is in a widget that has something to copy or cut, and false otherwise.| typedef ref<generic_window_appearanceObj, generic_window_appearance_base> x::w::generic_window_appearance |
Common appearance properties of a top level window.
Specifies various common properties of top level windows like main windows, and popup windows like the combo-boxes. A generic window appearance object is typically attached to another appearance object related to the relevant widget.
The default properties are set by the current display theme, and are cached for speed. x::w::generic_window_appearance::base::main_window_theme() returns a cached default theme appearance. Other cached objects include a date_input_field_theme(), list_contents_theme(), combobox_theme(), and tooltip_theme().
| typedef ptr<generic_window_appearanceObj, generic_window_appearance_base> x::w::generic_window_appearanceptr |
A nullable pointer reference to a top level window appearance.
| typedef ref<grabbed_pointerObj> x::w::grabbed_pointer |
Active pointer grab mcguffin.
Returned by grab_pointer() if the pointer grab succeeds.
| typedef ptr<grabbed_pointerObj> x::w::grabbed_pointerptr |
Nullable pointer reference to a grabbed pointer.
| typedef ref< grid_elementObj > x::w::grid_element |
An widget in a grid.
A reference to a constant grid_element.
An object that represents an widget in a grid, and its metadata; namely its "width" and "height" (number of grid cells it spans), and its custom borders, if any.
| typedef ptr< grid_elementObj > x::w::grid_elementptr |
A nullable pointer reference to a grid_element.
A nullable pointer reference to a constant grid_element.
| typedef mpobj<ref<grid_map_infoObj>, std::recursive_mutex> x::w::grid_map_t |
Internal structure used by the grid layout manager.
| typedef ref<gridfactoryObj> x::w::gridfactory |
Factory implementation for a grid.
This grid factory gets returned by the grid layout manager. Most of the methods that create new widgets in the grid are inherited from the factory base class. Each call to the layout manager's methods add the new element to the grid, one after another on the same row.
The grid layout manager's methods, like append_row() and insert_row(), return a grid factory that add new elements accordingly (to a new row appended to the grid, a row inserted in the middle of the grid, etc...).
This factory also implements additional methods described below. These methods modify the position, alignment, or other attributes of the new element, and must be called before creating the new element. These methods returns this, for convenient chaining, example:
Each widget in the grid has borders and inner padding. Before creating and adding a new widget to the grid, these methods specify its border and the padding.
border() and padding() set the border and the padding for all four sides, or they can be set individually.
A custom border gets specified as a x::w::border_infomm. The padding gets specified in millimeters.
Alternatively, borders and padding values get specified by name. This references border and padding definitions taken from the current theme. This is mostly for the library's internal use.
By default, each new element added to the grid is fitted in its cell. colspan() specifies that the new element will span across two or more cells, as specified. Similarly, rowspan() specifries that the new element spans two or more rows, as specified.
The grid layout manager sizes each row and column to fit the largest element in that row or column. Any other elements in the same row or column end up with some extra empty space on account of that.
halign() specifies how the element gets horizontally positioned within its cell. The supported values are:
x::w::halign::left: positioned flush against the left margin (default).x::w::halign::right: positioned flush against the right margin.x::w::halign::center: the element is centered in its column.valign() specifies how the element gets vertically positioned within its cell. The supported values are:
x::w::valign::top: positioned flush against the top margin (default).x::w::valign::bottom: positioned flush against the bottom margin.x::w::valign::middle: the element gets position in the middle of its row.Additionally, x::w::halign::fill and x::w::valign::fill are available options which stretch the widget to the full width or height of its row or column, if its bigger because of other widgets in the same row or column. This should be used only with nested containers that are placed into the grid layout manager.
Specifies that space for the new element gets removed from the grid when the new element is hidden.
| typedef functionref<void (const gridfactory &, uielements &) > x::w::gridfactory_generator |
Generate something using a grid factory.
The grid layout manager.
Passing an x::w::new_gridlayoutmanager to create_container() creates a new container that uses the grid layout manager. The grid layout manager arranges its content elements in a rectangular grid.
Only one execution thread at a time has access to the underlying container using the grid layout manager. The grid layout manager object holds an internal lock on the container, blocking other execution threads from accessing the container until the grid layout manager object goes out of scope and gets destroyed.
rows() returns the number of rows in the grid. cols() returns the number of cells in the given row. The cell count does not include cells that span that row. A cell from an earlier row that spans into this row does not get included in the count. A cell in the row spans multiple columns in this row gets counted only once.
Pedantically, cols() returns how many cells have their top-left ocrner in this row. Cells whose top-left corner are in the given row get numbered, consecutively, starting with cell #0.
append_row() adds a new empty row to the grid, and returns a grid factory. This grid factory adds elements to the newly-added row.
insert_row() adds a new empty row to the grid before another existing row, and returns a grid factory. This grid factory adds elements to the newly-inserted row.
replace_row() removes all elements from an existing row and returns a grid factory. This grid factory adds replacement elements in the row.
append_columns() returns a grid factory that adds more elements to an existing row.
insert_columns() returns a grid factory that inserts more elements before existing elements in an existing row. The factory returned by insert_columns(1, 2) inserts new elements before element #2 (the third one) in row #1 (the second row in the grid).
replace_cell() returns a grid factory that replaces the specified element. The factory returned by replace_cell(1, 2) replaces element #2 (the third one) in row #1 (the second row in the grid). Using this factory to create an element replaces this existing element. Creating more elements using the same factory results in only the last created element replacing the existing element.
remove() removes all existing elements from the grid. Also resets all default row and column defaults (borders, paddings, percentages).
This remove() removes one element from an existing row in the grid. Any remaining elements in the row get shifted over by one column, filling the space from the removed element.
remove_row() removes all elements in an existing row, and the row itself, from the grid.
The second parameter to remove_rows() specifies the nmber of rows to remove starting with the row specified by the first parameter.
get() returns the element at the given grid coordinates. A nullptr widget gets returned if no element exists at the given coordinates.
resort_rows() moves the rows in the grid. The index vector's size must match the number of rows in the grid. The index vector's values must consist of strictly increasing values, starting at 0, in some particular order, meaning that: for a grid of 8 rows, the index vector must contain values 0 through 7.
resort_rows() reorders the rows as if the index vector gets sorted in its natural order, and the corresponding rows get repositioned accordingly. For example, when the index vector contains the values:
This ends up moving the cells in the first row, row #0 to row #6, row #6 to #3, and row #3 to row #0.
The results are unspecified if the index vector fails to meet the stated requirements.
These methods define the default properties of rows and columns. Rows and columns are numbered, starting with row and column 0 in the top-left corner.
default_row_border() sets the default border drawn above the given row. default_col_border() sets the default border drawn on the left side of the given column. x::w::border_infomm specifies the border; alternatively the current theme's border gets specified by name.
requested_row_height() and requested_col_width() sets the desired size of the row or the column, specified as a percentage between 0-100 of the overall grid's width or height. This is just a hint to the grid layout manager. If the grid's size exceeds its standard size, the additional real estate gets doled out to the rows and the columns according to their requested sizes.
row_alignment() and col_alignment() specify the default alignment for the cells in the grid.
default_top_padding(), default_bottom_padding(), default_left_padding() and default_right_padding() set the default padding for the specified row or column.
row_alignment() and col_alignment() gets set before creating the cells in the given row or column. Once created, each individual cell's alignment gets fixed, and does not get affected by remove_row_defaults() and remove_col_defaults().
row_alignment() must get set before using append_row() or insert_row() to construct a factory for cells in the row.
set_background_color() is equivalent to invoking set_background_color() and remove_background_color() on the grid layout manager's underlying container widget. This is mostly for use by an XML-based specification of the container's contents. generate() creates new contents from the loaded theme file. See the tutorial for more information.
| typedef functionref<void (const gridlayoutmanager &, uielements &) > x::w::gridlayoutmanager_generator |
Generate something in the grid layout manager.
A nullable pointer reference to a grid layout manager.
| typedef ref<hotspotObj> x::w::hotspot |
A widget that can be activated.
A widget that can be activated, in some way, with a pointer button or ENTER or SPACE.
Installs a callback that gets invoked when the hotspot is activated. Only one callback can be installed at a time. A new callback replaces the previously installed one. To uninstall the current callback, install another one thta does nothing.
| typedef ref<hotspot_bgcolorObj> x::w::hotspot_bgcolor |
A hotspot that changes colors.
A subclass of a hotspot which changes background color when activated or used.
A nullable pointer reference to a hotspot with colors.
| typedef functionref<void (THREAD_CALLBACK, const callback_trigger_t &, const busy &)> x::w::hotspot_callback_t |
Signature for a hotspot activation function.
| typedef std::variant<hotspots_none, hotspots_create, hotspots_update> x::w::hotspot_processing |
Whether create_richtextstring() should create focusable label hotspots.
Used in elementObj::implObj to determine whether hotspots are allowed in the rich text string.
| typedef ptr<hotspotObj> x::w::hotspotptr |
A nullable pointer reference to an activatable widget.
| typedef ref<iconObj> x::w::icon |
A loaded icon.
Holds a reference to an icon.
After construction, at some point initialize() gets invoked from the connection thread, to finish initialization.
theme_updated() gets invoked, in some fashion, to notify the icon that the display theme has changed, this may result in a replacement image.
Both initialize() and theme_updated() return an icon object that should be used going forward. It's possible that between the time the icon gets constructed, and initialize(), the current theme has changed, in which case initialize() returns the new icon for the new theme; otherwise initialize() returns the same object. Similarly, theme_updated() usually brings a new icon from the new theme.
| typedef ptr<iconObj> x::w::iconptr |
A nullable pointer reference to an icon.
| typedef ref<imageObj> x::w::image |
An image
This widget shows an image loaded from a file. The filename is followed by width and height values which are x::w::dim_args and are optional. The width and height values are x::w::dim_args.
The filename's extension must be .sxg, .jpg, .gif, or .png, and specifies the file format. create_image() tries each one until it finds the file when the filename's extension is not specified.
Only the .sxg format uses the optional width and height values. Other formats always use the pixel size from the image. The width and height values specify the scaled dimensions of the image. A zero value for either one computes a default value that preserves the loaded image's aspect ratio. .sxg is the library's internal custom image file format. Without a specified width and height a loade .sxg image uses its default size and aspect ratio.
If the filename does not have a pathname component and does not exist in the process's current directory, create_image() also searches the library's current theme directory.
x::w::image using the same filename, and without a path component in the filename, does not load the file if a different file with the same name exists in the new directory, and does not fail if the file does not exist in the new directory.| typedef ref<image_buttonObj> x::w::image_button |
A simple button that display a different image when it changes state.
A traditional checkbox or a radio button. This object is returned from a factory's create_checkbox() or create_radio() method.
create_checkbox() and create_radio() take the same parameters, except that create_radio() takes an additional, initial parameter, a radio group identifier, an opaque label. All image button with the same label link all radio buttons into a single group. The common parameters are:
std::vector<std::string> that specifies custom images for a checkbox or a radio button that uses custom graphics. See x::w::image for more information. Each string names a file with an image for the corresponding state. The default value for this parameter creates three images for checkboxes: set, unset and intermediate. Radio buttons have two default image/states: selected and unselected.Each parameter is individually optional (the initial radio group parameter to create_radio() is mandatory, and appears before these three parameters) but these parameters must appear in the given order (this is done with some aggressive overloading).
A sole factory parameter is the usual case. The factory is expected to create a single widget, typically a label, that appears next to the button's image. Without a factory-created label, the button image appears by itself, unadorned.
Internally, the x::w::image_button is a one-row grid, with the actual image button display element, and an optional label.
The value of the image_button is its current state. For an ordinary checkbox or a radio button, 0 means that it's not selected, and 1 means that it's selected. get_value() returns the current value, and set_value() sets it.
Checkboxes also have a state 2, the "indeterminate" state. The indeterminate state can only be set manually with set_value(). Clicking on a checkbox always changes its state between 0 and 1.
on_activate() installs a callback that gets invoked when the image button's value gets changed, with value indicating the new state of the image button. Only one callback can be installed at a time. Installing a new callback replaces the previous one. Callbacks also get installed by the internal execution thread. When an existing callback gets replaced it's still possible that the old one might get immediately invoked, if the internal execution thread was set to do that, before updating the installed callback.
A newly installed callback always gets invoked immediately with the trigger parameter specifying the x::w::callback_trigger_initial as the reason for the callback. All subsequent invocations pass a different reason, and give the checkbox's or the radio button's new state value. The callbacks get invoked whether the checkbox's or the radio button's state gets clicked on, or directly via set_value().
Appearance of the image_buttons.
Specifies various properties of image_buttons. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::image_button_appearance::base::checkbox_theme() returns a cached default theme appearance for checkboxes. x::w::image_button_appearance::base::radio_theme() returns a cached default theme appearance for radio buttons.
| typedef ptr<image_button_appearanceObj, image_button_appearance_base> x::w::image_button_appearanceptr |
A nullable pointer reference to a image button appearance.
| typedef functionref<void (THREAD_CALLBACK, size_t, const callback_trigger_t &, const busy &)> x::w::image_button_callback_t |
Signature for an image_button activation function.
| typedef ptr<image_buttonObj> x::w::image_buttonptr |
A nullable pointer reference to an image button.
| typedef ptr<imageObj> x::w::imageptr |
A nullable pointer reference to an image.
| typedef ref<input_dialogObj> x::w::input_dialog |
A dialog with an input field.
This object is returned by create_input_dialog().
It is a subclass of a dialog object, containing an additional field, the input field.
| typedef ptr<input_dialogObj> x::w::input_dialogptr |
A nullable pointer reference to a input dialog window.
| typedef ref<input_fieldObj> x::w::input_field |
A text input field.
This is a text input field, with a blinking cursor.
set() specifies the new contents of the input field.
Setting the optional second parameter to true indicates that the new value of the input field is a validated value, and the validator (see below) won't get invoked to validate this value (unless it's subsequently edited).
The validator must set this flag if it chooses to update the value of this field to a canonical format, indicating that it should not be called to re-validate it, in an infinite loop.
Constructing an x::w::input_lock blocks the internal library execution thread (and all other execution threads from accessing the input_field, providing access to its contents).
Once locked, input_lock implements methods to retrieve the contents of the input field.
An input_lock is not required to set() new contents of the text input field. The internal library execution thread actually updates the contents, and set() only sends a message to the execution thread. set() returns immediately after doing so.
Overloaded set() methods that take an IN_THREAD handle from the internal connection thread update the input field immediately.
get() and get_unicode() is equivalent to constructing an x::w::input_lock and using its get() or get_unicode() method.
on_change() installs a callback that gets invoked whenever the contents of the input field change. The callback receives an input_change_info_t parameter describing the change.
on_autocomplete() installs an additional callback that gets invoked whenever the contents of the input field change as a result of typing with the cursor at the end of the field. The callback receives a input_autocomplete_info_t parameter. Returning true from this callback results in the contents of the input field getting updated.
on_validate() installs a callback that gets executed when:
The triggering event parameter gives a more detailed reason why the callback was invoked.
The lock parameter is a lock on the input field. The input field holds a reference on the callback, and this prevents the callback from capturing its own field (this would create a cicular reference). A weak reference is one option, but the lock parameter's get() method provides direct access to the input field's contents.
The callback does not get executed if the input field's contents do not change while the input field has focus, and the input field's contents already passed validation. There are some rare edge cases where the input field loses input focus in some other way (such as the not-very edge case of the application explicitly invoke request_focus() for some other widget). The input field becomes subject to validation the next time it gains input focus.
Returning true marks the field as validated, and the input field gets normally tabbed out of, or loses input focus as a result of a pointer click else. Returning false does not move the input focus, and the field's contents remain unvalidated.
set_validator() forwards its parameters to create_validated_input_field_contents() and uses on_validate() to install the returned callback, and returns a x::w::validated_input_field<T>, an object that represents the most recently validated contents of the text input field.
set_string_validator() forwards its parameters to create_string_validated_input_field_contents() and uses on_validate() to install the returned callback. set_string_validator() returns a x::w::validated_input_field<T>, an object that represents the most recently validated contents of the text input field.
Invoking validate_modified() manually triggers validation, if one is required. Returns an indication whether the input field passed validation. By default an input field passes validation if it is not visible, if it's disabled, or if it does not have a validation callback. If the validation callback already validated the field and it hasn't been modified at all, this returns true without invoking the callback again.
validate_modified() is for use by keyboard shortcut-invoked callbacks. Validation takes place when tabbing out of the input field, so it's useful to invoke the validation callback from a keyboard shortcut, after the input field was modified but not yet validated.
on_validate() callbacks get executed only after finishing the editing of the input field (while tabbing out, or clicking out of the input field). An input field filter adds more control over the input field's editing process. An input field filter checks each individual modification to the input field, and has the ability to ignore it, or do a different modification.
In all cases, the input field edits a single text string (a Unicode text string). All the input filter does is modify the text that gets added or removed from the input field, during editing.
on_default_filter() installs a basic input filter, with the following requirements:
autoselect and autodeselect its contents, upon gaining or losing keyboard focus.The first parameter to on_default_filter() is a callback that determines whether a given Unicode character is valid input. Invalid characters (typed in, or pasted), get ignored.
The second parameter is a std::vector<size_t> that specifies which characters in the input field are fixed and cannot be typed over.
The third parameter specifies a placeholder Unicode character where text input actually goes. A input field with a default filter is, essentially, a fixed size and the placeholder character designates where text input goes. As text gets typed in, these placeholder characters get replaced by the typed text.
Existing text always gets removed from the end of the entered text, and gets replaced by the placeholder character. Although the cursor is movable anywhere in the input field, any changes get quietly ignored except the ones that add or remove text at the end.
on_filter() installs a single callback that implements more granular control over changes to the input field. The callback gets invoked for every potential change to the contents of the input field, deletion and or insertion.
on_filter() receives an input_field_filter_info object. It's starting_pos specifies the tentative deletion/insertion point. n_delete indicates the number of characters for a tentative deletion, and new_contents gives the new contents tentatively inserted into the input field.
A non-0 n_delete and a non-empty new_contents specifies a change that simultaneously removes existing contents, and inserts new contents in its place. type provides some context for the reason for the change, and size gives the current number of characters in the input field, for informational purpose.
Returning from the callback without taking any action results in no changes to the input field's contents. The tentative change gets ignored.
update() with no parameters applies the tentative change. Alternatively, invoking update() with explicit parameter applies a specific change which may or may not have anything to do with the tentative change.
move() moves the cursor pointer to the indicated position in the input field. select_all() selects the entire contents of the input field.
A search widget behavior gets enabled by setting x::w::input_field_config's input_field_search. This is a small object with two fields:
callback which is a callable object that takes an x::w::input_field_search_info parameter.search_format that's specifies the bidi_format of the search string that the callback receives, this defaults to x::w::bidi_format::none.Alternatively, enable_search() installs a stub callback, and on_search() installs the callable object after the input field widget gets created.
Spin buttons are enabled by x::w::input_field_config's set_default_spin_control_factories() or set_spin_control_factories() method. on_spin() installs two callbacks that get executed in response to clicking on the appropriate button. A typical implementation uses an input field validator to validate the contents of the input field, with the callbacks taking the validated input value, incrementing or decrementing it, and then updating the input field with the new value.
A hint is a brief message that's shown in the input field when it's empty and does not have input focus. Its purpose is to provide a brief description of what's expected to be entered into this field. The hint disappears when the input field gains keyboard focus and its cursor starts blinking.
\n characters in the hint.hint is an x::w::text_param. Appearance of the input_field.
Specifies various properties of a input_field. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::input_field_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a input field appearance.
| typedef void x::w::input_field_filter_callback_t(THREAD_CALLBACK, const input_field_filter_info &) |
Callback for filtering changes to the input field.
| typedef void x::w::input_field_search_callback_t(const input_field_search_info &) |
Callback used by an input field to search for values.
Reference-counted input field validation callback.
| typedef bool x::w::input_field_validation_callback_t(THREAD_CALLBACK, input_lock &, const callback_trigger_t &) |
Signature of a callback for validating the contents of the input field.
An input field's on_validate() installs this callback to validate the contents of the input field.
A nullable pointer reference to a reference-counted input field validation callback.
| using x::w::input_field_validation_function_type = typedef typename input_field_detect_validator_functor_parameter< validation_function >::optional_return_type_t |
What create_validated_input_field_contents()'s validation_function's type.
Determine the validation function's type
| typedef ptr<input_fieldObj> x::w::input_fieldptr |
A nullable pointer reference to an input_field.
| typedef void x::w::install_contextpopup_callback_t(THREAD_CALLBACK, const element &, const callback_trigger_t &, const busy &) |
Signature of a context menu callback installer.
| typedef void x::w::internal_focusable_cb(const internal_focusable_group &) |
Callback for processing internal_focusable_group.
| typedef mpobj<ref<richtext_implObj>, std::recursive_mutex > x::w::internal_richtext_impl_t |
A container for an internally-implemented object.
Acquiring a lock on this object blocks access to the internal richtext structure that represents the contents of the input field, blocking other execution threads from accessing it
| using x::w::is_numeric_or_string_v = typedef typename is_numeric_or_string <std::remove_cv_t<std::remove_reference_t<T> >>::type |
Helper alias for dim_arg's constructor.
Appearance of the buttons created by the item layout manager.
Specifies various properties of a item layout manager's button. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::item_button_appearance::base::theme() returns a cached default theme appearance.
Item layout manager's append_item() and insert_item() take an optional parameter that specifies custom properties for the new button.
A nullable pointer reference to a item button appearance.
| typedef mpobj<itemlayout_button_container, std::recursive_mutex> x::w::item_info_t |
Mutex-protected info on the items we are managing.
Appearance of the item layout manager.
Specifies various properties of an item layout manager. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::item_layout_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a item layout manager appearance.
| typedef functionref<void (THREAD_CALLBACK, size_t, const itemlayout_lock &, const callback_trigger_t &, const busy &)> x::w::itemlayout_callback_t |
Callback that gets invoked whenever the close button gets clicked on an item.
A layout manager for a container that displays a list of items.
This is often used with an input_field, and placed above or below it.
This layout manager adjusts its container to any horizontal size. It expects its container's parent container to size the item layout manager's container to a specific horizontal size. Each element in the container gets drawn as a button, typically with a text label, inside it. There's an "X" next to it. These elements, items, get placed horizontally in a row until the row reaches the container's horizontal width, then a new row gets created for the next set of items.
The item layout manager is usually used with an input_field, and the container gets placed above or below it, and ends up being sized to the same width as the input field. The input field has an on_validate() callback; the callback checks and parses the content that gets typed into the text field. The text gets parsed as one or more "items" of some kind, and cleared from the input field. Each the item gets added to the item layout container, reprensented by a single button. Clicking on the "X" next to it invokes a callback that typically removes the item from the list.
size() returns the current number of items in the container. append_item() adds a new item to the end of the container, and insert_item() adds a new item before an existing item in the container. append_item() and insert_item() take a lambda or a callable object as a parameter and invoke it with a factory. The lambda must use the factory to create the item's label, usually a label, but it can be any widget. The callback must explicitly show() the label element. The results of using the factory to create more than one element are not specified.
For best results, all items in the list should have the same height. Always using create_label() with the same font is a simple way to do that.
remove_item() removes an existing item from the list. The items in the container are numbered consecutively, starting at 0. Removing or adding an item in the middle of the container automatically renumber the remaining items in the container. get_item() returns an existing item element.
Constructing an itemlayout_lock blocks all other execution threads from accessing the items in the container.
Passing an x::w::new_itemlayoutmanager to create_focusable_container() creates a new container that uses the item layout manager. x::w::new_itemlayoutmanager's constructor's optional parameter is a callback. Items in the container are drawn with a small "X" next to them, and clicking on an item's "X" invokes the callback. The usual behavior is to remove the item from the list, and the above example shows the default callback that gets installed, unless a custom one gets passed to the constructor. The default callback simply invokes remove_item() to remove the clicked item.
The callback's first parameter is the number of the item in the container whose "X" got clicked, and the second parameter is the locked item list.
on_remove() removes the existing close button callback and installs the replacement callback. Only one callback is installed, at a time, and installing a new close callback replaces the existing one.
| typedef functionref<void (const itemlayoutmanager &, uielements &) > x::w::itemlayoutmanager_generator |
Generate something in the item layout manager.
A nullable pointer reference to an item layout manager.
| typedef bool x::w::key_event_callback_t(THREAD_CALLBACK, const all_key_events_t &, bool, const busy &mcguffin) |
Callbacks for reporting key events.
The callback returns true if it processed the key event.
The first parameter is the key event, an actual keypress or pasted text from the X input method manager.
The second parameter indicates whether the key press or release is considered to be "activation" of that key. This parameter is always set to "true" for pasted X input method manager text.
| typedef ref<labelObj> x::w::label |
| typedef ref<label_forObj> x::w::label_for |
A link between a focusable, and its label.
Pointer clicks on a label get forwarded to its focusable, as if the focusable itself was clicking, with the same results.
The labeled element's enabled flag also tracks its focusable's enabled flag.
A strong reference to this link is owned by the label. The focusable keeps a weak list of existing links from all labels for the focusable.
| typedef ptr<label_forObj> x::w::label_forptr |
A nullable pointer reference to a label link.
| typedef std::variant<int, std::string_view> x::w::label_hotspot_id |
Identifiers for focusable label hotspots
Each hotspot is identified by a unique identifier when constructing a text parameter for a focusable. This can be an integer or a literal string.
| typedef std::unordered_map<label_hotspot_id, text_hotspot> x::w::label_hotspots_t |
All hotspot callbacks
create_focusable_label() takes a container of hotspots to bind them to the placeholders in the text parameter.
| typedef ptr<labelObj> x::w::labelptr |
A nullable pointer reference to an label.
Alias.
Alias.
| typedef ref<layoutmanagerObj> x::w::layoutmanager |
A layout manager.
Every container has a layout manager, that manages the elements inside the container widget. get_layoutmanager() returns the container's layout manager, which can be:
The layout manager returned by get_layoutmanager() typically acquires an internal lock on the container. The lock gets released when all references to the returned layout manager object go out of scope and get destroyed. At this time, any updates to the container are processed and finalized.
The internal lock can block the background thread that updates the display. The layout manager object handle returned by get_layoutmanager() should not persist for a long time; otherwise the display will be unresponsive.
List appearance
Specifies the appearance of a list, and lists used in derivative widgets, like combo-boxes.
When creating a new container that uses the list layout manager, or derivatives from it, the appearance class member of x::w::new_listlayoutmanager or its analogue is a constant reference to this appearance object. This appearance object specifies various visual attributes of the list. The appearance class member is a constant reference and cannot be modified.
The default appearance properties are specified by the current display theme, and the default appearance object is cached for speed, and that's the reason why it's constant.
Use modify() to make a copy of an existing constant appearance object. The passed-in closure receives a temporarily modifiable copy of the original constant appearance object.
x::w::list_appearance::base::theme() returns the default, cached, constant list appearance object.
combobox_theme() and pane_theme() similarly return the cached default list appearance themes for lists appearing in combo-boxes and pane containers.
A nullable pointer reference to a list appearance properties.
| typedef std::variant<text_param, image_param, separator, shortcut, inactive_shortcut, hierindent, menuoption, submenu, selected, list_item_status_change_callback, get_new_items> x::w::list_item_param_base |
A new list item.
Base class for listlayoutmanager's insert_items(), and append_items() parameters.
Type-erased list_item_status_change_callback_t.
| typedef void x::w::list_item_status_change_callback_t(THREAD_CALLBACK, const list_item_status_info_t &) |
List item callback's signature.
Type-erased list_item_status_change_callback_t.
| typedef functionptr<void (THREAD_CALLBACK, const list_item_status_info_t &) > x::w::list_selection_changed_cb_t |
selection_changed callback.
| typedef functionref<void (THREAD_CALLBACK, const listlayoutmanager &, size_t, const callback_trigger_t &, const busy &) > x::w::list_selection_type_cb_t |
selection_type callback.
The selection type callback gets invoked with an internal list lock in place. The selection type callback does not need to lock the list.
| typedef mpobj_lock<listimpl_info_s, std::recursive_mutex> x::w::listimpl_info_lock_t |
A forward reference to a lock on a listimpl_info_t.
| typedef mpobj<listimpl_info_s, std::recursive_mutex> x::w::listimpl_info_t |
Internal listlayoutmanager mutex-protected data.
| typedef ref<listitemhandleObj> x::w::listitemhandle |
A reference handle for an item in a list.
Provides the means for referring to an item in a list, combo-box, or a popup menu (whose layout managers derives from the list layout manager) without holding a strong reference on the widget.
List item handlers are returned when x::w::get_new_items is requested when calling of the list layout manager methods that create new list items.
The handle gives a way of having weak references to items in the list, and make it possible to conveniently update a particular item in the list, without going through the motions of keeping track of its list item number, and going through the motions of formally constructing the layout manager object and updating the list item. List item handles support the following operation on their list item:
enabled() enables or disables the handle's item, or indicates whether the item is currently enabled.
select() and autoselect() selects or unselcts the handle's item, see list layout manager's description of the semantics of these operations. The IN_THREAD overloads provide a default trigger object if not specified.
on_status_update() installs or replaces the list item's status callback.
Return the sub-menu's layout manager, if this is a submenu entry in a menu, and the menu has not been destroyed.
This handle does not hold any strong references on the widget. If the underlying list item gets removed from the list, or the list itself gets removed, this object automatically becomes an effective no-op, and attempts to update the now non-existent list item do nothing. enabled() always returns false. submenu_listlayout() returns a null ptr.
| typedef ptr<listitemhandleObj> x::w::listitemhandleptr |
A nullable pointer reference to a WHATITIS.
The list layout manager.
The list layout manager arranges its contents in a vertical list and implements a selection list. Each item in the list is on its own row. Moving the pointer over the item and clicking it selects it or unselects it; or unselects any other item that was selected previously, this depends on the new_listlayoutmanager.
The list layout manager can also be tabbed to. With the keyboard focus in the selection list "Cursor-Down" highlights each item in the list starting with the first one, "Cursor-Up" highlights the previous item in the list, and "Enter" selects or unselects the list item.
The list layout manager also serves as the underlying layout manager for pop-up menus and the list of options for a combo-box; in which case selecting a list item results in the action that corresponding to selecting the menu item, or the combo-box option item. The standard combo-box layout manager overrides many of the methods in order to require, by definition, that only text labels can be added to the list.
size() returns the number of elements in the list. selected(item_number) indicates whether list item #item_number is currently selected. An overloaded selected() returns an optional size_t indicating which list item is currently selected (or none). For list items that allow more than one item to be selected, all_selected() indicates which items are selected. Similarly, current_list_item() returns which list item is currently highlighted, by the mouse pointer, or via keyboard navigation. This is meaningful only if invoked from the connection thread; the list of selected items, and the currently highlighted list item, can change at any time.
autoselect(item_number) produces the same results as if the given item number was clicked on with a pointer or the keyboard, selecting/unselecting any items according to the list's selection_type.
selected(item_number, flag) manually selects or unselects the given item number. Normally each list item gets selected or unselected with the pointer or keyboard. This manually changes an individual list item's status to either the selected or the unselected status.
unselect() unselects all currently selected items (if any).
With one exception, select() and unselect() should not be used with menus or combo-boxes, only with generic containers that use this layout manager. The exception: menu items that are selectable menu options.
The selection_changed callback, installed when the list was created, gets invoked when list items' selected status gets officially updated.
The list gets automatically sized to accomodate its widest item. Several fields in the new_listlayoutmanager control other aspects of the list's appearance. height sets the list's height, this example sets the list to be ten rows tall. The list scrolls if there are more than ten items in the list. The list's actual height gets computed based on the list's default font, and the actual number of items that get displayed may vary if there are list items that are anything other than plain text with the default font. Setting vertical_scrollbar adjusts the scroll-bar's appearance
A list added as a vertical pane inside another container that uses the pane layout manager should turn off its own scroll-bar entirely, and specify a variable_height(). This makes the list's height adjustable, and the pane layout manager supplies the vertical scroll-bar for the list, when needed.
This locks the contents of the list, preventing all other execution threads from accessing the list until the lock object goes out of scope and gets destroyed. All other list layout manager methods, like size() and selected() see a consistent snapshot of the list, until the lock goes away.
List items that get selected() or autoselect()ed get their official selection status updated only after the lock gets released.
Unlike other layout managers, the list layout manager does not manage arbitrary widgets. The list layout manager contains only simple text labels.
append_items() adds new list items to the end of the existing list. insert_items() inserts new list items before an existing item in the list. replace_item() replaces existing items in the list. removes_item() removes a single item from the list. replace_all_items() is equivalent to removing all existing items from the list and then using append_items() to set new list items.
Each list item gets identified by its index number, starting with index 0. This item number gets passed to insert_items(), replace_items(), and remove_item(). Adding and removing items from the list automatically renumbers the remaining items in the list.
New list items get specified by a std::vector of list_item_params, which is a std::variant with several possibilites. The possible values consist of two classes of parameters:
All metadata parameters apply to the immediately following list item, and therefore cannot appear at the end of the vector. Two or more metadata parameters for a single list item can appear in any relative order, as long as they appear before their list item:
This adds two list items, "Lorem Ipsum" and "Dolor Sit Amet". The latter comes up initially selected.
A std::string, or a std::u32string specifies an individual list item, as a locale-encoded string or a unicode string. Alternatively, an x::w::text_param object specifies a list item with font and color mark-ups.
This example inserts two text items before the existing item #0.
An x::w::image_param value adds an image icon instead of a text label.
An x::w::separator parameter serves as a placeholder for a horizontal line that visually separates groups of items in the list. The separator line is considered a list item, gets numbered like all other items, and may be removed or replaced, with remove_item(), or replace_items().
A callable object (typically a simple lambda) specifies a callback that gets invoked whenever the following list item gets selected or unselected. The callable object gets attached to the immediately-following text item. The above example attaches the callback object to the "Lorem" item. No callback gets attached to the following "Ipsum" item, unless one is also specified.
An overloaded on_status_update() replaces either an existing list item's callback.
This replaces item #1's callback, and invokes the new callback with the trigger parameter's value of x::w::initial, reporting whether or not the list item is currently selected.
These replace existing callbacks. The initial callbacks get specified in the x::new_listlayoutmanager when creating the list.
This is used only with list layout managers that manage menus. By default, selecting a menu item does not render it as selected or unselected, as with separate list items. Only its callback gets invoked.
An x::w::menuoption parameter indicates that the following item is a selectable option. In addition to invoking its callback, a visual indicator (usually a small bullet) gets added or removed next to the list item.
Optional aggregate initialization specifies a unique menu option radio group label.
Selecting a menu option with a non-empty radio group name automatically deselects any other selected option the same radio group name (in the same menu popup).
A x::w::selected in a regular list or in a menu with a menuoption indicates a list item that's initially selected. Its optional aggregate initialization sets the value of its sole bool field (defaults to true ).
This is used only with list layout managers that manage menus. Passing a shortcut parameter sets a keyboard shortcut for the following list item. The shortcut key combination results in the same action as when the following item gets selected with the mouse pointer or the keyboard.
You cannot install a shortcut for a separator item (makes no sense), or a submenu.
An x::w::inactive_shortcut also shows the shortcut key in the menu item but doesn't actually attach it to the menu item.
This is used only with list layout managers that manage menus. The x::w::submenu parameter gets initialized with a callable object (typically a closure) that creates a sub-menu that gets attached to the following list item. The closure receives another list layout manager as its sole parameter, that represents the sub-menu's list layout manager.
The closure serves to create the contents of the sub-menu. The closure gets invoked by the library, and is responsible for creating the contents of the sub-menu.
The second optional parameter to x::w::submenu's aggregate initialization list is an "x::w::popup_list_appearance" that specifies custom visual appearance of the menu.
x::w::hierindent indicates an indentation level for the following list item. Its parameter is the number of units of indentation.
The list layout manager uses the indentation level to horizontally shift the contents of the list item; and does not treat the list item any differently otherwise. This allows using the list layout manager to present a hierarchical tree of items, with progressively-indented items intuitively appearing as sub-items of the preceding items.
x::w::hierindent applies only to the next specified list item; and a non-zero indentation level must be explicitly specified for each list item, individually.resort_items() reorders the items in the list. The index vector's size must match the number of items in the list. The index vector's values must consist of strictly increasing values, starting at 0, in some particular order, meaning that: for a list of 8 items, the index vector must contain values 0 through 7.
resort_items() reorders the items in its list as if the index vector gets sorted in its natural order, and the corresponding items in the list get repositioned accordingly. For example, when the index vector contains the values:
This ends up moving the first item in the list, item index #0 to item #6, item #6 to #3, and item #3 to position #0.
The results are unspecified if the index vector fails to meet the stated requirements.
This disables list item #4. Disabled list items cannot be selected with the pointer or keyboard.
enabled() after changing the item's status may still report that the item's status did not change.Setting new_listlayoutmanager's columns member creates a list with multiple columns. The number of discrete items passed to append_items(), insert_items(), replace_items(), and replace_all_items must be an even multiple of the number of columns, with one exception. Each group of items specified by the column count becomes a new item, with each text string in the corresponding column,
The sole exception is a list item separator. This parameter always gets specified by itself, as a single value.
remove_item(), append_items(), insert_items(), replace_items(), replace_all_items(), resort_items(), autoselect(), unselect(), selected(), on_status_update(), on_selection_changed(), on_current_list_item_changed(), selection_type(), and the enabled() overload which enables or disable a list item, get executed by the internal connection thread. There are two versions of each method. The first version sends a message to the internal library connection thread that implements this method. The IN_THREAD overload of each method is the implemention method that executes the operation, and can be invoked directly when executing another callback in the connection thread.
Using selected() to select a list item and passing a key or a button event for the optional trigger parameter results in the selected list item getting scrolled into view, if applicable.
Additional information gets returned from methods that create new list items, like append_items(), when the last value in a std::vector of list_item_param variants is an x::w::get_new_items value.
get_new_items, if specified, must be the last value in the vector when creating new items with append_items(), or other methods that create items.
Currently the returned object contains a single value, handles, which is a std::vector of x::w::listitemhandles.
This is empty by default, and gets returned only when get_new_items gets specified. It takes additional work to create these objects, so this work gets done only upon request.
append_copy_cut_paste() calls append_items() to create the standard "Copy", "Cut", and "Paste" menu items. This is typically used with the list layout manager to add them to the application's menu.
It's also possible to use append_copy_cut_paste() in a custom right pointer button context popup menu of an input field. All input fields have a default right context popup menu with these options. Calling an input field's install_contextpopup_callback() replaces the default popup with a custom one. Using append_copy_cut_paste() with that menu allows implementing a custom input field context popup menu that includes these standard menu items.
append_copy_cut_paste()'s parameter is either:
append_copy_cut_paste() returns an x::w::copy_cut_paste_menu_items object.
generate() generates the contents of the list from the loaded theme file. See the tutorial for more information.
| typedef functionref<void (const listlayoutmanager &, uielements &) > x::w::listlayoutmanager_generator |
Generate something in the list layout manager.
A nullable pointer reference to a text-only list layout manager.
| typedef ref<main_windowObj, main_windowBase> x::w::main_window |
Top level application window.
Inherits some functionality from its generic_window superclass.
Like factories, creating a top level application window uses a creator lambda to populate its contents. The creator lambda's parameter is the new main window.
Main windows inherit from generic windows.
install_window_icons() sets icon shown in the main window's title bar. install_window_icons()'s parameter is a vector of strings. Multiple icons of different sizes should be made available, for the window manager to pick an icon with a preferred size.
Theme icons are .sxg-formatted images that are scalable to multiple sizes. An overloaded install_window_icons() takes a single filename referring to an .sxg file, and installs multiple copies of it that are scaled to preset default sizes.
Filenames without a search component gets searched for in the current directory, and the current display theme's directory if the file does not exist in the current directory.
The filename suffix is optional and can be omitted; install_window_icons() tries each known filename suffix.
on_delete() installs a lambda that gets executed when the main application window's close button gets clicked. The closure receives a busy blocking object.
The menu bar at the top of the main window is initially hidden. get_menubar() returns its container, whose layout manager is x::w::menubarlayoutmanager. get_menubarlayoutmanager() is a equivalent to get_menubar()->get_layoutmanager().
Creates a generic dialog. The dialog needs to be show_all()ed, to make it visible by showing all of the dialog's widgets.
The first parameter is an x::w::create_dialog_args object. This object sets the new dialog's parameters. It's constructible from a single literal string, or this object is individually constructible, and passed in. Its required first parameter is a unique identifier for the new dialog. All dialogs created by the same main window must have unique identifiers. By convention, unique dialog identifiers are based on Internet domain names, either "unique.example.com", or "unique@example.com", where "example.com" is an Internet domain registered by the application.
The second parameter is the new dialog's creator, a lambda that gets called just before create_dialog() returns. It receives the just-created dialog as its parameter, and its job is to create the dialog's contents.
Optional x::w::create_dialog_args parameters:
modal is a bool flag. It's false by default. Setting it to true creates a modal dialog. While a modal dialog is visible, the parent window or dialog ignores all pointer and button events, and gets visibly shaded accordingly.
x::w::create_dialog_args's dialog_layout member specifies the new dialog's layout manager. It defaults to x::w::new_gridlayoutmanager.
If specified, dialog_layout cannot be set to a temporary object, and the new layout manager object cannot be destroyed before the new dialog gets created.
create_ok_dialog() creates a dialog with only an "Ok" button. create_ok_cancel_dialog() creates a dialog with "Ok" and "Cancel" buttons. Selecting either button hide()s the dialog and invokes the corresponding callback lambda.
The dialog shows an icon on its left side, the second parameter specifies one of the predefined icon names from the current theme. The second parameter is a callback lambda that creates the main contents of the dialog to show next to the icon, typically a short label.
create_ok_dialog() and create_ok_cancel-dialog() have two overloaded version with two more parameters that give non-default labels for their buttons, in place of "Ok" and "Cancel".
create_ok2_dialog() creates a dialog with two "Ok" buttons, and one cancel button; and a separate callback for each one. The labels for all three buttons are required. create_ok2_dialog() can include one optional parameter, a keyboard shortcut for the 2nd "Ok" button.
create_input_dialog() constructs an dialog with a input field, returning an x::w::input_dialog.
stop_message() is a shortcut that uses create_ok_dialog() to format and show() a text label in a modal (by default) dialog using the "stop" icon.
exception_message() does the same with a thrown exception object.
An optional x::w::stop_message_config parameter customizes the properties of the error dialog.
alert_message() creates a similar dialog that uses the "alert" icon, and the optional x::w::alert_message_config parameter.
acknowledged_callback to execute a callback when the dialog gets closed.create_file_dialog() returns a x::w::file_dialog, for selecting an existing or a new file.
create_print_dialog() returns a x::w::print_dialog, for selecting a printer and options for printing a document.
dialogs() returns the labels of the dialogs that currently exist. dialog() returns a dialog with the specified label. A null ptr gets returned if the dialog does not exist.
remove_dialog() removes the dialog from the main_window.
Appearance of the main_window_config.
Specifies various properties of a main window. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::main_window_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a main window appearance.
| typedef std::variant<main_window_config, splash_window_config, transparent_splash_window_config> x::w::main_window_config_t |
| typedef ptr<main_windowObj, main_windowBase> x::w::main_windowptr |
A nullable pointer reference to a main application window.
| typedef ref<menuObj> x::w::menu |
A menu button in a menu bar.
This widget represents a menu in a menu bar, a container with list layout manager that manages the items in the menu.
This installs an on_state_update() callback for the menu's popup window. See on_state_update() for more information. This provides the means of having a callback invoked whenever the popup menu is shown or hidden.
| typedef ref<menubarfactoryObj> x::w::menubarfactory |
Menu bar factory.
A factory for adding menus to a menu bar.
x::w::menubarfactory is a meta-factory that adds new menus to the application's menu bar. The title of the new menu does not necessarily have to be a text string. Any non-focusable widget can serve as a menu title. add() creates a new menu. The first parameter is a callback that receives an x::w::factory for a parameter, and should use it to construct a widget that becomes the new menu's title. add_text()'s first parameter is a x::w::text_param. add_text() is equivalent to using add() with create_label(). Only one widget may be created using the factory, and it gets automatically show()n.
The second parameter is the creator callback for the menu's contents. The creator callback receives an x::w::listlayoutmanager parameter, which it should use to populate the new menu.
Both add() and add_text() have additional parameters. Each individual parameter is optional; any that get specified must appear in the following order:
| typedef functionref<void (const menubarfactory &, uielements &) > x::w::menubarfactory_generator |
Generate something using a menu bar factory.
| typedef ptr<menubarfactoryObj> x::w::menubarfactoryptr |
A nullable pointer reference to a menu bar factory.
Menu bar layout manager.
A layout manager for a main window's menu bar.
A main window's menu bar has two sections, aligned against the left and the right margin.
append_menus() returns a factory that adds new menus to the end of the left-aligned section.
insert_menus() returns a factory that adds new menus before an existing menu in the left-aligned section.
append_right_menus() returns a factory that adds new menus to the end of the right-aligned section.
insert_right_menus() returns a factory that adds new menus before an existing menu in the right-aligned section.
remove_menu() and remove_right_menu() remove an existing menu from the corresponding section of the menu bar.
get_menus() and get_right_menus() return the number of menus on the left and the right side of the menu bar. get_menu() and get_right_menu() return the approrate menu.
| typedef functionref<void (const menubarlayoutmanager &, uielements &) > x::w::menubarlayoutmanager_generator |
Generate something using a menu bar layout manager.
A nullable pointer reference to a menu bar layout manager.
| typedef ptr<menuObj> x::w::menuptr |
A nullable pointer reference to a menu button.
| typedef void x::w::metrics_update_callback_t(THREAD_CALLBACK, const metrics::axis &, const metrics::axis &) |
| typedef void x::w::motion_event_callback_t(THREAD_CALLBACK, const motion_event &) |
Signature of a motion event callback.
A busy mcguffin factory is not provided. Acquiring a busy mcguffin as a result of a motion event is rather rude.
| typedef functionref<void (const new_booklayoutmanager_plainptr &layout, uielements &elements) > x::w::new_booklayoutmanager_generator |
Generate something to initialize a new_booklayoutmanager.
Pseudo-ref used to initialize a new_booklayoutmanager parameter.
| typedef functionref<void (const new_borderlayoutmanager_plainptr &layout, uielements &elements) > x::w::new_borderlayoutmanager_generator |
Generate something to initialize a new_borderlayoutmanager.
Pseudo-ref used to initialize a new_borderlayoutmanager parameter.
| typedef functionref<void (const new_custom_comboboxlayoutmanager_plainptr &, uielements &elements) > x::w::new_custom_comboboxlayoutmanager_generator |
Generate something to initialize a new_custom_comboboxlayoutmanager.
Pseudo-ref used to initialize a new_custom_comboboxlayoutmanager parameter.
| typedef functionref<void (const new_editable_comboboxlayoutmanager_plainptr &, uielements &elements) > x::w::new_editable_comboboxlayoutmanager_generator |
Generate something to initialize a new_editable_comboboxlayoutmanager.
Pseudo-ref used to initialize a new_editable_comboboxlayoutmanager parameter.
| typedef functionref<void (const new_gridlayoutmanager_plainptr &layout, uielements &elements) > x::w::new_gridlayoutmanager_generator |
Generate something to initialize a new_gridlayoutmanager.
Pseudo-ref used to initialize a new_gridlayoutmanager parameter.
| typedef functionref<void (const new_itemlayoutmanager_plainptr &layout, uielements &elements) > x::w::new_itemlayoutmanager_generator |
Generate something to initialize a new_itemlayoutmanager.
Pseudo-ref used to initialize a new_itemlayoutmanager parameter.
| typedef functionref<void (const new_list_or_combobox_layoutmanager_plainptr &layout, uielements &elements) > x::w::new_list_or_combobox_layoutmanager_generator |
Generate something to initialize a new_list_or_combobox_layoutmanager.
Pseudo-ref used to initialize a new_list_or_combobox_layoutmanager.
| typedef functionref<void (const new_listlayoutmanager_plainptr &layout, uielements &elements) > x::w::new_listlayoutmanager_generator |
Generate something to initialize a new_listlayoutmanager.
Pseudo-ref used to initialize a new_listlayoutmanager parameter.
| typedef functionref<void (const new_pagelayoutmanager_plainptr &layout, uielements &elements) > x::w::new_pagelayoutmanager_generator |
Generate something to initialize a new_pagelayoutmanager.
Pseudo-ref used to initialize a new_pagelayoutmanager parameter.
| typedef functionref<void (const new_panelayoutmanager_plainptr &layout, uielements &elements) > x::w::new_panelayoutmanager_generator |
Generate something to initialize a new_panelayoutmanager.
Pseudo-ref used to initialize a new_panelayoutmanager parameter.
| typedef functionref<void (const new_peepholelayoutmanager_plainptr &layout, uielements &elements) > x::w::new_peepholelayoutmanager_generator |
Generate something to initialize a new_peepholelayoutmanager (scrollable)
Pseudo-ref used to initialize a new_scrollable_peepholelayout parameter.
| typedef functionref<void (const new_standard_comboboxlayoutmanager_plainptr &, uielements &elements) > x::w::new_standard_comboboxlayoutmanager_generator |
Generate something to initialize a new_standard_comboboxlayoutmanager.
Pseudo-ref used to initialize a new_standard_comboboxlayoutmanager parameter.
| typedef functionref<void (const new_tablelayoutmanager_plainptr &layout, uielements &elements) > x::w::new_tablelayoutmanager_generator |
Generate something to initialize a new_tablelayoutmanager.
Pseudo-ref used to initialize a new_tablelayoutmanager parameter.
| typedef functionref<void (const new_toolboxlayoutmanager_plainptr &layout, uielements &elements) > x::w::new_toolboxlayoutmanager_generator |
Generate something to initialize a new_toolboxlayoutmanager.
Pseudo-ref used to initialize a new_toolboxlayoutmanager parameter.
A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.
| typedef nonrecursive_visibilityObj<focusframecontainer_elementObj< container_visible_elementObj< container_elementObj< child_elementObj> > > > x::w::nonrecursive_visibility_focusframe_t |
A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.
| typedef functionref<void(THREAD_CALLBACK, const ok_cancel_callback_args &) > x::w::ok_cancel_dialog_callback_t |
Signature of an ok or cancel callback.
| typedef const connection_thread& x::w::ONLY |
Some class methods can only be executed by the internal connection thread
Syntactic sugar for designating class methods and library functions that are callable only by the library's internal connection thread.
The library functions' first parameter gets declared as "ONLY IN_THREAD", and the function call other thread-only functions by specifying "IN_THREAD" as their first parameter.
This provides for a lightweight compile-time enforcement of thread-only methods and functions that are callable only by other thread-executed code.
| typedef mpobj<page_layout_info_s, std::recursive_mutex> x::w::page_layout_info_t |
Internal page layout manager mutex-protected info.
| typedef ref<pagefactoryObj> x::w::pagefactory |
Factory for containers managed by the page layout manager.
This factory is returned by x::w::pagelayoutmanager's append() and insert() methods. It inherits from the standard factory object, and implements additional halign() and valign() methods.
The page layout manager automatically sizes the container to accomodate the largest widget in the container, even when it's not visible; so switching to a different widget does not change the layout of other widgets in the window.
Calling halign() and valign() before creating new widgets specifies how narrow or shorter widges get accomodated in the page that's sized for the largest widget. By default all widgets get centered on their respective pages.
| typedef functionref<void (const pagefactory &, uielements &) > x::w::pagefactory_generator |
Generate something using a book factory.
| typedef ptr<pagefactoryObj> x::w::pagefactoryptr |
A nullable pointer reference to a element factory for the page layout manager.
The page layout manager.
This layout manager treats each element as a virtual page, with only one page being visible at any given time. Making another page, another element, another page visible hides the currently visible page, which gets replaced by the new page.
The pages get numbered by the page layout manager, starting with page #0. append() returns a factory that adds new pages, new widgets, to the end of the existing list of pages; insert() returns a factory that inserts new pages between an existing page, identified by its number, and automatically renumbers the remaining pages. remove() removes a page, and automatically renumbers the remaining pages.
lookup() returns the current page number of the given element.
size() returns the number of pages in the container container. lookup() returns the index of the given element. lookup() returns nothing if the given element is not in the container: you looked up someone else's element.
open() makes the given page number (the element-pages are numbered starting with 0) visible, and makes the currently-visible page, if there is one, disappear.
close() makes the currently visible page disappear, without making another page visible. opened() indicates which page is currently visible, if there is one.
get() returns element #n.
Constructing the page lock object blocks all other execution threads from accessing the page layout manager. The number of elements in the container, and other aspects of the container, may be examined using the page layout manager as a stable, consistent snapshot, blocking other execution threads from modifying the paged container.
| typedef functionref<void (const pagelayoutmanager &, uielements &) > x::w::pagelayoutmanager_generator |
Generate something in the page layout manager.
A nullable pointer reference to a page layout manager.
| typedef ref<pagetabgridlayoutmanagerObj> x::w::pagetabgridlayoutmanager |
The grid layout manager for a book layout manager's page tab.
| typedef ptr<pagetabgridlayoutmanagerObj> x::w::pagetabgridlayoutmanagerptr |
A nullable pointer reference to a book page tab grid layoutmanager.
Appearance of the next new pane.
Specifies various properties of a new pane. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::pane_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a pane appearance.
Appearance of the pane layout manager.
Specifies various properties of a new pane layout. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::pane_layout_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a pane layout appearance.
| typedef ref<panefactoryObj> x::w::panefactory |
A factory for new panes in a pane layout manager's container.
New elements get created as individual panes with adjustable sizes.
The appearance member specifies the appearance of the next new pane. appearance is a reference to a constant object. The default appearance comes from the current display theme. A custom appearance for the next new pane gets created by using an existing appearance object's modify(). This invokes the passed in closure that receives a modifiable copy of the appearance object. modify() returns the new constant appearance object.
The panes maintain a reference on their appearance object, and the connection thread may access the panes' appearance objects at any time, and this convention ensures, by contract, that the appearance objects are constant and thread safe, and the only time the appearance objects exist is when they get created as a copy of an original constant appearance object.
Each time a new pane gets create, the appearance member gets reset back to the default theme-specified appearance.
Pane sizes get specified in millimeters or theme-specified dimensions. Rather than sizing the pane container from the sizes of all individual elements, the overall size of a pane container is the sum total of all panes' specified initial sizes, plus the sizes of the divider/sliders, plus the inner padding of each pane.
Initially each pane shows only as much of the pane's element as fits within the specified pane initial size. Sliding dividers get placed between panes. The mouse or keyboard moves the sliders. This adjusts how the pane container overall space gets divided between all of its panes.
background_color sets the new pane's custom background color.
The individual panes may be expanded beyond their elements' initial size. horizontal_alignment and vertical_alignment sets the position alignment of the next pane's element when its smaller than its pane.
pane_scrollbar_visibility controls the visibility of the new pane's scroll-bar. Each pane's scroll-bar provides an alternative to using the nearby sliders to make the pane bigger. The default scrollbar visibility is x::w::scrollbar_visibility::automatic_reserved.
configure_new_list() gets called before calling create_focusable_container() for a table or a list. Passing a x::w::new_listlayoutmanager or x::w::new_tablelayoutmanager to configure_new_list() installs a modified pane appearance object that adjusts several settings for an intuitive interface consisting of a vertical pane with a selection list or a table.
Ordinary selection lists have a fixed height specified as the number of rows in the list, and the selection list provides a scroll-bar for longer lists. Tables also have a fixed height by default.
configure_new_list() installs a new appearance object with adjusted padding and position, settings and disables the scrollbar; and adjusts the new table or list to have an adjustable height, and no borders. The pane layout manager-provided borders are sufficient.
Setting configure_new_list()'s optional second parameter to true indicates that the new list is synchronized with another list; most likely the list in the preceding or the following pane. It's necessary to make those lists' scrollbars always visible; so all synchronized lists always have the same base width, preventing the situation where one list is wider than the others because it does not currently show a scrollbar (the automatic_reserved setting does not result in good visual appearance). This will prevent the lists' column widths from getting correctly synchronized.
After this selection list gets placed in the pane, the pane's sliders indirectly adjust the selection list's height. The pane's sliders adjust the pane's height, and with the pane's now having a variable height, the height of the selection list is always the same as its containing pane.
The end result is a selection list or a table that looks like an integral part of the pane container. This result gets further improved by automatically incorporating the selection list's tabbing order into the pane's tabbing order. Normally the pane's sliders' and its scroll-bars' tabbing order is independent of any focusable elements in the container's pane.
When a focusable container gets created as a pane (a selection list is a focusable container), the focusable container's tabbing order gets inserted in the natural order of the pane container's individual tabbable elements – the sliders and the pane's own scroll-bars (from other panes in the container). Do not directly adjust the individual tabbing order of focusable containers in the pane, the pane handles it automatically.
This special treatment gets afforded only to focusable containers that get created as individual panes, and does not affect any other focusable elements, that get created either directly as panes, or as individual elements of non-focusable container panes. Those focusable elements continue to have independently-adjustable tabbing order.
| typedef functionref<void (const panefactory &, uielements &) > x::w::panefactory_generator |
Generate something using a pane factory.
| typedef ptr<panefactoryObj> x::w::panefactoryptr |
A nullable pointer reference to a pane factory.
Pane layout manager
A series of panes, stacked in a vertical column or a horizontal row in order to use less real estate for displaying larger contents.
Each element in a container with a pane layout manager is placed into a single column (vertical panes) or row (horizontal panes). The elements are separated by thin dividers which slide, expanding the amount of the overall container that's allocated to each element, at expense of the other elements in the pane.
The width of vertical panes, and height of horizontal panes, gets automatically sized to the widest (tallest) pane.
Each individual pane could be smaller than the pane's element, partially (or even fully) hiding it. Move the dividing sliders on each side of the element's pane to see more of the pane's element. Alternatively, use each pane's scroll-bar to scroll different parts of the pane's element into view.
Passing an x::w::new_panelayoutmanager to create_focusable_container() creates a new container that uses the pane layout manager. new_panelayoutmanager's members set the new container's custom borders and colors.
Only one execution thread has access to the underlying container, at a time, using the pane layout manager, just like the grid layout manager, from which it derives.
append_panes() returns a factory that adds new panes after the container's existing panes. Each widget created with the returned factory's methods gets placed into a new pane.
The pane layout manager automatically numbers the panes in the container, starting with pane #0. size() returns the number of panes currently in the container. get() returns the pane element given its 0-based index.
Use x::w::panefactory's methods before creating a new element to set the new element's pane properties, such as the pane's initial size, and non-default inner padding.
insert_panes()'s factory adds new panes before an existing pane in the container. remove_pane() removes an existing pane. remove_all_panes() removes all panes from the container. replace_all_panes() is equivalent to using remove_all_panes(), followed by append_panes().
new_panelayoutmanager's restore() assigns a label to the new pane container. Labeled pane container have their number of panes automatically saved, when they're closed, and then restored when the container gets created again. All pane containers in the same window must have unique labels.
In the creator function use restored_size() to determine how many panes were restored. Restoration is not guaranteed. It's possible that there are no previously-saved panes, and in all cases the new pane container is empty. It is the creator function's responsibilty to create the given number of panes, if it does so their initial sizes get restored automatically when the pane container becomes visible.
The pane layout manager's container is focusable, whose tabbing order is adjustable with respect to other focusable widgets. The focusable elements in the pane container include the dividing sliders, and each pane's scroll-bars, when they're visible.
In addition to adjusting the slider elements by dragging them with the pointer, the slider elements can be tabbed to, using the keyboard, and moved using the cursor keys. The tabbing order in the pane container goes through the slider elements and all visible pane scroll-bars in order.
Each individual pane may have containers with individual focusable elements. The tabbing order of the focusable elements is independent from the pane container's tabbing order, they do not "interleave". For that reason it's preferred to have their tabbing order immediately follow or precede their pane container.
generate() generates the contents of the pane from the loaded theme file. See the tutorial for more information.
| typedef functionref<void (const panelayoutmanager &, uielements &) > x::w::panelayoutmanager_generator |
Generate something in the pane layout manager.
A nullable pointer reference to a pane layout manager.
Appearance of the scrollable peephole.
Specifies various properties of a peephole. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::peephole_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a peephole appearance.
The peephole layout manager
This layout manager puts another widget inside a (usually) smaller area, and scrolls parts of it into view, as needed.
width() and height() sets the peephole's size, given as dim_axis_arg's. new_scrollable_peepholelayoutmanager/new_peepholelayoutmanager's callback creates the peepholed widget, and gets scrolled within the peephole if its size exceeds the peephole's.
create_container() and create_focusable_container()'s creators are not used because the callback creates the peepholed element; but the creators can tweak some generic container-specific settings.
Not setting the width or the height makes the peephole's size, in that dimension, always match the peepholed element's. This results in a peephole that typically scrolls only the other dimension.
| typedef functionref<void (const peepholelayoutmanager &, uielements &) > x::w::peepholelayoutmanager_generator |
Generate something in the peephole layout manager.
A nullable pointer reference to a peephole layout manager.
| typedef ref<pictformatObj> x::w::pictformat |
Available picture formats on the server.
X protocol RENDER parameter, specifying the RENDER format of pictures. See RENDER documentation for more information.
| typedef ptr<pictformatObj> x::w::pictformatptr |
A nullable pointer reference to a pictformat to the server.
| typedef ref<pictureObj, pictureBase> x::w::picture |
A Picture object, as specified in the X Rendering extension.
A picture consists of a drawable, a pictformat, and some rendering state, and implements rendering operations.
This class implements Picture object operations, see the RENDER X protocol extension for more information.
These picture methods implement various compositing operations. Several overloaded methods offer alternative calling conventions, and options, like specifying an explicit compositing operation (the default is SRC).
| typedef ref<pictureObj::implObj> x::w::picture_internal |
An internal implementation object of a picture.
| typedef ref<pixmapObj> x::w::pixmap |
A Pixmap object.
This is a wrapper for the X protocol's Pixmap object. This pixmap object offers few methods on its own. Drawing operations are performed using an associated picture object, using the X RENDER extension, and using the graphic context object. A pixmap inherits from a drawable object, whose create_picture() and create_gc() methods construct suitable picture and graphic context objects for that purpose.
The only information of interest the pixmap brings to the table by itself is the points_of_interest class member. Pixmaps created from SXG files (using an existing drawable's load_pixmap() method) might use the points_of_interest class member to identify designated coordinates in the pixmap image.
| typedef std::unordered_map<std::string, std::pair<coord_t, coord_t> > x::w::pixmap_points_of_interest_t |
Points of interest in a pixmap.
A container for points of interest in this pixmap. Generic, opaque container. Loaded with metadata if the pixmap comes from a scalable sxg image.
Currently used by sxg images for custom pointer images, to define a "hotspot" for the pointer.
A pixmap with a cached picture.
A subclass of a pixmap that's always a const reference. As such, pixmap_with_picture is a const_ref.
Overrides pixmapObj's superclass's create_picture(), to return a cached const picture. Since this is always a const ovject, nothing needs to be done to override the non_const create_picture() method.
| typedef ptr<pixmapObj> x::w::pixmapptr |
A nullable pointer to a pixmap.
| typedef ref<popupObj> x::w::popup |
A popup.
A top level widget that's not controlled by the window manager. Whatever size and position we want it to be, there it is.
The popup typically grabs the pointer or the keyboard focus; but the popup object itself is just a subclass of generic_window that implements metrics notifications by going ahead and reconfiguring itself accordingly.
Popup list appearance
Specifies additional properties for a list in a popup.
Basicaly a subclass of list appearance with some additional properties.
Like x::w::list_appearance, use modify() to make a copy of an existing x::const_popup_list_appearance constant object, using a closure to customize a new x::popup_list_appearance object.
A nullable pointer reference to a popup list appearance properties.
| typedef ptr<popupObj> x::w::popupptr |
A nullable pointer reference to a popup.
| typedef void x::w::print_callback_t(const print_callback_info &) |
Callback used by the "Print" button in the print dialog.
This is not a THREAD_CALLBACK, it gets started in a separate thread.
| typedef ref<print_dialogObj> x::w::print_dialog |
Select a printer and print options.
x::w::main_window's create_print_dialog() method returns a print_dialog.
This dialog lists available printers, and available print options. The first parameter is a unique dialog identifier, like with other main_window dialog factories. The second parameter is a x::w::print_dialog_config, and third parameter specified whether the print dialog is modal, or not.
x::w::print_dialog_config specifies the following dialog options.
Do not use the dialog window's show_all() method to show the print dialog. create_print_dialog() creates an empty, uninitialized print dialog. initial_show() returns immediately after starting a background execution thread that connects to the print spooler and initializes the print dialog, then shows it.
initial_show() takes care of acquiring a wait mcguffin for the main window, until the print dialog becomes available. As such, initial_show() appears to a single, fluid action that puts up a "busy" pointer in the main window until the print dialog opens.
The x::cups::job object the print callback receives already have all the print options set, from the dialog. The only thing that needs to be done is to add the document contents to the object and invoke its submit() method. Because preparing the printed document should be a time-consuming task, the callback also gets the wait mcguffin. The callback does not need to start a new execution thread and pass the wait mcguffin to it. The print_callback itself gets invoked from a new execution thread, and the library's internal execution thread that handles display events continues executing concurrently (in addition to the application's main execution thread).
Appearance of the print_dialog dialog.
Specifies various properties of a print_dialog. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::print_dialog_appearance::base::theme() returns a cached default theme appearance.
| typedef ptr<print_dialog_appearanceObj, print_dialog_appearance_base> x::w::print_dialog_appearanceptr |
A nullable pointer reference to a print dialog appearance.
| typedef ptr<print_dialogObj> x::w::print_dialogptr |
A nullable pointer reference to a print dialog.
| typedef ref<progressbarObj> x::w::progressbar |
Appearance of a progress bar.
Specifies various properties of a progress bar. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::progressbar_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a progressbar appearance.
| typedef ptr<progressbarObj> x::w::progressbarptr |
A nullable pointer reference to a progress bar.
| typedef std::vector<rectangle> x::w::rectarea |
An area defined by a list of rectangles.
| typedef int x::w::redraw_priority_t |
We get better visual results when widgets get redrawn in a particular order.
| typedef uint32_t x::w::rgb_component_squared_t |
Value type that can be used for scaling rgb components.
| typedef uint16_t x::w::rgb_component_t |
Value type for RGB components.
| typedef std::unordered_map<size_t, rgb> x::w::rgb_gradient |
A gradient involving multiple colors.
The map must have a value for key 0. The highest key in the map defines the ending rgb color. The rgb at position #i defines the rgb color for that value.
| typedef ref<richtextObj> x::w::richtext |
A list of text paragraphs.
This object represents one or more paragraphs of "rich text", text with colors and fonts.
The implementation object is protected by a mutex, because it is not thread safe. finish_initialization() must be invoked every time the mutex protecting this object gets locked, except in order to obtain the current contents of the rich text. This is required in order to finish construction of this object.
| typedef ref<richtextcursorlocationObj> x::w::richtextcursorlocation |
A location in a rich text object.
These objects get attached to a specific character in a rich text object. When the contents of the rich text object are modified, the richtextcursorlocation object stays attached to the same character in its new position. If richtextcursorlocation's object gets removed, it'll point to the next or the previous character.
Like the rich text object, this is not a thread-safe object. The rich text iterator object provides a thread-safe wrapper for this object. This object is considered an internal object owned by the rich text classes, and gets modified by them.
We thread a very fine needle here. In all cases, we can only get here under protection of richtextobj's big lock. So, we're single-threaded here in all cases. But, additionally, ONLY IN_THREAD we may also look at my richtextfragmentObj's horiz_info in order to cache the horizontal pixel offset that this location represents.
The object that owns a richtextcursorlocation.
Inherited by richtextiterator. This object is responsible for initializing and deinitalizing the richtextcursorlocation
A nullable pointer reference to a richtextcursorlocationowner.
| typedef ref<richtextfragmentObj> x::w::richtextfragment |
A fragment of unicode text, ending at an allowed or a mandatory line break.
A nullable pointer reference to a text fragment.
| typedef ref<richtextiteratorObj> x::w::richtextiterator |
Iterator, or a pointer, into a rich text object.
Rich text iterators expose an iterator-like access to the underlying rich text object, whose begin(), end(), and at() methods create new iterators. Each iterator owns a reference on its richtext object, and a reference to the richtextcursorlocation, an internal placeholder for the iterator, that the rich text classes update themselves.
The richtextcursorlocation can only be accessed while holding a lock on the underlying rich text object. The iterator's method invoke rich text's methods to do that.
richtextiterators have a special relationship to their richtexts. Their methods acquire locks on the richtext, and are able to access info that other classes can't.
An existing richtextiterator's begin() and end() method create another iterator to the first or the last character in the underlying rich text. clone() clones the iterator, returning another one at the same location. swap() swaps the locations of two existing iterators, and pos() returns the iterator's position index in the underlying text, or return a new iterator for the specified location offset.
A nullable pointer reference to a rich text iterator.
| typedef ref<richtextparagraphObj> x::w::richtextparagraph |
A list of text fragments in a rich text object.
A mandatory line break divides sections of rich text "fragments" into paragraphs.
| typedef ptr<richtextObj> x::w::richtextptr |
A nullable pointer reference to a rich text string.
| typedef ref<scratch_bufferObj> x::w::scratch_buffer |
A picture and a pixmap used for preparing widget images.
This is returned by screen object's create_scratch_buffer().
| typedef ptr<scratch_bufferObj> x::w::scratch_bufferptr |
A nullable pointer reference to a scratch buffer.
| typedef ref<screenObj, screenBase> x::w::screen |
A screen on a display server.
create() returns a screen object for the default display of the default display server connection, a specific screen object, or a screen object for the explicitly specified connection, depending on the parameters.
get_connection() returns the existing screen object's connection object.
create_mainwindow() creates a new main window. The first parameter is a creator lambda, the second parameter is optional and specifies the new main window's layout manager.
The main window's former's position can be saved, loaded with load_screen_positions(), then passed in order to reopen the main window in the same location.
This is done by constructing a main_window_config and using its screen_position() method.
A main window may also be created directly:
This creates a new main window on the default screen of the default X server.
Determine the size of the screen.
get_workarea() returns the screen's work area, the usable area of the screen.
For convenience, this is forwarded to this screen's connection.
Memorized positions of main windows on the screen.
screen_positions memorizes the screen position and size of a main window. This provides the means to save the main window's position and size, and the next time the application runs its window opens in the same position.w
Use LibCXX's configdir() to prepare the application's configuration directory. The constructor's first parameter is the application's configuration file's name. The file gets loaded if it exists. An empty screen_positions gets constructed if the file does not exist.
A screen_positions object and an internal window identifier are optional parameters when creating a new x::w::main_window. More than one main window's screen position can be memorized, using a unique identifier for each window. The identifiers are opaque labels and the library treats them as arbitrary identifiers, except that the should not include punctuation, as they're used verbatim in an XPath expression (the configuration file is XML-formatted).
If the screen_positions object is empty (because the configuration file does not exist, probably), this is quietly ignored and the new main window opens with its default size and position.
In all cases, the window's ultimate position and size are controlled by the display's window manager, this serves merely to politely ask the window manager to open the window with this size and position.
The application must take explicit steps to memorize its windows' position and size. A main window's save() method records its current position and size, using the specified its identifier. Each main window must use a unique, opaque, identifier. Any existing recorded position with the same identifier gets replaced by the new position, so the the application can use the same screen_position object that it initially constructed to restore their previous size and position, and it still reflects it, or the application can default-construct a new, empty, screen_position object.
screen_position 's save() saves all recorded positions in the specified configuration file.
A handle for a saved widget configuration.
A screen_positions_handle gets constructed when creating a widget that preserves its configuration as XML. Upon construction, the widget's configuration, identified by its type, name, and the main window it's created in, gets used to compute its XPath in the configuration file.
newconfig() returns a writelock anchored at an XML element without any contents. Any existing, previously-saved configuration, gets removed. This is called from save(), to save the widget's configuration.
config() returns a readlock for reading the existing configuration. If there is none the returned readlock points to an XML element without any content.
A nullable pointer reference to screen_positions_handle.
A nullable pointer reference to memorized screen positions.
| typedef number<uint32_t, scroll_v_tag> x::w::scroll_v_t |
Discrete data type for scrollbar values.
| typedef ref<scrollbarObj> x::w::scrollbar |
A scroll-bar widget.
set() manually changes the position of the handle in the scroll-bar. reconfigure() replaces the scroll-bar's original configuration.
get_value() polls the scroll-bar and returns its current value. get_value() returns the value before the scroll-bar was dragged if the scrollbar is in the process of being dragged, at this time.
get_dragged_value() returns the current value of the scroll-bar, including when it's being dragged.
Of course, since the scroll-bar is managed by an internal library execution thread, the value of the scroll-bar can change at any time. set() and reconfigure() sends a message to the execution thread, and immediately calling get_value() or get_dragged_value() after set() or reconfigure() may still return the previous value of the scroll-bar if the internal execution thread did not yet process the message.
An x::w::scrollbar_config specifies the range of the potential scroll-bar values. The visual position of the scroll-bar's handle is scaled to an unsigned 32 bit value between 0 and (range-page_size). The above example configures a scroll-bar whose virtual position is always between 0 and 100, inclusively. Note that with the default page_size of 1, a range of 100 means that the scroll-bar's values range from 0 to 99.
The "page_size" component determines how big is the scroll-bar's draggable handle, in terms of the scroll-bar's range. This example sets the handle's size equivalent to ten scroll-bar positions, and clicking on the scroll-bar outside of its handle area using the first pointer button advances the scroll-bar's position by 10. "increment" sets how far the scroll-bar's value changes when the arrow buttons at either end of the scroll-bar get clicked with the first pointer button. Holding "CTRL" while clicking on the arrows advances the scrollbar's value by 1.
Installing a scroll-bar callback is better than using get_value() and get_dragged_value(). The callback gets automatically executed whenever the scroll-bar's values change.
create_horizontal_scrollbar() and create_vertical_scrollbar() take the initial callback as an optional parameter. Alternatively, on_update() replaces any existing callback with the provided callback. The new callback always gets executed immediately, giving the scroll-bar's current value, and then continues to get executed whenever the scroll-bar's value changes. This happens only with the replacement on_update() callback. The initial callback, provided when the scroll-bar gets created, does not get automatically executed.
set(), reconfigure(), and on_update() are overloaded with an initial IN_THREAD parameter, to be invoked from another callback in the connection thread.
Appearance of the scrollbar_config.
Specifies various properties of a scrollbar. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::scrollbar_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a scrollbar appearance.
| typedef functionref<void (THREAD_CALLBACK, const scrollbar_info_t &)> x::w::scrollbar_cb_t |
Callback that reports the scrollbar's updated values.
| typedef ref<scrollbar_images_appearanceObj, scrollbar_images_appearance_base> x::w::scrollbar_images_appearance |
A set of images that draws the various parts of the scrollbar.
Specifies individual images that get used to draw a scrollbar.
The default images1 are set by the current display theme, and are cached for speed. x::w::scrollbar_images_appearance::base::horizontal1() and x::w::scrollbar_images_appearance::base::vertical1() return the default images for the horizontal and vertical scrollbar. x::w::scrollbar_images_appearance::base::horizontal2() and x::w::scrollbar_images_appearance::base::vertical2() return the default images for the horizontal and vertical scrollbar when the corresponding portion of the scrollbar is selected (via the pointer or the keyboard).
| typedef ptr<scrollbar_images_appearanceObj, scrollbar_images_appearance_base> x::w::scrollbar_images_appearanceptr |
A nullable pointer reference to a WHATITIS.
| typedef ptr<scrollbarObj> x::w::scrollbarptr |
A layout manager for one element only.
Shared code for layout managers that have a single child element.
get() returns the current element. replace() returns an widget factory. Using the factory to create and show() a new widget replaces the previous widget in the container.
| typedef functionref<void (const singletonlayoutmanager &, uielements &) > x::w::singletonlayoutmanager_generator |
Generate something in the singleton layout manager.
A nullable pointer reference to a singleton layout manager.
| typedef std::unordered_set<xcb_atom_t> x::w::source_dnd_formats_t |
Supported dnd formats advertised by the source.
The formats given in the XdndEnter message, and from the source window's XdndTypeList are combined together.
| typedef functionref<void (THREAD_CALLBACK, const busy &)> x::w::stabilized_callback_t |
on_stabilized() callback type.
| typedef functionref<void (THREAD_CALLBACK, const standard_combobox_selection_changed_info_t &) > x::w::standard_combobox_selection_changed_t |
Callback that gets invoked when a standard combo-box's selection changes.
Standard combo-box layout managager.
A subclass of a custom combo-box layout manager that implements a standard combo-box containing plain text labels.
x::w::new_standard_comboboxlayoutmanager creates a focusable container that uses the standard combo-box layout manager.
Use only the methods documented here to modify the contents of the combo-box. Do not use the methods from the inherited custom combo-box list layout manager, and the underlying list layout manager, except as noted.
append_items() inserts a new item to the end of the combo-box's item list. insert_items() inserts a new item before an existing item. remove_item() removes an item.
replace_all()'s parameter is a vector of text items, which replaces all existing items in the combo-box.
These methods are inherited from the underlying list layout manager, and the parameters are actually list_item_param variants, however the only permissible items in a standard combo-box item are text labels, x::w::separator, a list item status change callback, or using an x::w::new_items to obtain a handle to the new list items.
size() returns the number of items in the list, and item() returns the given item number.
selected() returns the index of the currently-selected combo-box item.
autoselect() and unselect() are inherited. autoselect() manually selects an item in the list, and unselect() unselects the existing combo-box selection.
A x::w::standard_combobox_lock may be instantiated in order to lock access to the combo-box's items.
Standard combo-boxes inherit the enabled() method from the underlying list layout manager, in order to enable or disabling individual list items.
Standard combo-boxes inherit the IN_THREAD and the nonIN_THREAD versions of the methods from the underlying list layout manager, which work in the analogous way.
generate() generates the contents of the combo-box from the loaded theme file. See the tutorial for more information.
| typedef functionref<void (const standard_comboboxlayoutmanager &, uielements &) > x::w::standard_comboboxlayoutmanager_generator |
Generate something in the standard combobox layout manager.
A nullable pointer reference to a standard combox-box layout manager.
| typedef std::unordered_map<std::string, functionref<void (const factory &)> > x::w::standard_dialog_elements_t |
Standard dialog factories.
An internal data structure that represents all factories for a particular theme-specified dialog.
Synchronized axis.
An internal structure used to link the widths of columns from two or more selection lists.
Creating a new selection list using the same synchronized_axis will result in the selection lists' columns to have the same width provided that the selection lists themselves are sized the same width by their respective containers.
A nullable pointer reference to a synchronized axis.
Table header appearance
Specifies the appearance of the header row of a table.
new_tablelayoutmanager inherits from new_listlayoutmanager whose appearance member specifies the list's appearance.
new_tablelayoutmanager's extra_table_appearance member refers to this object that specifies additional properties of the table's header row.
The default properties are set by the current display theme, and are cached for speed. x::w::table_appearance::base::theme() returns a cached default theme appearance.
A nullable pointer reference to a table header row appearance.
| typedef std::vector<std::tuple<x::w::text_param, x::w::label_config> > x::w::table_headers_param_t |
Parameter for table_headers()
The table layout manager
A subclass of the list layout manager that adds a header row with optional draggable borders. If adjustments are enabled, putting the pointer on top of a border between two columns allows it to be clicked and dragged, adjusting the relative sizes of the columns on either side of the border.
x::w::new_tablelayoutmanager inherits most configuration settings from the x::w::new_listlayoutmanager.
There are several different settings that affect the table's visual width. Unless otherwise specified, each table column's width gets computed based on the contents of each column, and that fixes the table width.
minimum_column_widths specifies an explicit column width, in millimeters. This is a map indexed by column number. The above example sets the width of columns 0 and 1 to 20 millimeters. This affects only these columns. Any other columns in the table keep their default minimum width.
width optionally sets the table's initial or preferred width. This is effective only if its more than the minimum table width, whether defaulted or from minimum_column_widths.
Setting maximum_table_width specifies the maximum table width. The resulting table can be wider or narrower than its minimal width. unlimited_table_width() specifies no maximum table width, the table will be resizable to any width greater than its minimal size.
minimum_column_widths specifies the minimum width of each individual column. The size of the entire table also includes any borders, and is included in width and maximum_width.adjustable() enables interactive adjustments to the table columns' relative widths by dragging table's borders. This is independent of the overall column and table width settings. adjustable()'s parameter is the table's unique label.
Note that the table layout manager inherits from the list layout manager which does not draw borders by default. Set column_borders to have visible borders in the table for best visual results (column border settings get inherited from x::new_listlayoutmanager, which has no borders by default).
adjustable()'s parameter is the table's unique identifier. The adjusted column widths get preserved and restored. All tables in the window should have a unique identifier.
The initial table headers get specified by the x::w::new_tablelayoutmanager. An existing table's layout manager's header() returns the header element of the specified column. replace_header() returns a factory for replacing the existing header element with a new one. Using the returned factory to create and show() a new widget replaces the existing column's header with a new one.
Assigns a unique label to the table container that's used to restore its columns' previous sizes. All table widgets in a window must have unique
| typedef functionref<void (const tablelayoutmanager &, uielements &) > x::w::tablelayoutmanager_generator |
Generate something in the table layout manager.
A nullable pointer reference to a table layout manager.
| typedef std::variant<theme_color, rgb> x::w::text_color_arg |
Text label colors.
Text label colors can only be an explicit rgb value or a theme color
| typedef std::variant<const button_event *, const key_event *, focus_change> x::w::text_event_t |
The event that invoked a text link callback..
The callback gets invoked for a button event, or for a focus::gained and focus::lost event, indicating that the pointer moved into or out of this text section.
The callback also gets invoked for a key event, when the link is activated by a key press.
| typedef functionref<text_param(THREAD_CALLBACK, const text_event_t &)> x::w::text_hotspot |
A focusable label hotspot callback.
Focusable labels invoke these callbacks when the corresponding parts of the focusable label gain or lose keyboard focus, or are activated.
Hotspot handlers are callable objects that get invoked with a x::w::text_event_t which indicates the reason for invoking the callback:
x::w::focus_changed::gained or x::w::focus_changed::gained indicating that the hotspot area gains or loses keyboard or pointer focus.The hotspot handler must return another x::w::text_param (but without any hotspot markers of its own). Empty text results in no change to the visual appearance. A non-empty text replaces the hotspot's text with the returned value.
| typedef functionptr<text_param(THREAD_CALLBACK, const text_event_t &)> x::w::text_hotspotptr |
A nullable pointer to a focusable label hotspot callback.
| typedef ref<textlabelObj> x::w::textlabel |
Text label interface.
Specifies the interface for a widget that contains a text label.
| typedef ptr<textlabelObj> x::w::textlabelptr |
A nullable pointer reference to an text label.
| typedef std::variant<rgb, linear_gradient, radial_gradient> x::w::theme_color_t |
A theme color is either an rgb solid color, or a gradient color.
| using x::w::theme_font_elementObj = typedef typename theme_font_element_types<base, arg1, args...>::type |
Template for attaching theme_fontObj mixins to widgets.
The first template parameter is a subclass of elementObj::implObj. theme_font_elementObj multiply-inherits from the template parameter and a theme_fontObj via an intermediate theme_font_tag template, using the tag specified by the optional second template parameter (which defaults to void ).
The tag is used to create a distinct type only, and is not otherwise used. Additional template parameters may follow, specifying additional tags. This result in multiple inheritances, each one is referenced as theme_font_tag<tag>.
The end result is a multiple inheritance from the first template parameter and theme_font_tag<T>, with T specified by the template parameters to theme_font_elementObj. If none are specified, beyond the parent class, a single inheritance from theme_font_tag<void> results.
Each theme_font_tag<T> inherits from theme_fontObj, which implements methods for each mixed-in font.
For each mixed-in font, there's an initial string or current_fontcollection parameter that corresponds to the mixed-in font. The remaining constructor parameters get forwarded to the parent elementObj::implObj superclass.
| using x::w::themeborder_elementObj = typedef typename themeborder_element_types<base, arg1, args...>::type |
Template for attaching one or more themeborder_element_impl mixins to a widget.
The first template parameter is a subclass of elementObj::implObj, and themeborder_elementObj multiply-inherits from the template parameter and a themeborder_element_implObj via an intermediate themeborder_element_impl template, using the tag specified by the optional second template parameter (which defaults to void ).
The template parameter class is not used, and serves to differentiate multiple superclasses of themeborder_element_impl.
Additional template parameters may follow. This makes it possible to have multiple borders, referring to them as themeborder_element_impl<X>.
The template overrides initialize() and theme_updated(), in order to keep the borders updated.
Each themeborder_element_impl superclass that gets inherited from consumes a leading parameter to the constructor, which can be either a border_arg or a current_border_impl.
That is, if there are two themeborder_element_impl superclasses that get inherited from, the constructor takes two border_arg parameters.
The remaining parameters get forwarded to the superclass specified by the first template parameter.
If optional parameters are not specified, a single void template parameter gets used to mix in a single border.
| typedef ref<themedimObj> x::w::themedim |
A dimension specified by the default theme.
The constructor takes the name of a dimension. pixels(IN_THREAD) returns the number of pixels in the dimension.
Both the constructor, and theme_updated() take an additional parameter referencing the screen whose theme gets checked.
| using x::w::themedim_elementObj = typedef themedims_elementObj<base, arg1, args...> |
Template for attaching one or more themedimObj mixins to a widget.
The first template parameter is a subclass of elementObj::implObj, and themedim_elementObj multiply-inherits from the template parameter and a themedimObj via an intermediate themedim_element template, using the tag specified by the optional second template parameter (which defaults to void ).
The template overrides initialize() and theme_updated(), in order to keep the themedimObj updated.
Additional template parameters may follow. Each parameter assign a label to a themdimObj. The actual classes are not used and do not need to be defined. Two or more labels result in multiple reference dimensions, and multiply-inherited themedimObj. Each one's value gets referenced as them as themedim_element<X>::pixels(IN_THREAD), themedim_element<Y>::pixels(IN_THREAD).
If optional template parameters are not specified, a single void template parameter gets used to mix in a single dimension.
The first parameter to the constructor is a std::tuple with the same number number of values as the number of dimensions. It will be more efficient construct this parameter with std::forward_as_tuple, to avoid copying.
Each value in the std::tuple is itself a two-value tuple that gives the parameters to themedimObj's constructor: a dim_arg and a themedimaxis. The dim_arg parameter is also forwardable as a reference (both of them are, but not much to be gained from forwarding a simple themedimaxis value.
The remaining parameters get forwarded to the elementObj::implObj superclass.
themedim_elementObj is an alias that supplies the default void dimension tag, if none are supplied.
| typedef ONLY x::w::THREAD_CALLBACK |
Alternative syntactic sugar for thread-only invoked callbacks.
Alternative syntactic sugar for declaring callbacks that get invoked by the library's internal execution thread.
| typedef std::chrono::steady_clock x::w::tick_clock_t |
A clock for regularly-scheduled callbacks.
| typedef mpobj<toolbox_info, std::recursive_mutex> x::w::toolbox_info_t |
| typedef ref<toolboxfactoryObj> x::w::toolboxfactory |
A toolbox factory.
A factory that adds new widgets to a container with a toolbox layout manager.
| typedef functionref<void (const toolboxfactory &, uielements &) > x::w::toolboxfactory_generator |
Generate something using a toolbox factory.
| typedef ptr<toolboxfactoryObj> x::w::toolboxfactoryptr |
A nullable pointer reference to a toolbox factory.
The toolbox layout manager
The toolbox layout manager arranges its elements in a row up to its container's width, then continues placing its elements on the next row, and so on.
It's expected that all elements should have the same metrics, and the toolbox layout manager sizes all elements to the largest width and height.
Passing a x::w::new_toolboxlayoutmanager to factory's create_container() creates a new container that uses the toolbox layout manager.
append_tools() returns a factory that adds new tools to the end of the toolbox container. insert_tools() inserts new tools before an existing tool in the container. remove_tool() removes one tool, remove_tools() removes consecutive number of tools.
Tools are number sequentially, starting at 0. Adding and removing tools automatically renumbers them, accordingly.
| typedef functionref<void (const toolboxlayoutmanager &, uielements &) > x::w::toolboxlayoutmanager_generator |
Generate something in the toolbox layout manager.
A nullable pointer reference to a toolboxlayoutmanager.
Appearance of a new tooltip_factory.
Specifies various properties of a tooltip. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::tooltip_appearance::base::tooltip_theme() returns a cached default theme appearance for a popup tooltip. x::w::tooltip_appearance::base::static_tooltip_theme() returns a cached default theme appearance for a static tooltip. x::w::tooltip_appearance::base::direction_tooltip_theme() returns a cached default theme appearance for an input field's text direction tooltip
A nullable pointer reference to a tooltip appearance.
| typedef ref<tooltip_border_appearanceObj, tooltip_border_appearance_base> x::w::tooltip_border_appearance |
Appearance of the tooltip border.
Specifies various properties of a tooltip border. The default properties are set by the current display theme.
The default properties are set by the current display theme, and are cached for speed. x::w::tooltip_border_appearance::base::theme() returns a cached default theme appearance. x::w::tooltip_border_appearance::base::nonalpha_theme() returns a cached default theme appearance for displays that don't have an alpha channel.
| typedef ptr<tooltip_border_appearanceObj, tooltip_border_appearance_base> x::w::tooltip_border_appearanceptr |
A nullable pointer reference to a WHATITIS.
| typedef ref<uigeneratorsObj, uigeneratorsBase> x::w::uigenerators |
Loaded and parsed theme files
XML-based specification that's compiled into a form that gets used to generate() the contents of supported layout manager (and factories).
create() always returns a const_uigenerators, the created object is always constant, and represents the parsed XML layout that gets loaded from an XML file.
A layout manager's generate() creates the contents of its container from the loaded theme file and the widget factories.
See the tutorial for more information on XML-specified generators.
A nullable pointer reference to compiled widget generators.
| typedef std::vector<std::tuple<all_updated_position_widgets_t_iterator, updated_position_move_info> > x::w::updated_position_container_t |
Internal container used in widget position update processing.
| typedef std::vector<std::tuple<element_impl, rectangle, bool> > x::w::updated_position_widgets_t |
Temporary list of widgets and their new position.
The intermediate list consists of: the widget, it's new position, and a flag that's initially false, and gets set to true if the widget's contents were moved directly in the window_pixmap, and the widget does not need to be redrawn.
| using x::w::validated_input_field = typedef ref<validated_input_fieldObj<type> > |
Most recently validated value in the input_field.
An x::w::validated_input_field<T> is one of the values that gets returned from a widget factory's create_input_field() overload that takes the return value from create_validated_input_field_contents(), or create_string_validated_input_field_contents() as the first parameter to create_input_field(). It also gets returned by an existing input field's set_validator() and set_string_validator().
x::w::validated_input_field's contents member is a x::w::validated_input_field_contents object. The installed x::w::input_field callback owns a reference to the validated_input_field_contents, so does the returned x::w::validated_input_field, which also owns a reference to the x::w::input_field.
The following methods get implemented in a x::w::validated_input_field<T> by forwarding them to the x::w::validated_input_field_contents:
value() value_or() access() set() reinitializes the input field with a new value. std::nullopt specifies to value set, the input field gets cleared.
validated_input_field object owns a reference on the underlying x::w::input_field widget.validated_input_field's contents member is a reference to a x::w::validated_input_field_contents<T> object that implements the same value(), value_or(), and access() method, but only an IN_THREAD version of set(). The contents object does not own a reference to the underlying input field, but the input field owns a reference on it.
| using x::w::validated_input_field_contents = typedef ref<validated_input_field_contentsObj<type> > |
Current contents of a validated input field
value() returns the most recently entered value. Generally, no value gets returned before the first value gets entered into the input field, or if the entered contents could not be validated.
value_or() returns the most recently entered value, or its parameter if no value was entered. access() locks the value and passes it to the callable object given as access()'s parameter, releasing the lock after it returns.
set() is a shortcut for updating the value of the validated input field. It is used by the installed input field validation callback, and is also available for on_spin() callbacks as means of updating the spinned value. These callbacks receive an input field lock object that gets passed in as set()'s 2nd parameter. The third parameter is the new std::optional value of this input field, with the std::nullopt value indicating an unset/unvalidated value.
An option fourth parameter is a bool value, defaulting to true which specifies that the passed in std::nullopt value should result in the input field getting cleared. In all cases the passed in value, std::nullopt or otherwise, sets the new value of the validated input field. Passing in a false flag results in whatever actual text is in an input field not getting cleared by a std::nullopt.
A validated_input_field objects owns a reference to the underlying field. The input field also owns a reference to the contents member, a validated_input_field_contents object that holds the actual validated value and implements the value(), value_or(), access() and the IN_THREAD set() overload. The methods in the validated_input_field object are just proxies for the real one, and only the validated_input_field implements the non-IN_THREAD set() overload.
| using x::w::validated_input_field_contentsptr = typedef ptr<validated_input_field_contentsObj<type> > |
A nullable pointer reference to a validated input field contents.
| using x::w::validated_input_fieldptr = typedef ptr<validated_input_fieldObj<type> > |
A nullable pointer reference to a validated input field value.
| typedef number<int16_t, xcoord_tag> x::w::xcoord_t |
An X protocol coordinate is a 16 bit value.
| typedef number<uint16_t, xdim_tag> x::w::xdim_t |
A dimension (size) in the X protocol is a 16 bit value.
|
strong |
How a static tooltip, or a popup, gets attached to its widget.
Specifies how a static tooltip gets positioned with respect to its widget.
below_or_above, above_or_below: the first preference if there's enough room between the widget and the edge of the screen, else the other side. Furthermore, the popup's minimum width is set to be its element's width. This is the style used by combo-box popups.
right_or_left: to the right of the element, else to the left of it. This is the style used by sub-menus.
|
strong |
Bi-directional text direction.
|
strong |
Unicode bi-directional formatting to apply to retrieved text.
Whether to include directional embedding markers in text returned by input_lock's get() and get_unicode() methods, by default.
| Enumerator | |
|---|---|
| none | Do not include embedded directional markers. This mostly means that text that was forcibly entered in the opposite direction will not have embedded directional markers. set()ing the resulting text may not necessarily result in the text being rendered in the same order as it was entered.
|
| embedded | Include embedded directional override and isolation markers. Embedded directional override and isolation markers get included in the returned text, so that it's accurately restored if it gets set() in the same input field again. The logic for calculating directional markers is not exact. Some extra and unneeded directional markers may be included as a result, depending on the input field's specified bi-directional text direction, and won't necessarily match the override and isolation markers from the original contents of the input field. Applications must be fully aware and be able to process all Unicode bi-directional markers. |
| automatic | Include embeded directional markers heuristically. Determine heuristically whether embedded directional or isolation markers are required. |
|
strong |
Cut or copy option.
This gets passed to passed to cut_or_copy_selection() or focusable_cut_or_copy_selection().
| Enumerator | |
|---|---|
| available | Something can be cut or copied. |
| copy | Copy something. |
| cut | Cut something. |
|
strong |
Position of a new dialog with respect to its parent window.
|
strong |
The purpose of calling enabled()
|
strong |
Sets the behavior of a file dialog after selecting a file.
|
strong |
Reported keyboard and pointer focus changes.
This indication gets passed to a widget's on_pointer_focus() and a focusable element's on_keyboard_focus() callbacks, and indicates how the widget focus has changed.
|
strong |
|
strong |
|
strong |
|
strong |
Identifies what kind of a change the input field change callback gets invoked for.
| Enumerator | |
|---|---|
| deleted | |
| inserted | |
| set | |
|
strong |
Identifies the kind of a filtering event.
| Enumerator | |
|---|---|
| inserting | |
| deleting | |
| replacing | |
| move_only | |
|
strong |
Motion events are, sometimes, reported for other than real pointer motions.
|
strong |
How to intepret a specified cursor location, a location in richtext.
The cursor location gets set according left-to-right render order, and the cursor location's in the line fragment gets calculated. If the paragraph embedding left is right to left, and this option is bidi, the line position gets mirrored (location 0 becomes the location at the end of the fragment, and increasing values get counted to the beginning of the line).
This is normally specified as "bidi". "lr" designation does not adjust the location. This is typically done when the location is based on another location in the text, which was already adjusted for right to left embedding level, if appropriate.
| Enumerator | |
|---|---|
| lr | |
| bidi | |
|
strong |
Peephole sizing algorithm.
|
strong |
How a peephole scrolls elements that gain focus into view.
| Enumerator | |
|---|---|
| minimal | Scroll the peephole minimally. |
| centered | Try to keep the input focus centered in the peephole. |
|
strong |
Rich text direction.
What's in the rich text fragment.
| Enumerator | |
|---|---|
| lr | All normal left to right text. |
| rl | All right to left text. |
| both | Mixture of left to right and right to left text. |
|
strong |
Specify when a scroll-bar is visible.
|
strong |
Current temperature of an activatable widget.
|
strong |
Optional text decorations.
This specifies the following text parameters decorations:
| Enumerator | |
|---|---|
| none | |
| underline | |
|
strong |
|
strong |
|
strong |
References adjust_descender_for_underline().
Referenced by adjust_descender_for_underline().
| std::string x::w::bidi_override | ( | const std::string_view & | , |
| bidi | direction | ||
| ) |
Force text direction.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References bidi_override().
| std::u32string x::w::bidi_override | ( | const std::u32string_view & | , |
| bidi | direction | ||
| ) |
Force text direction.
If bidi is automatic, the same string gets returned. Otherwise all isolate, override, and directional markers get removed from the string, and replacement by a single override marker for the given direction.
This is used with input field filters which handle singly-directional text only.
References bidi_override().
Referenced by bidi_override(), and bidi_override().
| always_visible_focusframe_ref_t x::w::create_always_visible_focusframe_impl | ( | const container_impl & | parent_container, |
| const const_focus_border_appearance & | , | ||
| const dim_arg & | hpad, | ||
| const dim_arg & | vpad, | ||
| const std::optional< color_arg > & | bgcolor = {} |
||
| ) |
Create an always_visibleObj focus frame.
References create_always_visible_focusframe_impl().
Referenced by create_always_visible_focusframe_impl().
| container x::w::create_focusframe_container | ( | const ref< focusframecontainer_implObj > & | impl, |
| const element & | e | ||
| ) |
Create a container for a standard focusframe.
Constructs a container public object for a standard focusframe implementation object.
References create_focusframe_container().
Referenced by create_focusframe_container().
| focusable_container_owner x::w::create_focusframe_container_owner | ( | const container_impl & | parent_container, |
| const ref< focusframecontainer_implObj > & | impl, | ||
| const element & | e, | ||
| const focusable_impl & | element_focusable_impl | ||
| ) |
Create a focusable_container_owner for a standard focusframe.
Mostly for internal library use. Creates a focusable_container_owner for a standard focusframe implementation object.
The focusable_container_owner gets registered as an owner for the specified focusable implementation. This is typically some focusable object in the the focus frame (either the given element itself, or some widget in the the container), but whose public object is intentionally not the owner of its focusable implementation object.
The library uses it for buttons which contain non-focusable elements. The button constructs a custom focusframecontainer that implements the focusable interface, containing app-provided elements, and the focusable_container becomes its public owner/object.
References create_focusframe_container_owner().
Referenced by create_focusframe_container_owner().
| functionref< void(THREAD_CALLBACK, const tooltip_factory &)> x::w::create_label_tooltip | ( | const text_param & | , |
| const label_config & | |||
| ) |
Create a default tooltip factory consisting of a label.
A widget's create_tooltip() is equivalent to calling create_label_tooltip() and pasing the resulting callback to create_custom_tooltip().
References create_label_tooltip().
Referenced by create_label_tooltip().
| nonrecursive_visibility_focusframe_ref_t x::w::create_nonrecursive_visibility_focusframe_impl | ( | const container_impl & | parent_container, |
| const const_focus_border_appearance & | , | ||
| const dim_arg & | hpad, | ||
| const dim_arg & | vpad, | ||
| const std::optional< color_arg > & | bgcolor = {} |
||
| ) |
Create an nonrecursive_visibilityObj focus frame.
References create_nonrecursive_visibility_focusframe_impl().
Referenced by create_nonrecursive_visibility_focusframe_impl().
| auto x::w::create_string_validated_input_field_contents | ( | validation_function && | validator, |
| canonical_format_functor && | canonical_format, | ||
| const std::optional< T > & | initial_value, | ||
| new_value_functor && | new_value | ||
| ) | -> create_string_validator_ret_t< T > |
Create a validator for an input field using the >> operator.
Uses create_validated_input_field_contents() to create an input field validator that uses the >> operator to convert the input field's contents to a the type given by the template parameter. This is convenient when the object is an integral type, but any default-constructible type can be used.
The first template parameter is the object type.
create_validated_input_field_contents() returns the same values: the callback that gets passed to the input field's "on_validate()" and a validated_input_field_contents<T> validator object.
The first parameter is different from create_validated_input_field_contents()'s, the remaining parameters are the same. The first parameter is a callable object that receives the following parameters
std::string with the input field's unparsed contentsstd::optional object. It's value is what input field's contents were converted to using the >> operator. A std::nullopt indicates a conversion failure which could be because the field is empty (the closure can look at the unparsed value parameter to verify that).The closure may modify the referenced std::optional value, and change a std::nullopt to some value, or the other way around. The input field gets updated to reflect the changed value.
References create_string_validated_input_field_contents(), and create_validated_input_field_contents().
Referenced by create_string_validated_input_field_contents().
| auto x::w::create_validated_input_field_contents | ( | validation_function && | validator, |
| canonical_format_functor && | formatter, | ||
| const std::optional< input_field_validation_function_type< validation_function > > & | initial_value, | ||
| new_value_functor && | new_value | ||
| ) | -> create_validator_ret_t< validation_function > |
Create a validator for an input field.
create_validated_input_field_contents() returns two values:
1) An on_validate() callback, this callback should get passed to an input_field's on_validate() callback to install the validator.
2) An validated_input_field_contents<T> validator object. The type gets deduced from the validation_function parameter. The on_validate() callback also owns a reference to this object.
This adapts an input_field on_validate() callback to implement a consistent input validation framework for parsing and edit-checking the text input and converting it to a specific data type.
The first parameter to create_validated_input_field_contents() is a closure that returns a std::optional<T>, where T is some data type that the entered text gets converted to. The T type deduces the type of the returned validated_input_field_contents.
The first closure itself receives the following parameters:
std::string or std::u32string, the closure receives the current contents of the input field as either a string in the current encoding, or a unicode string. Note: leading and trailing whitespace gets trimmed off.The closure returns a T value to indicate the value of the converted string, or a std::nullopt if the string is not valid.
The closure is responsible for reporting invalid input, and the usual way to do that is to use the lock parameter and call the lock's stop_message(), that displays an error dialog in the input field's window.
create_validated_input_field_contents()'s second closure takes a T parameter and returns either a std::string in the current locale's encoding or a unicode string.
The returned string represents the entered T value in canonical form. It may or may not be identical to what was entered into the text input field, and passed to the first closure. It's expected that if the returned value gets passed to the first closure, the first closure returns the same value of T.
The date input field's parser provides a default year, if none was typed in, and its formatter converts the full date to canonical format. In this manner, typing in just the month and the day then tabbing out of the date input field updates it to show the full date.
create_validated_input_field_contents() has two defaulted parameters:
std::nullopt.References create_validated_input_field_contents(), and trim().
Referenced by create_string_validated_input_field_contents(), create_validated_input_field_contents(), x::w::input_field_setObj::set_validator(), and x::w::input_field_setObj::set_validator().
| const button_config & x::w::default_button | ( | ) |
Returns default appearance of a default button.
Typically thicker border, to visually mark the default "Ok", or similar, button, amongst its competitors.
References default_button().
Referenced by default_button().
| unicode_bidi_level_t x::w::default_paragraph_embedding_level | ( | ) |
References default_paragraph_embedding_level().
Referenced by default_paragraph_embedding_level().
| void x::w::get_focus_after_in_thread | ( | ONLY | IN_THREAD, |
| const focusable & | me, | ||
| const focusable & | other | ||
| ) |
References get_focus_after_in_thread().
Referenced by get_focus_after_in_thread().
| void x::w::get_focus_before_in_thread | ( | ONLY | IN_THREAD, |
| const focusable & | me, | ||
| const focusable & | other | ||
| ) |
References get_focus_before_in_thread().
Referenced by get_focus_before_in_thread().
| void x::w::get_focus_impl_after_in_thread | ( | ONLY | IN_THREAD, |
| const focusable & | me, | ||
| const focusable_impl & | a | ||
| ) |
References get_focus_impl_after_in_thread().
Referenced by get_focus_impl_after_in_thread().
| bool x::w::in_focus | ( | focus_change | f | ) |
Convert a very detailed focus_change to a simple boolean value.
Returns false for lost and child_lost, true for all others.
References in_focus().
Referenced by in_focus().
| rectarea x::w::intersect | ( | const rectarea & | , |
| const rectangle & | , | ||
| coord_t | offsetx = 0, |
||
| coord_t | offsety = 0 |
||
| ) |
Return an intersection set of two rectangle sets.
With the second set consisting of one widget. Most often used optimized path.
References intersect().
| rectarea x::w::intersect | ( | const rectarea & | , |
| const rectarea & | , | ||
| coord_t | offsetx = 0, |
||
| coord_t | offsety = 0 |
||
| ) |
Return an intersection set of two rectangle sets.
The returned rectangle set consists of only rectangular areas present in both sets.
offsetx and offsety are added to all rectangles' returned coordinates.
offsetx and offsety are added to all rectangles' returned coordinates.
References intersect().
Referenced by intersect(), and intersect().
| bool x::w::is_next_key | ( | const key_event & | ) |
Return true if this key event is for advancing focus to the next field.
References is_next_key().
Referenced by is_next_key().
| bool x::w::is_prev_key | ( | const key_event & | ) |
Return true if this key event is for advancing focus to the previous field.
References is_prev_key().
Referenced by is_prev_key().
| const listlayoutstyle_impl & x::w::list_style_by_name | ( | const std::string_view & | ) |
Return a list layout style by name.
References list_style_by_name().
Referenced by list_style_by_name().
| bool x::w::next_key_pressed | ( | const key_event & | ) |
Return true if keypress, and next_key().
References next_key_pressed().
Referenced by next_key_pressed().
| bool x::w::next_page_key | ( | const key_event & | ) |
Return true if this key event is for advancing focus to the next page.
References next_page_key().
Referenced by next_page_key().
| bool x::w::next_page_key_pressed | ( | const key_event & | ) |
Return true if keypress, and next_page_key().
References next_page_key_pressed().
Referenced by next_page_key_pressed().
| const button_config & x::w::normal_button | ( | ) |
Returns default appearance of a normal button.
References normal_button().
Referenced by normal_button().
| theme_color x::w::operator""_color | ( | const char * | , |
| size_t | |||
| ) |
Theme color name.
"0%"_color specifies a theme font in a text parameter.
| text_decoration x::w::operator""_decoration | ( | const char * | , |
| size_t | |||
| ) |
Text decorations.
"underline"_decoration and "no"_decoration are the only two possible values.
| font x::w::operator""_font | ( | const char * | , |
| size_t | |||
| ) |
Construct a x::w::font from a string.
"_font" literal suffix constructs a font from a string. The string, at a minimum consists of a font family name. A semicolon-delimited list of attributes follows the font family name, for example:
"_theme_font" literal suffix is similar, except that the font name refers to a theme-specified font, with any attributes modifying it:
This uses the theme font "label" as the initial font. The _theme_font literal is defined in text_param_literals.H .
The available attributes are:
Sets the font's foundry name.
Sets the font's name. This is convenient for referencing a theme font and substituting a different font family.
This takes the "label" theme font but sets the font family to "liberation mono".
Sets the font's size to n, which may be fractional. The font's size gets automatically scaled by the current theme.
Multiply the font's size by n, which may be fractional.
Sets the font's weight. "value" is one of: "thin", "light", "normal", "medium", "demibold", "bold", "heavy", or "extrablack".
Sets the font's slant. "value" is one of: "roman", "italic", or "oblique".
Sets the font's width. "value" is one of: "condensed", "normal", or "expanded".
Sets the font's style. This is a font-specific property, that depends on the font.
Sets the font's spacing. "value" is one of: "proportional", "dual", "monospace", or "charcell".
| start_hotspot x::w::operator""_hotspot | ( | const char * | , |
| size_t | |||
| ) |
Text hotspot identifier.
| start_hotspot x::w::operator""_hotspot | ( | unsigned long long | ) |
Text hotspot identifier.
|
inline |
"foo"_image specifies an image icon to be used in a list.
| theme_font x::w::operator""_theme_font | ( | const char * | , |
| size_t | |||
| ) |
Theme font name.
"sans_serif"_theme_font specifies a theme font in a text parameter.
See _font literal for more information on font literals.
| std::ostream & x::w::operator<< | ( | std::ostream & | , |
| const font & | |||
| ) |
Overload << operator.
References operator<<().
| std::ostream & x::w::operator<< | ( | std::ostream & | , |
| const rectangle & | |||
| ) |
Dump the rectangle into an output stream.
References operator<<().
| std::ostream & x::w::operator<< | ( | std::ostream & | , |
| const rgb & | |||
| ) |
Overload << operator.
References operator<<().
| std::ostream & x::w::operator<< | ( | std::ostream & | o, |
| const element_state & | |||
| ) |
References operator<<().
| void x::w::preserve_screen_number | ( | bool | flag | ) |
Memorize screen number as part of the window's positions.
References preserve_screen_number().
Referenced by preserve_screen_number().
| bool x::w::prev_key_pressed | ( | const key_event & | ) |
Return true if keypress, and prev_key().
References prev_key_pressed().
Referenced by prev_key_pressed().
| bool x::w::prev_page_key | ( | const key_event & | ) |
Return true if this key event is for advancing focus to the previous page.
References prev_page_key().
Referenced by prev_page_key().
| bool x::w::prev_page_key_pressed | ( | const key_event & | ) |
Return true if keypress, and prev_page_key().
References prev_page_key_pressed().
Referenced by prev_page_key_pressed().
|
inline |
Fixed list of focusable elements in a single group.
This is used by an focusableObj::do_get_impl() implementation to invoke its callback, passing it a fixed list of focusable implementation objects.
References process_focusable_impls().
Referenced by process_focusable_impls().
| void x::w::process_focusable_impls_from_focusables | ( | const function< internal_focusable_cb > & | cb, |
| const std::vector< focusable > & | v | ||
| ) |
Take a vector of focusables, extract their implementations, invoke the callback.
Note, this individually grabs all impls from do_get_impl(), and returns from it. Handle with care. Make sure all locks are in place.
References process_focusable_impls_from_focusables().
Referenced by process_focusable_impls_from_focusables().
| bool x::w::select_key | ( | const key_event & | ) |
Return true if this key event is for selecting something.
References select_key().
Referenced by select_key().
| bool x::w::select_key_pressed | ( | const key_event & | ) |
Return true if keypress, and select_key().
References select_key_pressed().
Referenced by select_key_pressed().
| rectarea x::w::subtract | ( | const rectarea & | , |
| const rectarea & | , | ||
| coord_t | ofssetx = 0, |
||
| coord_t | offsety = 0 |
||
| ) |
Subtract two rectangle sets.
The returned rectangle set consists of the first rectangle set, with rectangles in the second set removed.
offsetx and offsety are added to all rectangles' returned coordinates.
References subtract().
Referenced by subtract().
| std::vector< new_tablelayoutmanager::header_factory_t > x::w::table_headers | ( | const table_headers_param_t & | table_headers_param | ) |
Create header factories for new_tablelayoutmanager's constructor
This is helper for creating a vector of factories for a table's columns. table_headers() returns a vector for new_tablelayoutmanager's constructor with factories that use create_label() and show() it.
table_headers()'s parameter is a vector of tuples with two values:
References table_headers().
Referenced by table_headers().
| std::string x::w::themedirroot | ( | ) |
Location of the directory with all the themes.
References themedirroot().
Referenced by themedirroot().
|
constexpr |
Standard HTML 3.2 color.
|
extern |
For internal use.
|
extern |
For internal use.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
extern |
A bullet is to the left of each selected item.
|
constexpr |
callback_trigger_t has a const x::w::button_event *.
std::variant index where one might find a button_event.
|
constexpr |
callback_trigger_t indicating a cut/copy/paste operation
std::variant index used in the following circumstances:
|
constexpr |
callback_trigger_t initial invocation.
std::variant index used in the following circumstances:
|
constexpr |
callback_trigger_t has a const x::w::key_event *.
std::variant index where one might find a key_event.
|
constexpr |
callback_trigger_t indicating a forced keyboard focus move.
std::variant index used in the following circumstances:
|
constexpr |
std::variant index where one might find a motion_event.
|
constexpr |
callback_trigger_t has a const x::w::next_key &.
The callback is getting invoked because TAB or NEXT button was pressed.
|
constexpr |
callback_trigger_t indicating a forced pointer focus move.
std::variant index used in the following circumstances indicating that an element lost pointer focus for reasons other than a pointer moving to another element, namely:
|
constexpr |
callback_trigger_t has a const x::w::prev_key &.
The callback is getting invoked because SHIFT-TAB or BACK button was pressed
|
constexpr |
callback_trigger_t indicating an user modification
std::variant index used in the following circumstances:
|
staticconstexpr |
This widget is expected to draw a clear area.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
extern |
halign text strings
Mostly for internal use.
|
extern |
The list highlights items to indicate they're selected.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
extern |
Multiple selection list.
Multiple list items may be selected at any time.
|
extern |
How many rgb_colors there are.
|
constexpr |
Standard HTML 3.2 color.
|
extern |
No-selection list.
No list items can be selected at any time.
This results in a list, potentially scrollable, that exists solely for the virtue of presenting a potentially scrollable list. Clicking on a list item has no effect. (The individual list item can still be visually selected by directly invoking the list layout manager's selected() method).
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Standard HTML 3.2 color.
|
extern |
HTML 3.2 rgb color names.
|
extern |
HTML 3.2 rgb colors.
|
extern |
scrollbar_visibility text strings
Mostly for internal use.
|
extern |
|
constexpr |
Standard HTML 3.2 color.
|
extern |
Single, but optional, selection list.
Like single_selection_type(), but selecting the currently selected item again will deselect it.
|
extern |
Single selection list.
Default selection list type specified by the new_listlayoutmanager.
Only one list item may be selected at any time. Selecting another item de-selects the currently-selected item.
|
constexpr |
Standard HTML 3.2 color.
|
constexpr |
Transparent color.
|
extern |
valign text strings
Mostly for internal use.
|
constexpr |
Standard HTML 3.2 color.
|
staticconstexpr |
Garden-variety widget.
|
constexpr |
Standard HTML 3.2 color.