N_GUI_GRID_CALLBACKS
Module: GUI GRID: a virtualised, vertically scrolled grid
What the grid asks of its caller. More...
#include "n_gui_grid.h"
Public Attributes
| Name | |
|---|---|
| int(*)(int widget_id, int dz, int modifiers, void *user_data) | wheel A wheel turn of dz notches over the grid, positive away from the user, with the modifier keys held (ALLEGRO_KEYMOD_* ORed, see n_gui_get_key_modifiers()). |
| void(*)(int widget_id, size_t first, size_t last, void *user_data) | visible Called after each draw with the cells drawn and one row beyond, first included and last excluded: what to have ready. |
| void(*)(int widget_id, size_t index, int button, float x, float y, void *user_data) | press A press of button (1 or 2) on cell index, at screen x, y. |
| void(*)(int widget_id, size_t index, float x, float y, float w, float h, void *user_data) | draw_cell Draw cell index in the box at x, y, w by h, on screen. |
| void(*)(int widget_id, float x, float y, float w, float h, void *user_data) | draw_background Draw behind the cells, over the whole grid, before any cell; with no cells, the only thing drawn. |
Detailed Description
struct N_GUI_GRID_CALLBACKS;
What the grid asks of its caller.
Only draw_cell is required.
Public Attributes Documentation
variable wheel
int(*)(int widget_id, int dz, int modifiers, void *user_data) wheel;
A wheel turn of dz notches over the grid, positive away from the user, with the modifier keys held (ALLEGRO_KEYMOD_* ORed, see n_gui_get_key_modifiers()).
Asked before the grid scrolls: return non-zero to take the turn, for a Ctrl+wheel zoom say, and the grid does not scroll; zero and it scrolls as usual. May be NULL.
variable visible
void(*)(int widget_id, size_t first, size_t last, void *user_data) visible;
Called after each draw with the cells drawn and one row beyond, first included and last excluded: what to have ready.
May be NULL.
variable press
void(*)(int widget_id, size_t index, int button, float x, float y, void *user_data) press;
A press of button (1 or 2) on cell index, at screen x, y.
Not called for a press between cells or past the last. May be NULL.
variable draw_cell
void(*)(int widget_id, size_t index, float x, float y, float w, float h, void *user_data) draw_cell;
Draw cell index in the box at x, y, w by h, on screen.
The clipping rectangle is the grid's, so a cell partly scrolled off is cut there.
variable draw_background
void(*)(int widget_id, float x, float y, float w, float h, void *user_data) draw_background;
Draw behind the cells, over the whole grid, before any cell; with no cells, the only thing drawn.
May be NULL.
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