LibCXXW 0.32.1
LibCXX Widget Toolkit
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions | Variables
x::w Namespace Reference

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.
 

Typedefs

typedef ref< appearanceObjappearance
 
typedef const_ref< appearanceObjconst_appearance
 A constant appearance object.
 
typedef ptr< appearanceObjappearanceptr
 A nullable pointer reference to an appearance object.
 
typedef const_ptr< appearanceObjconst_appearanceptr
 A nullable pointer reference to a const appearance object.
 
typedef ref< batch_queueObj > batch_queue
 Batches execution batch_queue for the connection thread.
 
typedef ptr< batch_queueObj > batch_queueptr
 A nullable pointer reference to the batch_queue object.
 
typedef ref< book_appearanceObj, book_appearance_basebook_appearance
 
typedef const_ref< book_appearanceObj, book_appearance_baseconst_book_appearance
 Constant book container's appearance.
 
typedef ptr< book_appearanceObj, book_appearance_basebook_appearanceptr
 A nullable pointer reference to a book container's appearance.
 
typedef const_ptr< book_appearanceObj, book_appearance_baseconst_book_appearanceptr
 A nullable pointer reference to a const book container's appearance.
 
typedef appearance_wrapper< const_book_appearanceconst_book_appearance_wrapper
 Alias.
 
typedef ref< booklayoutmanagerObjbooklayoutmanager
 
typedef const_ref< booklayoutmanagerObjconst_booklayoutmanager
 A constant book layout manager.
 
typedef ptr< booklayoutmanagerObjbooklayoutmanagerptr
 A nullable pointer reference to a book layout manager.
 
typedef const_ptr< booklayoutmanagerObjconst_booklayoutmanagerptr
 A nullable pointer reference to a const book layout manager.
 
typedef ref< bookpage_appearanceObj, bookpage_appearance_basebookpage_appearance
 
typedef const_ref< bookpage_appearanceObj, bookpage_appearance_baseconst_bookpage_appearance
 Constant book page tab appearance.
 
typedef ptr< bookpage_appearanceObj, bookpage_appearance_basebookpage_appearanceptr
 A nullable pointer reference to a book page tab appearance.
 
typedef const_ptr< bookpage_appearanceObj, bookpage_appearance_baseconst_bookpage_appearanceptr
 A nullable pointer reference to a const book page tab appearance.
 
typedef appearance_wrapper< const_bookpage_appearanceconst_bookpage_appearance_wrapper
 Alias.
 
typedef optional_argconstrefs< label_config, shortcutcreate_bookpage_with_label_args_t
 The options for a book page factory's add().
 
typedef optional_argconstrefs< shortcutcreate_bookpage_args_t
 The options for a book page factory's add().
 
typedef ref< bookpagefactoryObjbookpagefactory
 
typedef const_ref< bookpagefactoryObjconst_bookpagefactory
 A constant book page factory.
 
typedef ptr< bookpagefactoryObjbookpagefactoryptr
 A nullable pointer reference to a book page factory.
 
typedef const_ptr< bookpagefactoryObjconst_bookpagefactoryptr
 A nullable pointer reference to a const book page factory.
 
typedef std::variant< border_infomm, std::string > border_arg
 A border that's specified as either a border_infomm, or a theme border.
 
typedef ref< borderlayoutmanagerObjborderlayoutmanager
 
typedef const_ref< borderlayoutmanagerObjconst_borderlayoutmanager
 A constant border layout manager.
 
typedef ptr< borderlayoutmanagerObjborderlayoutmanagerptr
 A nullable pointer reference to a border layout manager.
 
typedef const_ptr< borderlayoutmanagerObjconst_borderlayoutmanagerptr
 A nullable pointer reference to a const border layout manager.
 
typedef ref< button_appearanceObj, button_appearance_basebutton_appearance
 
typedef const_ref< button_appearanceObj, button_appearance_baseconst_button_appearance
 Constant button appearance.
 
typedef ptr< button_appearanceObj, button_appearance_basebutton_appearanceptr
 A nullable pointer reference to a button appearance.
 
typedef const_ptr< button_appearanceObj, button_appearance_baseconst_button_appearanceptr
 A nullable pointer reference to a const button appearance.
 
typedef appearance_wrapper< const_button_appearanceconst_button_appearance_wrapper
 Alias.
 
typedef optional_argconstrefs< label_config, button_config, shortcutcreate_button_with_label_args_t
 The options for a factory's create_button().
 
typedef optional_argconstrefs< button_config, shortcutcreate_button_args_t
 The options for a factory's create_button().
 
typedef ref< buttonObjbutton
 A clickable button.
 
typedef ptr< buttonObjbuttonptr
 A nullable pointer reference to an button.
 
typedef const_ref< buttonObjconst_button
 A reference to a constant button.
 
typedef const_ptr< buttonObjconst_buttonptr
 A nullable pointer reference to a constant 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_copyablecallback_trigger_t
 What triggered a callback activation.
 
typedef ref< canvasObjcanvas
 A mostly empty widget.
 
typedef ptr< canvasObjcanvasptr
 A nullable pointer reference to an canvas.
 
typedef const_ref< canvasObjconst_canvas
 A reference to a constant canvas object.
 
typedef const_ptr< canvasObjconst_canvasptr
 A nullable pointer reference to a constant canvas object.
 
typedef ref< color_picker_appearanceObj, color_picker_appearance_basecolor_picker_appearance
 
typedef const_ref< color_picker_appearanceObj, color_picker_appearance_baseconst_color_picker_appearance
 Constant color picker appearance.
 
typedef ptr< color_picker_appearanceObj, color_picker_appearance_basecolor_picker_appearanceptr
 A nullable pointer reference to a color picker appearance.
 
typedef const_ptr< color_picker_appearanceObj, color_picker_appearance_baseconst_color_picker_appearanceptr
 A nullable pointer reference to a const color picker appearance.
 
typedef appearance_wrapper< const_color_picker_appearanceconst_color_picker_appearance_wrapper
 Alias.
 
typedef ref< color_pickerObjcolor_picker
 
typedef const_ref< color_pickerObjconst_color_picker
 A constant color picker.
 
typedef ptr< color_pickerObjcolor_pickerptr
 A nullable pointer reference to a color picker.
 
typedef const_ptr< color_pickerObjconst_color_pickerptr
 A nullable pointer reference to a const color picker.
 
typedef void 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 ref< combobox_appearanceObj, combobox_appearance_basecombobox_appearance
 
typedef const_ref< combobox_appearanceObj, combobox_appearance_baseconst_combobox_appearance
 Constant combo-box appearance settings.
 
typedef ptr< combobox_appearanceObj, combobox_appearance_basecombobox_appearanceptr
 A nullable pointer reference to a combo-box appearance settings.
 
typedef const_ptr< combobox_appearanceObj, combobox_appearance_baseconst_combobox_appearanceptr
 A nullable pointer reference to a const combo-box appearance settings.
 
typedef appearance_wrapper< const_combobox_appearanceconst_combobox_appearance_wrapper
 Alias.
 
typedef ref< connection_threadObj > connection_thread
 Internal library execution thread.
 
typedef const connection_threadONLY
 Some class methods can only be executed by the internal connection thread
 
typedef ONLY THREAD_CALLBACK
 Alternative syntactic sugar for thread-only invoked callbacks.
 
typedef std::unordered_set< std::string > enabled_theme_options_t
 Which options are enabled for the given theme.
 
typedef ref< connectionObj, connectionBaseconnection
 A connection to the display server.
 
typedef const_ref< connectionObj, connectionBaseconst_connection
 A constant connection to the display server.
 
typedef ptr< connectionObj, connectionBaseconnectionptr
 A nullable pointer reference to a display server connection.
 
typedef const_ptr< connectionObj, connectionBaseconst_connectionptr
 A nullable pointer reference to a constant connection to display server connection.
 
typedef ref< containerObjcontainer
 Methods common to all display containers.
 
typedef ptr< containerObjcontainerptr
 A nullable pointer reference to a container.
 
typedef const_ref< containerObjconst_container
 A constant container.
 
typedef const_ptr< containerObjconst_containerptr
 A nullable pointer reference to a constant container.
 
typedef ref< containerObj::implObjcontainer_impl
 Alias.
 
typedef ptr< containerObj::implObjcontainer_implptr
 Alias.
 
typedef ref< copy_cut_paste_menu_itemsObjcopy_cut_paste_menu_items
 
typedef const_ref< copy_cut_paste_menu_itemsObjconst_copy_cut_paste_menu_items
 Constant copy/cut/paste menu items.
 
typedef ptr< copy_cut_paste_menu_itemsObjcopy_cut_paste_menu_itemsptr
 A nullable pointer reference to copy/cut/paste menu items.
 
typedef const_ptr< copy_cut_paste_menu_itemsObjconst_copy_cut_paste_menu_itemsptr
 A nullable pointer reference to const copy/cut/paste menu items.
 
typedef functionref< void(ONLY IN_THREAD, const custom_combobox_selection_search_info_t &) > custom_combobox_selection_search_t
 Callback that gets invoked when a combo-box selection is made.
 
typedef ref< custom_comboboxlayoutmanagerObjcustom_comboboxlayoutmanager
 
typedef const_ref< custom_comboboxlayoutmanagerObjconst_custom_comboboxlayoutmanager
 A constant combox-box layout manager.
 
typedef ptr< custom_comboboxlayoutmanagerObjcustom_comboboxlayoutmanagerptr
 A nullable pointer reference to a combox-box layout manager.
 
typedef const_ptr< custom_comboboxlayoutmanagerObjconst_custom_comboboxlayoutmanagerptr
 A nullable pointer reference to a const combox-box layout manager.
 
typedef functionref< void(THREAD_CALLBACK, const custom_combobox_selection_changed_info_t &) > custom_combobox_selection_changed_t
 Callback that gets invoked when a combo-box selection is made.
 
typedef ref< date_input_field_appearanceObj, date_input_field_appearance_basedate_input_field_appearance
 
typedef const_ref< date_input_field_appearanceObj, date_input_field_appearance_baseconst_date_input_field_appearance
 Constant date input field appearance.
 
typedef ptr< date_input_field_appearanceObj, date_input_field_appearance_basedate_input_field_appearanceptr
 A nullable pointer reference to a date input field appearance.
 
typedef const_ptr< date_input_field_appearanceObj, date_input_field_appearance_baseconst_date_input_field_appearanceptr
 A nullable pointer reference to a const date input field appearance.
 
typedef appearance_wrapper< const_date_input_field_appearanceconst_date_input_field_appearance_wrapper
 Alias.
 
typedef ref< date_input_fieldObjdate_input_field
 
typedef const_ref< date_input_fieldObjconst_date_input_field
 A constant date input field.
 
typedef ptr< date_input_fieldObjdate_input_fieldptr
 A nullable pointer reference to a date input field.
 
typedef const_ptr< date_input_fieldObjconst_date_input_fieldptr
 A nullable pointer reference to a const date input field.
 
typedef functionref< void(THREAD_CALLBACK, const std::optional< ymd > &, const callback_trigger_t &) > date_input_field_callback_t
 Callback that gets invoked when the date input field's value changes.
 
typedef ref< defaultthemeObj, defaultthemeBase > defaulttheme
 A loaded application theme.
 
typedef ptr< defaultthemeObj, defaultthemeBase > defaultthemeptr
 A nullable pointer reference to a loaded application theme.
 
typedef const_ref< defaultthemeObj, defaultthemeBase > const_defaulttheme
 A constant loaded application theme.
 
typedef const_ptr< defaultthemeObj, defaultthemeBase > const_defaultthemeptr
 A constant nullable pointer reference to a loaded application theme.
 
typedef mpobj< const_defaulttheme, std::recursive_mutex > current_theme_t
 Current theme, mutex protected.
 
typedef functionref< void(THREAD_CALLBACK, const ok_cancel_callback_args &) > ok_cancel_dialog_callback_t
 Signature of an ok or cancel callback.
 
typedef ref< dialogObjdialog
 
typedef const_ref< dialogObjconst_dialog
 A constant dialog window.
 
typedef ptr< dialogObjdialogptr
 A nullable pointer reference to a dialog window.
 
typedef const_ptr< dialogObjconst_dialogptr
 A nullable pointer reference to a const dialog window.
 
typedef std::unordered_map< std::string, functionref< void(const factory &)> > standard_dialog_elements_t
 Standard dialog factories.
 
template<typename T >
using is_numeric_or_string_v = typename is_numeric_or_string< std::remove_cv_t< std::remove_reference_t< T > > >::type
 Helper alias for dim_arg's constructor.
 
typedef ref< drawableObjdrawable
 A drawable object.
 
typedef ptr< drawableObjdrawableptr
 A nullable pointer reference to a drawable to the server.
 
typedef const_ref< drawableObjconst_drawable
 A constant drawable to the server.
 
typedef const_ptr< drawableObjconst_drawableptr
 A nullable pointer reference to a constant drawable to the server.
 
typedef ref< editable_comboboxlayoutmanagerObjeditable_comboboxlayoutmanager
 
typedef const_ref< editable_comboboxlayoutmanagerObjconst_editable_comboboxlayoutmanager
 A constant editable combo-box layout manager.
 
typedef ptr< editable_comboboxlayoutmanagerObjeditable_comboboxlayoutmanagerptr
 A nullable pointer reference to a editable combo-box layout manager.
 
typedef const_ptr< editable_comboboxlayoutmanagerObjconst_editable_comboboxlayoutmanagerptr
 A nullable pointer reference to a const editable combo-box layout manager.
 
typedef functionref< void(THREAD_CALLBACK, const editable_combobox_selection_changed_info_t &) > editable_combobox_selection_changed_t
 
typedef ref< element_popup_appearanceObj, element_popup_appearance_baseelement_popup_appearance
 
typedef const_ref< element_popup_appearanceObj, element_popup_appearance_baseconst_element_popup_appearance
 Constant attached popup appearance.
 
typedef ptr< element_popup_appearanceObj, element_popup_appearance_baseelement_popup_appearanceptr
 A nullable pointer reference to a attached popup appearance.
 
typedef const_ptr< element_popup_appearanceObj, element_popup_appearance_baseconst_element_popup_appearanceptr
 A nullable pointer reference to a const attached popup appearance.
 
typedef appearance_wrapper< const_element_popup_appearanceconst_element_popup_appearance_wrapper
 Alias.
 
typedef void element_state_callback_t(THREAD_CALLBACK, const element_state &, const busy &)
 Callback type for updates to the element_state.
 
typedef void metrics_update_callback_t(THREAD_CALLBACK, const metrics::axis &, const metrics::axis &)
 
typedef optional_argconstrefs< new_layoutmanager, static_tooltip_configcreate_static_tooltip_args_t
 Optional parameters to element's create_static_tooltip().
 
typedef ref< elementObjelement
 
typedef ptr< elementObjelementptr
 A nullable pointer reference to an widget.
 
typedef const_ref< elementObjconst_element
 A reference to a constant widget.
 
typedef const_ptr< elementObjconst_elementptr
 A nullable pointer reference to a constant widget.
 
typedef void install_contextpopup_callback_t(THREAD_CALLBACK, const element &, const callback_trigger_t &, const busy &)
 Signature of a context menu callback installer.
 
typedef bool button_event_callback_t(THREAD_CALLBACK, const button_event &, bool, const busy &)
 Signature of a button event callback.
 
typedef void motion_event_callback_t(THREAD_CALLBACK, const motion_event &)
 Signature of a motion event callback.
 
typedef ref< elementObj::implObjelement_impl
 Alias.
 
typedef ptr< elementObj::implObjelement_implptr
 Alias.
 
typedef ref< factoryObjfactory
 
typedef ptr< factoryObjfactoryptr
 A nullable pointer refereance to a factory.
 
typedef const_ref< factoryObjconst_factory
 A constant factory.
 
typedef const_ptr< factoryObjconst_factoryptr
 A nullable pointer refereance to a constant factory.
 
typedef ref< file_dialog_appearanceObj, file_dialog_appearance_basefile_dialog_appearance
 
typedef const_ref< file_dialog_appearanceObj, file_dialog_appearance_baseconst_file_dialog_appearance
 Constant file dialog appearance settings.
 
typedef ptr< file_dialog_appearanceObj, file_dialog_appearance_basefile_dialog_appearanceptr
 A nullable pointer reference to a file dialog appearance settings.
 
typedef const_ptr< file_dialog_appearanceObj, file_dialog_appearance_baseconst_file_dialog_appearanceptr
 A nullable pointer reference to a const file dialog appearance settings.
 
typedef appearance_wrapper< const_file_dialog_appearanceconst_file_dialog_appearance_wrapper
 Alias.
 
typedef ref< file_dialogObjfile_dialog
 
typedef const_ref< file_dialogObjconst_file_dialog
 A constant file dialog.
 
typedef ptr< file_dialogObjfile_dialogptr
 A nullable pointer reference to a file dialog.
 
typedef const_ptr< file_dialogObjconst_file_dialogptr
 A nullable pointer reference to a const file dialog.
 
typedef void focus_callback_t(THREAD_CALLBACK, focus_change, const callback_trigger_t &)
 Focus callback.
 
typedef ref< focus_border_appearanceObj, focus_border_appearance_basefocus_border_appearance
 
typedef const_ref< focus_border_appearanceObj, focus_border_appearance_baseconst_focus_border_appearance
 Constant WHATITIS.
 
typedef ptr< focus_border_appearanceObj, focus_border_appearance_basefocus_border_appearanceptr
 A nullable pointer reference to a WHATITIS.
 
typedef const_ptr< focus_border_appearanceObj, focus_border_appearance_baseconst_focus_border_appearanceptr
 A nullable pointer reference to a const WHATITIS.
 
typedef appearance_wrapper< const_focus_border_appearanceconst_focus_border_appearance_wrapper
 Alias.
 
typedef ref< focusable_container_ownerObjfocusable_container_owner
 A focusable container that's the registered owner of its focusable.
 
typedef const_ref< focusable_container_ownerObjconst_focusable_container_owner
 A constant focusable container owner.
 
typedef ptr< focusable_container_ownerObjfocusable_container_ownerptr
 A nullable pointer reference to a focusable container owner.
 
typedef const_ptr< focusable_container_ownerObjconst_focusable_container_ownerptr
 A nullable pointer reference to a constant focusable container owner.
 
typedef ref< focusable_containerObjfocusable_container
 A focusable widget that's implemented as an internal container.
 
typedef const_ref< focusable_containerObjconst_focusable_container
 A constant focusable container.
 
typedef ptr< focusable_containerObjfocusable_containerptr
 A nullable pointer reference to a focusable container.
 
typedef const_ptr< focusable_containerObjconst_focusable_containerptr
 A nullable pointer reference to a constant focusable container.
 
typedef ref< focusable_labelObjfocusable_label
 A label that processes input focus.
 
typedef const_ref< focusable_labelObjconst_focusable_label
 A constant focusable label.
 
typedef ptr< focusable_labelObjfocusable_labelptr
 A nullable pointer reference to a focusable label.
 
typedef const_ptr< focusable_labelObjconst_focusable_labelptr
 A nullable pointer reference to a const focusable label.
 
typedef ref< focusableObjfocusable
 
typedef ptr< focusableObjfocusableptr
 A nullable pointer reference to a focusable widget.
 
typedef const_ref< focusableObjconst_focusable
 A reference to a constant focusable widget.
 
typedef const_ptr< focusableObjconst_focusableptr
 A nullable pointer reference to a constant focusable widget.
 
typedef void internal_focusable_cb(const internal_focusable_group &)
 Callback for processing internal_focusable_group.
 
typedef ref< focusableObj::implObjfocusable_impl
 A focusable implementation mixin.
 
typedef ptr< focusableObj::implObjfocusable_implptr
 A nullable pointer reference to a focusable object.
 
typedef std::variant< font, theme_fontfont_arg
 A font may be specified directly, or as a reference to a theme font.
 
typedef ref< font_picker_appearanceObj, font_picker_appearance_basefont_picker_appearance
 
typedef const_ref< font_picker_appearanceObj, font_picker_appearance_baseconst_font_picker_appearance
 Constant font picker appearance.
 
typedef ptr< font_picker_appearanceObj, font_picker_appearance_basefont_picker_appearanceptr
 A nullable pointer reference to a font picker appearance.
 
typedef const_ptr< font_picker_appearanceObj, font_picker_appearance_baseconst_font_picker_appearanceptr
 A nullable pointer reference to a const font picker appearance.
 
typedef appearance_wrapper< const_font_picker_appearanceconst_font_picker_appearance_wrapper
 Alias.
 
typedef ref< font_pickerObjfont_picker
 
typedef const_ref< font_pickerObjconst_font_picker
 A constant font selection picker.
 
typedef ptr< font_pickerObjfont_pickerptr
 A nullable pointer reference to a font selection picker.
 
typedef const_ptr< font_pickerObjconst_font_pickerptr
 A nullable pointer reference to a const font selection pickery.
 
typedef void 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.
 
typedef ref< fontcollectionObjfontcollection
 A collection of fonts.
 
typedef ptr< fontcollectionObjfontcollectionptr
 A nullable pointer reference to font collection.
 
typedef const_ref< fontcollectionObjconst_fontcollection
 Constant font collection.
 
typedef const_ptr< fontcollectionObjconst_fontcollectionptr
 A nullable pointer reference to constant font collection.
 
typedef ref< frame_appearanceObj, frame_appearance_baseframe_appearance
 
typedef const_ref< frame_appearanceObj, frame_appearance_baseconst_frame_appearance
 Constant border frame.
 
typedef ptr< frame_appearanceObj, frame_appearance_baseframe_appearanceptr
 A nullable pointer reference to a border frame.
 
typedef const_ptr< frame_appearanceObj, frame_appearance_baseconst_frame_appearanceptr
 A nullable pointer reference to a const border frame.
 
typedef appearance_wrapper< const_frame_appearanceconst_frame_appearance_wrapper
 Alias.
 
typedef ref< gcObj, gcBasegc
 
typedef ptr< gcObj, gcBasegcptr
 A nullable pointer reference to an graphic context.
 
typedef const_ref< gcObj, gcBaseconst_gc
 A constant graphic context.
 
typedef const_ptr< gcObj, gcBaseconst_gcptr
 A nullable pointer reference to a constant graphic context.
 
typedef ref< generic_window_appearanceObj, generic_window_appearance_basegeneric_window_appearance
 
typedef const_ref< generic_window_appearanceObj, generic_window_appearance_baseconst_generic_window_appearance
 Constant top level window appearance.
 
typedef ptr< generic_window_appearanceObj, generic_window_appearance_basegeneric_window_appearanceptr
 A nullable pointer reference to a top level window appearance.
 
typedef const_ptr< generic_window_appearanceObj, generic_window_appearance_baseconst_generic_window_appearanceptr
 A nullable pointer reference to a const top level window appearance.
 
typedef appearance_wrapper< const_generic_window_appearanceconst_generic_window_appearance_wrapper
 Alias.
 
typedef functionref< void(THREAD_CALLBACK, const busy &)> stabilized_callback_t
 on_stabilized() callback type.
 
typedef ref< generic_windowObj, generic_windowBasegeneric_window
 Generic top level window methods.
 
typedef const_ref< generic_windowObj, generic_windowBaseconst_generic_window
 A constant generic window handler.
 
typedef mpobj< ref< grid_map_infoObj >, std::recursive_mutex > grid_map_t
 Internal structure used by the grid layout manager.
 
typedef ref< gridfactoryObjgridfactory
 
typedef ref< gridlayoutmanagerObjgridlayoutmanager
 
typedef const_ref< gridlayoutmanagerObjconst_gridlayoutmanager
 A constant grid layout manager.
 
typedef ptr< gridlayoutmanagerObjgridlayoutmanagerptr
 A nullable pointer reference to a grid layout manager.
 
typedef const_ptr< gridlayoutmanagerObjconst_gridlayoutmanagerptr
 A nullable pointer reference to a constant grid layout manager.
 
typedef ref< hotspot_bgcolorObjhotspot_bgcolor
 A hotspot that changes colors.
 
typedef ptr< hotspot_bgcolorObjhotspot_bgcolorptr
 A nullable pointer reference to a hotspot with colors.
 
typedef const_ref< hotspot_bgcolorObjconst_hotspot_bgcolor
 A reference to a constant hotspot with colors.
 
typedef const_ptr< hotspot_bgcolorObjconst_hotspot_bgcolorptr
 A nullable pointer reference to a constant hotspot with colors.
 
typedef functionref< void(THREAD_CALLBACK, const callback_trigger_t &, const busy &)> hotspot_callback_t
 Signature for a hotspot activation function.
 
typedef ref< hotspotObjhotspot
 A widget that can be activated.
 
typedef ptr< hotspotObjhotspotptr
 A nullable pointer reference to an activatable widget.
 
typedef const_ref< hotspotObjconst_hotspot
 A reference to a constant activatable widget.
 
typedef const_ptr< hotspotObjconst_hotspotptr
 A nullable pointer reference to a constant activatable widget.
 
typedef ref< image_button_appearanceObj, image_button_appearance_baseimage_button_appearance
 
typedef const_ref< image_button_appearanceObj, image_button_appearance_baseconst_image_button_appearance
 Constant image button appearance.
 
typedef ptr< image_button_appearanceObj, image_button_appearance_baseimage_button_appearanceptr
 A nullable pointer reference to a image button appearance.
 
typedef const_ptr< image_button_appearanceObj, image_button_appearance_baseconst_image_button_appearanceptr
 A nullable pointer reference to a const image button appearance.
 
typedef appearance_wrapper< const_image_button_appearanceconst_image_button_appearance_wrapper
 Alias.
 
typedef functionref< void(THREAD_CALLBACK, size_t, const callback_trigger_t &, const busy &)> image_button_callback_t
 Signature for an image_button activation function.
 
typedef ref< image_buttonObjimage_button
 A simple button that display a different image when it changes state.
 
typedef ptr< image_buttonObjimage_buttonptr
 A nullable pointer reference to an image button.
 
typedef const_ref< image_buttonObjconst_image_button
 A reference to a constant image button.
 
typedef const_ptr< image_buttonObjconst_image_buttonptr
 A nullable pointer reference to a constant image button.
 
typedef ref< imageObjimage
 
typedef ptr< imageObjimageptr
 A nullable pointer reference to an image.
 
typedef const_ref< imageObjconst_image
 A reference to a constant image.
 
typedef const_ptr< imageObjconst_imageptr
 A nullable pointer reference to a constant image.
 
template<typename base , typename arg1 = void, typename ... args>
using background_color_elementObj = typename background_colors_element_types< base, arg1, args... >::type
 
typedef ref< background_colorObjbackground_color
 A background color, possibly dependent on the current theme.
 
typedef ptr< background_colorObjbackground_colorptr
 A nullable pointer reference to a background color.
 
typedef ref< border_implObj, border_impl_baseborder_impl
 A border implementation.
 
typedef ptr< border_implObj, border_impl_baseborder_implptr
 A nullable pointer reference to a border implementation.
 
typedef const_ref< border_implObj, border_impl_baseconst_border_impl
 A constant border implementation object.
 
typedef const_ptr< border_implObj, border_impl_baseconst_border_implptr
 A nullable pointer reference to a constant border implementation object.
 
typedef ref< child_elementObjchild_element
 
typedef std::chrono::steady_clock tick_clock_t
 A clock for regularly-scheduled callbacks.
 
typedef ref< current_border_implObjcurrent_border_impl
 Current border around a widget.
 
typedef ptr< current_border_implObjcurrent_border_implptr
 A nullable pointer reference to a current border.
 
typedef const_ref< current_border_implObjconst_current_border_impl
 A constant current border object.
 
typedef const_ptr< current_border_implObjconst_current_border_implptr
 A nullable pointer reference to a constant current border object.
 
typedef ref< cursor_pointerObj > cursor_pointer
 
typedef const_ref< cursor_pointerObj > const_cursor_pointer
 A constant cursor_pointer.
 
typedef ptr< cursor_pointerObj > cursor_pointerptr
 A nullable cursor_pointer reference to a cursor_pointer.
 
typedef const_ptr< cursor_pointerObj > const_cursor_pointerptr
 A nullable cursor_pointer reference to a const cursor_pointer.
 
typedef std::unordered_set< xcb_atom_t > source_dnd_formats_t
 Supported dnd formats advertised by the source.
 
typedef std::variant< hotspots_none, hotspots_create, hotspots_updatehotspot_processing
 Whether create_richtextstring() should create focusable label hotspots.
 
typedef ref< delayed_input_focusObjdelayed_input_focus
 
typedef const_ref< delayed_input_focusObjconst_delayed_input_focus
 A constant WHATITIS.
 
typedef ptr< delayed_input_focusObjdelayed_input_focusptr
 A nullable pointer reference to a WHATITIS.
 
typedef const_ptr< delayed_input_focusObjconst_delayed_input_focusptr
 A nullable pointer reference to a const WHATITIS.
 
typedef std::list< focusable_implfocusable_fields_t
 A list of all focusable fields.
 
typedef ref< label_forObj > label_for
 A link between a focusable, and its label.
 
typedef ptr< label_forObj > label_forptr
 A nullable pointer reference to a label link.
 
typedef const_ref< label_forObj > const_label_for
 A reference to a constant label link.
 
typedef const_ptr< label_forObj > const_label_forptr
 A nullable pointer reference to a constant label link.
 
typedef always_visibleObj< focusframecontainer_elementObj< container_visible_elementObj< container_elementObj< child_elementObj > > > > always_visible_focusframe_t
 A typical implementation of a focusframecontainer always_visibleObj mixin.
 
typedef ref< always_visible_focusframe_talways_visible_focusframe_ref_t
 A typical implementation of a focusframecontainer always_visibleObj mixin.
 
typedef nonrecursive_visibilityObj< focusframecontainer_elementObj< container_visible_elementObj< container_elementObj< child_elementObj > > > > nonrecursive_visibility_focusframe_t
 A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.
 
typedef ref< nonrecursive_visibility_focusframe_tnonrecursive_visibility_focusframe_ref_t
 A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.
 
typedef ref< current_fontcollectionObjcurrent_fontcollection
 A font collection based on the current theme.
 
typedef ptr< current_fontcollectionObjcurrent_fontcollectionptr
 A nullable pointer reference to current font collection.
 
typedef const_ref< current_fontcollectionObjconst_current_fontcollection
 Constant current font collection.
 
typedef const_ptr< current_fontcollectionObjconst_current_fontcollectionptr
 A nullable pointer reference to constant current font collection.
 
typedef ref< freetypefontObjfreetypefont
 A loaded freetype font.
 
typedef ptr< freetypefontObjfreetypefontptr
 A nullable pointer reference to an font.
 
typedef const_ref< freetypefontObjconst_freetypefont
 A constant font.
 
typedef const_ptr< freetypefontObjconst_freetypefontptr
 A nullable pointer reference to a constant font.
 
typedef ref< grabbed_pointerObj > grabbed_pointer
 Active pointer grab mcguffin.
 
typedef ptr< grabbed_pointerObj > grabbed_pointerptr
 Nullable pointer reference to a grabbed pointer.
 
typedef ref< grid_elementObj > grid_element
 An widget in a grid.
 
typedef ptr< grid_elementObj > grid_elementptr
 A nullable pointer reference to a grid_element.
 
typedef ref< iconObjicon
 A loaded icon.
 
typedef ptr< iconObjiconptr
 A nullable pointer reference to an icon.
 
typedef const_ref< iconObjconst_icon
 A reference to a constant icon.
 
typedef const_ptr< iconObjconst_iconptr
 A nullable pointer reference to a constant icon.
 
typedef const_ref< pixmap_with_pictureObjpixmap_with_picture
 
typedef ref< popupObjpopup
 A popup.
 
typedef ptr< popupObjpopupptr
 A nullable pointer reference to a popup.
 
typedef int redraw_priority_t
 We get better visual results when widgets get redrawn in a particular order.
 
typedef ref< screen_positionsObj::config_handleObjscreen_positions_handle
 
typedef const_ref< screen_positionsObj::config_handleObjconst_screen_positions_handle
 Constant screen_positions_handle.
 
typedef ptr< screen_positionsObj::config_handleObjscreen_positions_handleptr
 A nullable pointer reference to screen_positions_handle.
 
typedef const_ptr< screen_positionsObj::config_handleObjconst_screen_positions_handleptr
 A nullable pointer reference to const screen_positions_handle.
 
typedef ref< current_selection_handlerObj > current_selection_handler
 
typedef const_ref< current_selection_handlerObj > const_current_selection_handler
 A constant X selection handler.
 
typedef ptr< current_selection_handlerObj > current_selection_handlerptr
 A nullable pointer reference to an X selection handler.
 
typedef const_ptr< current_selection_handlerObj > const_current_selection_handlerptr
 A nullable pointer reference to a const X selection handler.
 
template<typename base , typename arg1 = void, typename ... args>
using theme_font_elementObj = typename theme_font_element_types< base, arg1, args... >::type
 Template for attaching theme_fontObj mixins to widgets.
 
template<typename base , typename arg1 = void, typename ... args>
using themeborder_elementObj = typename themeborder_element_types< base, arg1, args... >::type
 Template for attaching one or more themeborder_element_impl mixins to a widget.
 
template<typename base , typename arg1 = void, typename ... args>
using themedim_elementObj = themedims_elementObj< base, arg1, args... >
 Template for attaching one or more themedimObj mixins to a widget.
 
typedef ref< themedimObjthemedim
 A dimension specified by the default theme.
 
typedef const_ref< themedimObjconst_themedim
 A constant theme specified dimension.
 
typedef std::vector< std::tuple< element_impl, rectangle, bool > > updated_position_widgets_t
 Temporary list of widgets and their new position.
 
typedef std::map< size_t, updated_position_widgets_tall_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 > all_updated_position_widgets_t_iterator
 Where to find a widget in a temporary list of repositioned widgets.
 
typedef std::vector< std::tuple< all_updated_position_widgets_t_iterator, updated_position_move_info > > updated_position_container_t
 Internal container used in widget position update processing.
 
typedef ref< input_dialogObjinput_dialog
 
typedef const_ref< input_dialogObjconst_input_dialog
 A constant input dialog window.
 
typedef ptr< input_dialogObjinput_dialogptr
 A nullable pointer reference to a input dialog window.
 
typedef const_ptr< input_dialogObjconst_input_dialogptr
 A nullable pointer reference to a const input dialog window.
 
typedef ref< input_field_appearanceObj, input_field_appearance_baseinput_field_appearance
 
typedef const_ref< input_field_appearanceObj, input_field_appearance_baseconst_input_field_appearance
 Constant input field appearance.
 
typedef ptr< input_field_appearanceObj, input_field_appearance_baseinput_field_appearanceptr
 A nullable pointer reference to a input field appearance.
 
typedef const_ptr< input_field_appearanceObj, input_field_appearance_baseconst_input_field_appearanceptr
 A nullable pointer reference to a const input field appearance.
 
typedef appearance_wrapper< const_input_field_appearanceconst_input_field_appearance_wrapper
 Alias.
 
typedef void input_field_search_callback_t(const input_field_search_info &)
 Callback used by an input field to search for values.
 
typedef mpobj< ref< richtext_implObj >, std::recursive_mutex > internal_richtext_impl_t
 A container for an internally-implemented object.
 
typedef bool 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.
 
typedef functionref< input_field_validation_callback_tinput_field_validation_callback
 Reference-counted input field validation callback.
 
typedef functionptr< input_field_validation_callback_tinput_field_validation_callbackptr
 A nullable pointer reference to a reference-counted input field validation callback.
 
typedef void input_field_filter_callback_t(THREAD_CALLBACK, const input_field_filter_info &)
 Callback for filtering changes to the input field.
 
typedef ref< input_fieldObjinput_field
 
typedef ptr< input_fieldObjinput_fieldptr
 A nullable pointer reference to an input_field.
 
typedef const_ref< input_fieldObjconst_input_field
 A reference to a constant input_field object.
 
typedef const_ptr< input_fieldObjconst_input_fieldptr
 A nullable pointer reference to a constant input_field object.
 
typedef ref< item_button_appearanceObj, item_button_appearance_baseitem_button_appearance
 
typedef const_ref< item_button_appearanceObj, item_button_appearance_baseconst_item_button_appearance
 Constant item button appearance.
 
typedef ptr< item_button_appearanceObj, item_button_appearance_baseitem_button_appearanceptr
 A nullable pointer reference to a item button appearance.
 
typedef const_ptr< item_button_appearanceObj, item_button_appearance_baseconst_item_button_appearanceptr
 A nullable pointer reference to a const item button appearance.
 
typedef appearance_wrapper< const_item_button_appearanceconst_item_button_appearance_wrapper
 Alias.
 
typedef ref< item_layout_appearanceObj, item_layout_appearance_baseitem_layout_appearance
 
typedef const_ref< item_layout_appearanceObj, item_layout_appearance_baseconst_item_layout_appearance
 Constant item layout manager appearance.
 
typedef ptr< item_layout_appearanceObj, item_layout_appearance_baseitem_layout_appearanceptr
 A nullable pointer reference to a item layout manager appearance.
 
typedef const_ptr< item_layout_appearanceObj, item_layout_appearance_baseconst_item_layout_appearanceptr
 A nullable pointer reference to a const item layout manager appearance.
 
typedef appearance_wrapper< const_item_layout_appearanceconst_item_layout_appearance_wrapper
 Alias.
 
typedef mpobj< itemlayout_button_container, std::recursive_mutex > item_info_t
 Mutex-protected info on the items we are managing.
 
typedef functionref< void(THREAD_CALLBACK, size_t, const itemlayout_lock &, const callback_trigger_t &, const busy &)> itemlayout_callback_t
 Callback that gets invoked whenever the close button gets clicked on an item.
 
typedef ref< itemlayoutmanagerObjitemlayoutmanager
 
typedef const_ref< itemlayoutmanagerObjconst_itemlayoutmanager
 A constant item layout manager.
 
typedef ptr< itemlayoutmanagerObjitemlayoutmanagerptr
 A nullable pointer reference to an item layout manager.
 
typedef const_ptr< itemlayoutmanagerObjconst_itemlayoutmanagerptr
 A nullable pointer reference to a const item layout manager.
 
typedef std::variant< const key_event *, const std::u32string_view *, all_key_events_is_not_copyableall_key_events_t
 Key event callback.
 
typedef bool key_event_callback_t(THREAD_CALLBACK, const all_key_events_t &, bool, const busy &mcguffin)
 Callbacks for reporting key events.
 
typedef ref< labelObjlabel
 A text label widget.
 
typedef ptr< labelObjlabelptr
 A nullable pointer reference to an label.
 
typedef const_ref< labelObjconst_label
 A reference to a constant label object.
 
typedef const_ptr< labelObjconst_labelptr
 A nullable pointer reference to a constant label object.
 
typedef ref< layoutmanagerObjlayoutmanager
 A layout manager.
 
typedef const_ref< layoutmanagerObjconst_layoutmanager
 A constant generic layout manager.
 
typedef ref< layoutmanagerObj::implObjlayout_impl
 Alias.
 
typedef const_ref< layoutmanagerObj::implObjconst_layout_impl
 Alias.
 
typedef ptr< layoutmanagerObj::implObjlayout_implptr
 Alias.
 
typedef const_ptr< layoutmanagerObj::implObjconst_layout_implptr
 Alias.
 
typedef ref< list_appearanceObj, list_appearance_baselist_appearance
 
typedef const_ref< list_appearanceObj, list_appearance_baseconst_list_appearance
 Constant list appearance properties.
 
typedef ptr< list_appearanceObj, list_appearance_baselist_appearanceptr
 A nullable pointer reference to a list appearance properties.
 
typedef const_ptr< list_appearanceObj, list_appearance_baseconst_list_appearanceptr
 A nullable pointer reference to a const list appearance properties.
 
typedef appearance_wrapper< const_list_appearanceconst_list_appearance_wrapper
 Alias.
 
typedef ref< listitemhandleObjlistitemhandle
 
typedef const_ref< listitemhandleObjconst_listitemhandle
 A constant WHATITIS.
 
typedef ptr< listitemhandleObjlistitemhandleptr
 A nullable pointer reference to a WHATITIS.
 
typedef const_ptr< listitemhandleObjconst_listitemhandleptr
 A nullable pointer reference to a const WHATITIS.
 
typedef ref< listlayoutmanagerObjlistlayoutmanager
 
typedef const_ref< listlayoutmanagerObjconst_listlayoutmanager
 A constant text-only list layout manager.
 
typedef ptr< listlayoutmanagerObjlistlayoutmanagerptr
 A nullable pointer reference to a text-only list layout manager.
 
typedef const_ptr< listlayoutmanagerObjconst_listlayoutmanagerptr
 A nullable pointer reference to a const text-only list layout manager.
 
typedef mpobj< listimpl_info_s, std::recursive_mutex > listimpl_info_t
 Internal listlayoutmanager mutex-protected data.
 
typedef mpobj_lock< listimpl_info_s, std::recursive_mutex > listimpl_info_lock_t
 A forward reference to a lock on a listimpl_info_t.
 
typedef void list_item_status_change_callback_t(THREAD_CALLBACK, const list_item_status_info_t &)
 List item callback's signature.
 
typedef functionref< list_item_status_change_callback_tlist_item_status_change_callback
 Type-erased list_item_status_change_callback_t.
 
typedef functionptr< list_item_status_change_callback_tlist_item_status_change_callbackptr
 Type-erased list_item_status_change_callback_t.
 
typedef functionptr< void(THREAD_CALLBACK, const list_item_status_info_t &) > list_selection_changed_cb_t
 selection_changed callback.
 
typedef std::variant< text_param, image_param, separator, shortcut, inactive_shortcut, hierindent, menuoption, submenu, selected, list_item_status_change_callback, get_new_itemslist_item_param_base
 A new list item.
 
typedef functionref< void(THREAD_CALLBACK, const listlayoutmanager &, size_t, const callback_trigger_t &, const busy &) > list_selection_type_cb_t
 selection_type callback.
 
typedef ref< main_window_appearanceObj, main_window_appearance_basemain_window_appearance
 
typedef const_ref< main_window_appearanceObj, main_window_appearance_baseconst_main_window_appearance
 Constant main window appearance.
 
typedef ptr< main_window_appearanceObj, main_window_appearance_basemain_window_appearanceptr
 A nullable pointer reference to a main window appearance.
 
typedef const_ptr< main_window_appearanceObj, main_window_appearance_baseconst_main_window_appearanceptr
 A nullable pointer reference to a const main window appearance.
 
typedef appearance_wrapper< const_main_window_appearanceconst_main_window_appearance_wrapper
 Alias.
 
typedef std::variant< main_window_config, splash_window_config, transparent_splash_window_configmain_window_config_t
 
typedef ref< main_windowObj, main_windowBasemain_window
 
typedef const_ref< main_windowObj, main_windowBaseconst_main_window
 A reference to a constant main application window.
 
typedef ptr< main_windowObj, main_windowBasemain_windowptr
 A nullable pointer reference to a main application window.
 
typedef const_ptr< main_windowObj, main_windowBaseconst_main_windowptr
 A nullable pointer reference to a constant main application window.
 
typedef ref< menubarfactoryObjmenubarfactory
 
typedef const_ref< menubarfactoryObjconst_menubarfactory
 A constant menu bar factory.
 
typedef ptr< menubarfactoryObjmenubarfactoryptr
 A nullable pointer reference to a menu bar factory.
 
typedef const_ptr< menubarfactoryObjconst_menubarfactoryptr
 A nullable pointer reference to a const menu bar factory.
 
typedef ref< menubarlayoutmanagerObjmenubarlayoutmanager
 
typedef const_ref< menubarlayoutmanagerObjconst_menubarlayoutmanager
 A constant menu bar layout manager.
 
typedef ptr< menubarlayoutmanagerObjmenubarlayoutmanagerptr
 A nullable pointer reference to a menu bar layout manager.
 
typedef const_ptr< menubarlayoutmanagerObjconst_menubarlayoutmanagerptr
 A nullable pointer reference to a const menu bar layout manager.
 
typedef ref< menuObjmenu
 
typedef const_ref< menuObjconst_menu
 A constant menu button.
 
typedef ptr< menuObjmenuptr
 A nullable pointer reference to a menu button.
 
typedef const_ptr< menuObjconst_menuptr
 A nullable pointer reference to a const menu button.
 
typedef ref< pagefactoryObjpagefactory
 
typedef const_ref< pagefactoryObjconst_pagefactory
 A constant element factory for the page layout manager.
 
typedef ptr< pagefactoryObjpagefactoryptr
 A nullable pointer reference to a element factory for the page layout manager.
 
typedef const_ptr< pagefactoryObjconst_pagefactoryptr
 A nullable pointer reference to a const element factory for the page layout manager.
 
typedef ref< pagelayoutmanagerObjpagelayoutmanager
 
typedef const_ref< pagelayoutmanagerObjconst_pagelayoutmanager
 A constant page layout manager.
 
typedef ptr< pagelayoutmanagerObjpagelayoutmanagerptr
 A nullable pointer reference to a page layout manager.
 
typedef const_ptr< pagelayoutmanagerObjconst_pagelayoutmanagerptr
 A nullable pointer reference to a const page layout manager.
 
typedef mpobj< page_layout_info_s, std::recursive_mutex > page_layout_info_t
 Internal page layout manager mutex-protected info.
 
typedef ref< pagetabgridlayoutmanagerObj > pagetabgridlayoutmanager
 
typedef const_ref< pagetabgridlayoutmanagerObj > const_pagetabgridlayoutmanager
 A constant book page tab grid layoutmanager.
 
typedef ptr< pagetabgridlayoutmanagerObj > pagetabgridlayoutmanagerptr
 A nullable pointer reference to a book page tab grid layoutmanager.
 
typedef const_ptr< pagetabgridlayoutmanagerObj > const_pagetabgridlayoutmanagerptr
 A nullable pointer reference to a const book page tab grid layoutmanager.
 
typedef ref< pane_appearanceObj, pane_appearance_basepane_appearance
 
typedef const_ref< pane_appearanceObj, pane_appearance_baseconst_pane_appearance
 Constant pane appearance.
 
typedef ptr< pane_appearanceObj, pane_appearance_basepane_appearanceptr
 A nullable pointer reference to a pane appearance.
 
typedef const_ptr< pane_appearanceObj, pane_appearance_baseconst_pane_appearanceptr
 A nullable pointer reference to a const pane appearance.
 
typedef appearance_wrapper< const_pane_appearanceconst_pane_appearance_wrapper
 Alias.
 
typedef ref< pane_layout_appearanceObj, pane_layout_appearance_basepane_layout_appearance
 
typedef const_ref< pane_layout_appearanceObj, pane_layout_appearance_baseconst_pane_layout_appearance
 Constant pane layout appearance.
 
typedef ptr< pane_layout_appearanceObj, pane_layout_appearance_basepane_layout_appearanceptr
 A nullable pointer reference to a pane layout appearance.
 
typedef const_ptr< pane_layout_appearanceObj, pane_layout_appearance_baseconst_pane_layout_appearanceptr
 A nullable pointer reference to a const pane layout appearance.
 
typedef appearance_wrapper< const_pane_layout_appearanceconst_pane_layout_appearance_wrapper
 Alias.
 
typedef ref< panefactoryObjpanefactory
 
typedef const_ref< panefactoryObjconst_panefactory
 A constant pane factory.
 
typedef ptr< panefactoryObjpanefactoryptr
 A nullable pointer reference to a pane factory.
 
typedef const_ptr< panefactoryObjconst_panefactoryptr
 A nullable pointer reference to a const pane factory.
 
typedef ref< panelayoutmanagerObjpanelayoutmanager
 
typedef const_ref< panelayoutmanagerObjconst_panelayoutmanager
 A constant pane layout manager.
 
typedef ptr< panelayoutmanagerObjpanelayoutmanagerptr
 A nullable pointer reference to a pane layout manager.
 
typedef const_ptr< panelayoutmanagerObjconst_panelayoutmanagerptr
 A nullable pointer reference to a const pane layout manager.
 
typedef ref< peephole_appearanceObj, peephole_appearance_basepeephole_appearance
 
typedef const_ref< peephole_appearanceObj, peephole_appearance_baseconst_peephole_appearance
 Constant peephole appearance.
 
typedef ptr< peephole_appearanceObj, peephole_appearance_basepeephole_appearanceptr
 A nullable pointer reference to a peephole appearance.
 
typedef const_ptr< peephole_appearanceObj, peephole_appearance_baseconst_peephole_appearanceptr
 A nullable pointer reference to a const peephole appearance.
 
typedef appearance_wrapper< const_peephole_appearanceconst_peephole_appearance_wrapper
 Alias.
 
typedef ref< peepholelayoutmanagerObjpeepholelayoutmanager
 
typedef const_ref< peepholelayoutmanagerObjconst_peepholelayoutmanager
 A constant peephole layout manager.
 
typedef ptr< peepholelayoutmanagerObjpeepholelayoutmanagerptr
 A nullable pointer reference to a peephole layout manager.
 
typedef const_ptr< peepholelayoutmanagerObjconst_peepholelayoutmanagerptr
 A nullable pointer reference to a const peephole layout manager.
 
typedef ref< pictformatObjpictformat
 Available picture formats on the server.
 
typedef ptr< pictformatObjpictformatptr
 A nullable pointer reference to a pictformat to the server.
 
typedef const_ref< pictformatObjconst_pictformat
 A constant pictformat to the server.
 
typedef const_ptr< pictformatObjconst_pictformatptr
 A nullable pointer reference to a constant pictformat to the server.
 
typedef ref< pictureObj::implObj > picture_internal
 An internal implementation object of a picture.
 
typedef ref< pictureObj::implObj > const_picture_internal
 A constant internal implementation object of a picture.
 
typedef ref< pictureObj, pictureBasepicture
 
typedef const_ref< pictureObj, pictureBaseconst_picture
 A constant picture.
 
typedef ref< pixmapObjpixmap
 A Pixmap object.
 
typedef const_ref< pixmapObjconst_pixmap
 A constant pixmap.
 
typedef ptr< pixmapObjpixmapptr
 A nullable pointer to a pixmap.
 
typedef const_ptr< pixmapObjconst_pixmapptr
 A nullable pointer to a constant pixmap.
 
typedef std::unordered_map< std::string, std::pair< coord_t, coord_t > > pixmap_points_of_interest_t
 Points of interest in a pixmap.
 
typedef ref< popup_list_appearanceObj, popup_list_appearance_basepopup_list_appearance
 
typedef const_ref< popup_list_appearanceObj, popup_list_appearance_baseconst_popup_list_appearance
 Constant popup list appearance properties.
 
typedef ptr< popup_list_appearanceObj, popup_list_appearance_basepopup_list_appearanceptr
 A nullable pointer reference to a popup list appearance properties.
 
typedef const_ptr< popup_list_appearanceObj, popup_list_appearance_baseconst_popup_list_appearanceptr
 A nullable pointer reference to a const popup list appearance properties.
 
typedef appearance_wrapper< const_popup_list_appearanceconst_popup_list_appearance_wrapper
 Alias.
 
typedef ref< print_dialog_appearanceObj, print_dialog_appearance_baseprint_dialog_appearance
 
typedef const_ref< print_dialog_appearanceObj, print_dialog_appearance_baseconst_print_dialog_appearance
 Constant print dialog appearance.
 
typedef ptr< print_dialog_appearanceObj, print_dialog_appearance_baseprint_dialog_appearanceptr
 A nullable pointer reference to a print dialog appearance.
 
typedef const_ptr< print_dialog_appearanceObj, print_dialog_appearance_baseconst_print_dialog_appearanceptr
 A nullable pointer reference to a const print dialog appearance.
 
typedef appearance_wrapper< const_print_dialog_appearanceconst_print_dialog_appearance_wrapper
 Alias.
 
typedef void print_callback_t(const print_callback_info &)
 Callback used by the "Print" button in the print dialog.
 
typedef ref< print_dialogObjprint_dialog
 
typedef const_ref< print_dialogObjconst_print_dialog
 A constant print dialog.
 
typedef ptr< print_dialogObjprint_dialogptr
 A nullable pointer reference to a print dialog.
 
typedef const_ptr< print_dialogObjconst_print_dialogptr
 A nullable pointer reference to a const print dialog.
 
typedef ref< progressbar_appearanceObj, progressbar_appearance_baseprogressbar_appearance
 
typedef const_ref< progressbar_appearanceObj, progressbar_appearance_baseconst_progressbar_appearance
 Constant progressbar appearance.
 
typedef ptr< progressbar_appearanceObj, progressbar_appearance_baseprogressbar_appearanceptr
 A nullable pointer reference to a progressbar appearance.
 
typedef const_ptr< progressbar_appearanceObj, progressbar_appearance_baseconst_progressbar_appearanceptr
 A nullable pointer reference to a const progressbar appearance.
 
typedef appearance_wrapper< const_progressbar_appearanceconst_progressbar_appearance_wrapper
 Alias.
 
typedef ref< progressbarObjprogressbar
 
typedef const_ref< progressbarObjconst_progressbar
 A constant progress bar.
 
typedef ptr< progressbarObjprogressbarptr
 A nullable pointer reference to a progress bar.
 
typedef const_ptr< progressbarObjconst_progressbarptr
 A nullable pointer reference to a const progress bar.
 
typedef std::vector< rectanglerectarea
 An area defined by a list of rectangles.
 
typedef uint16_t rgb_component_t
 Value type for RGB components.
 
typedef uint32_t rgb_component_squared_t
 Value type that can be used for scaling rgb components.
 
typedef std::unordered_map< size_t, rgbrgb_gradient
 A gradient involving multiple colors.
 
typedef std::variant< rgb, std::string, linear_gradient, radial_gradient, image_colorcolor_arg
 A color specification.
 
typedef std::variant< theme_color, rgbtext_color_arg
 Text label colors.
 
typedef ref< richtextcursorlocationObj > richtextcursorlocation
 A location in a rich text object.
 
typedef std::list< richtextcursorlocationfragment_cursorlocations_t
 Container for locations in a given richtextfragment.
 
typedef ref< richtextcursorlocationownerObjrichtextcursorlocationowner
 
typedef const_ref< richtextcursorlocationownerObjconst_richtextcursorlocationowner
 A constant richtextcursorlocationowner.
 
typedef ptr< richtextcursorlocationownerObjrichtextcursorlocationownerptr
 A nullable pointer reference to a richtextcursorlocationowner.
 
typedef const_ptr< richtextcursorlocationownerObjconst_richtextcursorlocationownerptr
 A nullable pointer reference to a const richtextcursorlocationowner.
 
typedef ref< richtextfragmentObjrichtextfragment
 A fragment of unicode text, ending at an allowed or a mandatory line break.
 
typedef const_ref< richtextfragmentObjconst_richtextfragment
 Reference to a constant rich text fragment.
 
typedef ptr< richtextfragmentObjrichtextfragmentptr
 A nullable pointer reference to a text fragment.
 
typedef ref< richtextObjrichtext
 A list of text paragraphs.
 
typedef ptr< richtextObjrichtextptr
 A nullable pointer reference to a rich text string.
 
typedef ref< richtextiteratorObjrichtextiterator
 Iterator, or a pointer, into a rich text object.
 
typedef ptr< richtextiteratorObjrichtextiteratorptr
 A nullable pointer reference to a rich text iterator.
 
typedef const_ref< richtextiteratorObjconst_richtextiterator
 A constant reference to a rich text iterator.
 
typedef ref< richtextparagraphObj > richtextparagraph
 A list of text fragments in a rich text object.
 
typedef ref< scratch_bufferObjscratch_buffer
 A picture and a pixmap used for preparing widget images.
 
typedef const_ref< scratch_bufferObjconst_scratch_buffer
 A constant scratch buffer.
 
typedef ptr< scratch_bufferObjscratch_bufferptr
 A nullable pointer reference to a scratch buffer.
 
typedef const_ptr< scratch_bufferObjconst_scratch_bufferptr
 A nullable pointer reference to a constant scratch buffer.
 
typedef ref< screen_positionsObj, screen_positionsBasescreen_positions
 
typedef const_ref< screen_positionsObj, screen_positionsBaseconst_screen_positions
 Constant memorized screen positions.
 
typedef ptr< screen_positionsObj, screen_positionsBasescreen_positionsptr
 A nullable pointer reference to memorized screen positions.
 
typedef const_ptr< screen_positionsObj, screen_positionsBaseconst_screen_positionsptr
 A nullable pointer reference to const memorized screen positions.
 
typedef ref< screenObj, screenBasescreen
 
typedef const_ref< screenObj, screenBaseconst_screen
 A constant screen.
 
typedef ref< scrollbar_appearanceObj, scrollbar_appearance_basescrollbar_appearance
 
typedef const_ref< scrollbar_appearanceObj, scrollbar_appearance_baseconst_scrollbar_appearance
 Constant scrollbar appearance.
 
typedef ptr< scrollbar_appearanceObj, scrollbar_appearance_basescrollbar_appearanceptr
 A nullable pointer reference to a scrollbar appearance.
 
typedef const_ptr< scrollbar_appearanceObj, scrollbar_appearance_baseconst_scrollbar_appearanceptr
 A nullable pointer reference to a const scrollbar appearance.
 
typedef appearance_wrapper< const_scrollbar_appearanceconst_scrollbar_appearance_wrapper
 Alias.
 
typedef ref< scrollbar_images_appearanceObj, scrollbar_images_appearance_basescrollbar_images_appearance
 
typedef const_ref< scrollbar_images_appearanceObj, scrollbar_images_appearance_baseconst_scrollbar_images_appearance
 Constant WHATITIS.
 
typedef ptr< scrollbar_images_appearanceObj, scrollbar_images_appearance_basescrollbar_images_appearanceptr
 A nullable pointer reference to a WHATITIS.
 
typedef const_ptr< scrollbar_images_appearanceObj, scrollbar_images_appearance_baseconst_scrollbar_images_appearanceptr
 A nullable pointer reference to a const WHATITIS.
 
typedef appearance_wrapper< const_scrollbar_images_appearanceconst_scrollbar_images_appearance_wrapper
 Alias.
 
typedef number< uint32_t, scroll_v_tag > scroll_v_t
 Discrete data type for scrollbar values.
 
typedef functionref< void(THREAD_CALLBACK, const scrollbar_info_t &)> scrollbar_cb_t
 Callback that reports the scrollbar's updated values.
 
typedef ref< scrollbarObjscrollbar
 
typedef ptr< scrollbarObjscrollbarptr
 A nullable pointer reference to a scrollbar.
 
typedef const_ref< scrollbarObjconst_scrollbar
 A reference to a constant scrollbar.
 
typedef const_ptr< scrollbarObjconst_scrollbarptr
 A nullable pointer reference to a constant scrollbar.
 
typedef ref< singletonlayoutmanagerObjsingletonlayoutmanager
 
typedef const_ref< singletonlayoutmanagerObjconst_singletonlayoutmanager
 A constant singleton layout manager.
 
typedef ptr< singletonlayoutmanagerObjsingletonlayoutmanagerptr
 A nullable pointer reference to a singleton layout manager.
 
typedef const_ptr< singletonlayoutmanagerObjconst_singletonlayoutmanagerptr
 A nullable pointer reference to a const singleton layout manager.
 
typedef ref< standard_comboboxlayoutmanagerObjstandard_comboboxlayoutmanager
 
typedef const_ref< standard_comboboxlayoutmanagerObjconst_standard_comboboxlayoutmanager
 A constant standard combox-box layout manager.
 
typedef ptr< standard_comboboxlayoutmanagerObjstandard_comboboxlayoutmanagerptr
 A nullable pointer reference to a standard combox-box layout manager.
 
typedef const_ptr< standard_comboboxlayoutmanagerObjconst_standard_comboboxlayoutmanagerptr
 A nullable pointer reference to a const standard combox-box layout manager.
 
typedef functionref< void(THREAD_CALLBACK, const standard_combobox_selection_changed_info_t &) > standard_combobox_selection_changed_t
 
typedef ref< synchronized_axisObjsynchronized_axis
 
typedef const_ref< synchronized_axisObjconst_synchronized_axis
 A constant synchronized axis.
 
typedef ptr< synchronized_axisObjsynchronized_axisptr
 A nullable pointer reference to a synchronized axis.
 
typedef const_ptr< synchronized_axisObjconst_synchronized_axisptr
 A nullable pointer reference to a const synchronized axis.
 
typedef ref< table_appearanceObj, table_appearance_basetable_appearance
 
typedef const_ref< table_appearanceObj, table_appearance_baseconst_table_appearance
 Constant table header row appearance.
 
typedef ptr< table_appearanceObj, table_appearance_basetable_appearanceptr
 A nullable pointer reference to a table header row appearance.
 
typedef const_ptr< table_appearanceObj, table_appearance_baseconst_table_appearanceptr
 A nullable pointer reference to a const table header row appearance.
 
typedef appearance_wrapper< const_table_appearanceconst_table_appearance_wrapper
 Alias.
 
typedef std::vector< std::tuple< x::w::text_param, x::w::label_config > > table_headers_param_t
 Parameter for table_headers()
 
typedef ref< tablelayoutmanagerObjtablelayoutmanager
 
typedef const_ref< tablelayoutmanagerObjconst_tablelayoutmanager
 A constant table layout manager.
 
typedef ptr< tablelayoutmanagerObjtablelayoutmanagerptr
 A nullable pointer reference to a table layout manager.
 
typedef const_ptr< tablelayoutmanagerObjconst_tablelayoutmanagerptr
 A nullable pointer reference to a const table layout manager.
 
typedef std::variant< int, std::string_view > label_hotspot_id
 
typedef std::variant< const button_event *, const key_event *, focus_changetext_event_t
 The event that invoked a text link callback..
 
typedef functionref< text_param(THREAD_CALLBACK, const text_event_t &)> text_hotspot
 A focusable label hotspot callback.
 
typedef functionptr< text_param(THREAD_CALLBACK, const text_event_t &)> text_hotspotptr
 A nullable pointer to a focusable label hotspot callback.
 
typedef std::unordered_map< label_hotspot_id, text_hotspotlabel_hotspots_t
 
typedef ref< textlabelObjtextlabel
 Text label interface.
 
typedef ptr< textlabelObjtextlabelptr
 A nullable pointer reference to an text label.
 
typedef const_ref< textlabelObjconst_textlabel
 A reference to a constant text label object.
 
typedef const_ptr< textlabelObjconst_textlabelptr
 A nullable pointer reference to a constant text label object.
 
typedef ref< toolboxfactoryObjtoolboxfactory
 
typedef const_ref< toolboxfactoryObjconst_toolboxfactory
 A constant toolbox factory.
 
typedef ptr< toolboxfactoryObjtoolboxfactoryptr
 A nullable pointer reference to a toolbox factory.
 
typedef const_ptr< toolboxfactoryObjconst_toolboxfactoryptr
 A nullable pointer reference to a const toolbox factory.
 
typedef mpobj< toolbox_info, std::recursive_mutex > toolbox_info_t
 
typedef ref< toolboxlayoutmanagerObjtoolboxlayoutmanager
 
typedef const_ref< toolboxlayoutmanagerObjconst_toolboxlayoutmanager
 A constant toolboxlayoutmanager.
 
typedef ptr< toolboxlayoutmanagerObjtoolboxlayoutmanagerptr
 A nullable pointer reference to a toolboxlayoutmanager.
 
typedef const_ptr< toolboxlayoutmanagerObjconst_toolboxlayoutmanagerptr
 A nullable pointer reference to a const toolboxlayoutmanager.
 
typedef ref< tooltip_appearanceObj, tooltip_appearance_basetooltip_appearance
 
typedef const_ref< tooltip_appearanceObj, tooltip_appearance_baseconst_tooltip_appearance
 Constant tooltip appearance.
 
typedef ptr< tooltip_appearanceObj, tooltip_appearance_basetooltip_appearanceptr
 A nullable pointer reference to a tooltip appearance.
 
typedef const_ptr< tooltip_appearanceObj, tooltip_appearance_baseconst_tooltip_appearanceptr
 A nullable pointer reference to a const tooltip appearance.
 
typedef appearance_wrapper< const_tooltip_appearanceconst_tooltip_appearance_wrapper
 Alias.
 
typedef ref< tooltip_border_appearanceObj, tooltip_border_appearance_basetooltip_border_appearance
 
typedef const_ref< tooltip_border_appearanceObj, tooltip_border_appearance_baseconst_tooltip_border_appearance
 Constant WHATITIS.
 
typedef ptr< tooltip_border_appearanceObj, tooltip_border_appearance_basetooltip_border_appearanceptr
 A nullable pointer reference to a WHATITIS.
 
typedef const_ptr< tooltip_border_appearanceObj, tooltip_border_appearance_baseconst_tooltip_border_appearanceptr
 A nullable pointer reference to a const WHATITIS.
 
typedef appearance_wrapper< const_tooltip_border_appearanceconst_tooltip_border_appearance_wrapper
 Alias.
 
typedef number< uint16_t, xdim_tag > xdim_t
 A dimension (size) in the X protocol is a 16 bit value.
 
typedef number< int16_t, xcoord_tag > xcoord_t
 An X protocol coordinate is a 16 bit value.
 
typedef number< uint32_t, dim_tag, dim_basedim_t
 Internal unit type for dimensions: width or height.
 
typedef number< uint64_t, dim_squared_tag, types_basedim_squared_t
 The unit type that can accomodate dim_t squared.
 
typedef number< int32_t, coord_tag, types_basecoord_t
 Internal unit type for positions: x and y coordinates.
 
typedef number< int64_t, coord_squared_tag, types_basecoord_squared_t
 The unit type that can accomodate coord_t + dim_t.
 
typedef number< uint8_t, depth_tag > depth_t
 The unit type for bit depth of windows, drawables...
 
typedef std::variant< rgb, linear_gradient, radial_gradienttheme_color_t
 A theme color is either an rgb solid color, or a gradient color.
 
typedef functionref< void(const factory &, uielements &) > factory_generator
 Generate something using a base factory.
 
typedef functionref< void(const gridlayoutmanager &, uielements &) > gridlayoutmanager_generator
 Generate something in the grid layout manager.
 
typedef functionref< void(const listlayoutmanager &, uielements &) > listlayoutmanager_generator
 Generate something in the list layout manager.
 
typedef functionref< void(const tablelayoutmanager &, uielements &) > tablelayoutmanager_generator
 Generate something in the table layout manager.
 
typedef functionref< void(const panelayoutmanager &, uielements &) > panelayoutmanager_generator
 Generate something in the pane layout manager.
 
typedef functionref< void(const itemlayoutmanager &, uielements &) > itemlayoutmanager_generator
 Generate something in the item layout manager.
 
typedef functionref< void(const pagelayoutmanager &, uielements &) > pagelayoutmanager_generator
 Generate something in the page layout manager.
 
typedef functionref< void(const toolboxlayoutmanager &, uielements &) > toolboxlayoutmanager_generator
 Generate something in the toolbox layout manager.
 
typedef functionref< void(const standard_comboboxlayoutmanager &, uielements &) > standard_comboboxlayoutmanager_generator
 Generate something in the standard combobox layout manager.
 
typedef functionref< void(const editable_comboboxlayoutmanager &, uielements &) > editable_comboboxlayoutmanager_generator
 Generate something in the editable combobox layout manager.
 
typedef functionref< void(const gridfactory &, uielements &) > gridfactory_generator
 Generate something using a grid factory.
 
typedef functionref< void(const menubarlayoutmanager &, uielements &) > menubarlayoutmanager_generator
 Generate something using a menu bar layout manager.
 
typedef functionref< void(const menubarfactory &, uielements &) > menubarfactory_generator
 Generate something using a menu bar factory.
 
typedef functionref< void(const booklayoutmanager &, uielements &) > booklayoutmanager_generator
 Generate something with the book layout manager.
 
typedef functionref< void(const bookpagefactory &, uielements &) > bookpagefactory_generator
 Generate something using a book page factory.
 
typedef functionref< void(const pagefactory &, uielements &) > pagefactory_generator
 Generate something using a book factory.
 
typedef functionref< void(const panefactory &, uielements &) > panefactory_generator
 Generate something using a pane factory.
 
typedef functionref< void(const toolboxfactory &, uielements &) > toolboxfactory_generator
 Generate something using a toolbox factory.
 
typedef functionref< void(const borderlayoutmanager &, uielements &) > borderlayoutmanager_generator
 Generate something in the border layout manager.
 
typedef functionref< void(const singletonlayoutmanager &, uielements &) > singletonlayoutmanager_generator
 Generate something in the singleton layout manager.
 
typedef new_gridlayoutmanagernew_gridlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_gridlayoutmanager parameter.
 
typedef functionref< void(const new_gridlayoutmanager_plainptr &layout, uielements &elements) > new_gridlayoutmanager_generator
 Generate something to initialize a new_gridlayoutmanager.
 
typedef new_booklayoutmanagernew_booklayoutmanager_plainptr
 Pseudo-ref used to initialize a new_booklayoutmanager parameter.
 
typedef functionref< void(const new_booklayoutmanager_plainptr &layout, uielements &elements) > new_booklayoutmanager_generator
 Generate something to initialize a new_booklayoutmanager.
 
typedef new_listlayoutmanagernew_listlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_listlayoutmanager parameter.
 
typedef new_list_or_combobox_layoutmanagernew_list_or_combobox_layoutmanager_plainptr
 Pseudo-ref used to initialize a new_list_or_combobox_layoutmanager.
 
typedef functionref< void(const new_listlayoutmanager_plainptr &layout, uielements &elements) > new_listlayoutmanager_generator
 Generate something to initialize a new_listlayoutmanager.
 
typedef functionref< void(const new_list_or_combobox_layoutmanager_plainptr &layout, uielements &elements) > new_list_or_combobox_layoutmanager_generator
 Generate something to initialize a new_list_or_combobox_layoutmanager.
 
typedef new_custom_comboboxlayoutmanagernew_custom_comboboxlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_custom_comboboxlayoutmanager parameter.
 
typedef functionref< void(const new_custom_comboboxlayoutmanager_plainptr &, uielements &elements) > new_custom_comboboxlayoutmanager_generator
 Generate something to initialize a new_custom_comboboxlayoutmanager.
 
typedef new_standard_comboboxlayoutmanagernew_standard_comboboxlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_standard_comboboxlayoutmanager parameter.
 
typedef functionref< void(const new_standard_comboboxlayoutmanager_plainptr &, uielements &elements) > new_standard_comboboxlayoutmanager_generator
 Generate something to initialize a new_standard_comboboxlayoutmanager.
 
typedef new_editable_comboboxlayoutmanagernew_editable_comboboxlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_editable_comboboxlayoutmanager parameter.
 
typedef functionref< void(const new_editable_comboboxlayoutmanager_plainptr &, uielements &elements) > new_editable_comboboxlayoutmanager_generator
 Generate something to initialize a new_editable_comboboxlayoutmanager.
 
typedef new_tablelayoutmanagernew_tablelayoutmanager_plainptr
 Pseudo-ref used to initialize a new_tablelayoutmanager parameter.
 
typedef functionref< void(const new_tablelayoutmanager_plainptr &layout, uielements &elements) > new_tablelayoutmanager_generator
 Generate something to initialize a new_tablelayoutmanager.
 
typedef new_panelayoutmanagernew_panelayoutmanager_plainptr
 Pseudo-ref used to initialize a new_panelayoutmanager parameter.
 
typedef functionref< void(const new_panelayoutmanager_plainptr &layout, uielements &elements) > new_panelayoutmanager_generator
 Generate something to initialize a new_panelayoutmanager.
 
typedef new_itemlayoutmanagernew_itemlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_itemlayoutmanager parameter.
 
typedef functionref< void(const new_itemlayoutmanager_plainptr &layout, uielements &elements) > new_itemlayoutmanager_generator
 Generate something to initialize a new_itemlayoutmanager.
 
typedef new_pagelayoutmanagernew_pagelayoutmanager_plainptr
 Pseudo-ref used to initialize a new_pagelayoutmanager parameter.
 
typedef functionref< void(const new_pagelayoutmanager_plainptr &layout, uielements &elements) > new_pagelayoutmanager_generator
 Generate something to initialize a new_pagelayoutmanager.
 
typedef new_toolboxlayoutmanagernew_toolboxlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_toolboxlayoutmanager parameter.
 
typedef functionref< void(const new_toolboxlayoutmanager_plainptr &layout, uielements &elements) > new_toolboxlayoutmanager_generator
 Generate something to initialize a new_toolboxlayoutmanager.
 
typedef new_borderlayoutmanagernew_borderlayoutmanager_plainptr
 Pseudo-ref used to initialize a new_borderlayoutmanager parameter.
 
typedef functionref< void(const new_borderlayoutmanager_plainptr &layout, uielements &elements) > new_borderlayoutmanager_generator
 Generate something to initialize a new_borderlayoutmanager.
 
typedef functionref< void(const uielements *const &)> elements_generator
 Generate something using already-generated elements.
 
typedef ref< uigeneratorsObj, uigeneratorsBaseuigenerators
 
typedef const_ref< uigeneratorsObj, uigeneratorsBaseconst_uigenerators
 Constant compiled widget generators.
 
typedef ptr< uigeneratorsObj, uigeneratorsBaseuigeneratorsptr
 A nullable pointer reference to compiled widget generators.
 
typedef const_ptr< uigeneratorsObj, uigeneratorsBaseconst_uigeneratorsptr
 A nullable pointer reference to const compiled widget generators.
 
typedef new_scrollable_peepholelayoutmanagernew_peepholelayoutmanager_plainptr
 Pseudo-ref used to initialize a new_scrollable_peepholelayout parameter.
 
typedef functionref< void(const new_peepholelayoutmanager_plainptr &layout, uielements &elements) > new_peepholelayoutmanager_generator
 Generate something to initialize a new_peepholelayoutmanager (scrollable)
 
typedef functionref< void(const peepholelayoutmanager &, uielements &) > peepholelayoutmanager_generator
 Generate something in the peephole layout manager.
 
template<input_field_validation_function validation_function>
using input_field_validation_function_type = typename input_field_detect_validator_functor_parameter< validation_function >::optional_return_type_t
 What create_validated_input_field_contents()'s validation_function's type.
 
template<typename type >
using validated_input_field_contents = ref< validated_input_field_contentsObj< type > >
 
template<typename type >
using const_validated_input_field_contents = const_ref< validated_input_field_contentsObj< type > >
 A constant validated input field contents.
 
template<typename type >
using validated_input_field_contentsptr = ptr< validated_input_field_contentsObj< type > >
 A nullable pointer reference to a validated input field contents.
 
template<typename type >
using const_validated_input_field_contentsptr = const_ptr< validated_input_field_contentsObj< type > >
 A nullable pointer reference to a const validated input field contents.
 
template<typename type >
using validated_input_field = ref< validated_input_fieldObj< type > >
 
template<typename type >
using const_validated_input_field = const_ref< validated_input_fieldObj< type > >
 A constant validated input field value.
 
template<typename type >
using validated_input_fieldptr = ptr< validated_input_fieldObj< type > >
 A nullable pointer reference to a validated input field value.
 
template<typename type >
using const_validated_input_fieldptr = const_ptr< validated_input_fieldObj< type > >
 A nullable pointer reference to a const validated input field value.
 
template<input_field_validation_function validation_function>
using create_validator_ret_t = std::tuple< input_field_validation_callback, validated_input_field_contents< input_field_validation_function_type< validation_function > > >
 
template<typename T >
using create_string_validator_ret_t = std::tuple< input_field_validation_callback, validated_input_field_contents< T > >
 

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_confignormal_button ()
 Returns default appearance of a normal button.
 
const button_configdefault_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_ttable_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.
 

Detailed Description

LibCXXW library namespace.

Typedef Documentation

◆ all_key_events_t

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.

◆ all_updated_position_widgets_t

Temporary list of all repositioned widgets, by their nesting level.

◆ all_updated_position_widgets_t_iterator

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.

◆ always_visible_focusframe_ref_t

A typical implementation of a focusframecontainer always_visibleObj mixin.

◆ always_visible_focusframe_t

A typical implementation of a focusframecontainer always_visibleObj mixin.

◆ 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.

◆ appearanceptr

A nullable pointer reference to an appearance object.

See also
appearance

◆ 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.

◆ background_color_elementObj

template<typename base , typename arg1 = void, typename ... args>
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.

#include <x/w/impl/background_color_element.H>
struct color_tag;
class my_implObj: public x::w::background_color_elementObj< // ...,
color_tag> {
// ...
typedef x::w::background_color_elementObj< // ...,
color_tag> superclass_t;
};
my_implObj::my_implObj(const x::w::color_arg &amp;color, // ...
) : superclass_t{color, // ...
}
{
// ...
x::w::background_color bg=x::w::background_color_element<color_tag>::get(IN_THREAD);
x::w::const_picture p=bg->get_current_color(IN_THREAD);
}

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.

Constructors

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 recalculations

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.

Obtaining the current color

background_color_element<T>::get(IN_THREAD) returns the associated tag's background_color.

◆ background_colorptr

A nullable pointer reference to a background color.

◆ batch_queue

typedef ref<batch_queueObj> x::w::batch_queue

Batches execution batch_queue for the connection thread.

◆ batch_queueptr

typedef ptr<batch_queueObj> x::w::batch_queueptr

A nullable pointer reference to the batch_queue object.

See also
batch_queue.

◆ book_appearance

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.

x::w::new_booklayoutmanager nblm;
x::w::const_book_appearance custom=nblm.appearance
->modify([]
(const x::w::book_appearance &custom)
{
// Modify custom->...
});
nblm.appearance=custom;

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.

◆ book_appearanceptr

A nullable pointer reference to a book container's appearance.

See also
book_appearance

◆ booklayoutmanager

The book layout manager.

auto container=factory->create_focusable_container
([]
(const x::w::container &c)
{
x::w::booklayoutmanager book=c->get_layoutmanager();
// ...
},
x::w::new_booklayoutmanager{});

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.

x::w::book_lock lock{book};
x::w::bookpagefactory factory=book->append();
x::w::bookpagefactory factory=book->insert(0);
x::w::element e=book->get_page(0);
book->remove(0);
size_t n=book->pages();
book->open(1);
book->close();
std::optional<size_t> n=book->opened();
ref< factoryObj > factory
Definition factoryfwd.H:593

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.

book->on_opened([]
(ONLY IN_THREAD,
const x::w::book_status_info_t &info)
{
size_t n=info.opened;
});

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().

Populating from an XML-based specification
booklayout->generate("options-layout", generators, elements);

generate() creates new contents from the loaded theme file. See the tutorial for more information.

◆ booklayoutmanager_generator

Generate something with the book layout manager.

See also
uigenerators

◆ booklayoutmanagerptr

A nullable pointer reference to a book layout manager.

See also
booklayoutmanager

◆ bookpage_appearance

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.

x::w::bookpagefactory f;
x::w::const_bookpage_appearance custom=x::w::bookpage_appearance::base::theme()
->modify([]
(const x::w::bookpage_appearance &custom)
{
// Modify custom->...
});
f->appearance=custom;

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.

◆ bookpage_appearanceptr

A nullable pointer reference to a book page tab appearance.

See also
bookpage_appearance

◆ bookpagefactory

A factory that adds another page to a container with a book layout manager.

factory->halign(LIBCXX_NAMESPACE:w::halign::left)
.add("Page 1",
[]
(const LIBCXX_NAMESPACE::w::factory &page_factory)
{
page_factory->create_container([]
(const auto &c)
{
},
x::w::new_gridlayoutmanager{})->show();
// ...
});
factory->appearance=theme;
factory->set_appearance(theme)
factory->add([]
(const LIBCXX_NAMESPACE::w::factory &tab_factory,
const LIBCXX_NAMESPACE::w::factory &page_factory)
{
tab_factory->create_label("Page 1")->show();
page_factory->create_container([]
(const auto &c)
{
},
x::w::new_gridlayoutmanager{})->show();
// ...
});
#define LIBCXX_NAMESPACE
valign
Vertical alignment.
Definition alignment.H:23
rectarea add(const rectarea &, const rectarea &, coord_t offsetx=0, coord_t offsety=0)
Add two rectangle sets together.
halign
Horizontal alignment.
Definition alignment.H:14

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:

  • x::w::text_param sets the page's label shown in the page's tab, as a text string.
  • A closure or a callable object. The callable object receives one parameter, a factory that the callable object must use to create one widget that represents the page in the book; typically a container. The callable object is responsible for show()ing the new element.
  • An optional keyboard shortcut for opening the new page.
  • An optional alignment for the text tab, if it contains multiple lines of text. Even though the book layout manager controls which page is currently visible, like all other widgets, they have to be shown, in order to actually become visible when the page gets shown.

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.

factory->noncurrent_color=x::w::silver;
factory->current_color=x::w::white;
factory->warm_color=x::w::yellow;
factory->active_color=x::w::aqua;
factory->label_font=x::w::font{"liberation mono"};
factory->active_color=x::w::black;
factory->horiz_padding=2.0;
factory->vert_padding=2.0;

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).

See also
booklayoutmanager

◆ bookpagefactory_generator

Generate something using a book page factory.

See also
uigenerators

◆ bookpagefactoryptr

A nullable pointer reference to a book page factory.

See also
bookpagefactory

◆ border_arg

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.

◆ border_impl

A border implementation.

An object that contains specifications for a border, and the logic to draw it.

◆ border_implptr

A nullable pointer reference to a border implementation.

◆ borderlayoutmanager

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.

f->update_title("New title");
f->update_title(IN_THREAD, "New title");

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.

f->update_border("thin");
f->update_borders("thin", "thin", "thick", "thick")
f->update_border(IN_THREAD, "thin");
f->update_borders(IN_THREAD, "thin", "thin", "thick", "thick")

update_border() changes the shown border. update_borders() individually specified the left, right, top, and bottom borders.

x::w::const_uigenerators generators;
x::w::uielements elements;
f->generate("options", generators, elements);

generate() generates the contents of the border layout manager's container from a theme file

◆ borderlayoutmanager_generator

Generate something in the border layout manager.

See also
uigenerators

◆ borderlayoutmanagerptr

A nullable pointer reference to a border layout manager.

See also
borderlayoutmanager

◆ button

A clickable button.

button->on_activate([]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &,
const x::w::busy &)
{
});
button->on_activate(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &,
const x::w::busy &)
{
});
const connection_thread & ONLY
Some class methods can only be executed by the internal connection thread
Definition connection_threadfwd.H:49
ref< buttonObj > button
A clickable button.
Definition buttonfwd.H:61

on_activate() installs a callback that gets invoked by clicking on the button.

#include <x/w/singletonlayoutmanager.H>
x::w::singletonlayoutmanager l=button->get_layoutmanager();

get_layoutmanager() returns the singleton layout manager for accessing or replacing the button's contents.

◆ button_appearance

Appearance of the button_config.

Specifies various properties of a button. The default properties are set by the current display theme.

x::w::button_config config;
x::w::const_button_appearance custom=x::w::button_appearance::base::normal_theme()
->modify([]
(const x::w::button_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ button_appearanceptr

A nullable pointer reference to a button appearance.

See also
button_appearance

◆ button_event_callback_t

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.

◆ buttonptr

A nullable pointer reference to an button.

◆ 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.

See also
callback_trigger_key_event
callback_trigger_button_event
callback_trigger_initial

◆ canvas

A mostly empty widget.

config.width={0, 50, 100};
config.height={0, 50, 100};
factory->create_canvas(config);
Canvas options.
Definition canvas.H:19
dim_axis_arg height
Initial height.
Definition canvas.H:29
dim_axis_arg width
Initial width.
Definition canvas.H:26

The canvas object gets constructed, with specified horizontal and vertical metrics.

c->update(h_metrics, v_metrics);

Update the canvas object's horizontal and vertical metrics.

See also
canvas_config

◆ canvasptr

A nullable pointer reference to an canvas.

See also
canvas

◆ child_element

◆ color_arg

typedef std::variant<rgb, std::string, linear_gradient, radial_gradient, image_color> x::w::color_arg

A color specification.

One of the following:

◆ color_picker

Color picker widget.

x::w::color_picker cp=factory->create_color_picker();

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.

Note
The color picker ignores 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.

Selecting the color with the keyboard

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 "Ok" and "Cancel" buttons

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".

x::w::rgb c=cp->current_color();
cp->current_color(x::w::rgb{});
cp->current_color(IN_THREAD, x::w::rgb{});
cp->on_color_update([]
(ONLY IN_THREAD,
const x::w::rgb &new_color,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
});

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.

Note
The color picker callback gets installed by an internal execution thread. It is possible that the old callback may still be invoked if the "Ok" button was in the process of being clicked at the time of on_color_update(). In all cases the old callback is no longer in effect at the time the new callback's 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.

Saving and restoring color picker configuration
x::color_picker_config config;
config.name="foreground-color";

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.

◆ color_picker_appearance

Appearance of the color_picker.

Specifies various properties of a color picker. The default properties are set by the current display theme.

x::w::color_picker_config config{
// ...
};
x::w::const_color_picker_appearance custom=x::w::color_picker_appearance::base::theme()
->modify([]
(const x::w::color_picker_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ color_picker_appearanceptr

A nullable pointer reference to a color picker appearance.

See also
color_picker_appearance

◆ color_picker_callback_t

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.

◆ color_pickerptr

A nullable pointer reference to a color picker.

See also
color_picker

◆ combobox_appearance

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.

x::w::const_combobox_appearance custom=x::w::combobox_appearance::base::theme()
->modify([]
(const x::w::combobox_appearance &custom)
{
// Modify custom->...
});

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.

◆ combobox_appearanceptr

A nullable pointer reference to a combo-box appearance settings.

See also
combobox_appearance

◆ connection

A connection to the display server.

auto conn=x::w::connection::create();
auto conn=x::w::connection::create("localhost:1.0");

Creates an object representing a connection to the display SERVER.

Screen info
size_t n=conn->screens();
size_t n=conn->default_screen();
Connection mcguffin
x::ref<x::obj> mcguffin=conn->mcguffin();

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.

Themes
std::pair<std::string, int> conn->current_theme();

Returns the identifier for the current theme, and the scaling factor percentage.

Invoke an arbitrary callback in the connection thread.
conn->in_thread([]
(ONLY IN_THREAD)
{
// ...
});
conn->in_thread_idle([]
(ONLY IN_THREAD)
{
// ...
});

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.

Selections
bool flag=conn->selection_has_owner("SECONDARY");

Returns an indication whether the given selection has an owner window. This checks where GetSelectionOwner() returns a window handle.

◆ connection_thread

typedef ref<connection_threadObj> x::w::connection_thread

Internal library execution thread.

◆ connectionptr

A nullable pointer reference to a display server connection.

◆ const_appearance

A constant appearance object.

See also
appearance

◆ const_appearanceptr

A nullable pointer reference to a const appearance object.

See also
appearance

◆ const_book_appearance

◆ const_book_appearance_wrapper

Alias.

◆ const_book_appearanceptr

A nullable pointer reference to a const book container's appearance.

See also
book_appearance

◆ const_booklayoutmanager

◆ const_booklayoutmanagerptr

A nullable pointer reference to a const book layout manager.

See also
booklayoutmanager

◆ const_bookpage_appearance

◆ const_bookpage_appearance_wrapper

Alias.

◆ const_bookpage_appearanceptr

A nullable pointer reference to a const book page tab appearance.

See also
bookpage_appearance

◆ const_bookpagefactory

A constant book page factory.

See also
bookpagefactory

◆ const_bookpagefactoryptr

A nullable pointer reference to a const book page factory.

See also
bookpagefactory

◆ const_border_impl

A constant border implementation object.

◆ const_border_implptr

A nullable pointer reference to a constant border implementation object.

◆ const_borderlayoutmanager

◆ const_borderlayoutmanagerptr

A nullable pointer reference to a const border layout manager.

See also
borderlayoutmanager

◆ const_button

A reference to a constant button.

See also
button

◆ const_button_appearance

◆ const_button_appearance_wrapper

Alias.

◆ const_button_appearanceptr

A nullable pointer reference to a const button appearance.

See also
button_appearance

◆ const_buttonptr

A nullable pointer reference to a constant button.

See also
button

◆ const_canvas

A reference to a constant canvas object.

See also
canvas

◆ const_canvasptr

A nullable pointer reference to a constant canvas object.

See also
canvas

◆ const_color_picker

A constant color picker.

See also
color_picker

◆ const_color_picker_appearance

◆ const_color_picker_appearance_wrapper

Alias.

◆ const_color_picker_appearanceptr

A nullable pointer reference to a const color picker appearance.

See also
color_picker_appearance

◆ const_color_pickerptr

A nullable pointer reference to a const color picker.

See also
color_picker

◆ const_combobox_appearance

◆ const_combobox_appearance_wrapper

Alias.

◆ const_combobox_appearanceptr

A nullable pointer reference to a const combo-box appearance settings.

See also
combobox_appearance

◆ const_connection

A constant connection to the display server.

See also
connection

◆ const_connectionptr

A nullable pointer reference to a constant connection to display server connection.

◆ const_container

A constant container.

See also
container

◆ const_containerptr

A nullable pointer reference to a constant container.

◆ const_copy_cut_paste_menu_items

◆ const_copy_cut_paste_menu_itemsptr

A nullable pointer reference to const copy/cut/paste menu items.

See also
copy_cut_paste_menu_items

◆ const_current_border_impl

A constant current border object.

◆ const_current_border_implptr

A nullable pointer reference to a constant current border object.

◆ const_current_fontcollection

◆ const_current_fontcollectionptr

A nullable pointer reference to constant current font collection.

◆ const_current_selection_handler

typedef const_ref<current_selection_handlerObj> x::w::const_current_selection_handler

◆ const_current_selection_handlerptr

typedef const_ptr<current_selection_handlerObj> x::w::const_current_selection_handlerptr

A nullable pointer reference to a const X selection handler.

See also
current_selection_handler

◆ const_cursor_pointer

typedef const_ref<cursor_pointerObj> x::w::const_cursor_pointer

A constant cursor_pointer.

See also
cursor_pointer

◆ const_cursor_pointerptr

typedef const_ptr<cursor_pointerObj> x::w::const_cursor_pointerptr

A nullable cursor_pointer reference to a const cursor_pointer.

See also
cursor_pointer

◆ const_custom_comboboxlayoutmanager

◆ const_custom_comboboxlayoutmanagerptr

A nullable pointer reference to a const combox-box layout manager.

See also
custom_comboboxlayoutmanager

◆ const_date_input_field

A constant date input field.

See also
date_input_field

◆ const_date_input_field_appearance

◆ const_date_input_field_appearance_wrapper

Alias.

◆ const_date_input_field_appearanceptr

A nullable pointer reference to a const date input field appearance.

See also
date_input_field_appearance

◆ const_date_input_fieldptr

A nullable pointer reference to a const date input field.

See also
date_input_field

◆ const_defaulttheme

typedef const_ref<defaultthemeObj, defaultthemeBase> x::w::const_defaulttheme

A constant loaded application theme.

◆ const_defaultthemeptr

typedef const_ptr<defaultthemeObj, defaultthemeBase> x::w::const_defaultthemeptr

A constant nullable pointer reference to a loaded application theme.

◆ const_delayed_input_focus

A constant WHATITIS.

See also
delayed_input_focus

◆ const_delayed_input_focusptr

A nullable pointer reference to a const WHATITIS.

See also
delayed_input_focus

◆ const_dialog

A constant dialog window.

See also
dialog

◆ const_dialogptr

A nullable pointer reference to a const dialog window.

See also
dialog

◆ const_drawable

A constant drawable to the server.

◆ const_drawableptr

A nullable pointer reference to a constant drawable to the server.

◆ const_editable_comboboxlayoutmanager

◆ const_editable_comboboxlayoutmanagerptr

A nullable pointer reference to a const editable combo-box layout manager.

See also
editable_comboboxlayoutmanager

◆ const_element

A reference to a constant widget.

See also
element

◆ const_element_popup_appearance

◆ const_element_popup_appearance_wrapper

Alias.

◆ const_element_popup_appearanceptr

A nullable pointer reference to a const attached popup appearance.

See also
element_popup_appearance

◆ const_elementptr

A nullable pointer reference to a constant widget.

See also
element

◆ const_factory

A constant factory.

See also
factory

◆ const_factoryptr

A nullable pointer refereance to a constant factory.

See also
factory

◆ const_file_dialog

A constant file dialog.

See also
file_dialog

◆ const_file_dialog_appearance

◆ const_file_dialog_appearance_wrapper

Alias.

◆ const_file_dialog_appearanceptr

A nullable pointer reference to a const file dialog appearance settings.

See also
file_dialog_appearance

◆ const_file_dialogptr

A nullable pointer reference to a const file dialog.

See also
file_dialog

◆ const_focus_border_appearance

Constant WHATITIS.

See also
focus_border_appearance

◆ const_focus_border_appearance_wrapper

Alias.

◆ const_focus_border_appearanceptr

A nullable pointer reference to a const WHATITIS.

See also
focus_border_appearance

◆ const_focusable

A reference to a constant focusable widget.

See also
focusable

◆ const_focusable_container

A constant focusable container.

See also
focusable_container

◆ const_focusable_container_owner

A constant focusable container owner.

See also
focusable_container_owner

◆ const_focusable_container_ownerptr

A nullable pointer reference to a constant focusable container owner.

See also
focusable_container_owner

◆ const_focusable_containerptr

A nullable pointer reference to a constant focusable container.

See also
focusable_container

◆ const_focusable_label

A constant focusable label.

See also
focusable_label

◆ const_focusable_labelptr

A nullable pointer reference to a const focusable label.

See also
focusable_label

◆ const_focusableptr

A nullable pointer reference to a constant focusable widget.

See also
focusable

◆ const_font_picker

A constant font selection picker.

See also
font_picker

◆ const_font_picker_appearance

◆ const_font_picker_appearance_wrapper

Alias.

◆ const_font_picker_appearanceptr

A nullable pointer reference to a const font picker appearance.

See also
font_picker_appearance

◆ const_font_pickerptr

A nullable pointer reference to a const font selection pickery.

See also
font_picker

◆ const_fontcollection

Constant font collection.

◆ const_fontcollectionptr

A nullable pointer reference to constant font collection.

◆ const_frame_appearance

Constant border frame.

See also
frame_appearance

◆ const_frame_appearance_wrapper

Alias.

◆ const_frame_appearanceptr

A nullable pointer reference to a const border frame.

See also
frame_appearance

◆ const_freetypefont

A constant font.

◆ const_freetypefontptr

A nullable pointer reference to a constant font.

◆ const_gc

A constant graphic context.

◆ const_gcptr

A nullable pointer reference to a constant graphic context.

◆ const_generic_window

A constant generic window handler.

See also
generic_window

◆ const_generic_window_appearance

◆ const_generic_window_appearance_wrapper

Alias.

◆ const_generic_window_appearanceptr

A nullable pointer reference to a const top level window appearance.

See also
generic_window_appearance

◆ const_gridlayoutmanager

A constant grid layout manager.

See also
gridlayoutmanager

◆ const_gridlayoutmanagerptr

A nullable pointer reference to a constant grid layout manager.

See also
gridlayoutmanager

◆ const_hotspot

A reference to a constant activatable widget.

◆ const_hotspot_bgcolor

A reference to a constant hotspot with colors.

See also
hotspot_bgcolor

◆ const_hotspot_bgcolorptr

A nullable pointer reference to a constant hotspot with colors.

See also
hotspot_bgcolor

◆ const_hotspotptr

A nullable pointer reference to a constant activatable widget.

◆ const_icon

A reference to a constant icon.

◆ const_iconptr

A nullable pointer reference to a constant icon.

◆ const_image

A reference to a constant image.

See also
image

◆ const_image_button

A reference to a constant image button.

See also
image_button

◆ const_image_button_appearance

◆ const_image_button_appearance_wrapper

Alias.

◆ const_image_button_appearanceptr

A nullable pointer reference to a const image button appearance.

See also
image_button_appearance

◆ const_image_buttonptr

A nullable pointer reference to a constant image button.

See also
image_button

◆ const_imageptr

A nullable pointer reference to a constant image.

See also
image

◆ const_input_dialog

A constant input dialog window.

See also
input_dialog

◆ const_input_dialogptr

A nullable pointer reference to a const input dialog window.

See also
input_dialog

◆ const_input_field

A reference to a constant input_field object.

See also
input_field

◆ const_input_field_appearance

◆ const_input_field_appearance_wrapper

Alias.

◆ const_input_field_appearanceptr

A nullable pointer reference to a const input field appearance.

See also
input_field_appearance

◆ const_input_fieldptr

A nullable pointer reference to a constant input_field object.

See also
input_field

◆ const_item_button_appearance

◆ const_item_button_appearance_wrapper

Alias.

◆ const_item_button_appearanceptr

A nullable pointer reference to a const item button appearance.

See also
item_button_appearance

◆ const_item_layout_appearance

◆ const_item_layout_appearance_wrapper

Alias.

◆ const_item_layout_appearanceptr

A nullable pointer reference to a const item layout manager appearance.

See also
item_layout_appearance

◆ const_itemlayoutmanager

◆ const_itemlayoutmanagerptr

A nullable pointer reference to a const item layout manager.

See also
itemlayoutmanager

◆ const_label

A reference to a constant label object.

See also
label

◆ const_label_for

typedef const_ref<label_forObj> x::w::const_label_for

A reference to a constant label link.

◆ const_label_forptr

typedef const_ptr<label_forObj> x::w::const_label_forptr

A nullable pointer reference to a constant label link.

◆ const_labelptr

A nullable pointer reference to a constant label object.

See also
label

◆ const_layout_impl

Alias.

◆ const_layout_implptr

Alias.

◆ const_layoutmanager

A constant generic layout manager.

See also
layoutmanager

◆ const_list_appearance

◆ const_list_appearance_wrapper

Alias.

◆ const_list_appearanceptr

A nullable pointer reference to a const list appearance properties.

See also
list_appearance

◆ const_listitemhandle

A constant WHATITIS.

See also
listitemhandle

◆ const_listitemhandleptr

A nullable pointer reference to a const WHATITIS.

See also
listitemhandle

◆ const_listlayoutmanager

◆ const_listlayoutmanagerptr

A nullable pointer reference to a const text-only list layout manager.

See also
listlayoutmanager

◆ const_main_window

A reference to a constant main application window.

See also
main_window

◆ const_main_window_appearance

◆ const_main_window_appearance_wrapper

Alias.

◆ const_main_window_appearanceptr

A nullable pointer reference to a const main window appearance.

See also
main_window_appearance

◆ const_main_windowptr

A nullable pointer reference to a constant main application window.

See also
main_window

◆ const_menu

A constant menu button.

See also
menu

◆ const_menubarfactory

A constant menu bar factory.

See also
menubarfactory

◆ const_menubarfactoryptr

A nullable pointer reference to a const menu bar factory.

See also
menubarfactory

◆ const_menubarlayoutmanager

◆ const_menubarlayoutmanagerptr

A nullable pointer reference to a const menu bar layout manager.

See also
menubarlayoutmanager

◆ const_menuptr

A nullable pointer reference to a const menu button.

See also
menu

◆ const_pagefactory

◆ const_pagefactoryptr

A nullable pointer reference to a const element factory for the page layout manager.

See also
pagefactory

◆ const_pagelayoutmanager

◆ const_pagelayoutmanagerptr

A nullable pointer reference to a const page layout manager.

See also
pagelayoutmanager

◆ const_pagetabgridlayoutmanager

typedef const_ref<pagetabgridlayoutmanagerObj> x::w::const_pagetabgridlayoutmanager

◆ const_pagetabgridlayoutmanagerptr

typedef const_ptr<pagetabgridlayoutmanagerObj> x::w::const_pagetabgridlayoutmanagerptr

A nullable pointer reference to a const book page tab grid layoutmanager.

See also
pagetabgridlayoutmanager

◆ const_pane_appearance

Constant pane appearance.

See also
pane_appearance

◆ const_pane_appearance_wrapper

Alias.

◆ const_pane_appearanceptr

A nullable pointer reference to a const pane appearance.

See also
pane_appearance

◆ const_pane_layout_appearance

◆ const_pane_layout_appearance_wrapper

Alias.

◆ const_pane_layout_appearanceptr

A nullable pointer reference to a const pane layout appearance.

See also
pane_layout_appearance

◆ const_panefactory

A constant pane factory.

See also
panefactory

◆ const_panefactoryptr

A nullable pointer reference to a const pane factory.

See also
panefactory

◆ const_panelayoutmanager

◆ const_panelayoutmanagerptr

A nullable pointer reference to a const pane layout manager.

See also
panelayoutmanager

◆ const_peephole_appearance

◆ const_peephole_appearance_wrapper

Alias.

◆ const_peephole_appearanceptr

A nullable pointer reference to a const peephole appearance.

See also
peephole_appearance

◆ const_peepholelayoutmanager

◆ const_peepholelayoutmanagerptr

A nullable pointer reference to a const peephole layout manager.

See also
peepholelayoutmanager

◆ const_pictformat

A constant pictformat to the server.

◆ const_pictformatptr

A nullable pointer reference to a constant pictformat to the server.

◆ const_picture

A constant picture.

◆ const_picture_internal

typedef ref<pictureObj::implObj> x::w::const_picture_internal

A constant internal implementation object of a picture.

◆ const_pixmap

A constant pixmap.

See also
pixmap

◆ const_pixmapptr

A nullable pointer to a constant pixmap.

See also
pixmap

◆ const_popup_list_appearance

◆ const_popup_list_appearance_wrapper

Alias.

◆ const_popup_list_appearanceptr

A nullable pointer reference to a const popup list appearance properties.

See also
popup_list_appearance

◆ const_print_dialog

A constant print dialog.

See also
print_dialog

◆ const_print_dialog_appearance

◆ const_print_dialog_appearance_wrapper

Alias.

◆ const_print_dialog_appearanceptr

A nullable pointer reference to a const print dialog appearance.

See also
print_dialog_appearance

◆ const_print_dialogptr

A nullable pointer reference to a const print dialog.

See also
print_dialog

◆ const_progressbar

A constant progress bar.

See also
progressbar

◆ const_progressbar_appearance

◆ const_progressbar_appearance_wrapper

Alias.

◆ const_progressbar_appearanceptr

A nullable pointer reference to a const progressbar appearance.

See also
progressbar_appearance

◆ const_progressbarptr

A nullable pointer reference to a const progress bar.

See also
progressbar

◆ const_richtextcursorlocationowner

◆ const_richtextcursorlocationownerptr

A nullable pointer reference to a const richtextcursorlocationowner.

See also
richtextcursorlocationowner

◆ const_richtextfragment

Reference to a constant rich text fragment.

◆ const_richtextiterator

A constant reference to a rich text iterator.

◆ const_scratch_buffer

A constant scratch buffer.

◆ const_scratch_bufferptr

A nullable pointer reference to a constant scratch buffer.

◆ const_screen

A constant screen.

◆ const_screen_positions

◆ const_screen_positions_handle

◆ const_screen_positions_handleptr

A nullable pointer reference to const screen_positions_handle.

See also
screen_positions_handle

◆ const_screen_positionsptr

A nullable pointer reference to const memorized screen positions.

See also
screen_positions

◆ const_scrollbar

A reference to a constant scrollbar.

See also
scrollbar

◆ const_scrollbar_appearance

◆ const_scrollbar_appearance_wrapper

Alias.

◆ const_scrollbar_appearanceptr

A nullable pointer reference to a const scrollbar appearance.

See also
scrollbar_appearance

◆ const_scrollbar_images_appearance

◆ const_scrollbar_images_appearance_wrapper

Alias.

◆ const_scrollbar_images_appearanceptr

A nullable pointer reference to a const WHATITIS.

See also
scrollbar_images_appearance

◆ const_scrollbarptr

A nullable pointer reference to a constant scrollbar.

See also
scrollbar

◆ const_singletonlayoutmanager

◆ const_singletonlayoutmanagerptr

A nullable pointer reference to a const singleton layout manager.

See also
singletonlayoutmanager

◆ const_standard_comboboxlayoutmanager

◆ const_standard_comboboxlayoutmanagerptr

A nullable pointer reference to a const standard combox-box layout manager.

See also
standard_comboboxlayoutmanager

◆ const_synchronized_axis

A constant synchronized axis.

See also
synchronized_axis

◆ const_synchronized_axisptr

A nullable pointer reference to a const synchronized axis.

See also
synchronized_axis

◆ const_table_appearance

◆ const_table_appearance_wrapper

Alias.

◆ const_table_appearanceptr

A nullable pointer reference to a const table header row appearance.

See also
table_appearance

◆ const_tablelayoutmanager

◆ const_tablelayoutmanagerptr

A nullable pointer reference to a const table layout manager.

See also
tablelayoutmanager

◆ const_textlabel

A reference to a constant text label object.

See also
textlabel

◆ const_textlabelptr

A nullable pointer reference to a constant text label object.

See also
textlabel

◆ const_themedim

◆ const_toolboxfactory

A constant toolbox factory.

See also
toolboxfactory

◆ const_toolboxfactoryptr

A nullable pointer reference to a const toolbox factory.

See also
toolboxfactory

◆ const_toolboxlayoutmanager

◆ const_toolboxlayoutmanagerptr

A nullable pointer reference to a const toolboxlayoutmanager.

See also
toolboxlayoutmanager

◆ const_tooltip_appearance

◆ const_tooltip_appearance_wrapper

Alias.

◆ const_tooltip_appearanceptr

A nullable pointer reference to a const tooltip appearance.

See also
tooltip_appearance

◆ const_tooltip_border_appearance

◆ const_tooltip_border_appearance_wrapper

Alias.

◆ const_tooltip_border_appearanceptr

A nullable pointer reference to a const WHATITIS.

See also
tooltip_border_appearance

◆ const_uigenerators

◆ const_uigeneratorsptr

A nullable pointer reference to const compiled widget generators.

See also
uigenerators

◆ const_validated_input_field

template<typename type >
using x::w::const_validated_input_field = typedef const_ref<validated_input_fieldObj<type> >

◆ const_validated_input_field_contents

◆ const_validated_input_field_contentsptr

A nullable pointer reference to a const validated input field contents.

See also
validated_input_field_contents

◆ const_validated_input_fieldptr

template<typename type >
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.

See also
validated_input_field

◆ 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.

x::w::layoutmanager manager=container->get_layoutmanager();

get_layoutmanager() returns the container's layout manager.

auto manager=container->gridlayout();

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.

◆ container_impl

Alias.

◆ container_implptr

Alias.

◆ containerptr

A nullable pointer reference to a container.

◆ coord_squared_t

typedef number<int64_t, coord_squared_tag, types_base> x::w::coord_squared_t

The unit type that can accomodate coord_t + dim_t.

◆ coord_t

typedef number<int32_t, coord_tag, types_base> x::w::coord_t

Internal unit type for positions: x and y coordinates.

◆ copy_cut_paste_menu_items

Standard "Copy"/"Cut"/"Paste" menu items.

x::w::copy_cut_paste_menu_items ccp=l->append_copy_cut_paste(main_window);
x::w::copy_cut_paste_menu_itemsptr ccp;
x::w::menu file_menu=
mbf->add([]
(const auto &f)
{
f->create_label("File");
},
[&]
{
ccp=lm->append_copy_cut_paste(mw);
});
// Attach a callback that gets invoked before the "File" menu
// becomes visible (or hidden). Use this callback to enable or
// disable the Cut/Copy/Paste menu items depending upon whether the
// given operation is possible at this time.
file_menu->on_popup_state_update
(ONLY IN_THREAD,
const x::w::busy &mcguffin)
{
if (es.state_update != es.before_showing)
return;
ccp->update(IN_THREAD);
});
Factory for busy mcguffins.
Definition busy.H:54
Information passed to a widget's state update callback.
Definition element_state.H:17

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.

◆ copy_cut_paste_menu_itemsptr

A nullable pointer reference to copy/cut/paste menu items.

See also
copy_cut_paste_menu_items

◆ create_bookpage_args_t

The options for a book page factory's add().

◆ create_bookpage_with_label_args_t

The options for a book page factory's add().

◆ create_button_args_t

The options for a factory's create_button().

◆ create_button_with_label_args_t

The options for a factory's create_button().

◆ create_static_tooltip_args_t

Optional parameters to element's create_static_tooltip().

◆ create_string_validator_ret_t

Defines create_string_validated_input_field_contents() return type

Helper template that defines what create_validated_stromg+input_field_contents() returns.

◆ create_validator_ret_t

template<input_field_validation_function validation_function>
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_impl

Current border around a widget.

Provides a border implementation object, and a theme_updated() method that rebuilds it, after a theme change.

◆ current_border_implptr

A nullable pointer reference to a current border.

◆ current_fontcollection

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.

◆ current_fontcollectionptr

A nullable pointer reference to current font collection.

◆ current_selection_handler

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.

See also
window_handlerObj

◆ current_selection_handlerptr

typedef ptr<current_selection_handlerObj> x::w::current_selection_handlerptr

A nullable pointer reference to an X selection handler.

See also
current_selection_handler

◆ current_theme_t

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.

◆ cursor_pointer

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.

◆ cursor_pointerptr

typedef ptr<cursor_pointerObj> x::w::cursor_pointerptr

A nullable cursor_pointer reference to a cursor_pointer.

See also
cursor_pointer

◆ custom_combobox_selection_changed_t

Callback that gets invoked when a combo-box selection is made.

◆ custom_combobox_selection_search_t

Callback that gets invoked when a combo-box selection is made.

◆ custom_comboboxlayoutmanager

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.

◆ custom_comboboxlayoutmanagerptr

A nullable pointer reference to a combox-box layout manager.

See also
custom_comboboxlayoutmanager

◆ 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.

#include <x/ymd.H>
field->set(x::ymd{2018, 1, 1});
field->set(std::nullopt);
std::optional<x::ymd> d=field->get();

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.

field->on_change(
[]
(ONLY IN_THREAD,
const std::optional<x::ymd> &new_date,
const x::w::callback_trigger_t &trigger)
{
});

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.

Note
The callback gets invoked by the library's internal execution thread. The initial callback invocation may occur before or after on_change() returns.

◆ 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.

x::w::date_input_field_config config{
// ...
};
x::w::const_date_input_field_appearance custom=x::w::date_input_field_appearance::base::theme()
->modify([]
(const x::w::date_input_field_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ date_input_field_appearanceptr

A nullable pointer reference to a date input field appearance.

See also
date_input_field_appearance

◆ date_input_field_callback_t

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.

◆ date_input_fieldptr

A nullable pointer reference to a date input field.

See also
date_input_field

◆ defaulttheme

typedef ref<defaultthemeObj, defaultthemeBase> x::w::defaulttheme

A loaded application theme.

◆ defaultthemeptr

typedef ptr<defaultthemeObj, defaultthemeBase> x::w::defaultthemeptr

A nullable pointer reference to a loaded application theme.

◆ delayed_input_focus

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.

◆ delayed_input_focusptr

A nullable pointer reference to a WHATITIS.

See also
delayed_input_focus

◆ depth_t

typedef number<uint8_t, depth_tag> x::w::depth_t

The unit type for bit depth of windows, drawables...

◆ 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():

#include <x/w/main_window.H>
#include <x/w/dialog.H>
x::w::main_window new_main_window=x::w::main_window::create(
[]
(const x::w::main_window &new_main_window)
{
// Creator lambda
});
// In the creator lambda, or separately:
x::w::dialog d=help->create_ok_cancel_dialog(
"help@example.com",
"alert",
[]
(const x::w::factory &factory)
{
factory->create_label("Help yoruself");
},
(const x::w::busy &ignore)
{
// Ok action.
},
(const x::w::busy &ignore)
{
// Cancel action.
},
true);
d->dialog_window->set_window_title("Help");
// To make the dialog visible.
d->dialog_window->show_all();

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.

d->set_dialog_position(x::w::dialog_position::on_the_left);

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.

◆ dialogptr

A nullable pointer reference to a dialog window.

See also
dialog

◆ dim_squared_t

typedef number<uint64_t, dim_squared_tag, types_base> x::w::dim_squared_t

The unit type that can accomodate dim_t squared.

◆ dim_t

typedef number<uint32_t, dim_tag, dim_base> x::w::dim_t

Internal unit type for dimensions: width or height.

◆ drawable

A drawable object.

A common superclass of generic windows and pixmaps.

// Return the drawable's screen
auto s=drawable->get_screen();

get_screen() returns the drawable's screen.

auto p=drawable->create_picture();

Create a picture object for this drawable.

auto p=drawable->create_pixmap(100, 100);

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.

x::w::dim_t width=drawable->get_width();
x::w::dim_t height=drawable->get_height();

Returns this drawable's size.

x::w::gc gc=drawable->create_gc();

Creates a new X protocol GraphicContext object for this drawable. This is mostly for internal use.

◆ drawableptr

A nullable pointer reference to a drawable to the server.

◆ editable_combobox_selection_changed_t

Callback that gets invoked when an editable combo-box's selection changes.

◆ editable_comboboxlayoutmanager

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:

  • set() updates the contents of the input field, and on_validate() installs the input field's validation callbacks. None of the other callback from the underlying input field are available, they are appropriated by the editable combo-box.
  • size(), pos(), get(), and get_unicode() are inherited from the internal const_input_lock.
layout_manager->on_validate([]
(ONLY IN_THREAD,
const x::w::editable_comboboxlayoutmanager &lm)
{
std::string t=lm->get();
return true;
});

This is equivalent to invoking on_validate() on the undertlying input field. Additionally, set_validator() and set_string_validator() are also available.

◆ editable_comboboxlayoutmanager_generator

Generate something in the editable combobox layout manager.

See also
uigenerators

◆ editable_comboboxlayoutmanagerptr

A nullable pointer reference to a editable combo-box layout manager.

See also
editable_comboboxlayoutmanager

◆ element

Methods common to all widgets.

e->appdata=x::mcguffinstash<std::string>::create();
x::w::screen screen=e->get_screen();
e->show();
e->show_all();
e->hide();
e->hide_all();
e->show(IN_THREAD);
e->show_all(IN_THREAD);
e->hide(IN_THREAD);
e->hide_all(IN_THREAD);

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).

e->ensure_entire_visibility();
e->ensure_entire_visibility(IN_THREAD);

Scrolls this widget into view if it's currently hidden inside a peephole.

auto p=e->set_background_color(x::w::rgb(x::w::rgb::maximum(), 0, 0));
e->set_background_color("action_color1");
e->set_background_color(IN_THREAD, "action_color1");
e->remove_background_color();
e->remove_background_color(IN_THREAD);

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.

x::ref<x::obj> mcguffin=element->get_shade_busy_mcguffin();
x::ref<x::obj> mcguffin=element->get_wait_busy_mcguffin();
x::ref<x::obj> mcguffin=element->connection_mcguffin();

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.

Pointer focus callback
element->on_pointer_focus([]
(ONLY IN_THREAD,
x::w::focus_change f,
const x::w::callback_trigger_t &trigger)
{
// ...
});

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.

Note
Well, not immediately. The callbacks get invoked and updated by an internal execution thread, and the callback's initial invocation will likely occur after on_pointer_focus() returns.

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.

Note
The callback cannot capture references to its widget, any of its parent widgets, or any of its child widgets (if the element is a container). This creates a circular references. Weak captures must be used.
Button event callback
#include <x/w/button_event.H>
#include <x/w/motion_event.H>
element->on_button_event([]
(ONLY IN_THREAD,
const x::w::button_event &e,
bool activated,
const x::w::busy &mcguffin)
{
if (activated && e.button == 1)
// ...
});
element->on_motion_event([]
(ONLY IN_THREAD,
const x::w::motion_event &e)
{
});
ref< elementObj > element
Definition elementfwd.H:487

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.

Note
The callback cannot capture references to its widget, any of its parent widgets, or any of its child widgets (if the element is a container). This creates a circular references. Weak captures must be used.
Metrics callback.
element->on_metrics_callback([]
(ONLY IN_THREAD,
const x::metrics::axis &h,
const x::metrics::axis &v)
{
// ...
});

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.

Element state callback
m->on_state_update([]
(ONLY IN_THREAD,
const x::w::element_state &s,
const x::w::busy &mcguffin)
{
});
m->on_state_update(ONLY IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::element_state &s,
const x::w::busy &mcguffin)
{
});

The state update callback reports changes to the widget's visibility, and receives the x::w::element_state.

Context popups
#include <x/w/container.H>
#include <x/w/listlayoutmanager.H>
x::w::container context_popup=
element->create_popup_menu([]
(const x::w::listlayoutmanager &lm)
{
// ...
});
element->install_contextpopup_callback([context_popup]
(ONLY IN_THREAD,
const x::w::element &e,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
context_popup->show();
},
{"F3"});
});
element->remove_contextpopup();

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.

Note
The widget owns a reference on its installed context popup callback. The widget does not directly own a reference on any of its context popup callbacks, and the popups do not own a reference on its widget. The above example captures the context popup container, for the callback. This results in the widget owning a reference on its callback, and the callback owning a reference on the popup, so it remains in scope until the callback gets removed.
Only containers created using the element's create_popup_menu() should be shown by the installed callback. Using a container created by another element's create_popup_menu() has unspecified results.
Invoke an arbitrary callback in the widget's connection thread.
conn->in_thread([]
(ONLY IN_THREAD)
{
// ...
});
conn->in_thread_idle([]
(ONLY IN_THREAD)
{
// ...
});

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.

Tooltips
element->create_tooltip("Enter text here");
element->create_custom_tooltip([]
(ONLY IN_THREAD,
const x::w::tooltip_factory &f)
{
f([]
(const x::w::container &c)
{
x::w::grid_layoutmanager glm=c->get_layoutmanager();
// ...
},
x::w::new_gridlayoutmanager{});
});
x::w::new_gridlayoutmanager nglm;
x::w::static_tooltip_config stc;
x::w::container tooltip=element->create_static_tooltip(
[]
(const x::w::container &c)
{
// ...
},
{
nglm,
stc
});
x::w::container tooltip=element->create_static_tooltip(
IN_THREAD,
[]
(const x::w::container &c)
{
// ...
},
{
nglm,
stc
});
tooltip->show_all();
element->remove_tooltip();
element->remove_tooltip(IN_THREAD)

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.

Note
The creator lambda should not show() the new container. The new container gets automatically show_all()ed and the tooltip becomes visible when the creator returns.

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:

  • the tooltip should be show()n only directly in response to some keyboard or pointer activity in the widget
  • the tooltip should be hide()n when the widget no longer receives keyboard or pointer focus

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.

◆ element_impl

Alias.

◆ element_implptr

Alias.

◆ 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.

x::w::const_element_popup_appearance custom=x::w::element_popup_appearance::base::theme()
->modify([]
(const x::w::element_popup_appearance &custom)
{
// Modify custom->...
});

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.

◆ element_popup_appearanceptr

A nullable pointer reference to a attached popup appearance.

See also
element_popup_appearance

◆ element_state_callback_t

typedef void x::w::element_state_callback_t(THREAD_CALLBACK, const element_state &, const busy &)

Callback type for updates to the element_state.

◆ elementptr

A nullable pointer reference to an widget.

◆ elements_generator

typedef functionref<void (const uielements * const &)> x::w::elements_generator

Generate something using already-generated elements.

See also
uigenerators

◆ enabled_theme_options_t

typedef std::unordered_set<std::string> x::w::enabled_theme_options_t

Which options are enabled for the given theme.

◆ 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.

Creator lambdas

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,

Canvases
#include <x/w/canvas.H>
x::w::canvas_config config;
config.width=4.0;
config.height=4.0;
x::w::canvas new_canvas=
factory->create_canvas(config);
x::w::canvas new_canvas=factory->create_canvas();

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.

Nested containers
#include <x/w/container.H>
#include <x/w/gridlayoutmanager.H>
x::w::container new_container=
factory->create_container([]
(const auto &new_container)
{
// Creator lambda
}, x::w::new_gridlayoutmanager());

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:

#include <x/w/focusable_container.H>
#include <x/w/listlayoutmanager.H>
x::w::new_listlayoutmanager list_style{
x::w::highlighted_list
};
x::w::focusable_container new_container=
factory->create_focusable_container([]
(const auto &new_container)
{
// Creator lambda
}, list_style);

create_focusable_container() is similar to create_container(), but creates a container that handles input focus. Its second parameter can be one of:

Focusable containers with validated input fields
#include <x/w/validated_input_field.H>
x::w::new_editable_comboboxlayoutmanager combobox_lm;
auto [new_container, validated] =
factory->create_focusable_container(
x::w::create_validated_input_field_contents(
// ...
),
[]
(const auto &new_container)
{
// Creator lambda
}, combobox_lm);

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.

Labels
#include <x/w/label.H>
x::w::label new_label=
factory->create_label({"Hello world!"});
x::w::label new_label=
factory->create_label({"Hello world!"}, 40.0);

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.

Focusable labels

create_focusable_label() creates a new focusable label widget.

Bordered widget elements
x::w::container border_container=
factory->create_bordered_element
([]
(const x::w::factory &f)
{
auto l=f->create_label("There's a border around me");
l->show();
},
"inputfocuson_border",
1, 1);

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.

Buttons
#include <x/w/button.H>
x::w::button button=
factory->create_button(
[]
(const x::w::factory &f)
{
f->create_label({"Cancel"});
});
x::w::button button=
factory->create_button(
[]
(const x::w::factory &f)
{
f->create_label({"Ok"});
},
{
x::w::default_button()
});
x::w::button button=factory->create_button(
"Cancel"
);
#include <x/w/text_param_literals.H>
x::w::button button=factory->create_button(
{
"underline"_decoration,
"C",
"no"_decoration,
"ancel"
},
{
x::w::shortcut{"Alt", 'C'}
});

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:

#include <x/w/button.H>
x::w::button button=create_button(
"Ok",
{
x::w::label_config{},
x::w::default_button(),
x::w::shortcut{'\n'}
});

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:

#include <x/w/button.H>
x::w::button button=create_button(
"Ok",
{
x::w::default_button(),
});
x::w::button button=create_button(
"Ok",
{
x::w::shortcut{'\n'}
});

Each one of the following arguments is optional, but the arguments, if specified, must appear in the following order:

  • the x::w::label_config parameter exists only in the create_button_with_label_args_t that's used when the first parameter is a text_param, and gets forwarded to create_label().
  • the x::w::button_config parameter controls the visual appearance of the new button, and defaults to the value returned by x::w::normal_button(), the default button border and background color. x::w::default_button() returns the settings for a button with a thicker border, visually indicating the default button on a form.
  • the x::w::shortcut parameter specifies an optional keyboard shortcut that activates the button.
Input fields
#include <x/w/input_field.H>
x::w::input_field field=
factory->create_input_field({""},{40});

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.

Validated input fields
#include <x/w/input_field.H>
#include <x/w/validated_input_field.H>
auto [input_field, validated] =
factory->create_input_field(
x::w::create_validated_input_field_contents(
// ...
), config);
ref< input_fieldObj > input_field
Definition input_fieldfwd.H:631

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.

Date input fields
#include <x/w/date_input_field.H>
x::w::date_input_field field=
factory->create_date_input_field();

This creates a new date input field.

Images
#include <x/w/image.H>
x::w::image image=factory->create_image("./image1.gif");

This creates an x::w::image that shows an image loaded from a file.

Note
Filenames without a path component get searched for in the current display theme's directory, and NOT the current directory. Use "./filename" to load an image file from the current directory.
Checkboxes and radio buttons.
#include <x/w/image_button.H>
x::w::image_button
checkbox=factory->create_checkbox([]
(const x::w::factory &f)
{
f->create_label("Check me!")->show();
});

create_checkbox() creates a simple checkbox widget.

x::w::image_button
button=factory->create_radio("group1",
[]
(const x::w::factory &f)
{
f->create_label("Good choice!")->show();
});

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.

Progress bars
#include <x/w/progressbar.H>
x::w::progressbar_config config;
x::w::progressbar pb=factory->create_progressbar(
[]
(const x::w::progressbar &pb)
{
x::w::gridlayoutmanager glm=pb->get_layoutmanager();
x::w::gridfactory f=glm->append_row();
f->halign(x::w::halign::center);
glm->create_label("0%");
},
config,
x::w::new_gridlayoutmanager{});
pb->show_all();

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.

Scroll bars

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.

#include <x/w/scrollbar.H>
x::w::scrollbar_config config;
config.range=110;
config.page_size=10;
config.increment=5;
config.minimum_size=50;
x::w::scrollbar sb=factory->create_horizontal_scrollbar(
config,
[]
(const x::w::scrollbar_info_t &info)
{
});

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:

  • The scroll-bar's initial callback that gets executed whenever the scrollbar's value changes. Alternatively, an existing scroll-bar's on_update() installs the callback.
  • A scrollbar appearance object parameter.

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.

Color pickers
#include <x/w/color_picker.H>
#include <x/w/color_picker_config.H>
x::w::color_picker_config config;
x::w::color_picker cp=factory->create_color_picker(config);

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.

Font pickers
#include <x/w/font_picker.H>
#include <x/w/font_picker_config.H>
x::w::font_picker_config config;
x::w::font_picker fp=factory->create_font_picker(config);

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.

◆ factory_generator

Generate something using a base factory.

See also
uigenerators

◆ factoryptr

A nullable pointer refereance to a factory.

See also
factory

◆ file_dialog

A file open/create dialog.

// ...
x::w::file_dialog_config c;
x::w::file_dialog fd=mw->create_file_dialog(c);
// ...
fd->the_dialog()->set_window_title("Pick a file");
fd->the_dialog()->show_all();

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.

Custom file dialog appearance.
c.appearance=c.appearance->modify([]
(const x::w::file_dialog_appearance &custom)
{
// ...
});

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.

◆ file_dialog_appearance

Appearance of the file dialog.

Specifies various properties of a file dialog. The default properties are set by the current display theme.

x::w::file_dialog_config config{
// ...
};
x::w::const_file_dialog_appearance custom=x::w::file_dialog_appearance::base::theme()
->modify([]
(const x::w::file_dialog_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ file_dialog_appearanceptr

A nullable pointer reference to a file dialog appearance settings.

See also
file_dialog_appearance

◆ file_dialogptr

A nullable pointer reference to a file dialog.

See also
file_dialog

◆ focus_border_appearance

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.

x::w::const_focus_border_appearance custom=x::w::focus_border_appearance::base::theme()
->modify([]
(const x::w::focus_border_appearance &custom)
{
// Modify custom->...
});

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.

◆ focus_border_appearanceptr

A nullable pointer reference to a WHATITIS.

See also
focus_border_appearance

◆ focus_callback_t

typedef void x::w::focus_callback_t(THREAD_CALLBACK, focus_change, const callback_trigger_t &)

Focus callback.

◆ 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.

f->set_enabled(false);

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.

f->get_focus_after(other);
f->get_focus_before(other);
f->get_focus_first();
f->request_focus();
f->request_focus(true);
f->get_focus_after_me({other1, other2, other3});
f->get_focus_before_me({other1, other2, other3});
f->get_focus_after(IN_THREAD, other);
f->get_focus_before(IN_THREAD, other);
f->get_focus_first(IN_THREAD);
f->request_focus(IN_THREAD);
f->request_focus(IN_THREAD, true);
f->get_focus_after_me(IN_THREAD, {other1, other2, other3});
f->get_focus_before_me(IN_THREAD, {other1, other2, other3});

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.

#include <x/w/focus.H>
f->on_keyboard_focus([]
(ONLY IN_THREAD,
x::w::focus_change f,
const x::w::callback_trigger_t &trigger)
{
if (x::w::in_focus(f))
// ...
// ...
});
#include <x/w/key_event.H>
f->on_key_event([]
(ONLY IN_THREAD,
const x::w::all_key_events_t &e,
bool activated,
const busy &mcguffin)
{
// ...
return true;
});

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.

f->autofocus(true);

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.

Selections
bool flag=f->focusable_cut_or_copy_selection(x::w::cut_or_copy_op::available);
bool flag=f->focusable_cut_or_copy_selection(IN_THREAD, x::w::cut_or_copy_op::available);
f->focusable_cut_or_copy_selection(x::w::cut_or_copy_op::copy);
f->focusable_cut_or_copy_selection(IN_THREAD, x::w::cut_or_copy_op::copy);
f->focusable_receive_selection();
f->focusable_receive_selection(IN_THREAD)

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.

◆ focusable_container

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().

Combo-box helpers

The following helper functions require the focusable container with the appropriate layout manager, otherwise an exception gets thrown.

auto e=container->combobox_current_selection();

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.

#include <x/w/input_field.H>
auto f=container->editable_combobox_input_field();

Return an editable combo-box's input field (this focusable_container is an editable combo-box).

◆ focusable_container_owner

A focusable container that's the registered owner of its focusable.

Multiply inherits from focusable_container and a focusable implementation owner.

◆ focusable_container_ownerptr

A nullable pointer reference to a focusable container owner.

See also
focusable_container_owner

◆ focusable_containerptr

A nullable pointer reference to a focusable container.

See also
focusable_container

◆ focusable_fields_t

A list of all focusable fields.

◆ 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.

◆ focusable_implptr

A nullable pointer reference to a focusable object.

◆ 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.

x::w::focusable_label label=factory->create_focusable_label(
{
"Click ",
x::w::start_hotspot{"hotspot1"},
"here",
x::w::end_hotspot{},
},
{
{"hotspot1",
[]
(ONLY IN_THREAD,
const x::w::text_event_t &event)
{
// ...
}
},
});

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.

#include <x/w/text_param_literals.H>
label->update(
{
"Click ",
"hotspot1"_hotspot,
x::w::start_hotspot{"hotspot1"},
"here",
end_hotspot{},
" again",
},
{
{"hotspot1",
[]
(ONLY IN_THREAD,
const x::w::text_event_t &event)
{
// ...
}
},
});

Focusable labels' update() sets the label's new contents and any hotspot callbacks. text_param_literals.H imports user defined literals:

"label"_hotspot
1_hotspot

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.

◆ focusable_labelptr

A nullable pointer reference to a focusable label.

See also
focusable_label

◆ focusableptr

A nullable pointer reference to a focusable widget.

◆ font_arg

typedef std::variant<font, theme_font> x::w::font_arg

A font may be specified directly, or as a reference to a theme font.

◆ font_picker

Font picker widget.

x::w::font_picker fp=factory->create_font_picker();

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 "Ok" and "Cancel" buttons

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".

x::w::font f=fp->current_font();
fp->current_font(f);
fp->current_font(IN_THREAD, f);

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.

std::vector<x::w::font_picker_group_id> mru=fp->most_recently_used();
fp->most_recently_used(mru);
fp->most_recently_used(IN_THREAD, mru);

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.

fp->on_font_update([]
(ONLY IN_THREAD,
const x::w::font &new_font,
const x::w::font_picker_group_id *new_font_group,
const x::w::font_picker &myself,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
});

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:

  • the font picker's new saved font.
  • the identifier for the system font that the new font is based on. A custom font picker configuration makes the selecting a font optional, in that case the passed in font value is the default system font and the identifier is a nullptr.
  • the font picker widget itself. Font picker callbacks often need to reference their widget; usually to have the font picker's most recently used list include the newly picked font. This saved the callbacks the trouble of properly weakly-capturing their widget and recovering the weak reference before using it. That detail is already taken care of.
Saving and restoring font picker configuration
x::font_picker_config config;
config.name="title-font";

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.

◆ font_picker_appearance

Appearance of the font picker dialog.

Specifies various properties of a font picker. The default properties are set by the current display theme.

x::w::font_picker_config config{
// ...
};
x::w::const_font_picker_appearance custom=x::w::font_picker_appearance::base::theme()
->modify([]
(const x::w::font_picker_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ font_picker_appearanceptr

A nullable pointer reference to a font picker appearance.

See also
font_picker_appearance

◆ font_picker_callback_t

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.

◆ font_pickerptr

A nullable pointer reference to a font selection picker.

See also
font_picker

◆ 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.

◆ fontcollectionptr

A nullable pointer reference to font collection.

◆ fragment_cursorlocations_t

Container for locations in a given richtextfragment.

◆ frame_appearance

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.

x::w::new_borderlayoutmanager lm{
// ...
};
x::w::const_frame_appearance custom=x::w::frame_appearance::base::theme()
->modify([]
(const x::w::frame_appearance &custom)
{
// Modify custom->...
});
lm->appearance=custom;

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.

◆ frame_appearanceptr

A nullable pointer reference to a border frame.

See also
frame_appearance

◆ 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.

◆ freetypefontptr

A nullable pointer reference to an font.

◆ gc

typedef ref<gcObj, gcBase> x::w::gc

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.

x::w::gc context;
x::w::gc::base::properties props;
context->fill_rectangle(0, 0, 100, 100, props);
context->segment(0, 0, 100, 100, props);
std::vector<x::w::polyline> lines;
context->lines(lines, props);
x::w::gc::arc one_arc;
std::vector<x::w::gc::arc> arcs;
context->draw_arc(one_arc, props);
context->draw_arcs(arcs, props);
context->fill_arc(one_arc, props);
context->fill_arcs(arcs, props);
context->copy(rectangle{0, 0, 50, 50}, 10, 10);
A rectangle, pretty much it.
Definition rectangle.H:15

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.

◆ gcptr

A nullable pointer reference to an graphic context.

◆ generic_window

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.

main_window->set_window_title("Hello world");
main_window->set_window_title(U"Hello world");
main_window->set_window_class("main", "myapp");
main_window->set_window_type("toolbar");

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:

  • "normal"
  • "toolbar"
  • "menu"
  • "utility"
  • "splash"
  • "dialog"
  • "notification"
main_window->on_disconnect([]{ /* ... */ });

Installs a callback that gets invoked if the connection to the X server gets shut down unexpectedly.

main_window->on_stabilized([]
(ONLY IN_THREAD,
const LIBCXX_NAMESPACE::w::busy &mcguffin)
{
});

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.

main_window->raise();
main_window->lower();

Moves this window above all other windows, or below all other windows.

Selections
bool flag=main_window->selection_has_owner("SECONDARY");

For convenience, this is forwarded to this screen's connection.

bool flag=main_window->selection_can_be_received();

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.

Note
Unless selection_can_be_received() gets invoked from the connection thread, the keyboard focus can change at any time and this because out of date.
main_window->receive_selection();
main_window->receive_selection(IN_THREAD)

Presumably we've checked if selection_can_be_received(), so this starts the process of converting the X selection into the widget.

Note
receive_selection() returns immediately after sending a request to the selection's current owner. The widget gets updated later, when the owner's response, with the converted selection's data gets received.
bool flag=main_window->cut_or_copy_selection(cut_or_copy_op::available);
bool flag=main_window->cut_or_copy_selection(IN_THREAD, x::w::cut_or_copy_op::available);
main_window->cut_or_copy_selection(x::w::cut_or_copy_op::copy);
main_window->cut_or_copy_selection(IN_THREAD, x::w::cut_or_copy_op::copy);
@ available
Something can be cut or copied.

cut_or_copy_selection() executes a cut or a copy operation specified by the parameter.

Note
cut_or_copy_op::available is meaningful only IN_THREAD, since things can change at any time, and a copy or a cut actually takes place only if it is available.

◆ 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.

x::w::const_generic_window_appearance custom=x::w::generic_window_appearance::base::main_window_theme()
->modify([]
(const x::w::generic_window_appearance &custom)
{
// Modify custom->...
});
x::w::main_window_config config;
config.appearance=config.appearance
->modify([&]
(const auto &main_window_appearance)
{
main_window_appearance->toplevel_appearance=custom;
});
auto main_window=x::w::main_window::create
(config,
[]
(const auto &main_window)
{
});
ref< main_windowObj, main_windowBase > main_window
Definition main_windowfwd.H:462
ref< main_window_appearanceObj, main_window_appearance_base > main_window_appearance
Definition main_window_appearancefwd.H:44

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().

◆ generic_window_appearanceptr

A nullable pointer reference to a top level window appearance.

See also
generic_window_appearance

◆ grabbed_pointer

typedef ref<grabbed_pointerObj> x::w::grabbed_pointer

Active pointer grab mcguffin.

Returned by grab_pointer() if the pointer grab succeeds.

◆ grabbed_pointerptr

typedef ptr<grabbed_pointerObj> x::w::grabbed_pointerptr

Nullable pointer reference to a grabbed pointer.

◆ grid_element

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.

◆ grid_elementptr

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.

◆ grid_map_t

typedef mpobj<ref<grid_map_infoObj>, std::recursive_mutex> x::w::grid_map_t

Internal structure used by the grid layout manager.

◆ 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:

gridfactory->padding(2.5).create_label({"Hello world!"});
Borders and padding
x::w::border_infomm new_border;
gridfactory->border(new_border);
gridfactory->left_border(new_border);
gridfactory->right_border(new_border);
gridfactory->top_border(new_border);
gridfactory->bottom_border(new_border);
gridfactory->padding(2.5);
gridfactory->left_padding(2.5);
gridfactory->right_padding(2.5);
gridfactory->top_padding(2.5);
gridfactory->bottom_padding(2.5);

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.

gridfactory->border("inputfocuson_border");
gridfactory->left_border("inputfocuson_border");
gridfactory->right_border("inputfocuson_border");
gridfactory->top_border("inputfocuson_border");
gridfactory->bottom_border("inputfocuson_border");
gridfactory->padding("cell_padding");
gridfactory->left_padding("cell_padding");
gridfactory->right_padding("cell_padding");
gridfactory->top_padding("cell_padding");
gridfactory->bottom_padding("cell_padding");

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.

Spanning and alignment
gridfactory->colspan(2);
gridfactory->rowspan(2);

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.

gridfactory->remove_when_hidden();

Specifies that space for the new element gets removed from the grid when the new element is hidden.

Note
The borders on the opposite sites of a hidden element do not get collapsed.

◆ gridfactory_generator

Generate something using a grid factory.

See also
uigenerators

◆ gridlayoutmanager

The grid layout manager.

#include <x/w/gridlayoutmanager.H>
x::w::new_gridlayoutmanager nglm;
factory->create_container(
[&]
(const x::w::focusable_container &c)
{
x::w::gridlayoutmanager pane_lm=c->get_layoutmanager();
},
nglm);

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.

size_t rows=gridlayout->rows();
size_t cols=gridlayout->cols(2);

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.

#include <x/w/gridfactory.H>
x::w::gridfactory factory=gridlayout->append_row();
x::w::gridfactory factory=gridlayout->append_columns(4);
x::w::gridfactory factory=gridlayout->insert_row(1);
x::w::gridfactory factory=gridlayout->replace_row(1);
x::w::gridfactory factory=gridlayout->insert_columns(1, 2);
x::w::gridfactory factory=gridlayout->replace_cell(1, 2);

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.

gridlayout->remove();

remove() removes all existing elements from the grid. Also resets all default row and column defaults (borders, paddings, percentages).

gridlayout->remove(row, col);

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.

gridlayout->remove_row(2);
gridlayout->remove_rows(2, 3);

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.

elementptr e=gridlayout->get(row, col);

get() returns the element at the given grid coordinates. A nullptr widget gets returned if no element exists at the given coordinates.

Resorting rows
std::vector<size_t> index;
l->resort_rows(index);

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:

std::vector<size_t> index={6, 1, 2, 0, 4, 5, 3, 7};
l->resort_rows(index);

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.

Note
All focusable widgets in the resorted rows remain in the same tabbing order.
Row and column defaults
x::w::border_infomm new_border;
gridlayout->default_row_border(0, new_border);
gridlayout->default_row_border(0, "thin_0%");
gridlayout->requested_row_height(0, 100);
gridlayout->row_alignment(0, x::w::valign::middle);
gridlayout->default_top_padding(0, 2.0);
gridlayout->default_bottom_padding(0, 2.0);
gridlayout->default_col_border(0, new_border);
gridlayout->default_col_border(0, "thin_0%");
gridlayout->requested_col_width(0, 100);
gridlayout->col_alignment(0, x::w::halign::center);
gridlayout->default_left_padding(0, 2.0);
gridlayout->default_right_padding(0, 2.0);
gridlayout->remove_row_defaults(0);
gridlayout->remove_col_defaults(0);

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.

Note

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.

Populating from an XML-based specification
gridlayout->set_background_color(x::w::white);
gridlayout->remove_background_color();
gridlayout->generate("main-layout", generators, elements);

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.

◆ gridlayoutmanager_generator

Generate something in the grid layout manager.

See also
uigenerators

◆ gridlayoutmanagerptr

A nullable pointer reference to a grid layout manager.

◆ hotspot

A widget that can be activated.

A widget that can be activated, in some way, with a pointer button or ENTER or SPACE.

element->on_activate([]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &,
const x::w::busy &)
{
});
element->on_activate(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &,
const x::w::busy &)
{
});

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.

Note
The callbacks get invoked by an internal execution thread, and installation of a new callback can happen while the existing one is being executed. Furthermore, even after on_activate() returns it's possible for the previous callback to be executed just after on_activate() returns, before the new callback takes effect for all activations in the future.

◆ hotspot_bgcolor

A hotspot that changes colors.

A subclass of a hotspot which changes background color when activated or used.

◆ hotspot_bgcolorptr

A nullable pointer reference to a hotspot with colors.

See also
hotspot_bgcolor

◆ hotspot_callback_t

Signature for a hotspot activation function.

◆ 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.

◆ hotspotptr

A nullable pointer reference to an activatable widget.

◆ 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.

◆ iconptr

A nullable pointer reference to an icon.

◆ image

An image

#include <x/w/image.H>
x::w::image image=
factory->create_image("image1.sxg", 100, 0);

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.

Note
The loaded images get cached internally. Specifying the same filename uses the cached image, and does not load the file again. The cache looks only at the filename, and doesn't check the current directory. Changing the process's current directory and creating a second 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.
The cached images get automatically discarded after their widget gets removed, and creating another one with the same name tries to load the image file again. Because image element removal gets finalized in an internal execution thread, it is not specified whether removing one image element, then immediately creating another one, uses the stored cached image. That depends on whether the internal execution thread finalizes the old image's removal before or after the new image element gets created with the same filename. Create new images with the same filename before removing old elements in order to guarantee cached images.

◆ 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:

  • an optional factory object for creating the button's label, the description of the button that appears next to it.
  • a 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.
  • a vertical alignment setting.

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.

size_t v=image_button->get_value();
image_button->set_value(1);
image_button->set_value(IN_THREAD, 1);
image_button->set_value(IN_THREAD, 1, trigger);
image_button->on_activate([]
(ONLY IN_THREAD,
size_t value,
const x::w::callback_trigger_t &trigger,
const x::w::busy &busy_mcguffin)
{
if (trigger.index() == x::w::callback_trigger_initial)
{
}
});
image_button->on_activate(IN_THREAD,
[]
(ONLY IN_THREAD,
size_t value,
const x::w::callback_trigger_t &trigger,
const x::w::busy &busy_mcguffin)
{
if (trigger.index() == x::w::callback_trigger_initial)
{
}
});
ref< image_buttonObj > image_button
A simple button that display a different image when it changes state.
Definition image_buttonfwd.H:133

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.

Note
The state of the image button gets updated by the library's internal execution thread. It's possible that calling get_value() immediately after set_value() might return the old value, for a brief period of time until the execution thread gets around to updating it.

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().

◆ image_button_appearance

Appearance of the image_buttons.

Specifies various properties of image_buttons. The default properties are set by the current display theme.

x::w::const_image_button_appearance custom=x::w::image_button_appearance::base::checkbox_theme()
->modify([]
(const x::w::image_button_appearance &custom)
{
// Modify custom->...
});
factory->create_checkbox(custom);

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.

◆ image_button_appearanceptr

A nullable pointer reference to a image button appearance.

See also
image_button_appearance

◆ image_button_callback_t

Signature for an image_button activation function.

◆ image_buttonptr

A nullable pointer reference to an image button.

◆ imageptr

A nullable pointer reference to an image.

◆ 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.

◆ input_dialogptr

A nullable pointer reference to a input dialog window.

See also
input_dialog

◆ input_field

A text input field.

#include <x/w/input_field.H>
x::w::input_field f=factory->create_input_field({""}, {20});

This is a text input field, with a blinking cursor.

f->set("Hello world");
f->set(U"Hello world");

set() specifies the new contents of the input field.

f->set("Hello world", true);

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.

x::w::input_lock lock{f};

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.

Note
For that reason, getting the contents of the input field immediately after setting it may still retrieve the original contents. The input field, like all other widgets, gets updated by an internal execution thread, which might be busy with other things, before focusing its attention on updating the input field's contents.
f->on_set(IN_THREAD, "");

Overloaded set() methods that take an IN_THREAD handle from the internal connection thread update the input field immediately.

std::string s=f->get();
std::u32string s=f->get_unicode();

get() and get_unicode() is equivalent to constructing an x::w::input_lock and using its get() or get_unicode() method.

f->on_change([]
(ONLY IN_THREAD,
const x::w::input_change_info_t &)
{
});
f->on_change(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::input_change_info_t &)
{
});
f->on_autocomplete(
[]
(ONLY IN_THREAD,
const x::w::input_autocomplete_info_t &)
{
return false;
});
f->on_autocomplete(
ONLY IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::input_autocomplete_info_t &)
{
return false;
});

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.

Note
The editable combo-box layout manager installs an autocomplete callback into its input field.
Validation
f->on_validate([]
(ONLY IN_THREAD,
x::w::input_lock &lock,
const x::w::callback_trigger_t &triggering_event)
{
if (lock.get() == "4")
return true;
return false;
});

on_validate() installs a callback that gets executed when:

  • attempting to tab out of the input field, or
  • a button press outside of the input field

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.

x::w::validated_input_field<int> validated_field=field->set_validator
([]
(ONLY IN_THREAD,
const std::string &value,
x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger)-> std::optional<int>
{
std::istringstream i{value};
int n;
if (i >> n)
return n;
lock.stop_message("Numeric input required");
return std::nullopt;
},
[]
(int v) -> std::string
{
return std::to_string(v);
},
[]
(ONLY IN_THREAD, const std::optional<int> &v)
{
if (v)
std::cout << "New value: " << *v << std::endl;
else
std::cout << "No new value" << std::endl;
});
x::w::validated_input_field<int> validated_field=field->set_validator
(IN_THREAD,
[]
(ONLY IN_THREAD,
// ...

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.

x::w::validated_input_field<int> validated_int=field->set_string_validator<int>
([]
(ONLY IN_THREAD,
const std::string &value,
std::optional<int> &parsed_value,
x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger)
{
if (parsed_value)
{
if (*parsed_value >= 0 && *parsed_value <= 99)
return;
}
else
{
if (value.empty())
{
parsed_value=0;
return;
}
}
parsed_value.reset();
lock.stop_message("Must enter a number 0-99");
return std::nullopt;
},
[]
(int v) -> std::string
{
return std::to_string(v);
},
[]
(ONLY IN_THREAD, const std::optional<int> &v)
{
if (v)
std::cout << "New value: " << *v << std::endl;
else
std::cout << "No new value" << std::endl;
});
x::w::validated_input_field<int> validated_int=field->set_string_validator
(IN_THREAD,
[]
(ONLY IN_THREAD,
// ...

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.

if (!f->validate_modified(IN_THREAD))
{
// ...
}

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.

Input filters
#include <x/w/input_field_filter.H>
x::w::input_field_config config{15};
config.maximum_size=14;
config.autoselect=true;
config.autodeselect=true;
auto field=factory->create_input_field("(###) ###-####", config);
field->on_default_filter([]
(char32_t c)
{
return c >= '0' && c <= '9';
},
{0, 4, 5, 9},
'#');
field->on_default_filter(ONLY IN_THREAD,
[]
(char32_t c)
{
return c >= '0' && c <= '9';
},
{0, 4, 5, 9},
'#');

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:

  • the input field's initial contents is the same size as the input field's configured maximum size.
  • optionally, the input field's width should be one extra column, to avoid scrolling (extra room for the trailing cursor), and the input field gets configured to 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.

Note
The entire contents of the input field inclues the placeholders, and immutable characters. An input field validation callback gets typically used together with the input filter, to convert the contents into a usable form, typically stripping off the immutable characters and placeholders.
field->on_filter([]
(ONLY IN_THREAD,
const x::w::input_field_filter_info &info)
{
size_t starting_pos=info.starting_pos;
size_t n_delete=info.n_delete;
std::u32string_view new_contents=info.new_contents;
x::w::input_filter_type type=info.type;
size_t size=info.size;
info.update();
info.update(0, 0, new_contents);
info.move(0);
info.select_all();
});
field->on_filter(ONLY IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::input_field_filter_info &info)
{
//
});

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.

Replacing or installing a search callback
x::w::input_field_config conf{40};
conf.input_field_search={
[]
(const x::w::input_field_search_info &info)
{
}
};
conf.enable_search();
// ...
field->on_search(
{
[]
(const x::w::input_field_search_info &info)
{
}
});
field->on_search(
IN_THREAD,
{
[]
(const x::w::input_field_search_info &info)
{
}
});

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:

  • a callback which is a callable object that takes an x::w::input_field_search_info parameter.
  • a 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
#include <x/w/input_field.H>
#include <x/w/input_field_config.H>
x::w::input_field_config conf{3};
conf.set_default_spin_control_factories();
x::w::input_field f=factory->create_input_field({""}, conf);
auto validated_int=field->set_string_validator<int>
([]
(ONLY IN_THREAD,
const std::string &value,
std::optional<int> &parsed_value,
const x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger)
-> std::optional<int>
{
// ...
},
[]
(int n)
{
return std::to_string(n);
});
field->on_spin([contents=validated_int->contents]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
// ...
},
[validated_int->contents]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
// ...
});
field->on_spin(IN_THREAD,
[contents=validated_int->contents]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
// ...
},
[validated_int->contents]
(ONLY IN_THREAD,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
// ...
});

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.

Hint
#include <x/w/input_field.H>
#include <x/w/input_field_config.H>
x::w::input_field_config conf{20};
conf.hint("Enter something here");
x::w::input_field f=factory->create_input_field({""}, conf);

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.

Note
There are no provisions for the hint's size exceeding the width of the input field, it simply gets cut off. It's your responsibility to make sure that it's shorter. Additionally, the hint's text appears starting on the first line of a multi-line input field, but it's possible to manually center the hint vertical in the field by prepending explicit \n characters in the hint.
input_field_config's hint is an x::w::text_param.

◆ input_field_appearance

Appearance of the input_field.

Specifies various properties of a input_field. The default properties are set by the current display theme.

x::w::input_field_config config{
// ...
};
x::w::const_input_field_appearance custom=x::w::input_field_appearance::base::theme()
->modify([]
(const x::w::input_field_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ input_field_appearanceptr

A nullable pointer reference to a input field appearance.

See also
input_field_appearance

◆ input_field_filter_callback_t

typedef void x::w::input_field_filter_callback_t(THREAD_CALLBACK, const input_field_filter_info &)

Callback for filtering changes to the input field.

◆ input_field_search_callback_t

typedef void x::w::input_field_search_callback_t(const input_field_search_info &)

Callback used by an input field to search for values.

◆ input_field_validation_callback

Reference-counted input field validation callback.

◆ input_field_validation_callback_t

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.

◆ input_field_validation_callbackptr

A nullable pointer reference to a reference-counted input field validation callback.

◆ input_field_validation_function_type

template<input_field_validation_function validation_function>
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

◆ input_fieldptr

A nullable pointer reference to an input_field.

See also
input_field

◆ install_contextpopup_callback_t

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.

◆ internal_focusable_cb

typedef void x::w::internal_focusable_cb(const internal_focusable_group &)

Callback for processing internal_focusable_group.

◆ internal_richtext_impl_t

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

◆ is_numeric_or_string_v

template<typename T >
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.

◆ item_button_appearance

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.

x::w::itemlayoutmanager lm;
x::w::const_item_button_appearance custom=x::w::item_button_appearance::base::theme()
->modify([]
(const x::w::item_button_appearance &custom)
{
// Modify custom->...
});
// ...
lm->append_item([]
(const x::w::factory &f)
{
// ...
},
custom);

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.

◆ item_button_appearanceptr

A nullable pointer reference to a item button appearance.

See also
item_button_appearance

◆ item_info_t

typedef mpobj<itemlayout_button_container, std::recursive_mutex> x::w::item_info_t

Mutex-protected info on the items we are managing.

◆ item_layout_appearance

Appearance of the item layout manager.

Specifies various properties of an item layout manager. The default properties are set by the current display theme.

x::w::new_item_layoutmanager nlm{
// ...
};
x::w::const_item_layout_appearance custom=x::w::item_layout_appearance::base::theme()
->modify([]
(const x::w::item_layout_appearance &custom)
{
// Modify custom->...
});
nlm.appearance=custom;

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.

◆ item_layout_appearanceptr

A nullable pointer reference to a item layout manager appearance.

See also
item_layout_appearance

◆ itemlayout_callback_t

Callback that gets invoked whenever the close button gets clicked on an item.

See also
itemlayoutmanager

◆ itemlayoutmanager

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.

#include <x/w/itemlayoutmanager.H>
x::w::itemlayoutmanager il=container->get_layoutmanager();
size_t s=il->size();
il->append_item([]
(const x::w::factory &f)
{
f->create_label("Lorem ipsum")->show();
});
il->insert_item(0,
[]
(const x::w::factory &f)
{
f->create_label("Lorem ipsum")->show();
});
il->remove_item(0);
x::w::element e=il->get_item(0);

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.

Locking and implementing the close button callback.
x::w::itemlayout_lock lock{il};

Constructing an itemlayout_lock blocks all other execution threads from accessing the items in the container.

x::w::new_itemlayoutmanager nilm{
[]
(ONLY IN_THREAD,
size_t i,
const x::w::itemlayout_lock &lock,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
lock.layout_manager->remove_item(i);
}
};
x::w::focusable_container fc=
factory->create_container([]
(const x::w::focusable_container &fc)
{
});

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.

il->on_remove(
[]
(ONLY IN_THREAD,
size_t i,
const x::w::itemlayout_lock &lock,
const x::w::callback_trigger_t &trigger,
const x::w::busy &mcguffin)
{
lock.layout_manager->remove_item(i);
});

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.

◆ itemlayoutmanager_generator

Generate something in the item layout manager.

See also
uigenerators

◆ itemlayoutmanagerptr

A nullable pointer reference to an item layout manager.

See also
itemlayoutmanager

◆ key_event_callback_t

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.

◆ label

A text label widget.

Multiply-inherits from textlabel and widget for a normal label widget.

factory->create_label({"Hello world!"});
See also
factory

◆ label_for

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.

◆ label_forptr

typedef ptr<label_forObj> x::w::label_forptr

A nullable pointer reference to a label link.

◆ label_hotspot_id

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.

Note
The literal string must exist as long as the text_param remains in scope.

◆ label_hotspots_t

All hotspot callbacks

create_focusable_label() takes a container of hotspots to bind them to the placeholders in the text parameter.

◆ labelptr

A nullable pointer reference to an label.

See also
label

◆ layout_impl

Alias.

◆ layout_implptr

Alias.

◆ 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

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.

x::w::new_listlayoutmanager nlm;
x::w::const_list_appearance custom=x::w::list_appearance::base::theme()
->modify([]
(const x::w::list_appearance &custom)
{
// Modify custom->...
});
custom->border={};
nlm.appearance=custom;

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.

x::w::const_list_appearance custom=x::w::list_appearance::base::combobox_theme()
->modify([]
(const x::w::list_appearance &custom)
{
// Modify custom->...
});
x::w::const_list_appearance custom=x::w::list_appearance::base::pane_theme()
->modify([]
(const x::w::list_appearance &custom)
{
// Modify custom->...
});

combobox_theme() and pane_theme() similarly return the cached default list appearance themes for lists appearing in combo-boxes and pane containers.

◆ list_appearanceptr

A nullable pointer reference to a list appearance properties.

See also
list_appearance

◆ list_item_param_base

A new list item.

Base class for listlayoutmanager's insert_items(), and append_items() parameters.

◆ list_item_status_change_callback

Type-erased list_item_status_change_callback_t.

◆ 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.

See also
listlayoutmanager

◆ list_item_status_change_callbackptr

Type-erased list_item_status_change_callback_t.

◆ list_selection_changed_cb_t

selection_changed callback.

See also
new_listlayoutmanager

◆ 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.

See also
new_listlayoutmanager

◆ listimpl_info_lock_t

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.

◆ listimpl_info_t

typedef mpobj<listimpl_info_s, std::recursive_mutex> x::w::listimpl_info_t

Internal listlayoutmanager mutex-protected data.

◆ 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:

bool enabled=handle->enabled();
handle->enabled(true);
handle->enabled(IN_THREAD, true);

enabled() enables or disables the handle's item, or indicates whether the item is currently enabled.

bool flag=handle->selected();
handle->selected(true);
handle->selected(IN_THREAD, true);
handle->selected(IN_THREAD, true, trigger);
handle->autoselect();
handle->autoselect(IN_THREAD);
handle->autoselect(IN_THREAD, trigger);

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.

handle->on_status_update([]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});
handle->on_status_update(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});

on_status_update() installs or replaces the list item's status callback.

x::w::listlayoutmanagerptr l=handle->submenu_listlayout();

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.

Note
The new callback installed by on_status_update() gets immediately invoked with the trigger value of x::w::initial, reporting the list item's current selection status. The callback does not get invoked if the list item does not exist any more.

◆ listitemhandleptr

A nullable pointer reference to a WHATITIS.

See also
listitemhandle

◆ listlayoutmanager

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.

#include <x/w/listlayoutmanager.H>
x::w::listlayoutmanager l=container->get_layoutmanager();
size_t s=l->size();
size_t item_number;
bool flag=l->selected(item_number);
l->selected(item_number, true);
std::optional<size_t> n=l->selected();
std::vector<size_t> v=l->all_selected();
std::optional<size_t> n=l->current_list_item();
l->autoselect(item_number);
l->unselect();

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.

Note
List selection gets updated by an internal execution thread. Calling selected(item_number) after selecting or unselecting an item, using selected() or autoselect(), will not report list item's revised selection status until the internal execution thread officially updates it.

The selection_changed callback, installed when the list was created, gets invoked when list items' selected status gets officially updated.

Appearance
x::w::new_listlayoutmanager new_list;
new_list.height=10;
new_list.vertical_scrollbar=x::w::scrollbar_visibility::always;
f->create_focusable_container
([]
(const x::w::focusable_container &c)
{
x::w::listlayoutmanager l=c->get_layoutmanager();
// ...
}, new_list);

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

x::w::new_listlayoutmanager new_list;
new_list.variable_height();
new_list.vertical_scrollbar=x::w::scrollbar_visibility::never;

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.

Locking the list
x::w::list_lock lock{l};

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.

Note
This lock blocks the internal execution thread if it tries to access the list in order to process a pointer or a keybaord event (this includes pointer movement). The lock should not be held for an extended time.

List items that get selected() or autoselect()ed get their official selection status updated only after the lock gets released.

Modifying the contents of the list
#include <x/w/factory.H>
l->append_items({"Lorem ipsum"});
size_t item_number;
l->insert_items(item_number, {"Lorem ipsum"});
l->remove_item(item_number);
l->replace_items(item_number, {"Lorem", "ipsum"});
l->replace_all_items(item_number, {"Lorem ipsum"});

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:

  • Parameters that specify discrete items, such as text labels and separator items. Each such parameter creates a new list item.
  • List item metadata, such as selection callbacks and keyboard shortcuts.

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:

#include <x/w/factory.H>
l->append_items({
"Lorem ipsum",
x::w::selected{},
"Dolor Sit Amet",
});

This adds two list items, "Lorem Ipsum" and "Dolor Sit Amet". The latter comes up initially selected.

Note
All changes to the contents of the list get processed by the connection thread. Using size() immediately after append_items(), for example, may still return the previous list size; until the contents of list get updated by the connection thread. As explained below, the IN_THREAD overloads are invocable from the connection thread itself, most likely from another callback, and they take effect immediately.
Text label items
l->insert_items(0, {"Lorem", x::w::text_param{"ipsum"}});

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.

Separators
l->append_items(0, {"Lorem",
x::w::separator{},
"Ipsum"});

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().

Selection callbacks
l->insert_items(0,
{
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
},
"Lorem",
"Ipsum"
});

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.

l->on_status_update(1,
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});
l->on_status_update(IN_THREAD,
1,
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});

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.

Replacing other callbacks
l->selection_type([]
(ONLY IN_THREAD,
const x::w::listlayoutmanager &lm,
size_t n,
const x::w::callback_trigger &trigger,
const x::w::busy &mcguffin)
{
});
l->selection_type(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::listlayoutmanager &lm,
size_t n,
const x::w::callback_trigger &trigger,
const x::w::busy &mcguffin)
{
});
l->on_selection_changed([]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});
l->on_selection_changed(ONLY IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});
l->on_current_list_item_changed([]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});
l->on_current_list_item_changed(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
});

These replace existing callbacks. The initial callbacks get specified in the x::new_listlayoutmanager when creating the list.

Selectable menu options
l->append_items({
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
},
x::w::menuoption{},
"Detailed view",
});

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.

x::w::menuoption{"radiogroup1@examples.libcxx.com"},

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).

Initially selected list items
l->append_items({
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
},
x::w::menuoption{},
x::w::selected{}
"Detailed view",
});

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 ).

Menu item shortcuts
l->append_items({
x::w::shortcut{"Alt", 'O'),
[]
(ONLY IN_THREAD,
const x::w::list_item_status_info_t &)
{
},
"Open",
});

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.

Submenus
l->append_items({
x::w::submenu{
[]
(const x::w::listlayoutmanager &)
{
}
},
"Recent files...",
});

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.

Hierarchical lists
auto f=l->append_items(
{
x::w::hierindent{1},
"Lorem Ipsum",
});

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.

Note
The application is responsible for making sure that the list items' hierarchy indentation level makes sense. Removing or adding new list items has no effect on the hierarchy indentation level of other items in the list. The hierindent() method returns the indentation level of an existing list item, for information purposes. The only way to modify an existing list item indentation level is to replace it completely, with replace_items().
A list that uses indentation levels should not set any column borders. Column borders are not drawn for indented list items, at all, only list items that have a default indentation level of 0. When adding new list to the list, 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.
Sorting the list
std::vector<size_t> index;
l->resort_items(index);

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:

std::vector<size_t> index={6, 1, 2, 0, 4, 5, 3, 7};
l->resort_items(index);

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.

Enabling and disabling list items
if (l->enabled(4))
l->enabled(4, false);

This disables list item #4. Disabled list items cannot be selected with the pointer or keyboard.

Note
List item status gets updated by the library's internal execution thread. Enabling or disabling an item sends a message to the execution thread, so immediately calling enabled() after changing the item's status may still report that the item's status did not change.
Lists with multiple columns.
x::w::new_listlayoutmanager new_list;
new_list.columns=3;
f->create_focusable_container
([]
(const x::w::focusable_container &c)
{
x::w::listlayoutmanager l=c->get_layoutmanager();
l->append_items(
{
// First list item
[]
(const x::w::list_item_status_info_t &)
{
// ...
},
"Lorem ipsum", "dolor sit amet", "consectetur",
// Second list item, a separator
x::w::separator{},
// Third list item
[]
(const x::w::list_item_status_info_t &)
{
// ...
},
"adipisicing", "elit", "sed do eiusmod"
});
},
new_list);

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.

Connection thread methods

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.

Creating handles for new list items
#include <x/w/listitemhandle.H>
auto ret=l->append_items(
{
"Lorem ipsum",
"dolor sit amet",
"consectetur",
x::w::get_new_items{},
});
std::vector<x::w::listitemhandle> &handles=ret.handles;

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.

Note
The vector includes all handles for new items, except for separator items.
Standard Copy/Cut/Paste menu items
#include <x/w/copy_cut_paste_menu_items.H>
x::w::copy_cut_paste_menu_items items=l->append_copy_cut_paste(parent);
x::w::copy_cut_paste_menu_items items=l->append_copy_cut_paste(IN_THREAD, parent);

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:

  • the main window when adding the default "Copy", "Cut", and "Paste" menu items to an application field.
  • a widget when adding the menu items to the element's right context button popup.

append_copy_cut_paste() returns an x::w::copy_cut_paste_menu_items object.

Generating content from an XML-based specification
l->generate("list-layout", generators, elements);

generate() generates the contents of the list from the loaded theme file. See the tutorial for more information.

◆ listlayoutmanager_generator

Generate something in the list layout manager.

See also
uigenerators

◆ listlayoutmanagerptr

A nullable pointer reference to a text-only list layout manager.

See also
listlayoutmanager

◆ main_window

Top level application window.

Inherits some functionality from its generic_window superclass.

// Create an application window on the default screen.
x::w::main_window main_window=x::w::main_window::create(
[]
(const x::w::main_window &new_main_window)
{
// Initialize the new main window.
});
// Explicitly create an application window on a specific screen.
auto screen=x::w::screen::create();
x::w::main_window main_window=screen->create_mainwindow(
[]
(const x::w::mainwindow &w)
{
// Initialize the new main window.
});
ref< screenObj, screenBase > screen
Definition screenfwd.H:125

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.

See also
screen_positions
Window icon
main_window->install_window_icons({"appsmall.gif", "appmedium.gif", "applarge.gif"});
main_window->install_window_icons("app.sxg");

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.

Close button
main_window->on_delete([]
(ONLY IN_THREAD,
const x::w::busy &block)
{
});
main_window->on_delete(IN_THREAD,
[]
(ONLY IN_THREAD,
const x::w::busy &block)
{
});

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.

Menu bar
x::w::menubarlayoutmanager mb=w->get_menubarlayoutmanager();
x::w::container c=w->get_menubar();
c->show();

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().

Dialogs
x::w::dialog d=w->create_dialog("dialog_id@example.com",
[]
(const x::w::dialog &f)
{
});
x::w::create_dialog_args args{"dialog_id@example.com"};
x::w::dialog d=w->create_dialog(args,
[]
(const x::w::dialog &f)
{
});
d->dialog_window->show_all();

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:

args.modal=true;
x::w::dialog d=w->create_dialog({"dialog_id@example.com", true},
[]
(const x::w::dialog &f)
{
});

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::new_toolboxlayoutmanager ntlm;
args.dialog_layout=ntlm;

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.

Standard dialogs
x::w::dialog d=w->create_ok_dialog(
// x::w::standard_dialog_args
//
// Same as x::w::create_dialog_args except that there's
// no dialog_layout.
//
// Like x::w::create_dialog_args, it's constructible
// from a single literal string, and also has an optional modal flag;
// the literal string sets a unique identifier, or a label, for the dialog.
//
// All dialogs must have unique labels in the parent windows or dialogs.
// Different parent main window or parent dialogs can use the same labels.
// For future use, identifier labels should be formatted as Internet
// hostnames or E-mail addresses using domain names that belong to
// the application.
{"lorem_ipsum@example.com", true},
// Use this icon for this dialog.
"alert",
// The featured widget.
[]
(const x::w::factory &factory)
{
factory->create_label("Lorem ipsum");
},
// The callback when the dialog gets closed.
[]
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// ...
});
x::w::dialog d=w->create_ok_cancel_dialog(
// Just a dialog label, the modal flag defaults to false.
"dolores@example.com",
// Icon
"alert",
// The featured widget.
[]
(const x::w::factory &factory)
{
factory->create_label("Lorem ipsum");
},
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// Ok action.
},
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// Cancel action.
});
x::w::dialog d=w->create_ok2_cancel_dialog(
// Just a dialog label, the modal flag defaults to false.
"sitamet@example.com",
// Icon
"alert",
// The featured widget.
[]
(const x::w::factory &factory)
{
factory->create_label("Lorem ipsum");
},
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// Ok action.
},
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// Ok2 action.
},
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
// Cancel action.
},
// Labels
"Ok",
"Ok2",
"Cancel",
);

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.

x::w::input_dialog d=main_window->create_input_dialog
(// Identifier label, modal dialog.
{"help_question@example.com", true},
// Show an icon with a question mark.
"question",
// Callback: the element to the left of the input field.
[]
(const x::w::factory &f)
{
f->create_label("What is your name?");
},
// Initial value of the input field
"",
// Input field's configuration
x::w::input_field_config{},
// This callback gets invoked by the "Ok" button, or when <Enter>
// is pressed in the input field. In either case the dialog is hidden.
//
// This callback received the input_field widgets, so that
// the callback may obtain the entered text.
[]
(ONLY IN_THREAD,
const x::w::input_dialog_ok_args &info)
{
x::w::input_lock lock{info.dialog_input_field};
std::cout << "Your name is: " << lock.get() << std::endl;
},
// This callback gets invoked when the dialog gets hidden for other
// reasons: the cancel button, or the dialog's close button, if
// provided by the window manager.
[]
(ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
std::cout << "How rude..." << std::endl;
});

create_input_dialog() constructs an dialog with a input field, returning an x::w::input_dialog.

main_window->stop_message("Something went wrong");
try {
// ...
} catch (const x &e)
{
main_window->exception_message(e);
}

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.

Note
stop_message(), exception_message(), and alert_message() do not wait until the dialog gets closed, they return immediately. Use x::w::stop_message_config's or x::w::alert_message_config's acknowledged_callback to execute a callback when the dialog gets closed.
#include <x/w/file_dialog.H>
#include <x/w/file_dialog_config.H>
x::w::file_dialog_config config{
[]
(ONLY IN_THREAD,
const x::w::file_dialog &d,
const std::string &name,
const x::w::busy &busy_mcguffin)
{
d->dialog_window->hide();
// ...
},
[](ONLY IN_THREAD,
const x::w::ok_cancel_callback_args &args)
{
}};
x::w::file_dialog d=main_window->create_file_dialog({"file_open@example.com", true}, config);

create_file_dialog() returns a x::w::file_dialog, for selecting an existing or a new file.

#include <x/w/print_dialog.H>
#include <x/w/print_dialog_config.H>
x::w::print_dialog_config config;
x::w::print_dialog d=main_window->create_print_dialog({"print@example.com", true}, config);

create_print_dialog() returns a x::w::print_dialog, for selecting a printer and options for printing a document.

Managing existing dialogs.
std::unordered_set<std::string> labels=main_window->dialogs();
x::w::dialogptr d=main_window->dialog("question@example.com");
main_window->remove_dialog("question@example.com");

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.

◆ main_window_appearance

Appearance of the main_window_config.

Specifies various properties of a main window. The default properties are set by the current display theme.

x::w::main_window_config config{
// ...
};
x::w::const_main_window_appearance custom=x::w::main_window_appearance::base::theme()
->modify([]
(const x::w::main_window_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ main_window_appearanceptr

A nullable pointer reference to a main window appearance.

See also
main_window_appearance

◆ main_window_config_t

◆ main_windowptr

A nullable pointer reference to a main application window.

See also
main_window

◆ menu

A menu button in a menu bar.

x::w::listlayoutmanager l=m->listlayout();

This widget represents a menu in a menu bar, a container with list layout manager that manages the items in the menu.

m->on_popup_state_update([]
(ONLY IN_THREAD,
const x::w::element_state &s,
const x::w::busy &mcguffin)
{
});

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.

◆ menubarfactory

Menu bar factory.

A factory for adding menus to a menu bar.

factory->add([]
(const x::w::factory &f)
{
},
[]
(const x::w::listlayoutmanager &m)
{
});
factory->add_text("File",
[]
(const x::w::listlayoutmanager &m)
{
});

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.

Optional parameters

Both add() and add_text() have additional parameters. Each individual parameter is optional; any that get specified must appear in the following order:

◆ menubarfactory_generator

Generate something using a menu bar factory.

See also
uigenerators

◆ menubarfactoryptr

A nullable pointer reference to a menu bar factory.

See also
menubarfactory

◆ menubarlayoutmanager

Menu bar layout manager.

A layout manager for a main window's menu bar.

x::w::menubarlayoutmanager mb=main_window->get_menubarlayoutmanager();
x::w::menubarfactory f=mb->append_menus();
x::w::menubarfactory f=mb->insert_menus(0);
x::w::menubarfactory f=mb->append_right_menus();
x::w::menubarfactory f=mb->insert_right_menus(0);

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.

mb->remove_menu(0);
mb->remove_right_menu(0);

remove_menu() and remove_right_menu() remove an existing menu from the corresponding section of the menu bar.

size_t n=mb->get_menus();
size_t n=mb->get_right_menus();
x::w::menu m=mb->get_menu(0);
x::w::menu m=mb->get_right_menu(0);

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.

◆ menubarlayoutmanager_generator

Generate something using a menu bar layout manager.

See also
uigenerators

◆ menubarlayoutmanagerptr

A nullable pointer reference to a menu bar layout manager.

See also
menubarlayoutmanager

◆ menuptr

A nullable pointer reference to a menu button.

See also
menu

◆ metrics_update_callback_t

typedef void x::w::metrics_update_callback_t(THREAD_CALLBACK, const metrics::axis &, const metrics::axis &)

◆ motion_event_callback_t

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.

◆ new_booklayoutmanager_generator

Generate something to initialize a new_booklayoutmanager.

See also
uigenerators

◆ new_booklayoutmanager_plainptr

Pseudo-ref used to initialize a new_booklayoutmanager parameter.

◆ new_borderlayoutmanager_generator

Generate something to initialize a new_borderlayoutmanager.

See also
uigenerators

◆ new_borderlayoutmanager_plainptr

Pseudo-ref used to initialize a new_borderlayoutmanager parameter.

◆ new_custom_comboboxlayoutmanager_generator

Generate something to initialize a new_custom_comboboxlayoutmanager.

See also
uigenerators

◆ new_custom_comboboxlayoutmanager_plainptr

Pseudo-ref used to initialize a new_custom_comboboxlayoutmanager parameter.

◆ new_editable_comboboxlayoutmanager_generator

Generate something to initialize a new_editable_comboboxlayoutmanager.

See also
uigenerators

◆ new_editable_comboboxlayoutmanager_plainptr

Pseudo-ref used to initialize a new_editable_comboboxlayoutmanager parameter.

◆ new_gridlayoutmanager_generator

Generate something to initialize a new_gridlayoutmanager.

See also
uigenerators

◆ new_gridlayoutmanager_plainptr

Pseudo-ref used to initialize a new_gridlayoutmanager parameter.

◆ new_itemlayoutmanager_generator

Generate something to initialize a new_itemlayoutmanager.

See also
uigenerators

◆ new_itemlayoutmanager_plainptr

Pseudo-ref used to initialize a new_itemlayoutmanager parameter.

◆ new_list_or_combobox_layoutmanager_generator

Generate something to initialize a new_list_or_combobox_layoutmanager.

See also
uigenerators

◆ new_list_or_combobox_layoutmanager_plainptr

Pseudo-ref used to initialize a new_list_or_combobox_layoutmanager.

◆ new_listlayoutmanager_generator

Generate something to initialize a new_listlayoutmanager.

See also
uigenerators

◆ new_listlayoutmanager_plainptr

Pseudo-ref used to initialize a new_listlayoutmanager parameter.

◆ new_pagelayoutmanager_generator

Generate something to initialize a new_pagelayoutmanager.

See also
uigenerators

◆ new_pagelayoutmanager_plainptr

Pseudo-ref used to initialize a new_pagelayoutmanager parameter.

◆ new_panelayoutmanager_generator

Generate something to initialize a new_panelayoutmanager.

See also
uigenerators

◆ new_panelayoutmanager_plainptr

Pseudo-ref used to initialize a new_panelayoutmanager parameter.

◆ new_peepholelayoutmanager_generator

Generate something to initialize a new_peepholelayoutmanager (scrollable)

See also
uigenerators

◆ new_peepholelayoutmanager_plainptr

Pseudo-ref used to initialize a new_scrollable_peepholelayout parameter.

◆ new_standard_comboboxlayoutmanager_generator

Generate something to initialize a new_standard_comboboxlayoutmanager.

See also
uigenerators

◆ new_standard_comboboxlayoutmanager_plainptr

Pseudo-ref used to initialize a new_standard_comboboxlayoutmanager parameter.

◆ new_tablelayoutmanager_generator

Generate something to initialize a new_tablelayoutmanager.

See also
uigenerators

◆ new_tablelayoutmanager_plainptr

Pseudo-ref used to initialize a new_tablelayoutmanager parameter.

◆ new_toolboxlayoutmanager_generator

Generate something to initialize a new_toolboxlayoutmanager.

See also
uigenerators

◆ new_toolboxlayoutmanager_plainptr

Pseudo-ref used to initialize a new_toolboxlayoutmanager parameter.

◆ nonrecursive_visibility_focusframe_ref_t

A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.

◆ nonrecursive_visibility_focusframe_t

A typical implementation of a focusframecontainer nonrecursive_visibilityObj mixin.

◆ ok_cancel_dialog_callback_t

Signature of an ok or cancel callback.

◆ ONLY

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.

void foo(ONLY IN_THREAD, int);
void bar(ONLY IN_THREAD)
{
// ...
foo(IN_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.

◆ page_layout_info_t

typedef mpobj<page_layout_info_s, std::recursive_mutex> x::w::page_layout_info_t

Internal page layout manager mutex-protected info.

◆ 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.

◆ pagefactory_generator

Generate something using a book factory.

See also
uigenerators

◆ pagefactoryptr

A nullable pointer reference to a element factory for the page layout manager.

See also
pagefactory

◆ pagelayoutmanager

The page layout manager.

#include <x/w/pagelayoutmanager.H>
factory->create_container([]
(const auto &new_container)
{
x::w::pagelayoutmanager layout_manager=new_container->get_layoutmanager();
// ...
},
x::w::new_pagelayoutmanager{});

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.

#include <x/w/pagefactory.H>
x::w::pagefactory factory=layout_manager->append();
auto label=factory->create_label("Hello world")->show();
x::w::pagefactory factory=layout_manager->insert(0);
layout_manager->remove(1);

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.

Note
Each page, each widget in the page container must still be show()n in order to be visible when its turn comes to shine, even though the page layout manager only makes one page visible.

lookup() returns the current page number of the given element.

std::optional<size_t> layout_manager->lookup(label);
layout_manager->open(layout_manager->size()-1);
layout_manager->close();
std::optional<size_t> n=layout_manager->opened();
x::w::element e=layout_manager->get(0);

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.

x::w::page_lock lock{layout_manager};

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.

Note
This also includes the library's internal execution thread. An existing page lock can block the internal execution thread from updating the display.

◆ pagelayoutmanager_generator

Generate something in the page layout manager.

See also
uigenerators

◆ pagelayoutmanagerptr

A nullable pointer reference to a page layout manager.

See also
pagelayoutmanager

◆ pagetabgridlayoutmanager

typedef ref<pagetabgridlayoutmanagerObj> x::w::pagetabgridlayoutmanager

The grid layout manager for a book layout manager's page tab.

◆ pagetabgridlayoutmanagerptr

typedef ptr<pagetabgridlayoutmanagerObj> x::w::pagetabgridlayoutmanagerptr

A nullable pointer reference to a book page tab grid layoutmanager.

See also
pagetabgridlayoutmanager

◆ pane_appearance

Appearance of the next new pane.

Specifies various properties of a new pane. The default properties are set by the current display theme.

x::w::panefactory f;
x::w::const_pane_appearance custom=x::w::pane_appearance::base::theme()
->modify([]
(const x::w::pane_appearance &custom)
{
// Modify custom->...
});
f->appearance=custom;

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.

◆ pane_appearanceptr

A nullable pointer reference to a pane appearance.

See also
pane_appearance

◆ pane_layout_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.

x::w::new_panelayoutmanager config{
// ...
};
x::w::const_pane_layout_appearance custom=x::w::pane_layout_appearance::base::theme()
->modify([]
(const x::w::pane_layout_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ pane_layout_appearanceptr

A nullable pointer reference to a pane layout appearance.

See also
pane_layout_appearance

◆ panefactory

A factory for new panes in a pane layout manager's container.

f->create_label("Hello world!")->show();

New elements get created as individual panes with adjustable sizes.

#include <x/w/pane_appearance.H>
f->appearance=f->appearance->modify([]
(const x::w::pane_appearance &custom)
{
custom->size=10.0;
custom->left_padding=
custom->right_padding=
custom->bottom_padding=2;
});
f->create_label("Hello world!")->show();

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.

Note
Each new pane's element needs to get show()n to be visible.
Miscellaneous pane appearance properties.
f->appearance=f->appearance->modify([]
(const x::w::pane_appearance &custom)
{
custom->size=10.0;
custom->left_padding=
custom->right_padding=
custom->bottom_padding=2;
custom->background_color=x::w::blue;
custom->horizontal_alignment=x::w::halign::centered;
custom->vertical_alignment=x::w::valign::middle;
custom->pane_scrollbar_visibility=x::w::scrollbar_visibility::always;
});

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.

Note
Using the factory to create multiple widgets places each individual element into a new pane, and resets the pane appearance to the default theme-specified appearance. Creating multiple panes with a custom background color, for example, requires taking the pane appearance object from the factory, using modify(), and setting its background_color to the same pane's background color. Call set_background_color() again to use the same (or different) background color before creating the next widget.
Panes with selection lists and tables
x::w::new_listlayoutmanager nlm;
pane_f->configure_new_list(nlm);
pane_f->appearance=pane_f->appearance->modify([]
(const auto &custom)
{
custom->size=20;
});
pane_f->create_focusable_container(
[]
(const auto &container)
{
x::w::listlayoutmanager lm=container->get_layoutmanager();
lm->append_items({
"Lorem ipsum",
"dolor sit amet",
"consectetur",
"adipisicing elit sed",
"do eiusmod",
"tempor incididunt ut",
"labore et",
"dolore magna",
"aliqua"});
},
nlm)->show();
ref< containerObj > container
Methods common to all display containers.
Definition containerfwd.H:43

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.

Note
configure_new_list() installs a new, default appearance object. Any custom settings for the new pane must be done after configure_new_list().

◆ panefactory_generator

Generate something using a pane factory.

See also
uigenerators

◆ panefactoryptr

A nullable pointer reference to a pane factory.

See also
panefactory

◆ panelayoutmanager

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.

#include <x/w/panelayoutmanager.H>
x::w::new_panelayoutmanager nplm;
nplm.slider_background_color="100%";
factory->create_focusable_container(
[&]
(const x::w::focusable_container &c)
{
x::w::panelayoutmanager pane_lm=c->get_layoutmanager();
},
nplm);

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.

#include <x/w/panefactory.H>
size_t n=pane_lm->restored_size();
size_t n=pane_lm->size();
x::w::element e=lm->get(0);
x::w::panefactory pane_f=pane_lm->append_panes();
x::w::panefactory pane_f=pane_lm->insert_panes(0);
x::w::panefactory pane_f=pane_lm->replace_panes(0);
pane_lm->remove_pane(1);
pane_lm->remove_all_panes();
x::w::panefactory pane_f=pane_lm->replace_all_panes();

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().

Restoring pane sizes
LIBCXX_NAMESPACE::w::new_panelayoutmanager nplm{100};
nplm.restore("stack");
auto pane=factory->create_focusable_container(
[&](const auto &pane_container)
{
auto lm=pane_container->panelayout();
size_t n=lm->restored_size();
// ...
});

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.

Pane focusability.
#include <x/w/panelayoutmanager.H>
x::w::new_panelayoutmanager nplm;
nplm.slider_background_color="100%";
LIBCXX_NAMESPACE::w::focusable_container c=factory->create_focusable_container(
[&]
(const x::w::focusable_container &c)
{
// ...
},
nplm);
c->get_focus_before(another_focusable);

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.

Generating content from an XML-based specification
l->generate("pane-layout", generators, elements);

generate() generates the contents of the pane from the loaded theme file. See the tutorial for more information.

◆ panelayoutmanager_generator

Generate something in the pane layout manager.

See also
uigenerators

◆ panelayoutmanagerptr

A nullable pointer reference to a pane layout manager.

See also
panelayoutmanager

◆ peephole_appearance

Appearance of the scrollable peephole.

Specifies various properties of a peephole. The default properties are set by the current display theme.

x::w::new_scrollable_peepholelayoutmanager lm{
// ...
};
x::w::const_peephole_appearance custom=x::w::peephole_appearance::base::theme()
->modify([]
(const x::w::peephole_appearance &custom)
{
// Modify custom->...
});
lm.appearance=custom;

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.

◆ peephole_appearanceptr

A nullable pointer reference to a peephole appearance.

See also
peephole_appearance

◆ peepholelayoutmanager

The peephole layout manager

This layout manager puts another widget inside a (usually) smaller area, and scrolls parts of it into view, as needed.

See also
new_scrollable_peepholelayoutmanager
new_peepholelayoutmanager
x::w::new_peepholelayoutmanager nplm{
[&]
(const x::w::factory &f)
{
f->create_container(
[&]
(const x::w::container &c)
{
x::w::gridlayoutmanager glm=c->get_layoutmanager();
// ...
},
x::w::new_gridlayoutmanager{});
}
};
npl.width({20, 50, 100});
npl.height({20, 50, 100});
f->create_focusable_container(
[]
(const auto &c)
{
// Unused
});

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.

◆ peepholelayoutmanager_generator

Generate something in the peephole layout manager.

See also
uigenerators

◆ peepholelayoutmanagerptr

A nullable pointer reference to a peephole layout manager.

See also
peepholelayoutmanager

◆ pictformat

Available picture formats on the server.

X protocol RENDER parameter, specifying the RENDER format of pictures. See RENDER documentation for more information.

◆ pictformatptr

A nullable pointer reference to a pictformat to the server.

◆ 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.

x::w::picture dst_picture;
dst_picture->repeat(x::w::render_repeat::normal);
x::w::const_picture yellow=screen->create_solid_color_picture(
{ x::w::rgb::maximum(),
x::w::rgb::maximum(),
0 });
dst_picture->composite(yellow, 0, 0, {0, 0, 100, 100},
x::w::render_pict_op::op_over);
x::w::rectarea rectangles;
dst_picture->clip_rectangles(rectangles);
dst_picture->clear_clip();
dst_picture->fill_rectangle( {0, 0, 100, 100}, { x::w::rgb::maximum(),
x::w::rgb::maximum(),
0 });
std::set<x::w::picture::base::triangle> triangles;
dst_picture->fill_triangles(triangles, yellow);
std::vector<x::w::picture::base::point> points;
dst_picture->fill_tri_strip(points, yellow);
dst_picture->fill_tri_fan(points, yellow);
constexpr rgb yellow
Standard HTML 3.2 color.
Definition rgb.H:117

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).

◆ picture_internal

typedef ref<pictureObj::implObj> x::w::picture_internal

An internal implementation object of a picture.

◆ 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.

◆ pixmap_points_of_interest_t

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.

◆ pixmap_with_picture

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.

◆ pixmapptr

A nullable pointer to a pixmap.

See also
pixmap

◆ 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

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.

◆ popup_list_appearanceptr

A nullable pointer reference to a popup list appearance properties.

See also
popup_list_appearance

◆ popupptr

A nullable pointer reference to a popup.

◆ print_callback_t

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.

◆ print_dialog

Select a printer and print options.

#include <x/w/print_dialog.H>
#include <x/w/print_dialog_config.H>
#include <x/cups/job.H>
x::w::print_dialog_config config;
config.print_callback=[]
(const x::w::print_callback_info &info)
{
x::cups::job job=info.job;
x::ref<x::obj> wait_mcguffin=info.wait_mcguffin;
// ...
};
config.cancel_callback=[]
{
// ...
};
x::w::print_dialog pd=main_window->create_print_dialog("print_dialog", config, true);
// ...
pd->initial_show();
// ...
ref< jobObj > job

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.

Dialog configuration

x::w::print_dialog_config specifies the following dialog options.

  • print_callback: this callback gets executed by the print dialog's "Print" button. The "Print" button closes its dialog before invoking the callback, passing it a x::w::print_callback_info parameter. The parameter's shining star is a x::cups::job object with the selected print options already set. The co-star is the opaque wait mcguffin which blocks pointer and keyboard press events for print dialog's parent main window. Printing a document is typically a time consuming process, so the wait mcguffin gets created and passed as a parameter to this callback.
  • cancel_callback: this callback gets executed if the print dialog gets closed by its "Cancel" button, or if it gets closed by the window manager.
Opening the print dialog

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.

Printing a document

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).

◆ print_dialog_appearance

Appearance of the print_dialog dialog.

Specifies various properties of a print_dialog. The default properties are set by the current display theme.

x::w::print_dialog_config config{
// ...
};
x::w::const_print_dialog_appearance custom=x::w::print_dialog_appearance::base::theme()
->modify([]
(const x::w::print_dialog_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ print_dialog_appearanceptr

A nullable pointer reference to a print dialog appearance.

See also
print_dialog_appearance

◆ print_dialogptr

A nullable pointer reference to a print dialog.

See also
print_dialog

◆ progressbar

A progress indication bar

x::w::progressbar
pb=factory->create_progressbar(
[]
(const auto &)
{
// ...
});
pb->update(
15, 50,
[]
(ONLY IN_THREAD)
{
});

A widget created by a factory's create_progressbar().

◆ progressbar_appearance

Appearance of a progress bar.

Specifies various properties of a progress bar. The default properties are set by the current display theme.

x::w::progressbar_config config;
x::w::const_progressbar_appearance custom=x::w::progressbar_appearance::base::theme()
->modify([]
(const x::w::progressbar_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;
x::w::progressbar
pb=factory->create_progressbar(
[]
(const auto &)
{
// ...
},
config);

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.

◆ progressbar_appearanceptr

A nullable pointer reference to a progressbar appearance.

See also
progressbar_appearance

◆ progressbarptr

A nullable pointer reference to a progress bar.

See also
progressbar

◆ rectarea

typedef std::vector<rectangle> x::w::rectarea

An area defined by a list of rectangles.

◆ redraw_priority_t

We get better visual results when widgets get redrawn in a particular order.

◆ rgb_component_squared_t

Value type that can be used for scaling rgb components.

◆ rgb_component_t

typedef uint16_t x::w::rgb_component_t

Value type for RGB components.

◆ rgb_gradient

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.

◆ 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.

◆ richtextcursorlocation

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.

◆ richtextcursorlocationowner

The object that owns a richtextcursorlocation.

Inherited by richtextiterator. This object is responsible for initializing and deinitalizing the richtextcursorlocation

◆ richtextcursorlocationownerptr

A nullable pointer reference to a richtextcursorlocationowner.

See also
richtextcursorlocationowner

◆ richtextfragment

A fragment of unicode text, ending at an allowed or a mandatory line break.

◆ richtextfragmentptr

A nullable pointer reference to a text fragment.

◆ 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.

iterator positions.
auto q=p->begin();
auto q=p->end();
auto q=p->clone();
size_t offset=p->pos();
auto q=p->pos(offset);

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.

Note
The contents of the underlying object can be changed at any by the connection thread. A consistent view of a richtextiterator to an input field requires obtaining an input field lock.

◆ richtextiteratorptr

A nullable pointer reference to a rich text iterator.

◆ richtextparagraph

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.

◆ richtextptr

A nullable pointer reference to a rich text string.

◆ scratch_buffer

A picture and a pixmap used for preparing widget images.

This is returned by screen object's create_scratch_buffer().

◆ scratch_bufferptr

A nullable pointer reference to a scratch buffer.

◆ screen

A screen on a display server.

auto s=x::w::screen::create();
auto s=x::w::screen::create(1);
auto s=x::w::screen::create(x::w::connection::create("localhost:0.0"));
auto s=x::w::screen::create(x::w::connection::create("localhost:0.0"), 1);
x::w::connection conn=s->get_connection()

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.

#include <x/w/main_window.H>
x::w::main_window main_window=s->create_mainwindow(
[]
(const x::w::main_window &main_window)
{
},
x::w::new_gridlayoutmanager{});

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.

x::w::screen_positions_t screen_positions=
x::w::load_screen_positions(x::configdir("app@example.com") + "/windows");
x::w::main_window_config config;
config.screen_position(screen_positions, "main");
x::w::main_window main_window=s->create(config,
[]
(const x::w::main_window &new_main_window)
{
// Initialize the new main window.
});
static auto create(Args_t &&...args) LIBCXX_INLINE

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.

Note
If the saved position includes a screen number, the window will really be opened on its former screen, which may not necessarily be this screen.

A main window may also be created directly:

#include <x/w/main_window.H>
auto main_window=x::w::main_window::create(
[]
(const x::w::main_window &main_window)
{
},
x::w::new_gridlayoutmanager{});

This creates a new main window on the default screen of the default X server.

x::w::dim_t width=s->width_in_pixels();
x::w::dim_t height=s->height_in_pixels();
x::w::dim_t widthmm=s->width_in_millimeters();
x::w::dim_t heightmm=s->height_in_millimeters();

Determine the size of the screen.

x::w::rectangle size=s->get_workarea();

get_workarea() returns the screen's work area, the usable area of the screen.

Selections
bool flag=conn->selection_has_owner("SECONDARY");

For convenience, this is forwarded to this screen's connection.

◆ screen_positions

Memorized positions of main windows on the screen.

#include <x/config.H>
auto my_screen_positions=x::w::screen_positions::create();
auto configfile=x::configdir("app@example.com") + "/windows";
auto my_screen_positions=x::w::screen_positions::create(configfile);
x::w::main_window_config config;
config.screen_position(my_screen_positions, "main");
auto main_window=x::w::main_window::create(config,
[]
(const x::w::main_window &new_main_window)
{
// Initialize the new main window.
});
main_window->save("main", my_screen_positions);
my_screen_positions->save();
Restoring the main window's previous size and position.

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.

Memorizing the main window's 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.

◆ screen_positions_handle

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.

◆ screen_positions_handleptr

A nullable pointer reference to screen_positions_handle.

See also
screen_positions_handle

◆ screen_positionsptr

A nullable pointer reference to memorized screen positions.

See also
screen_positions

◆ scroll_v_t

typedef number<uint32_t, scroll_v_tag> x::w::scroll_v_t

Discrete data type for scrollbar values.

◆ scrollbar

A scroll-bar widget.

sb->set(4);
sb->set(IN_THREAD, 4);
x::w::scrollbar_config config;
config.range=110;
config.page_size=10;
config.increment=5;
sb->reconfigure(sb);
sb->reconfigure(IN_THREAD, sb);
auto v=sb->get_value();
auto v=sb->get_dragged_value();

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.

Scrollbar configuration

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.

sb->on_update([]
(ONLY IN_THREAD,
const x::w::scrollbar_info_t &info)
{
});

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.

Note
The initial invocation of a replacement callback gets executed by the library's internal execution thread, and may happen before or after on_update() returns.

set(), reconfigure(), and on_update() are overloaded with an initial IN_THREAD parameter, to be invoked from another callback in the connection thread.

◆ scrollbar_appearance

Appearance of the scrollbar_config.

Specifies various properties of a scrollbar. The default properties are set by the current display theme.

x::w::scrollbar_config config{
// ...
};
x::w::const_scrollbar_appearance custom=x::w::scrollbar_appearance::base::theme()
->modify([]
(const x::w::scrollbar_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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.

◆ scrollbar_appearanceptr

A nullable pointer reference to a scrollbar appearance.

See also
scrollbar_appearance

◆ scrollbar_cb_t

Callback that reports the scrollbar's updated values.

◆ 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.

x::w::scrollbar_images_config config{
// ...
};
x::w::const_scrollbar_images_appearance custom=x::w::scrollbar_images_appearance::base::horizontal1()
->modify([]
(const x::w::scrollbar_images_appearance &custom)
{
// Modify custom->...
});
config.appearance=custom;

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).

◆ scrollbar_images_appearanceptr

A nullable pointer reference to a WHATITIS.

See also
scrollbar_images_appearance

◆ scrollbarptr

A nullable pointer reference to a scrollbar.

See also
scrollbar

◆ singletonlayoutmanager

A layout manager for one element only.

Shared code for layout managers that have a single child element.

x::element e=l->get();
x::factory f=l->replace();

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.

◆ singletonlayoutmanager_generator

Generate something in the singleton layout manager.

See also
uigenerators

◆ singletonlayoutmanagerptr

A nullable pointer reference to a singleton layout manager.

See also
singletonlayoutmanager

◆ source_dnd_formats_t

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.

◆ stabilized_callback_t

on_stabilized() callback type.

◆ standard_combobox_selection_changed_t

Callback that gets invoked when a standard combo-box's selection changes.

◆ standard_comboboxlayoutmanager

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.

lm->append_items("Item");
lm->insert_items(0, "Item");
lm->remove_item(0);
lm->replace_all({"Lorem","Ipsum"});
std::vector<size_t> index;
lm->resort_items(index);

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_t n=lm->size();
x::w::text_param s=lm->item(0);

size() returns the number of items in the list, and item() returns the given item number.

lm->autoselect(1);
std::optional<size_t> n=lm->selected();
if (n)
{
size_t i=n.value();
lm->unselect();
}

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.

x::w::standard_combobox_lock lock{lm};

A x::w::standard_combobox_lock may be instantiated in order to lock access to the combo-box's items.

Enabling and disabling list items.

Standard combo-boxes inherit the enabled() method from the underlying list layout manager, in order to enable or disabling individual list items.

Internal thread methods

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.

Generating contents from an XML-based specification
lm->generate("standard-combobox-layout", generators, elements);

generate() generates the contents of the combo-box from the loaded theme file. See the tutorial for more information.

◆ standard_comboboxlayoutmanager_generator

Generate something in the standard combobox layout manager.

See also
uigenerators

◆ standard_comboboxlayoutmanagerptr

A nullable pointer reference to a standard combox-box layout manager.

See also
standard_comboboxlayoutmanager

◆ standard_dialog_elements_t

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

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.

◆ synchronized_axisptr

A nullable pointer reference to a synchronized axis.

See also
synchronized_axis

◆ table_appearance

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.

x::w::new_tablelayoutmanager lm{
// ...
};
x::w::const_table_appearance custom=x::w::table_appearance::base::theme()
->modify([]
(const x::w::table_appearance &custom)
{
// Modify custom->...
});
lm.extra_table_appearance=custom;

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.

◆ table_appearanceptr

A nullable pointer reference to a table header row appearance.

See also
table_appearance

◆ table_headers_param_t

Parameter for table_headers()

◆ tablelayoutmanager

The table layout manager

x::w::new_tablelayoutmanager new_table{
{
[]
(const x::w::factory &f)
{
f->create_label("Column 1")->show();
},
[]
(const x::w::factory &f)
{
f->create_label("Column 2")->show();
}
}
};
x::w::focusable_container list=f->create_focusable_container(
[]
(const x::w::focusable_container &c)
{
x::w::tablelayoutmanager tbl=c->get_layoutmanager();
},
new_table);

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.

Table width
new_table.minimum_column_widths={
{0, 20},
{1, 20}};
new_table.width=60;
new_table.maximum_table_width=80;
new_table.unlimited_table_width();

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.

Note
The ability of the table to resize itself depends on other elements in its container. These settings have no effect beyond the resulting table. Whether, and to what extent, the table ends up resizable depends entirely on the table's container's layout manager.
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.
new_table.adjustable("table1");
new_table.column_borders={
{1, "thin_0%"},
{2, "thin_dashed_0%"},
};

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.

Accessing and modifying the table's headers
x::w::element e=tbl->header(0);
x::w::factory f=tbl->replace_header(0);

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.

Saving and restoring column widths
x::new_tablelayoutmanager ntlm;
ntlm.restore("main-table");

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

◆ tablelayoutmanager_generator

Generate something in the table layout manager.

See also
uigenerators

◆ tablelayoutmanagerptr

A nullable pointer reference to a table layout manager.

See also
tablelayoutmanager

◆ text_color_arg

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

◆ text_event_t

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.

◆ 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:

  • a x::w::focus_change value, either x::w::focus_changed::gained or x::w::focus_changed::gained indicating that the hotspot area gains or loses keyboard or pointer focus.
  • a pointer to either a x::w::key_event or a x::w::button_event that activates or clicks on the hotspot.

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.

◆ text_hotspotptr

A nullable pointer to a focusable label hotspot callback.

See also
text_hotspot

◆ textlabel

Text label interface.

Specifies the interface for a widget that contains a text label.

See also
label
focusable_label

◆ textlabelptr

A nullable pointer reference to an text label.

See also
textlabel

◆ theme_color_t

A theme color is either an rgb solid color, or a gradient color.

◆ theme_font_elementObj

template<typename base , typename arg1 = void, typename ... args>
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.

Constructors

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.

◆ themeborder_elementObj

template<typename base , typename arg1 = void, typename ... args>
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.

◆ 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.

◆ themedim_elementObj

template<typename base , typename arg1 = void, typename ... args>
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.

◆ THREAD_CALLBACK

Alternative syntactic sugar for thread-only invoked callbacks.

element->on_state_update([]
{
method(IN_THREAD);
});

Alternative syntactic sugar for declaring callbacks that get invoked by the library's internal execution thread.

◆ tick_clock_t

typedef std::chrono::steady_clock x::w::tick_clock_t

A clock for regularly-scheduled callbacks.

◆ toolbox_info_t

typedef mpobj<toolbox_info, std::recursive_mutex> x::w::toolbox_info_t

◆ toolboxfactory

A toolbox factory.

A factory that adds new widgets to a container with a toolbox layout manager.

◆ toolboxfactory_generator

Generate something using a toolbox factory.

See also
uigenerators

◆ toolboxfactoryptr

A nullable pointer reference to a toolbox factory.

See also
toolboxfactory

◆ toolboxlayoutmanager

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.

#include <x/w/toolboxfactory.H>
x::w::new_toolboxlayoutmanager ntlm;
f->create_container([]
(const x::w::container &c)
{
x::w::toolboxlayoutmanager tlm=
c->get_layoutmanager();
x::w::toolboxfactory f=tlm->append_tools();
},
ntlm);
// ...
x::w::toolboxfactory f=tlm->insert_tools(2);
tlm->remove_tool(0);
tlm->remove_tools(0, 2);
size_t n=tlm->size();

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.

◆ toolboxlayoutmanager_generator

Generate something in the toolbox layout manager.

See also
uigenerators

◆ toolboxlayoutmanagerptr

A nullable pointer reference to a toolboxlayoutmanager.

See also
toolboxlayoutmanager

◆ tooltip_appearance

Appearance of a new tooltip_factory.

Specifies various properties of a tooltip. The default properties are set by the current display theme.

element->create_custom_tooltip
([]
(ONLY IN_THREAD,
const x::w::tooltip_factory &f)
{
x::w::const_tooltip_appearance custom=x::w::tooltip_appearance::base::tooltip_theme()
->modify([]
(const x::w::tooltip_appearance &custom)
{
// Modify custom->...
});
f.appearance=custom;
//
});
x::w::static_tooltip_config stc;
stc.appearance=std.appearance->modify
([]
(const x::w::tooltip_appearance &custom)
{
// Modify custom->...
});
STL namespace.

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

◆ tooltip_appearanceptr

A nullable pointer reference to a tooltip appearance.

See also
tooltip_appearance

◆ 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.

x::w::const_tooltip_border_appearance custom=x::w::tooltip_border_appearance::base::theme()
->modify([]
(const x::w::tooltip_border_appearance &custom)
{
// Modify custom->...
});

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.

◆ tooltip_border_appearanceptr

A nullable pointer reference to a WHATITIS.

See also
tooltip_border_appearance

◆ 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).

x::w::const_uigenerators generators=x::w::uigenerators::create("dialogs.xml");

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.

x::w::uielements factories{
{
{"label",
[&]
(const x::w::factory &f)
{
f->create_label("Lorem ipsum");
}
},
{"button",
[&]
(const x::w::factory &f)
{
f->create_button("Lorem ipsum");
}
},
}
};
x::w::gridlayoutmanager gml=container->get_layoutmanager();
gml->generate("main", generators, elements);

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.

◆ uigeneratorsptr

A nullable pointer reference to compiled widget generators.

See also
uigenerators

◆ updated_position_container_t

Internal container used in widget position update processing.

◆ updated_position_widgets_t

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.

◆ validated_input_field

template<typename type >
using x::w::validated_input_field = typedef ref<validated_input_fieldObj<type> >

Most recently validated value in the input_field.

#include <x/w/validated_input_field.H>
x::w::validated_input_field<int> validated_int_value=
input_field->set_string_validator(
[]
(ONLY IN_THREAD,
const std::string &value,
int *parsed_value,
x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger) -> std::optional<int>
{
// ...
},
[]
(int n) { return std::to_string(n) });

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_contents<int> validated_int_contents=validated_int_value->contents;

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()
validated_int_value->set(5);
validated_int_value->set(std::nullopt);
validated_int_value->set(IN_THREAD, 5);

set() reinitializes the input field with a new value. std::nullopt specifies to value set, the input field gets cleared.

Note
The non-IN_THREAD overload does not immediately update the value(), but forwards a message to the connection thread, which updates the value and the input field widget.
The validated_input_field object owns a reference on the underlying x::w::input_field widget.
x::w::validated_input_field_contents<int> contents=validated_int_value->contents;

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.

◆ validated_input_field_contents

template<typename type >
using x::w::validated_input_field_contents = typedef ref<validated_input_field_contentsObj<type> >

Current contents of a validated input field

x::validated_input_field_contents<int> value;
std::optional<int> last_value=value->value();
int last_value=value->value_or(0);
value->access([]
(const std::optional<int> &value)
{
});

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.

value->set(IN_THREAD,
lock,
3);

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.

x::w::validated_input_field_contents<int> contents=value->contents;

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.

◆ validated_input_field_contentsptr

template<typename type >
using x::w::validated_input_field_contentsptr = typedef ptr<validated_input_field_contentsObj<type> >

A nullable pointer reference to a validated input field contents.

See also
validated_input_field_contents

◆ validated_input_fieldptr

template<typename type >
using x::w::validated_input_fieldptr = typedef ptr<validated_input_fieldObj<type> >

A nullable pointer reference to a validated input field value.

See also
validated_input_field

◆ xcoord_t

typedef number<int16_t, xcoord_tag> x::w::xcoord_t

An X protocol coordinate is a 16 bit value.

◆ xdim_t

typedef number<uint16_t, xdim_tag> x::w::xdim_t

A dimension (size) in the X protocol is a 16 bit value.

Enumeration Type Documentation

◆ attached_to

enum class x::w::attached_to
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.

Enumerator
below_or_above 

Below, if there's room, else above.

above_or_below 

Above, if there's room, else below.

right_or_left 

To the right, if there's room else to the left.

tooltip_right 

Tooltip displayed to the right of the pointer position.

Used internally by regular tooltips. Do not specify when creating a static tooltip.

tooltip_left 

Tooltip displayed to the left of the pointer position.

Used internally by regular tooltips. Do not specify when creating a static tooltip.

◆ bidi

enum class x::w::bidi
strong

Bi-directional text direction.

Enumerator
automatic 

Automatically determine the direction of bi-directional text.

Uses the Unicode bi-directional algorithm to determine the main direction (left to right or right to left) based on the first directional character in the text or the label.

left_to_right 

This text or label's main direction is left-to-right.

right_to_left 

This text or label's main direction is right-to-left.

◆ bidi_format

enum class x::w::bidi_format
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.

Note
Input fields do not preserve any directional override or isolate markers. They get removed from the initial contents of the input field, or from any explicitly set() contents, and the standard format retrieves the entered text without any directional override and isolate markers.
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.

◆ cut_or_copy_op

enum class x::w::cut_or_copy_op
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.

◆ dialog_position

enum class x::w::dialog_position
strong

Position of a new dialog with respect to its parent window.

Enumerator
default_position 

Default dialog position.

on_the_left 

Position the dialog to the left of the main window.

on_the_right 

Position the dialog to the right of the main window.

above 

Position the dialog above the main window.

below 

Position the dialog below the main window.

◆ enabled_for

enum class x::w::enabled_for
strong

The purpose of calling enabled()

Enumerator
input_focus 

Whether the widget can receive keyboard and pointer input.

shortcut_activation 

Whether to activate the shortcut related to this widget.

Even if this widget is enabled, if it's in a popup menu that's attached to a widget that's not visible or cannot receive input focus this keyboard shortcut is not active.

◆ file_dialog_type

enum class x::w::file_dialog_type
strong

Sets the behavior of a file dialog after selecting a file.

Enumerator
existing_file 

The selected file must exist and must be readable.

Otherwise an error message gets shown.

write_file 

If the selected file exists, it must be writable; if the selected file does not exist its directory must be writable.

Otherwise an error message gets shown.

create_file 

The selected file's directory must be writable, the permissions of any existing file are ignored.

Otherwise an error message gets shown.

◆ focus_change

enum class x::w::focus_change
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.

Enumerator
gained 

Gained focus.

lost 

Lost focus.

child_gained 

Child widget gained focus.

child_lost 

Child widget lost focus.

child_moved 

Focus moved to a different child widget.

gained_from_child 
lost_to_child 

Child lost focus for me, a gained event will follow.

focus_movement_complete 

After a lost focus, the focus was received by a child widget.

◆ get_location

enum class x::w::get_location
strong

Get the location index offset.

Analogous to new_location, when we read the existing cursor location, and compute the offset to the beginning of the text, the cursor location in its line fragment gets calculated based on this option.

Enumerator
lr 
bidi 

◆ halign

enum class x::w::halign
strong

Horizontal alignment.

Enumerator
left 
center 
right 
fill 

◆ icon_scale

enum class x::w::icon_scale
strong

How to scale an icon.

Scale the icon size as close to the requested size as possible, to be at least as big as the requested size, or not bigger than the requested size.

Enumerator
nearest 
atleast 
nomore 

◆ input_change_type

enum class x::w::input_change_type
strong

Identifies what kind of a change the input field change callback gets invoked for.

  • deleted: characters were deleted.
  • inserted: characters were inserted.
  • set: set() was called.
Enumerator
deleted 
inserted 
set 

◆ input_filter_type

enum class x::w::input_filter_type
strong

Identifies the kind of a filtering event.

See also
input_field_filter_info
Enumerator
inserting 
deleting 
replacing 
move_only 

◆ motion_event_type

enum class x::w::motion_event_type
strong

Motion events are, sometimes, reported for other than real pointer motions.

Enumerator
real_motion 

Honest to goodness pointer motion event.

button_event 

X & Y coordinates for a button event.

button_action_event 

X & Y cooridnates for a button event that activates something.

enter_event 

Pointer entered this display event.

keyboard_action_event 

Simulated motion by keyboard activity.

◆ new_location

enum class x::w::new_location
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 

◆ peephole_algorithm

enum class x::w::peephole_algorithm
strong

Peephole sizing algorithm.

See also
peephole_style
Enumerator
automatic 

Default sizing algorithm.

We take the width/height of the peepholed element, the width/height of the peephole, and work with it.

This is used mostly internally by the library in situation where the peephole's container completely controls the peephole size. For example, the peephole is in a container that uses the grid layout manager, with the peephole's width or height alignment set to 'fill'.

stretch_peephole 

Stretch the peephole to match the peepholed element's dimension.

Always set the width or the height of the peephole to match the width or height of the peepholed widget. This effectively turns this peephole into a single-dimension peephole. If the width gets stretched, the peephole operates only in the vertical dimension, and vice versa

◆ peephole_scroll

enum class x::w::peephole_scroll
strong

How a peephole scrolls elements that gain focus into view.

See also
peephole_style
Enumerator
minimal 

Scroll the peephole minimally.

centered 

Try to keep the input focus centered in the peephole.

◆ richtext_dir

enum class x::w::richtext_dir : unsigned char
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.

◆ scrollbar_visibility

enum class x::w::scrollbar_visibility
strong

Specify when a scroll-bar is visible.

Enumerator
never 

Never show the scroll-bar.

always 

Always show the scroll-bar, even when there's nothing to scroll.

automatic 

The scroll-bar appears only when there's something to scroll.

automatic_reserved 

Same as automatic, but reserve the space for the scroll-bar in advance.

The scroll-bar is not visible when there's nothing to scroll, and a blank area appears in its place.

◆ temperature

enum class x::w::temperature
strong

Current temperature of an activatable widget.

Enumerator
cold 

Pointer not inside the hotspot, hotspot does not have input focus, nothing is pressed.

warm 

Pointer is inside the hotspot, or it has input focus, nothing is pressed.

hot 

Space, enter, or button 1 is pressed.

◆ text_decoration

enum class x::w::text_decoration
strong

Optional text decorations.

This specifies the following text parameters decorations:

  • underline: draw an underline
  • none: remove all decorations
Enumerator
none 
underline 

◆ themedimaxis

enum class x::w::themedimaxis
strong

Whether the theme dimension is width or height.

Enumerator
width 
height 

◆ valign

enum class x::w::valign
strong

Vertical alignment.

Enumerator
top 
middle 
bottom 
fill 

◆ visual_class_t

enum class x::w::visual_class_t
strong

Visual class.

Enumerator
static_gray 
gray_scale 
static_color 
pseudo_color 
true_color 
direct_color 

Function Documentation

◆ add()

rectarea x::w::add ( const rectarea ,
const rectarea ,
coord_t  offsetx = 0,
coord_t  offsety = 0 
)

Add two rectangle sets together.

The returned rectangle set consists of all the combined rectangles, with all overlapping areas removed.

offsetx and offsety are added to all rectangles' returned coordinates.

References add().

Referenced by add().

◆ adjust_descender_for_underline()

dim_t x::w::adjust_descender_for_underline ( dim_t  ascender,
dim_t  descender 
)

◆ bidi_override() [1/2]

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().

◆ bidi_override() [2/2]

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().

◆ bounds()

rectangle x::w::bounds ( const rectarea )

Return a bounding rectangle for the given rectangle set.

References bounds().

Referenced by bounds().

◆ create_always_visible_focusframe_impl()

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_focusframe_container()

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().

◆ create_focusframe_container_owner()

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().

◆ create_label_tooltip()

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().

◆ create_nonrecursive_visibility_focusframe_impl()

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_string_validated_input_field_contents()

template<typename T , input_field_string_validation_function< T > validation_function, typename canonical_format_functor , typename new_value_functor >
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.

const auto &[callback, contents] = create_string_validated_input_field_contents<int>(
[]
(ONLY IN_THREAD,
const std::string &unparsed_value,
std::optional<int> &value,
x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger)
{
if (value)
{
if (*value > 99)
{
lock.stop_message("Invalid number");
value.reset();
return;
}
}
},
[]
(int v) -> std::string
{
return std::to_string(v);
},
std::nullopt,
[]
(ONLY IN_THREAD, int v)
{
std::cout << "New value: " << *v << std::endl;
});

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

  • the closure gets invoked IN_THREAD.
  • a std::string with the input field's unparsed contents
  • a reference to a std::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).
  • an input lock and a trigger, they serve the same purpose as the corresponding parameters to the analogous create_validated_input_field_contents() callback.

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().

◆ create_validated_input_field_contents()

template<input_field_validation_function validation_function, typename canonical_format_functor , typename new_value_functor >
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.

[]
(ONLY IN_THREAD,
const std::string &value,
x::w::input_lock &lock,
const x::w::callback_trigger_t &trigger)-> std::optional<int>
{
std::istringstream i{value};
int n;
if (i >> n)
return n;
lock.stop_message("Numeric input required");
return std::nullopt;
},
[]
(int v) -> std::string
{
return std::to_string(v);
},
std::nullopt,
[]
(ONLY IN_THREAD, int v)
{
std::cout << "New value: " << *v << std::endl;
});
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 >
Definition validated_input_field.H:318

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:

  • the closure gets invoked IN_THREAD.
  • either a 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.
  • a reference to an x::w::input_lock on its own field, for convenience.
  • the triggering event.

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:

  • the initial value of the input field, or std::nullopt.
  • a third closure that gets called after the input field's validated value changes, and it receives the new validated value.

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().

◆ default_button()

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().

◆ default_paragraph_embedding_level()

unicode_bidi_level_t x::w::default_paragraph_embedding_level ( )

◆ get_focus_after_in_thread()

void x::w::get_focus_after_in_thread ( ONLY  IN_THREAD,
const focusable me,
const focusable other 
)

◆ get_focus_before_in_thread()

void x::w::get_focus_before_in_thread ( ONLY  IN_THREAD,
const focusable me,
const focusable other 
)

◆ get_focus_impl_after_in_thread()

void x::w::get_focus_impl_after_in_thread ( ONLY  IN_THREAD,
const focusable me,
const focusable_impl a 
)

◆ in_focus()

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().

◆ intersect() [1/2]

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().

◆ intersect() [2/2]

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().

◆ is_next_key()

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().

◆ is_prev_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().

◆ list_style_by_name()

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().

◆ next_key_pressed()

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().

◆ next_page_key()

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().

◆ next_page_key_pressed()

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().

◆ normal_button()

const button_config & x::w::normal_button ( )

Returns default appearance of a normal button.

References normal_button().

Referenced by normal_button().

◆ operator""_color()

theme_color x::w::operator""_color ( const char *  ,
size_t   
)

Theme color name.

"0%"_color specifies a theme font in a text parameter.

◆ operator""_decoration()

text_decoration x::w::operator""_decoration ( const char *  ,
size_t   
)

Text decorations.

"underline"_decoration and "no"_decoration are the only two possible values.

◆ operator""_font()

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:

"liberation mono; point_size=10; weight=bold"_font

"_theme_font" literal suffix is similar, except that the font name refers to a theme-specified font, with any attributes modifying it:

"label; point_size=10; weight=bold"_theme_font

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:

  • foundry=name

Sets the font's foundry name.

  • family=name

Sets the font's name. This is convenient for referencing a theme font and substituting a different font family.

"label; family=liberation mono"_theme_font

This takes the "label" theme font but sets the font family to "liberation mono".

  • point_size=n

Sets the font's size to n, which may be fractional. The font's size gets automatically scaled by the current theme.

  • scale=n

Multiply the font's size by n, which may be fractional.

  • weight=value

Sets the font's weight. "value" is one of: "thin", "light", "normal", "medium", "demibold", "bold", "heavy", or "extrablack".

  • slant=value

Sets the font's slant. "value" is one of: "roman", "italic", or "oblique".

  • width=value

Sets the font's width. "value" is one of: "condensed", "normal", or "expanded".

  • style=label

Sets the font's style. This is a font-specific property, that depends on the font.

  • spacing=value

Sets the font's spacing. "value" is one of: "proportional", "dual", "monospace", or "charcell".

◆ operator""_hotspot() [1/2]

start_hotspot x::w::operator""_hotspot ( const char *  ,
size_t   
)

Text hotspot identifier.

◆ operator""_hotspot() [2/2]

start_hotspot x::w::operator""_hotspot ( unsigned long long  )

Text hotspot identifier.

◆ operator""_image()

image_param x::w::operator""_image ( const char *  p,
size_t  n 
)
inline

"foo"_image specifies an image icon to be used in a list.

See also
image_param

◆ operator""_theme_font()

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.

◆ operator<<() [1/4]

std::ostream & x::w::operator<< ( std::ostream &  ,
const font  
)

Overload << operator.

References operator<<().

◆ operator<<() [2/4]

std::ostream & x::w::operator<< ( std::ostream &  ,
const rectangle  
)

Dump the rectangle into an output stream.

References operator<<().

◆ operator<<() [3/4]

std::ostream & x::w::operator<< ( std::ostream &  ,
const rgb  
)

Overload << operator.

References operator<<().

◆ operator<<() [4/4]

std::ostream & x::w::operator<< ( std::ostream &  o,
const element_state  
)

References operator<<().

◆ preserve_screen_number()

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().

◆ prev_key_pressed()

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().

◆ prev_page_key()

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().

◆ prev_page_key_pressed()

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().

◆ process_focusable_impls()

template<typename ... Args>
void x::w::process_focusable_impls ( const function< internal_focusable_cb > &  cb,
Args &&...  args 
)
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().

◆ process_focusable_impls_from_focusables()

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().

◆ select_key()

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().

◆ select_key_pressed()

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().

◆ subtract()

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().

◆ table_headers()

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

#include <x/w/label.H>
x::w::new_tablelayoutmanager new_table{
x::w::table_headers(
{
{"Column1", {}},
{"Column2", {}},
})
};

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().

◆ themedirroot()

std::string x::w::themedirroot ( )

Location of the directory with all the themes.

References themedirroot().

Referenced by themedirroot().

Variable Documentation

◆ aqua

constexpr rgb x::w::aqua {0, rgb::maximum, rgb::maximum}
constexpr

Standard HTML 3.2 color.

◆ bidi_format_names

const char x::w::bidi_format_names[3][16]
extern

For internal use.

◆ bidi_names

const char x::w::bidi_names[3][16]
extern

For internal use.

◆ black

constexpr rgb x::w::black {0, 0, 0}
constexpr

Standard HTML 3.2 color.

◆ blue

constexpr rgb x::w::blue {0, 0, rgb::maximum}
constexpr

Standard HTML 3.2 color.

◆ bulleted_list

const listlayoutstyle_impl& x::w::bulleted_list
extern

A bullet is to the left of each selected item.

◆ callback_trigger_button_event

constexpr size_t x::w::callback_trigger_button_event =2
constexpr

callback_trigger_t has a const x::w::button_event *.

std::variant index where one might find a button_event.

Note
The button event is not copyable, and gets destroyed when the callback returns.

◆ callback_trigger_cut_copy_paste

constexpr size_t x::w::callback_trigger_cut_copy_paste =7
constexpr

callback_trigger_t indicating a cut/copy/paste operation

std::variant index used in the following circumstances:

  • cut, copy, or paste operation

◆ callback_trigger_initial

constexpr size_t x::w::callback_trigger_initial =4
constexpr

callback_trigger_t initial invocation.

std::variant index used in the following circumstances:

  • with image buttons, indicating the callback's initial invocation.
  • internal use by editable combo-boxes indicating that the combo-box selection was made by auto-completion.
  • initial invocation from on_pointer_focus() and on_keyboard_focus().
  • initial invocation from date_input_field's on_change().
  • a new on_status callback is installed for a list item, and this reports the current list item status.

◆ callback_trigger_key_event

constexpr size_t x::w::callback_trigger_key_event =1
constexpr

callback_trigger_t has a const x::w::key_event *.

std::variant index where one might find a key_event.

Note
The key event is not copyable, and gets destroyed when the callback returns.

◆ callback_trigger_keyfocus_move

constexpr size_t x::w::callback_trigger_keyfocus_move =9
constexpr

callback_trigger_t indicating a forced keyboard focus move.

std::variant index used in the following circumstances:

  • request_focus was explicitly invoked.
  • a widget that has the current keyboard focus becomes disabled, hidden, or it gets removed completely, and keyboard focus is forced to move to the next widget that can received keyboard focus
  • a widget that could not immediately receive keyboard focus because it hasn't been enabled yet is now enabled, and forces a delayed keyboard focus move.
  • the window is visible, and the keyboard focus is moved to the first widget with the autofocus flag.

◆ callback_trigger_motion_event

constexpr size_t x::w::callback_trigger_motion_event =3
constexpr

std::variant index where one might find a motion_event.

Note
The motion event is not copyable, and gets destroyed when the callback returns.

◆ callback_trigger_next

constexpr size_t x::w::callback_trigger_next =6
constexpr

callback_trigger_t has a const x::w::next_key &.

The callback is getting invoked because TAB or NEXT button was pressed.

◆ callback_trigger_pointerfocus_move

constexpr size_t x::w::callback_trigger_pointerfocus_move =10
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:

  • the pointer left the parent window entirely.
  • the element with the pointer focus was remove from its parent window.

◆ callback_trigger_prev

constexpr size_t x::w::callback_trigger_prev =5
constexpr

callback_trigger_t has a const x::w::prev_key &.

The callback is getting invoked because SHIFT-TAB or BACK button was pressed

◆ callback_trigger_user_mod

constexpr size_t x::w::callback_trigger_user_mod =8
constexpr

callback_trigger_t indicating an user modification

std::variant index used in the following circumstances:

  • input field has been modified by calling set(). This trigger is seen by the input field's on_change() callback.

◆ clear_area

constexpr redraw_priority_t x::w::clear_area =0
staticconstexpr

This widget is expected to draw a clear area.

◆ fuchsia

constexpr rgb x::w::fuchsia {rgb::maximum, 0, rgb::maximum}
constexpr

Standard HTML 3.2 color.

◆ gray

constexpr rgb x::w::gray {rgb::maximum/2+1, rgb::maximum/2+1, rgb::maximum/2+1}
constexpr

Standard HTML 3.2 color.

◆ green

constexpr rgb x::w::green {0, rgb::maximum/2+1, 0}
constexpr

Standard HTML 3.2 color.

◆ halign_names

const char x::w::halign_names[4][8]
extern

halign text strings

Mostly for internal use.

◆ highlighted_list

const listlayoutstyle_impl& x::w::highlighted_list
extern

The list highlights items to indicate they're selected.

◆ lime

constexpr rgb x::w::lime {0, rgb::maximum, 0}
constexpr

Standard HTML 3.2 color.

◆ maroon

constexpr rgb x::w::maroon {rgb::maximum/2+1, 0, 0}
constexpr

Standard HTML 3.2 color.

◆ multiple_selection_type

const list_selection_type_cb_t x::w::multiple_selection_type
extern

Multiple selection list.

Multiple list items may be selected at any time.

◆ n_rgb_colors

const size_t x::w::n_rgb_colors
extern

How many rgb_colors there are.

◆ navy

constexpr rgb x::w::navy {0, 0, rgb::maximum/2+1}
constexpr

Standard HTML 3.2 color.

◆ no_selection_type

const list_selection_type_cb_t x::w::no_selection_type
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).

◆ olive

constexpr rgb x::w::olive {rgb::maximum/2+1, rgb::maximum/2+1, 0}
constexpr

Standard HTML 3.2 color.

◆ purple

constexpr rgb x::w::purple {rgb::maximum/2+1, 0, rgb::maximum/2+1}
constexpr

Standard HTML 3.2 color.

◆ red

constexpr rgb x::w::red {rgb::maximum, 0, 0}
constexpr

Standard HTML 3.2 color.

◆ rgb_color_names

const char* const x::w::rgb_color_names[]
extern

HTML 3.2 rgb color names.

◆ rgb_colors

const rgb x::w::rgb_colors[]
extern

HTML 3.2 rgb colors.

◆ scrollbar_visibility_names

const char x::w::scrollbar_visibility_names[4][20]
extern

scrollbar_visibility text strings

Mostly for internal use.

◆ selection_type_str

const char x::w::selection_type_str[4][16]
extern

◆ silver

constexpr rgb x::w::silver
constexpr
Initial value:
{(rgb::maximum/4+1)*3, (rgb::maximum/4+1)*3,
(rgb::maximum/4+1)*3}

Standard HTML 3.2 color.

◆ single_optional_selection_type

const list_selection_type_cb_t x::w::single_optional_selection_type
extern

Single, but optional, selection list.

Like single_selection_type(), but selecting the currently selected item again will deselect it.

◆ single_selection_type

const list_selection_type_cb_t x::w::single_selection_type
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.

◆ teal

constexpr rgb x::w::teal {0, rgb::maximum/2+1, rgb::maximum/2+1}
constexpr

Standard HTML 3.2 color.

◆ transparent

constexpr rgb x::w::transparent {0, 0, 0, 0}
constexpr

Transparent color.

◆ valign_names

const char x::w::valign_names[4][8]
extern

valign text strings

Mostly for internal use.

◆ white

constexpr rgb x::w::white {rgb::maximum, rgb::maximum, rgb::maximum}
constexpr

Standard HTML 3.2 color.

◆ widget_area

constexpr redraw_priority_t x::w::widget_area =1
staticconstexpr

Garden-variety widget.

◆ yellow

constexpr rgb x::w::yellow {rgb::maximum, rgb::maximum, 0}
constexpr

Standard HTML 3.2 color.