Muteki
EABI code execution on Besta® RTOS devices.
Loading...
Searching...
No Matches
boolfield.h File Reference

Bool field (unlabeled checkbox) and bool text field (labeled checkbox) widget constructor and methods. More...

Go to the source code of this file.

Functions

ui_boolfield_t * CreateBoolField (unsigned short tag, short x, short y, unsigned short *value, unsigned short mask)
 Create a bool field (unlabeled checkbox) widget.
ui_booltextfield_t * CreateBoolTextField (unsigned short tag, short x, short y, unsigned short *value, unsigned short mask, const UTF16 *label)
 Create a bool text field (labeled checkbox) widget.
void PBOOLFIELD_draw (ui_boolfield_t *self)
 The default draw method.

Detailed Description

Bool field (unlabeled checkbox) and bool text field (labeled checkbox) widget constructor and methods.

Bool fields are checkboxes that are capable of setting and clearing bits in a user-owned 16-bit bitfield. Multiple bits can be set/cleared simultaneously using a bit mask, although the bits must be set/cleared at the same time. For example, if the mask is set to 0x0003, the bit 0 and bit 1 must both be initialized to 0 or 1, and both bits must stay equal across the entire lifecycle of the widget. Checkboxes have a fixed size of 16x16px.

Bool text fields are labeled checkboxes that are based on the bool field, with the possibility to add a text label at the right side of the checkbox widget itself. The parent bool field is available as ui_booltextfield_t::bf.

Function Documentation

◆ CreateBoolField()

ui_boolfield_t * CreateBoolField ( unsigned short tag,
short x,
short y,
unsigned short * value,
unsigned short mask )
extern

Create a bool field (unlabeled checkbox) widget.

Syscall Number
0x10132
Parameters
tagComponent tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component, or looking up an item with GetDeskItem()). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated.
xX coordinate of the top-left corner, in pixels (inclusive).
yY coordinate of the top-left corner, in pixels (inclusive).
valuePointer to a 16-bit value bitfield. Must be valid across widget lifecycle.
maskBitmask used to toggle the bits in the value bitfield.
Returns
The created bool field widget object.

◆ CreateBoolTextField()

ui_booltextfield_t * CreateBoolTextField ( unsigned short tag,
short x,
short y,
unsigned short * value,
unsigned short mask,
const UTF16 * label )
extern

Create a bool text field (labeled checkbox) widget.

Syscall Number
0x10133
Parameters
tagComponent tag. Can be used to distinguish components under some circumstances (like when sharing a callback with another component, or looking up an item with GetDeskItem()). Does not need to be unique. Usually will be set by AllocBlock() after the memory was allocated.
xX coordinate of the top-left corner, in pixels (inclusive).
yY coordinate of the top-left corner, in pixels (inclusive).
valuePointer to a 16-bit value bitfield. Must be valid across widget lifecycle.
maskBitmask used to toggle the bits in the value bitfield.
labelText label.
Returns
The created bool text field widget object.

◆ PBOOLFIELD_draw()

void PBOOLFIELD_draw ( ui_boolfield_t * self)
extern

The default draw method.

Syscall Number
0x1013c
Parameters
selfThe bool field object.
Returns
None.