N_GUI_LABEL_DATA
Module: GUI: allegro5 widget system with pseudo-windows
static text label specific data
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| void * | user_data user data for callback |
| int | truncate how text too wide for the label is shortened: N_GUI_TRUNCATE_END (the default), N_GUI_TRUNCATE_START or N_GUI_TRUNCATE_PATH. |
| char[4096] | text text to display |
| int | sel_start selection start byte offset (-1 = no selection) |
| int | sel_end selection end byte offset (-1 = no selection) |
| int | sel_dragging 1 if mouse is actively dragging to select text |
| float | scroll_y vertical scroll offset for overflowing text (pixels) |
| void(*)(int widget_id, const char *link, void *user_data) | on_link_click callback when link is clicked (widget_id, link_url, user_data) |
| char[4096] | link optional hyperlink URL (empty string = no link) |
| ALLEGRO_BITMAP * | bg_bitmap optional bitmap for the label background (NULL = no background) |
| int | align text alignment: N_GUI_ALIGN_LEFT, N_GUI_ALIGN_CENTER, N_GUI_ALIGN_RIGHT |
Public Attributes Documentation
variable user_data
void * user_data;
user data for callback
variable truncate
int truncate;
how text too wide for the label is shortened: N_GUI_TRUNCATE_END (the default), N_GUI_TRUNCATE_START or N_GUI_TRUNCATE_PATH.
Not used by N_GUI_ALIGN_JUSTIFIED, which wraps
variable text
char[4096] text;
text to display
variable sel_start
int sel_start;
selection start byte offset (-1 = no selection)
variable sel_end
int sel_end;
selection end byte offset (-1 = no selection)
variable sel_dragging
int sel_dragging;
1 if mouse is actively dragging to select text
variable scroll_y
float scroll_y;
vertical scroll offset for overflowing text (pixels)
variable on_link_click
void(*)(int widget_id, const char *link, void *user_data) on_link_click;
callback when link is clicked (widget_id, link_url, user_data)
variable link
char[4096] link;
optional hyperlink URL (empty string = no link)
variable bg_bitmap
ALLEGRO_BITMAP * bg_bitmap;
optional bitmap for the label background (NULL = no background)
variable align
int align;
text alignment: N_GUI_ALIGN_LEFT, N_GUI_ALIGN_CENTER, N_GUI_ALIGN_RIGHT
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