6 Struct N_GUI_SCROLLBAR_DATA
gullradriel edited this page 2026-10-12 07:59:13 +02:00

N_GUI_SCROLLBAR_DATA

Module: GUI: allegro5 widget system with pseudo-windows

scrollbar specific data

#include "n_gui.h"

Public Attributes

Name
double wheel_step
how far one wheel notch moves it, in content units; 0 (the default) is a twentieth of the range.
double viewport_size
visible viewport size
void * user_data
user data for callback
ALLEGRO_BITMAP * track_bitmap
optional bitmap for the scrollbar track background (NULL = color theme)
ALLEGRO_BITMAP * thumb_hover_bitmap
optional bitmap for the thumb on hover (NULL = fallback to thumb_bitmap)
ALLEGRO_BITMAP * thumb_bitmap
optional bitmap for the thumb/handle, normal state (NULL = color theme)
ALLEGRO_BITMAP * thumb_active_bitmap
optional bitmap for the thumb while dragging (NULL = fallback to thumb_bitmap)
int shape
shape type: N_GUI_SHAPE_RECT or N_GUI_SHAPE_ROUNDED
double scroll_pos
current scroll position
int orientation
orientation: N_GUI_SCROLLBAR_H or N_GUI_SCROLLBAR_V
void(*)(int widget_id, double scroll_pos, void *user_data) on_scroll
callback on scroll
double content_size
total content size

Public Attributes Documentation

variable wheel_step

double wheel_step;

how far one wheel notch moves it, in content units; 0 (the default) is a twentieth of the range.

Set by n_gui_scrollbar_set_wheel_step()

variable viewport_size

double viewport_size;

visible viewport size

variable user_data

void * user_data;

user data for callback

variable track_bitmap

ALLEGRO_BITMAP * track_bitmap;

optional bitmap for the scrollbar track background (NULL = color theme)

variable thumb_hover_bitmap

ALLEGRO_BITMAP * thumb_hover_bitmap;

optional bitmap for the thumb on hover (NULL = fallback to thumb_bitmap)

variable thumb_bitmap

ALLEGRO_BITMAP * thumb_bitmap;

optional bitmap for the thumb/handle, normal state (NULL = color theme)

variable thumb_active_bitmap

ALLEGRO_BITMAP * thumb_active_bitmap;

optional bitmap for the thumb while dragging (NULL = fallback to thumb_bitmap)

variable shape

int shape;

shape type: N_GUI_SHAPE_RECT or N_GUI_SHAPE_ROUNDED

variable scroll_pos

double scroll_pos;

current scroll position

variable orientation

int orientation;

orientation: N_GUI_SCROLLBAR_H or N_GUI_SCROLLBAR_V

variable on_scroll

void(*)(int widget_id, double scroll_pos, void *user_data) on_scroll;

callback on scroll

variable content_size

double content_size;

total content size