![]() |
BSB Developer Docs
|
Editable menu item widgets with per-kind value editors. More...
#include "private/smenu_item.h"Go to the source code of this file.
Typedefs | |
| typedef struct SMenuItemEditable | SMenuItemEditable |
| SMenuItemEditable opaque structure. | |
Functions | |
| SMenuItemEditable * | smenu_item_editable_switch_alloc (Widget *parent) |
| Create a new binary switch menu item. | |
| SMenuItemEditable * | smenu_item_editable_timebox_alloc (Widget *parent, int32_t min_minutes, int32_t max_minutes, int32_t step_minutes) |
| Create a new time selection menu item. | |
| SMenuItemEditable * | smenu_item_editable_spinbox_alloc (Widget *parent, const char *suffix, int32_t min, int32_t max, int32_t step) |
| Create a new numeric value selection menu item. | |
| SMenuItemEditable * | smenu_item_editable_selector_alloc (Widget *parent, const char *choices_text[], int32_t choices_count) |
| Create a new value list selection menu item. | |
| void | smenu_item_editable_set_primary_text (SMenuItemEditable *instance, const char *text) |
| Set the item label text. | |
| void | smenu_item_editable_set_value (SMenuItemEditable *instance, int32_t value) |
| Set the current item value. | |
| int32_t | smenu_item_editable_get_value (SMenuItemEditable *instance) |
| Get the current item value. | |
| SMenuItem * | smenu_item_editable_get_base (SMenuItemEditable *instance) |
| Get a pointer to the base class instance. | |
Editable menu item widgets with per-kind value editors.
| SMenuItem * smenu_item_editable_get_base | ( | SMenuItemEditable * | instance | ) |
Get a pointer to the base class instance.
The return value can be used in all SMenuItem methods.
| [in,out] | instance | pointer to the SMenuItemEditable instance to be queried |
| int32_t smenu_item_editable_get_value | ( | SMenuItemEditable * | instance | ) |
Get the current item value.
| [in] | instance | pointer to the SMenuItemEditable instance to be queried |
| SMenuItemEditable * smenu_item_editable_selector_alloc | ( | Widget * | parent, |
| const char * | choices_text[], | ||
| int32_t | choices_count ) |
Create a new value list selection menu item.
| [in,out] | parent | pointer to the parent Widget instance |
| [in] | choices_text | pointer to an array of zero-terminated strings containing choice labels |
| [in] | choices_count | number of elements in the choice_text array |
| void smenu_item_editable_set_primary_text | ( | SMenuItemEditable * | instance, |
| const char * | text ) |
Set the item label text.
| [in,out] | instance | pointer to the SMenuItemEditable instance to be modified |
| [in] | text | zero-terminated string containing the item label |
| void smenu_item_editable_set_value | ( | SMenuItemEditable * | instance, |
| int32_t | value ) |
Set the current item value.
This function has a different meaning depending on the item kind:
| [in,out] | instance | pointer to the SMenuItemEditable instance to be modified |
| [in] | value | value to be set |
| SMenuItemEditable * smenu_item_editable_spinbox_alloc | ( | Widget * | parent, |
| const char * | suffix, | ||
| int32_t | min, | ||
| int32_t | max, | ||
| int32_t | step ) |
Create a new numeric value selection menu item.
| [in,out] | parent | pointer to the parent Widget instance |
| [in] | suffix | zero-terminated string containing the value suffix (may be NULL) |
| [in] | min | minimum allowed value |
| [in] | max | maximum allowed value |
| [in] | step | step or increment |
| SMenuItemEditable * smenu_item_editable_switch_alloc | ( | Widget * | parent | ) |
Create a new binary switch menu item.
| [in,out] | parent | pointer to the parent Widget instance |
| SMenuItemEditable * smenu_item_editable_timebox_alloc | ( | Widget * | parent, |
| int32_t | min_minutes, | ||
| int32_t | max_minutes, | ||
| int32_t | step_minutes ) |
Create a new time selection menu item.
| [in,out] | parent | pointer to the parent Widget instance |
| [in] | min_minutes | minimum allowed value, in minutes |
| [in] | max_minutes | maximum allowed value, in minutes |
| [in] | step_minutes | step or increment, in minutes |