LibCXX Widget Toolkit


Index

LibCXX Widget Toolkit
Introduction
Status
Installation, and requirements
I. Tutorial
1. LibCXX overview
References
2. Hello world!
Building example programs
Basic concepts
Application identifiers and version
Widgets are reference-counted objects with smart pointers
Containers own references to the widgets in the container
Proper reference-counting is critical
Connection threads and callbacks
Callbacks
Containers
Creator lambdas
Layout managers
Factories
Exceptions
3. Text labels
Bi-directional labels
4. Word-wrapping labels
Using font literals
Customizing visual appearance of widgets
Modifying an appearance object
Caching appearance objects
Using an XML stylesheet to create an appearance object
5. Input fields and buttons
Input fields
Clipboards
Using x::w::input_field
Password input fields
Turning on an input field's password mode
Bi-directional input fields
Tooltips
Buttons
Shortcut activation
Element activation
Attaching application data to widgets
6. Date input fields
7. Validating input fields
Using on_validate()
Understanding references between input field-related objects and avoiding circular references
8. Filtered input fields
The on_filter() callback
Filtering cursor movements
Using on_default_filter()
on_default_filter() requirements
9. Static tooltips
Creating and destroying static tooltips
10. The item layout manager
Items
Using singleton objects
11. Input field spinners
Implementing spin buttons
12. Disabling input processing
13. Using focusable widgets
14. Checkboxes and radio buttons
Creating checkboxes and radio buttons
Radio group identifiers
Button labels
Customizing x::w::image_button labels
Setting checkbox and radio button state
Getting checkbox and radio button state
15. The grid layout manager
Nested containers
Setting the size of grid rows and columns
Callbacks and captures
16. The border layout manager
Creating a border with an optional title
Border title and background
Background colors and titles
17. The page layout manager
18. The book layout manager
The book page factory
The on_opened callback
An appdata example
19. Selection lists
Creating a list layout manager
Selecting multiple items in a list, and callbacks
Enabling and disabling list items
Modifying the contents of a list
List locks
Lists with multiple columns
20. Tables
Creating a table layout manager
Using x::w::table_headers()
Adjustable tables
Adjusting table column widths using the keyboard
Preserving table columns' widths
21. Hierarchical lists
Creating a hierarchical list
List item hierarchical indentation
Image icons in selection lists
22. Standard and editable combo-boxes
Creating a standard combo-box layout manager
Retrieving the standard combo-box's current selection
Using the standard combo-box with a pointer or a keyboard
Locking the combo-box
Editable combo-boxes
23. Search fields
Creating a search field
The search callback thread
Aborting searches
Processing search results
24. Menus
The menu bar layout manager
Retrieving the existing menus.
Using the list layout manager with menus
Menu item attributes
Separators
Using the mouse pointer or the keyboard with menus
25. Context popup menus
Creating the contents of the context popup menu
Creating new context popup menus on demand
Keyboard shortcuts for context popup menus
26. Copy/Cut/Paste menu items
Application menus with copy, cut, and paste items
Context menu popups with copy, cut, and paste items
27. The pane layout manager
Pane container's size
Creating new panes
Removing panes
Input focus and selection lists or tables
Configuring lists and tables in panes
Panes with synchronized lists
Preserving and restoring pane sizes
28. The peephole layout manager
Creating a peephole
Specifying the peephole's size
Ensuring visibility of widgets in a peephole
29. Dialogs
Dialog identifiers and configuration settings
Other dialog creation parameters
Standard dialog callbacks
File dialogs
Showing and hiding dialogs
Modal dialogs
x::w::main_windows own references on their dialogs
Custom dialogs
Ad-hoc error message dialogs
30. Print Dialog
Using the print dialog
Another singleton example
31. Progress bars
32. Scroll-bars
Creating and configuring scroll-bars
Scroll-bar's current value
33. Font and color pickers
Creating font and color pickers
Using the font picker
Using the color picker
34. Toolbox Dialogs
Creating a toolbox layout manager
Initial dialog position
The on_stabilized() callback
Custom images for checkbox and radio buttons
35. Splash windows
Creating splash windows
Using the standard HTML 3.2 color palette
36. Generating widgets from an XML theme file
37. Bi-directional text
Bi-directional text input
II. Custom widgets
38. Introduction
Public and implementation objects
Implementing a custom widget
39. Custom x::w::canvas
Horizontal and vertical metrics
Mixin templates
Drawing custom widgets
Scratch buffers
Overriding process_button_event()
40. Custom x::w::element widgets
Resizing a custom widget
41. Custom focusable x::w::element
Overriding keyboard_focus() and process_key_event()
Overriding elementObj::implObj's basic do_draw() method
Drawing the updated contents of a custom widget
Creating the standard input focus frame widget
Creating the standard input focus frame implementation object
The x::w::nonrecursive_visibilityObj template mixin
The x::w::always_visibleObj template mixin
The x::w::container_visibleObj template mixin
Creating the standard input focus frame public object
42. Custom x::w::container
The x::w::container_elementObj template mixin
Overriding pointer_focus()
43. Custom font rendering
Font collections
Theme font rendering
The x::themedim_elementObj template mixin.
Typical implementation of custom theme-aware custom widgets
III. Miscellaneous topics
44. Singleton windows
45. Connections and screens
Connection mcguffins
46. Connection threads and callbacks
Callback calling conventions
Callback invocations
Flushing the display buffers
47. Properties and debugging
Setting properties
Locked display when setting breakpoints in callbacks
Lockups at program startup
Lockups at program terminations
Windows no longer getting updated
A. Scalable X Graphics
Structure of an SXG file
Scaling and round-off errors
Scaling algorithm
Specifying fonts
Creating pictures
Creating solid color pictures
Defining a background color
Using theme colors
Using predefined locations and dimensions
Creating text pictures
Creating pixmaps
Graphic context commands
function
foreground
background
line_width
line_style
join_style
cap_style
fill_style
clip
dashes
line
fill and clear
fill_arc_mode
arcs
Picture render commands
op
repeat
clip
fill
composite
triangles
tristrip and trifan
Example SXG file
Using XInclude with SXG files
B. LibCXXW theme files
Creating generic widgets using named callbacks
Creating widgets directly from an XML theme file
Steps for creating generic widgets from a theme file
dims, colors, and borders
Using dims, colors, and borders from the default theme
Derivedcolors, and borders
Gradient colors
Specifying x::w::dim_axis_arg values
fonts
Other values in theme files
x::w::halign values
x::w::valign values
x::w::scrollbar_visibility values
x::w::text_param values
x::w::shortcut values
x::w::list_item_param values
x::w::bidi values
x::w::bidi_format values
containers
Common elements to all layouts
type=book layouts
Creating type=book layouts
type=book layout elements
append_pages and insert_pages
remove
open
close
type=bookpage factorys
halign
valign
set_appearance
add
type=border layouts
Creating type=border layouts
type=border layout elements
replace
update_border, update_borders
update_title
type=standard_combobox and type=editable_combobox layouts
Creating type=standard_combobox and type=editable_combobox layouts
Initializing x::w::new_standard_comboboxlayoutmanager and x::w::new_editable_comboboxlayoutmanager
Creating a type=editable_combobox with a validated input field
type=standard_combobox and type=editable_combobox layout elements
type=grid layouts
Creating type=grid layouts
type=grid layout elements
background_color
remove_background_color
halign
valign
padding
default_col_border and default_row_border
percent
remove_col_defaults and remove_row_defaults
remove_all, remove_row, remove_rows, and remove_cell
append_row, insert_row, append_columns, insert_columns, replace_row, and replace_cell
type=grid factorys
halign
valign
padding
border
colspan and rowspan
remove_when_hidden
elements and containers
type=item layouts
Creating type=item layouts
Initializing x::w::new_itemlayoutmanagers
type=item layout elements
append_item and insert_item
remove_item and remove_items
type=list layouts
Creating type=list layouts
Initializing x::w::new_listlayoutmanagers
type=list layout elements
append_items, replace_all_items, insert_items, and replace_items
remove_item and remove_items
autoselect
append_copy_cut_paste
type=menubar layouts
type=menubar factorys
Adding menus
type=page layouts
Creating type=page layouts
type=page layout elements
append and insert
open and <close/>
type=page factorys
type=pane layouts
Creating type=pane layouts
Initializing x::w::new_panelayoutmanager
type=pane layout elements
append_panes, insert_panes, replace_panes, remove_pane, <remove_all_panes/>, and replace_all_panes
type=pane factorys
type=peephole layouts
Creating type=peephole layouts
Initializing x::w::new_scrollable_peepholelayoutmanagers
type=table layouts
Creating type=table layouts
Initializing x::w::new_tablelayoutmanager
type=table layout elements
replace_header
append_items, replace_all_items, and other list layout manager methods
type=toolbox layouts
Creating type=toolbox layouts
Initializing x::w::new_toolboxlayoutmanager
type=toolbox layout elements
append_tools, insert_tools, remove_tool, and remove_tools
type=toolbox factorys
elements
type=elements factorys
Manual processing of an elements factory
Processing an elements factory after creating a new widget or container
show, hide, show_all, and hide_all
autofocus, get_focus_first, get_focus_before, get_focus_after, get_focus_before_me, get_focus_after_me, and request_focus
Creating tooltips
Creating context popup menus
Label element widgets
Specifying label options
Canvas element widgets
Focusable label element widgets
Button element widgets
Input field element widgets
Creating validated input fields
Date input field element widgets
Image element widgets
Checkbox element widgets
Radio element widgets
Progress bar element widgets
Color picker element widgets
Font picker element widgets
Scroll-bar element widgets
appearances
Creating and using appearance objects
Contents of appearances in theme files
std::optional and std::vector fields
cxxwcreator tool
C. Manual pages
cxxw — Show display diagnostic information for LibCXXW-based applications
cxxwtheme — Set default display theme for LibCXXW-based applications
cxxwcreatorLibCXXW UI creator
D. COPYING