Table of Contents
- N_GUI_KVTABLE
- Public Attributes
- Detailed Description
- Public Attributes Documentation
- variable window_id
- variable value_placeholder
- variable user_data
- variable top_offset
- variable split_b
- variable split_a
- variable show_value
- variable show_enabled
- variable show_desc
- variable show_actions
- variable rows
- variable row_height
- variable padding
- variable on_remove
- variable nb_rows
- variable nb_active
- variable lbl_value
- variable lbl_key
- variable lbl_enabled
- variable lbl_desc
- variable key_placeholder
- variable init_win_w
- variable init_win_h
- variable header_height
- variable frac_cols
- variable ctx
- variable col_frac
- variable btn_add
N_GUI_KVTABLE
Module: GUI: allegro5 widget system with pseudo-windows
key-value table built from textareas, checkboxes, and buttons. More...
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| int | window_id parent window |
| char * | value_placeholder owned hint shown in each value textarea, or NULL |
| void * | user_data user data for callback |
| float | top_offset unscaled y offset of the header row from the window top (default 0), to reserve space above the table for other widgets |
| int | split_b splitpane widget ID of the divider after the second text column, or -1 |
| int | split_a splitpane widget ID of the divider after the first text column, or -1 |
| int | show_value 1 to show the Value column (default 1) |
| int | show_enabled 1 to show the enabled-checkbox column (default 1) |
| int | show_desc 1 to show the Description column (default 1) |
| int | show_actions 1 to show the per-row move-up / move-down / duplicate buttons (default 0) |
| N_GUI_KV_ROW[128] | rows row storage |
| float | row_height unscaled row height in pixels |
| float | padding unscaled padding in pixels |
| void(*)(int, void *) | on_remove callback on row removal |
| int | nb_rows total rows (including removed) |
| int | nb_active active row count |
| int | lbl_value label widget ID for "Value" header |
| int | lbl_key label widget ID for "Key" header |
| int | lbl_enabled label widget ID for "On" header |
| int | lbl_desc label widget ID for "Description" header |
| char * | key_placeholder owned hint shown in each key textarea, or NULL |
| float | init_win_w parent window width at create time |
| float | init_win_h parent window height at create time |
| float | header_height unscaled column-header row height |
| int | frac_cols visible text column count col_frac was computed for; when it changes the fractions reset to equal widths |
| N_GUI_CTX * | ctx GUI context. |
| float[3] | col_frac width fraction of each visible text column over the text area, summing to 1; user-adjusted by the column dividers |
| int | btn_add button widget ID for "+" add row |
Detailed Description
struct N_GUI_KVTABLE;
key-value table built from textareas, checkboxes, and buttons.
The text columns are separated by draggable dividers (split panes spanning the table height), so the user can widen a column whose content overflows; the trailing checkbox/action/remove cluster keeps its fixed width
Public Attributes Documentation
variable window_id
int window_id;
parent window
variable value_placeholder
char * value_placeholder;
owned hint shown in each value textarea, or NULL
variable user_data
void * user_data;
user data for callback
variable top_offset
float top_offset;
unscaled y offset of the header row from the window top (default 0), to reserve space above the table for other widgets
variable split_b
int split_b;
splitpane widget ID of the divider after the second text column, or -1
variable split_a
int split_a;
splitpane widget ID of the divider after the first text column, or -1
variable show_value
int show_value;
1 to show the Value column (default 1)
variable show_enabled
int show_enabled;
1 to show the enabled-checkbox column (default 1)
variable show_desc
int show_desc;
1 to show the Description column (default 1)
variable show_actions
int show_actions;
1 to show the per-row move-up / move-down / duplicate buttons (default 0)
variable rows
N_GUI_KV_ROW[128] rows;
row storage
variable row_height
float row_height;
unscaled row height in pixels
variable padding
float padding;
unscaled padding in pixels
variable on_remove
void(*)(int, void *) on_remove;
callback on row removal
variable nb_rows
int nb_rows;
total rows (including removed)
variable nb_active
int nb_active;
active row count
variable lbl_value
int lbl_value;
label widget ID for "Value" header
variable lbl_key
int lbl_key;
label widget ID for "Key" header
variable lbl_enabled
int lbl_enabled;
label widget ID for "On" header
variable lbl_desc
int lbl_desc;
label widget ID for "Description" header
variable key_placeholder
char * key_placeholder;
owned hint shown in each key textarea, or NULL
variable init_win_w
float init_win_w;
parent window width at create time
variable init_win_h
float init_win_h;
parent window height at create time
variable header_height
float header_height;
unscaled column-header row height
variable frac_cols
int frac_cols;
visible text column count col_frac was computed for; when it changes the fractions reset to equal widths
variable ctx
N_GUI_CTX * ctx;
GUI context.
variable col_frac
float[3] col_frac;
width fraction of each visible text column over the text area, summing to 1; user-adjusted by the column dividers
variable btn_add
int btn_add;
button widget ID for "+" add row
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