The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
idunn_class_t Struct Reference

#include </home/runner/work/ginnOS-docs/ginnOS-docs/ginnOS/src/lib/idunn/idunn_internal.h>

Data Fields

const char * name
void(*) measure (idunn_widget_t *w, int32_t max_width, int32_t *width, int32_t *height)
 the size it wants, in pixels; max_width is the width there is (for text that wraps)
void(*) layout (idunn_widget_t *w)
 place the children in w->rect (boxes)
void(*) draw (idunn_widget_t *w, gfx_buffer_t *buf)
 draw in w->rect; the children are drawn after it
void(*) draw_over (idunn_widget_t *w, gfx_buffer_t *buf)
 draw over the children (a scroll bar), in the same clip as them
bool(*) event (idunn_widget_t *w, const idunn_event_t *ev)
gfx_rect_t(*) reveal (idunn_widget_t *w, gfx_rect_t r)
 scroll so that r (a rect of a widget in w) can be seen.
gfx_rect_t(*) hover_area (idunn_widget_t *w)
 the part of w that looks different when the pointer comes or goes (optional: all of w).
void(*) frame (idunn_widget_t *w)
 before each frame is drawn (optional): move things that glide (a scroll view), when the pixels in the buffer can still be moved
void(*) free (idunn_widget_t *w)
 free w->data

Field Documentation

◆ name

const char* idunn_class_t::name

◆ measure

void(*) idunn_class_t::measure(idunn_widget_t *w, int32_t max_width, int32_t *width, int32_t *height)

the size it wants, in pixels; max_width is the width there is (for text that wraps)

◆ layout

void(*) idunn_class_t::layout(idunn_widget_t *w)

place the children in w->rect (boxes)

◆ draw

void(*) idunn_class_t::draw(idunn_widget_t *w, gfx_buffer_t *buf)

draw in w->rect; the children are drawn after it

◆ draw_over

void(*) idunn_class_t::draw_over(idunn_widget_t *w, gfx_buffer_t *buf)

draw over the children (a scroll bar), in the same clip as them

◆ event

bool(*) idunn_class_t::event(idunn_widget_t *w, const idunn_event_t *ev)
Returns
true if the widget used the event

◆ reveal

gfx_rect_t(*) idunn_class_t::reveal(idunn_widget_t *w, gfx_rect_t r)

scroll so that r (a rect of a widget in w) can be seen.

Returns
where r is after the scroll.

◆ hover_area

gfx_rect_t(*) idunn_class_t::hover_area(idunn_widget_t *w)

the part of w that looks different when the pointer comes or goes (optional: all of w).

a large widget that shows hover in a small part (a scroll bar, a list row) is then not drawn again whole.

◆ frame

void(*) idunn_class_t::frame(idunn_widget_t *w)

before each frame is drawn (optional): move things that glide (a scroll view), when the pixels in the buffer can still be moved

◆ free

void(*) idunn_class_t::free(idunn_widget_t *w)

free w->data


The documentation for this struct was generated from the following file: