Table of Contents
N_GUI_DROPMENU_DATA
Module: GUI: allegro5 widget system with pseudo-windows
dropdown menu specific data
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| int | scroll_offset scroll offset |
| ALLEGRO_BITMAP * | panel_bitmap optional bitmap for the dropdown panel background (NULL = color theme) |
| void * | on_open_user_data user data for on_open callback |
| void(*)(int widget_id, void *user_data) | on_open callback to rebuild dynamic entries each time the menu is opened. |
| size_t | nb_entries number of entries |
| int | max_visible max visible items |
| char[128] | label menu label (shown on the button) |
| ALLEGRO_BITMAP * | item_hover_bitmap optional bitmap for the hovered entry background (NULL = color theme) |
| float | item_height item height |
| int | is_open is the menu currently open |
| int | highlight_index open-panel navigation cursor for the wheel and Up/Down keys (-1 = none). |
| int | flags bitmask of N_GUI_DROPMENU_* flags |
| size_t | entries_capacity allocated capacity |
| N_GUI_DROPMENU_ENTRY * | entries dynamic array of entries |
Public Attributes Documentation
variable scroll_offset
int scroll_offset;
scroll offset
variable panel_bitmap
ALLEGRO_BITMAP * panel_bitmap;
optional bitmap for the dropdown panel background (NULL = color theme)
variable on_open_user_data
void * on_open_user_data;
user data for on_open callback
variable on_open
void(*)(int widget_id, void *user_data) on_open;
callback to rebuild dynamic entries each time the menu is opened.
signature: void rebuild(int widget_id, void* user_data) The callback should call n_gui_dropmenu_clear_dynamic() then add dynamic entries.
variable nb_entries
size_t nb_entries;
number of entries
variable max_visible
int max_visible;
max visible items
variable label
char[128] label;
menu label (shown on the button)
variable item_hover_bitmap
ALLEGRO_BITMAP * item_hover_bitmap;
optional bitmap for the hovered entry background (NULL = color theme)
variable item_height
float item_height;
item height
variable is_open
int is_open;
is the menu currently open
variable highlight_index
int highlight_index;
open-panel navigation cursor for the wheel and Up/Down keys (-1 = none).
While the menu is open, the wheel and arrow keys move this; hovering the panel sets it to the entry under the pointer; Enter or a click activates it. Reset to -1 when the panel closes.
variable flags
int flags;
bitmask of N_GUI_DROPMENU_* flags
variable entries_capacity
size_t entries_capacity;
allocated capacity
variable entries
N_GUI_DROPMENU_ENTRY * entries;
dynamic array of entries
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