5 Struct N_GUI_RADIOLIST_DATA
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_GUI_RADIOLIST_DATA

Module: GUI: allegro5 widget system with pseudo-windows

radio list 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 items
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
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 pixels
ALLEGRO_BITMAP * item_bg_bitmap
optional bitmap for per-item background, normal state (NULL = color theme)
ALLEGRO_BITMAP * bg_bitmap
optional bitmap for the radiolist 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 items

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 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 pixels

variable item_bg_bitmap

ALLEGRO_BITMAP * item_bg_bitmap;

optional bitmap for per-item background, normal state (NULL = color theme)

variable bg_bitmap

ALLEGRO_BITMAP * bg_bitmap;

optional bitmap for the radiolist background (NULL = color theme)