Table of Contents
- N_GUI_STYLE
- Public Attributes
- Detailed Description
- Public Attributes Documentation
- variable tooltip_max_w
- variable tooltip_fg
- variable tooltip_delay
- variable tooltip_border
- variable tooltip_bg
- variable titlebar_h
- variable title_padding
- variable title_max_w_reserve
- variable textarea_padding
- variable textarea_cursor_width
- variable textarea_cursor_blink_period
- variable tb_btn_spacing
- variable tb_btn_size
- variable tb_btn_right_margin
- variable tb_btn_glyph_thickness
- variable slider_value_label_offset
- variable slider_track_size
- variable slider_track_corner_r
- variable slider_track_border_thickness
- variable slider_handle_min_r
- variable slider_handle_edge_offset
- variable slider_handle_border_thickness
- variable shape_mode
- variable scrollbar_track_color
- variable scrollbar_thumb_padding
- variable scrollbar_thumb_min
- variable scrollbar_thumb_corner_r
- variable scrollbar_thumb_color
- variable scrollbar_size
- variable scroll_step
- variable radiolist_default_item_height
- variable radio_label_gap
- variable radio_inner_offset
- variable radio_circle_min_r
- variable radio_circle_border_thickness
- variable min_win_w
- variable min_win_h
- variable listbox_default_item_height
- variable link_underline_thickness
- variable link_color_normal
- variable link_color_hover
- variable label_padding
- variable item_text_padding
- variable item_selection_inset
- variable item_height_pad
- variable grip_size
- variable grip_line_thickness
- variable grip_color
- variable global_scrollbar_track_color
- variable global_scrollbar_thumb_padding
- variable global_scrollbar_thumb_min
- variable global_scrollbar_thumb_corner_r
- variable global_scrollbar_thumb_color
- variable global_scrollbar_thumb_border_color
- variable global_scrollbar_size
- variable global_scrollbar_border_thickness
- variable global_scroll_step
- variable dropmenu_max_visible
- variable dropdown_border_thickness
- variable dropdown_arrow_thickness
- variable dropdown_arrow_reserve
- variable dropdown_arrow_half_w
- variable dropdown_arrow_half_h
- variable combobox_max_visible
- variable combobox_max_dropdown_width
- variable checkbox_max_size
- variable checkbox_mark_thickness
- variable checkbox_mark_margin
- variable checkbox_label_offset
- variable checkbox_label_gap
N_GUI_STYLE
Module: GUI: allegro5 widget system with pseudo-windows
Global style holding every configurable layout constant. More...
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| float | tooltip_max_w widest a tooltip bubble's text may get before it word-wraps, in pixels (0 = wrap only at the display edge). |
| ALLEGRO_COLOR | tooltip_fg tooltip text color |
| float | tooltip_delay inner padding |
| ALLEGRO_COLOR | tooltip_border tooltip bubble border color |
| ALLEGRO_COLOR | tooltip_bg tooltip bubble background color |
| float | titlebar_h title bar height |
| float | title_padding padding left of title text |
| float | title_max_w_reserve pixels reserved right of title for truncation |
| float | textarea_padding |
| float | textarea_cursor_width cursor width in pixels |
| float | textarea_cursor_blink_period cursor blink period in seconds (full cycle on+off) |
| float | tb_btn_spacing gap between titlebar buttons |
| float | tb_btn_size titlebar button size (0 = auto: titlebar_h - 4) |
| float | tb_btn_right_margin right margin from window edge to rightmost button |
| float | tb_btn_glyph_thickness line thickness for titlebar button glyphs |
| float | slider_value_label_offset gap between slider end and value label |
| float | slider_track_size track width (vertical) or height (horizontal) |
| float | slider_track_corner_r track corner radius |
| float | slider_track_border_thickness track outline thickness |
| float | slider_handle_min_r minimum handle circle radius |
| float | slider_handle_edge_offset handle circle offset from edge |
| float | slider_handle_border_thickness handle border thickness |
| int | shape_mode global widget shape override: N_GUI_SHAPE_ROUNDED forces a rounded GUI, N_GUI_SHAPE_RECT forces a square one, and -1 (default) leaves each widget on its own shape (the dropmenu button + panel still default to rounded). |
| ALLEGRO_COLOR | scrollbar_track_color scrollbar track colour |
| float | scrollbar_thumb_padding thumb inset from track edge |
| float | scrollbar_thumb_min minimum thumb dimension |
| float | scrollbar_thumb_corner_r thumb corner radius |
| ALLEGRO_COLOR | scrollbar_thumb_color scrollbar thumb colour |
| float | scrollbar_size scrollbar track width/height |
| float | scroll_step pixels per mouse wheel notch for window auto-scroll |
| float | radiolist_default_item_height default item height for radiolist |
| float | radio_label_gap gap between circle and label text |
| float | radio_inner_offset inner filled circle shrink from outer |
| float | radio_circle_min_r minimum outer circle radius |
| float | radio_circle_border_thickness outer circle border thickness |
| float | min_win_w minimum window width (for resize) |
| float | min_win_h minimum window height (for resize) |
| float | listbox_default_item_height default item height for listbox |
| float | link_underline_thickness link underline thickness |
| ALLEGRO_COLOR | link_color_normal link colour (normal) |
| ALLEGRO_COLOR | link_color_hover link colour (hover) |
| float | label_padding horizontal padding each side |
| float | item_text_padding text padding inside list/combo/dropmenu items |
| float | item_selection_inset item highlight inset from left/right edges |
| float | item_height_pad min padding added to font height for item height |
| float | grip_size grip area size |
| float | grip_line_thickness grip line thickness |
| ALLEGRO_COLOR | grip_color grip line colour |
| ALLEGRO_COLOR | global_scrollbar_track_color global scrollbar track colour |
| float | global_scrollbar_thumb_padding global thumb inset from track edge |
| float | global_scrollbar_thumb_min global minimum thumb dimension |
| float | global_scrollbar_thumb_corner_r global thumb corner radius |
| ALLEGRO_COLOR | global_scrollbar_thumb_color global scrollbar thumb colour |
| ALLEGRO_COLOR | global_scrollbar_thumb_border_color global scrollbar thumb border colour |
| float | global_scrollbar_size global scrollbar track width/height |
| float | global_scrollbar_border_thickness global thumb border thickness |
| float | global_scroll_step pixels per mouse wheel notch for global scroll |
| int | dropmenu_max_visible default max visible items for dropmenu panel |
| float | dropdown_border_thickness dropdown panel border thickness |
| float | dropdown_arrow_thickness arrow stroke thickness |
| float | dropdown_arrow_reserve horizontal space reserved for the arrow on the right |
| float | dropdown_arrow_half_w horizontal half-extent of the arrow chevron |
| float | dropdown_arrow_half_h vertical half-extent of the arrow chevron |
| int | combobox_max_visible default max visible items for combobox dropdown |
| float | combobox_max_dropdown_width maximum dropdown width for N_GUI_COMBOBOX_AUTO_WIDTH (0 = display width) |
| float | checkbox_max_size maximum box size |
| float | checkbox_mark_thickness checkmark line thickness |
| float | checkbox_mark_margin checkmark inset from box edge |
| float | checkbox_label_offset horizontal offset from box edge to label text |
| float | checkbox_label_gap gap between box and label text |
Detailed Description
struct N_GUI_STYLE;
Global style holding every configurable layout constant.
Initialised with sensible defaults by n_gui_default_style(). Can be serialised/deserialised to/from JSON with n_gui_style_to_json / n_gui_style_from_json.
Public Attributes Documentation
variable tooltip_max_w
float tooltip_max_w;
widest a tooltip bubble's text may get before it word-wraps, in pixels (0 = wrap only at the display edge).
Without a cap a long tooltip on a wide display renders as one line the width of the screen, which is readable but miserable to read; ~50 characters per line is not
variable tooltip_fg
ALLEGRO_COLOR tooltip_fg;
tooltip text color
variable tooltip_delay
float tooltip_delay;
inner padding
seconds the pointer must rest on a widget before its tooltip shows
variable tooltip_border
ALLEGRO_COLOR tooltip_border;
tooltip bubble border color
variable tooltip_bg
ALLEGRO_COLOR tooltip_bg;
tooltip bubble background color
variable titlebar_h
float titlebar_h;
title bar height
variable title_padding
float title_padding;
padding left of title text
variable title_max_w_reserve
float title_max_w_reserve;
pixels reserved right of title for truncation
variable textarea_padding
float textarea_padding;
variable textarea_cursor_width
float textarea_cursor_width;
cursor width in pixels
variable textarea_cursor_blink_period
float textarea_cursor_blink_period;
cursor blink period in seconds (full cycle on+off)
variable tb_btn_spacing
float tb_btn_spacing;
gap between titlebar buttons
variable tb_btn_size
float tb_btn_size;
titlebar button size (0 = auto: titlebar_h - 4)
variable tb_btn_right_margin
float tb_btn_right_margin;
right margin from window edge to rightmost button
variable tb_btn_glyph_thickness
float tb_btn_glyph_thickness;
line thickness for titlebar button glyphs
variable slider_value_label_offset
float slider_value_label_offset;
gap between slider end and value label
variable slider_track_size
float slider_track_size;
track width (vertical) or height (horizontal)
variable slider_track_corner_r
float slider_track_corner_r;
track corner radius
variable slider_track_border_thickness
float slider_track_border_thickness;
track outline thickness
variable slider_handle_min_r
float slider_handle_min_r;
minimum handle circle radius
variable slider_handle_edge_offset
float slider_handle_edge_offset;
handle circle offset from edge
variable slider_handle_border_thickness
float slider_handle_border_thickness;
handle border thickness
variable shape_mode
int shape_mode;
global widget shape override: N_GUI_SHAPE_ROUNDED forces a rounded GUI, N_GUI_SHAPE_RECT forces a square one, and -1 (default) leaves each widget on its own shape (the dropmenu button + panel still default to rounded).
Buttons and comboboxes follow this when it is set. The widgets with no shape of their own (textareas, checkboxes, a frameless window's body, the combobox dropdown) round ONLY when it is N_GUI_SHAPE_ROUNDED, and stay square otherwise. Toggle with n_gui_set_shape_mode() for a round/square GUI.
variable scrollbar_track_color
ALLEGRO_COLOR scrollbar_track_color;
scrollbar track colour
variable scrollbar_thumb_padding
float scrollbar_thumb_padding;
thumb inset from track edge
variable scrollbar_thumb_min
float scrollbar_thumb_min;
minimum thumb dimension
variable scrollbar_thumb_corner_r
float scrollbar_thumb_corner_r;
thumb corner radius
variable scrollbar_thumb_color
ALLEGRO_COLOR scrollbar_thumb_color;
scrollbar thumb colour
variable scrollbar_size
float scrollbar_size;
scrollbar track width/height
variable scroll_step
float scroll_step;
pixels per mouse wheel notch for window auto-scroll
variable radiolist_default_item_height
float radiolist_default_item_height;
default item height for radiolist
variable radio_label_gap
float radio_label_gap;
gap between circle and label text
variable radio_inner_offset
float radio_inner_offset;
inner filled circle shrink from outer
variable radio_circle_min_r
float radio_circle_min_r;
minimum outer circle radius
variable radio_circle_border_thickness
float radio_circle_border_thickness;
outer circle border thickness
variable min_win_w
float min_win_w;
minimum window width (for resize)
variable min_win_h
float min_win_h;
minimum window height (for resize)
variable listbox_default_item_height
float listbox_default_item_height;
default item height for listbox
variable link_underline_thickness
float link_underline_thickness;
link underline thickness
variable link_color_normal
ALLEGRO_COLOR link_color_normal;
link colour (normal)
variable link_color_hover
ALLEGRO_COLOR link_color_hover;
link colour (hover)
variable label_padding
float label_padding;
horizontal padding each side
variable item_text_padding
float item_text_padding;
text padding inside list/combo/dropmenu items
variable item_selection_inset
float item_selection_inset;
item highlight inset from left/right edges
variable item_height_pad
float item_height_pad;
min padding added to font height for item height
variable grip_size
float grip_size;
grip area size
variable grip_line_thickness
float grip_line_thickness;
grip line thickness
variable grip_color
ALLEGRO_COLOR grip_color;
grip line colour
variable global_scrollbar_track_color
ALLEGRO_COLOR global_scrollbar_track_color;
global scrollbar track colour
variable global_scrollbar_thumb_padding
float global_scrollbar_thumb_padding;
global thumb inset from track edge
variable global_scrollbar_thumb_min
float global_scrollbar_thumb_min;
global minimum thumb dimension
variable global_scrollbar_thumb_corner_r
float global_scrollbar_thumb_corner_r;
global thumb corner radius
variable global_scrollbar_thumb_color
ALLEGRO_COLOR global_scrollbar_thumb_color;
global scrollbar thumb colour
variable global_scrollbar_thumb_border_color
ALLEGRO_COLOR global_scrollbar_thumb_border_color;
global scrollbar thumb border colour
variable global_scrollbar_size
float global_scrollbar_size;
global scrollbar track width/height
variable global_scrollbar_border_thickness
float global_scrollbar_border_thickness;
global thumb border thickness
variable global_scroll_step
float global_scroll_step;
pixels per mouse wheel notch for global scroll
variable dropmenu_max_visible
int dropmenu_max_visible;
default max visible items for dropmenu panel
variable dropdown_border_thickness
float dropdown_border_thickness;
dropdown panel border thickness
variable dropdown_arrow_thickness
float dropdown_arrow_thickness;
arrow stroke thickness
variable dropdown_arrow_reserve
float dropdown_arrow_reserve;
horizontal space reserved for the arrow on the right
variable dropdown_arrow_half_w
float dropdown_arrow_half_w;
horizontal half-extent of the arrow chevron
variable dropdown_arrow_half_h
float dropdown_arrow_half_h;
vertical half-extent of the arrow chevron
variable combobox_max_visible
int combobox_max_visible;
default max visible items for combobox dropdown
variable combobox_max_dropdown_width
float combobox_max_dropdown_width;
maximum dropdown width for N_GUI_COMBOBOX_AUTO_WIDTH (0 = display width)
variable checkbox_max_size
float checkbox_max_size;
maximum box size
variable checkbox_mark_thickness
float checkbox_mark_thickness;
checkmark line thickness
variable checkbox_mark_margin
float checkbox_mark_margin;
checkmark inset from box edge
variable checkbox_label_offset
float checkbox_label_offset;
horizontal offset from box edge to label text
variable checkbox_label_gap
float checkbox_label_gap;
gap between box and label text
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB