Table of Contents
- N_GUI_COMBOBOX_DATA
- Public Attributes
- Public Attributes Documentation
- variable user_data
- variable selected_index
- variable scroll_offset
- variable on_select
- variable nb_items
- variable max_visible
- variable items_capacity
- variable items
- variable item_selected_bitmap
- variable item_height
- variable item_bg_bitmap
- variable is_open
- variable highlight_index
- variable flags
- variable bg_bitmap
N_GUI_COMBOBOX_DATA
Module: GUI: allegro5 widget system with pseudo-windows
combo box specific data
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| void * | user_data user data for callback |
| int | selected_index currently selected index (-1 = none) |
| int | scroll_offset scroll offset in dropdown |
| void(*)(int widget_id, int index, void *user_data) | on_select callback on selection change (widget_id, selected_index, user_data) |
| size_t | nb_items number of items |
| int | max_visible max visible items in dropdown |
| size_t | items_capacity allocated capacity |
| N_GUI_LISTITEM * | items dynamic array of items |
| ALLEGRO_BITMAP * | item_selected_bitmap optional bitmap for per-item background, selected/highlighted (NULL = color theme) |
| float | item_height item height in dropdown |
| ALLEGRO_BITMAP * | item_bg_bitmap optional bitmap for per-item background, normal state (NULL = color theme) |
| int | is_open is dropdown currently open |
| int | highlight_index open-panel navigation cursor for the wheel and Up/Down keys (-1 = none). |
| int | flags bitmask of N_GUI_COMBOBOX_* flags |
| ALLEGRO_BITMAP * | bg_bitmap optional bitmap for the combobox background (NULL = color theme) |
Public Attributes Documentation
variable user_data
void * user_data;
user data for callback
variable selected_index
int selected_index;
currently selected index (-1 = none)
variable scroll_offset
int scroll_offset;
scroll offset in dropdown
variable on_select
void(*)(int widget_id, int index, void *user_data) on_select;
callback on selection change (widget_id, selected_index, user_data)
variable nb_items
size_t nb_items;
number of items
variable max_visible
int max_visible;
max visible items in dropdown
variable items_capacity
size_t items_capacity;
allocated capacity
variable items
N_GUI_LISTITEM * items;
dynamic array of items
variable item_selected_bitmap
ALLEGRO_BITMAP * item_selected_bitmap;
optional bitmap for per-item background, selected/highlighted (NULL = color theme)
variable item_height
float item_height;
item height in dropdown
variable item_bg_bitmap
ALLEGRO_BITMAP * item_bg_bitmap;
optional bitmap for per-item background, normal state (NULL = color theme)
variable is_open
int is_open;
is dropdown currently open
variable highlight_index
int highlight_index;
open-panel navigation cursor for the wheel and Up/Down keys (-1 = none).
While the dropdown is open, the wheel and arrow keys move this; hovering the panel sets it to the item under the pointer; Enter or a click commits it to selected_index. Reset to -1 when the panel closes.
variable flags
int flags;
bitmask of N_GUI_COMBOBOX_* flags
variable bg_bitmap
ALLEGRO_BITMAP * bg_bitmap;
optional bitmap for the combobox background (NULL = color theme)
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