Table of Contents
N_GUI_WIDGET
Module: GUI: allegro5 widget system with pseudo-windows
A single GUI widget.
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| float | y position y relative to parent window |
| float | x position x relative to parent window |
| float | w width |
| int | visible visibility flag |
| int | type widget type (N_GUI_TYPE_*) |
| char * | tooltip owned tooltip text shown after the pointer rests on the widget (NULL = none); heap-allocated with no length cap so long tooltips are not truncated |
| N_GUI_THEME | theme color theme for this widget |
| int | state current state flags (N_GUI_STATE_*) |
| N_GUI_SB_TRACK | sb_v the vertical scrollbar this widget draws inside itself, if it draws one, so the pointer can be tested against the bar rather than against the whole widget |
| N_GUI_SB_TRACK | sb_h and the horizontal one |
| char[128] | persist_key optional stable key for persisting this widget's user-adjustable state (splitpane divider ratio, datagrid column order/visibility/width) across sessions inside the layout JSON. |
| float | norm_y normalized position y (fraction of parent window h, used for SCALE resize) |
| float | norm_x normalized position x (fraction of parent window w, used for SCALE resize) |
| float | norm_w normalized width (fraction of parent window w) |
| float | norm_h normalized height (fraction of parent window h) |
| int | id unique widget id |
| float | h height |
| ALLEGRO_FONT * | font font used by this widget (NULL = context default) |
| int | enabled enabled flag (1 = enabled, 0 = disabled: drawn dimmed and ignores input) |
| void * | data widget-specific data (union via void pointer) |
Public Attributes Documentation
variable y
float y;
position y relative to parent window
variable x
float x;
position x relative to parent window
variable w
float w;
width
variable visible
int visible;
visibility flag
variable type
int type;
widget type (N_GUI_TYPE_*)
variable tooltip
char * tooltip;
owned tooltip text shown after the pointer rests on the widget (NULL = none); heap-allocated with no length cap so long tooltips are not truncated
variable theme
N_GUI_THEME theme;
color theme for this widget
variable state
int state;
current state flags (N_GUI_STATE_*)
variable sb_v
N_GUI_SB_TRACK sb_v;
the vertical scrollbar this widget draws inside itself, if it draws one, so the pointer can be tested against the bar rather than against the whole widget
variable sb_h
N_GUI_SB_TRACK sb_h;
and the horizontal one
variable persist_key
char[128] persist_key;
optional stable key for persisting this widget's user-adjustable state (splitpane divider ratio, datagrid column order/visibility/width) across sessions inside the layout JSON.
"" (the default) = not persisted. Set with n_gui_widget_set_persist_key.
variable norm_y
float norm_y;
normalized position y (fraction of parent window h, used for SCALE resize)
variable norm_x
float norm_x;
normalized position x (fraction of parent window w, used for SCALE resize)
variable norm_w
float norm_w;
normalized width (fraction of parent window w)
variable norm_h
float norm_h;
normalized height (fraction of parent window h)
variable id
int id;
unique widget id
variable h
float h;
height
variable font
ALLEGRO_FONT * font;
font used by this widget (NULL = context default)
variable enabled
int enabled;
enabled flag (1 = enabled, 0 = disabled: drawn dimmed and ignores input)
variable data
void * data;
widget-specific data (union via void pointer)
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