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

_N_GUI_GRID

a grid's state, owned by its custom widget

Public Attributes

Name
int visible
whether the caller wants it shown
void * user_data
handed back to the callbacks
float scroll
pixels from the top of the content to the top of the view
int placing
set while the bar is being told where it is, so its callback is not taken for a drag
float outer_y
float outer_x
the rectangle n_gui_grid_set_rect() was given, scrollbar included
float outer_w
float outer_h
float inner_w
the grid's own width, the strip taken off when the bar shows
int id
the grid widget
float gap
gap between and around cells
N_GUI_CTX * ctx
the context, for the callbacks that are handed only an id
size_t count
how many cells
float cell_w
cell width
float cell_h
cell height
N_GUI_GRID_CALLBACKS cb
what the caller asked for
float bar_w
width of the scrollbar's strip
int bar_showing
whether the bar is shown
int bar
its scrollbar

Public Attributes Documentation

variable visible

int visible;

whether the caller wants it shown

variable user_data

void * user_data;

handed back to the callbacks

variable scroll

float scroll;

pixels from the top of the content to the top of the view

variable placing

int placing;

set while the bar is being told where it is, so its callback is not taken for a drag

variable outer_y

float outer_y;

variable outer_x

float outer_x;

the rectangle n_gui_grid_set_rect() was given, scrollbar included

variable outer_w

float outer_w;

variable outer_h

float outer_h;

variable inner_w

float inner_w;

the grid's own width, the strip taken off when the bar shows

variable id

int id;

the grid widget

variable gap

float gap;

gap between and around cells

variable ctx

N_GUI_CTX * ctx;

the context, for the callbacks that are handed only an id

variable count

size_t count;

how many cells

variable cell_w

float cell_w;

cell width

variable cell_h

float cell_h;

cell height

variable cb

N_GUI_GRID_CALLBACKS cb;

what the caller asked for

variable bar_w

float bar_w;

width of the scrollbar's strip

variable bar_showing

int bar_showing;

whether the bar is shown

variable bar

int bar;

its scrollbar