|
muteki
|
Common part of all widgets and views. More...
#include <common.h>
Data Fields | |
| ui_component_t * | next |
| Next component in a component ring or list. | |
| ui_component_t * | parent |
| Parent component. | |
| unsigned short | state |
| Component state bit field. | |
| short | unk_0xa |
| Unknown. Set to 1 on buttons and 0xfd01 on deskbox views. | |
| ui_rect_t | footprint |
| Component visual footprint. | |
| void(* | on_change_state )(ui_component_t *self, unsigned short mask, bool value) |
| Component state change callback. | |
| void(* | on_erase_bg )(ui_component_t *self) |
| Component callback for erasing background. | |
| void(* | on_draw )(ui_component_t *self) |
| Component draw callback. | |
| void(* | on_event )(ui_component_t *self, ui_event_t *event) |
| Component event callback. | |
| void * | unk_0x24 |
| Unknown. Used in MessageBox(). | |
| short | unk_0x28 |
| Unknown. | |
| short | unk_0x2a |
| Unknown. Set to 0x65 on buttons. | |
| int | unk_0x2c |
| Unknown. | |
| unsigned short | tag |
| short | unk_0x32 |
| Unknown. Probably padding. | |
Common part of all widgets and views.
self argument defined as ui_component_t * (or void * if we opt to do that) which is a bit less ideal. | ui_rect_t ui_component_s::footprint |
Component visual footprint.
This defines the size and location of the component on screen.
| ui_component_t* ui_component_s::next |
Next component in a component ring or list.
This will be set to NULL when initialized, and, depending on context, will be a pointer to the next component, a pointer to this component or NULL.
| void(* ui_component_s::on_erase_bg) (ui_component_t *self) |
Component callback for erasing background.
| ui_component_t* ui_component_s::parent |
Parent component.
This will usually be a view.
| unsigned short ui_component_s::state |
Component state bit field.
Each component may use this differently to represent different states.
| unsigned short ui_component_s::tag |
Component tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated.