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

N_GUI_HEXVIEW_DATA

Module: GUI: allegro5 widget system with pseudo-windows

hex viewer specific data: a read-only byte dump

#include "n_gui.h"

Public Attributes

Name
void * user_data
opaque pointer handed back to on_change
int scroll_offset
first visible row
void(*)(int widget_id, const unsigned char *data, size_t len, void *user_data) on_change
called after any edit, with the new byte count
int nibble
which half of the cursor byte a typed hex digit lands in: 0 high, 1 low
size_t len
number of bytes
int editable
1 when the bytes can be edited in place
unsigned char * data
owned copy of the bytes, or NULL
size_t cursor
byte the cursor sits on (<= len)
size_t cap
bytes allocated (>= len; edits grow the buffer)
int bytes_per_row
bytes shown per row

Public Attributes Documentation

variable user_data

void * user_data;

opaque pointer handed back to on_change

variable scroll_offset

int scroll_offset;

first visible row

variable on_change

void(*)(int widget_id, const unsigned char *data, size_t len, void *user_data) on_change;

called after any edit, with the new byte count

variable nibble

int nibble;

which half of the cursor byte a typed hex digit lands in: 0 high, 1 low

variable len

size_t len;

number of bytes

variable editable

int editable;

1 when the bytes can be edited in place

variable data

unsigned char * data;

owned copy of the bytes, or NULL

variable cursor

size_t cursor;

byte the cursor sits on (<= len)

variable cap

size_t cap;

bytes allocated (>= len; edits grow the buffer)

variable bytes_per_row

int bytes_per_row;

bytes shown per row