|
Muteki
EABI code execution on Besta® RTOS devices.
|
Button widget constructor and methods. More...
#include "../types/button.h"Go to the source code of this file.
Functions | |
| void | RelatedKeyButton (ui_button_t *button, int keycode) |
| Bind a button to a keyboard key. | |
| void | RelatedKeyButtonEx (ui_button_t *button, int keycode) |
| Bind a button to a keyboard key and attach the prompt string for that key. | |
| void | UnRelatedKeyButton (ui_button_t *button) |
| Remove existing key binding on a button. | |
| ui_button_t * | CreateButton (unsigned short tag, short x0, short y0, short x1, short y1, const UTF16 *label, unsigned int event, unsigned short flags) |
| Create a button widget object. | |
| void | ChangeButton (ui_button_t *button, const UTF16 *label, unsigned int event) |
| Modify and redraw the button. | |
| void | PBUTTON_draw (ui_button_t *self) |
| Default draw callback of the button widget. | |
Button widget constructor and methods.
|
extern |
Modify and redraw the button.
| button | The button object. |
| label | New UTF-16 encoded string to be used as a label. Will be skipped if set to NULL. |
| event | New custom event to be sent on button press. Will be skipped if set to 0. |
|
extern |
Create a button widget object.
Test the event behavior. This needs more reverse engineering on the view event handling process.
Figure out the flags.
| tag | Component 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. |
| x0 | X coordinate of the top-left corner, in pixels (inclusive). |
| y0 | Y coordinate of the top-left corner, in pixels (inclusive). |
| x1 | X coordinate of the bottom-right corner, in pixels (inclusive), or 0 to let the function automatically decide the size. |
| y1 | Y coordinate of the bottom-right corner, in pixels (inclusive), or 0 to let the function automatically decide the size. |
| label | UTF-16 encoded string to be used as a label. |
| event | Custom event to be sent on button press. |
| flags | Flags. Valid options seem to be 2, 4, 0x40. |
|
extern |
Default draw callback of the button widget.
| self |
|
extern |
Bind a button to a keyboard key.
| button | The button object. |
| keycode | Keycode. |
|
extern |
Bind a button to a keyboard key and attach the prompt string for that key.
The default draw callback will draw the key prompt string before the label string (e.g. F1 Press Me)
| button | The button object. |
| keycode | Keycode. |
|
extern |
Remove existing key binding on a button.
| button | The button object. |