Table of Contents
- N_GUI_SLIDER_DATA
- Public Attributes
- Public Attributes Documentation
- variable value_visible
- variable value_format
- variable value
- variable user_data
- variable track_bitmap
- variable step
- variable orientation
- variable on_change
- variable mode
- variable min_val
- variable max_val
- variable key_step
- variable has_default
- variable handle_hover_bitmap
- variable handle_bitmap
- variable handle_active_bitmap
- variable fill_bitmap
- variable default_value
N_GUI_SLIDER_DATA
Module: GUI: allegro5 widget system with pseudo-windows
slider specific data
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| int | value_visible draw the built-in value label next to/below the handle. |
| char[32] | value_format printf-style format string applied to the numeric value when the built-in readout draws. |
| double | value current value (always snapped to step) |
| void * | user_data user data for callback |
| ALLEGRO_BITMAP * | track_bitmap optional bitmap for the track/rail background (NULL = color theme) |
| double | step step increment (0 is treated as 1). |
| int | orientation orientation: N_GUI_SLIDER_H or N_GUI_SLIDER_V |
| void(*)(int widget_id, double value, void *user_data) | on_change callback on value change |
| int | mode mode: N_GUI_SLIDER_VALUE or N_GUI_SLIDER_PERCENT |
| double | min_val minimum value |
| double | max_val maximum value |
| double | key_step increment applied by the arrow keys and the mouse wheel, when it should differ from step. |
| int | has_default non-zero once n_gui_slider_set_default() gave the slider a default, which a double click on it puts back |
| ALLEGRO_BITMAP * | handle_hover_bitmap optional bitmap for the handle on hover (NULL = fallback to handle_bitmap) |
| ALLEGRO_BITMAP * | handle_bitmap optional bitmap for the draggable handle, normal state (NULL = color theme) |
| ALLEGRO_BITMAP * | handle_active_bitmap optional bitmap for the handle while dragging (NULL = fallback to handle_bitmap) |
| ALLEGRO_BITMAP * | fill_bitmap optional bitmap for the filled portion of the track (NULL = color theme) |
| double | default_value the value a double click puts back, when has_default is set |
Public Attributes Documentation
variable value_visible
int value_visible;
draw the built-in value label next to/below the handle.
Default 1 (on) for backward compatibility. Set to 0 when the consumer is already painting the value elsewhere (e.g. a status bar) to avoid the double-render gotcha.
variable value_format
char[32] value_format;
printf-style format string applied to the numeric value when the built-in readout draws.
Empty (first byte '\0') selects the legacy defaults: "%.1f" for VALUE mode, "%.0f%%" for PERCENT. Set via n_gui_slider_set_value_format().
variable value
double value;
current value (always snapped to step)
variable user_data
void * user_data;
user data for callback
variable track_bitmap
ALLEGRO_BITMAP * track_bitmap;
optional bitmap for the track/rail background (NULL = color theme)
variable step
double step;
step increment (0 is treated as 1).
All values snap to nearest multiple of step from min_val.
variable orientation
int orientation;
orientation: N_GUI_SLIDER_H or N_GUI_SLIDER_V
variable on_change
void(*)(int widget_id, double value, void *user_data) on_change;
callback on value change
variable mode
int mode;
mode: N_GUI_SLIDER_VALUE or N_GUI_SLIDER_PERCENT
variable min_val
double min_val;
minimum value
variable max_val
double max_val;
maximum value
variable key_step
double key_step;
increment applied by the arrow keys and the mouse wheel, when it should differ from step.
0 falls back to step, and then to a twentieth of the range, which is what every slider did before this existed. Set via n_gui_slider_set_key_step().
variable has_default
int has_default;
non-zero once n_gui_slider_set_default() gave the slider a default, which a double click on it puts back
variable handle_hover_bitmap
ALLEGRO_BITMAP * handle_hover_bitmap;
optional bitmap for the handle on hover (NULL = fallback to handle_bitmap)
variable handle_bitmap
ALLEGRO_BITMAP * handle_bitmap;
optional bitmap for the draggable handle, normal state (NULL = color theme)
variable handle_active_bitmap
ALLEGRO_BITMAP * handle_active_bitmap;
optional bitmap for the handle while dragging (NULL = fallback to handle_bitmap)
variable fill_bitmap
ALLEGRO_BITMAP * fill_bitmap;
optional bitmap for the filled portion of the track (NULL = color theme)
variable default_value
double default_value;
the value a double click puts back, when has_default is set
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