GUI: VariableItemList view module API. More...
#include <gui/view.h>
Go to the source code of this file.
Typedefs | |
typedef struct VariableItemList | VariableItemList |
typedef struct VariableItem | VariableItem |
typedef void(* | VariableItemChangeCallback) (VariableItem *item) |
typedef void(* | VariableItemListEnterCallback) (void *context, uint32_t index) |
Functions | |
VariableItemList * | variable_item_list_alloc (void) |
Allocate and initialize VariableItemList. | |
void | variable_item_list_free (VariableItemList *variable_item_list) |
Deinitialize and free VariableItemList. | |
void | variable_item_list_reset (VariableItemList *variable_item_list) |
Clear all elements from list. | |
View * | variable_item_list_get_view (VariableItemList *variable_item_list) |
Get VariableItemList View instance. | |
VariableItem * | variable_item_list_add (VariableItemList *variable_item_list, const char *label, uint8_t values_count, VariableItemChangeCallback change_callback, void *context) |
Add item to VariableItemList. | |
void | variable_item_list_set_enter_callback (VariableItemList *variable_item_list, VariableItemListEnterCallback callback, void *context) |
Set enter callback. | |
void | variable_item_list_set_selected_item (VariableItemList *variable_item_list, uint8_t index) |
uint8_t | variable_item_list_get_selected_item_index (VariableItemList *variable_item_list) |
void | variable_item_set_current_value_index (VariableItem *item, uint8_t current_value_index) |
Set item current selected index. | |
void | variable_item_set_values_count (VariableItem *item, uint8_t values_count) |
Set number of values for item. | |
void | variable_item_set_current_value_text (VariableItem *item, const char *current_value_text) |
Set item current selected text. | |
uint8_t | variable_item_get_current_value_index (VariableItem *item) |
Get item current selected index. | |
void * | variable_item_get_context (VariableItem *item) |
Get item context. | |
GUI: VariableItemList view module API.
void * variable_item_get_context | ( | VariableItem * | item | ) |
Get item context.
item | VariableItem* instance |
uint8_t variable_item_get_current_value_index | ( | VariableItem * | item | ) |
Get item current selected index.
item | VariableItem* instance |
VariableItem * variable_item_list_add | ( | VariableItemList * | variable_item_list, |
const char * | label, | ||
uint8_t | values_count, | ||
VariableItemChangeCallback | change_callback, | ||
void * | context ) |
Add item to VariableItemList.
variable_item_list | VariableItemList instance |
label | item name |
values_count | item values count |
change_callback | called on value change in gui |
context | item context |
VariableItemList * variable_item_list_alloc | ( | void | ) |
Allocate and initialize VariableItemList.
void variable_item_list_free | ( | VariableItemList * | variable_item_list | ) |
Deinitialize and free VariableItemList.
variable_item_list | VariableItemList instance |
View * variable_item_list_get_view | ( | VariableItemList * | variable_item_list | ) |
Get VariableItemList View instance.
variable_item_list | VariableItemList instance |
void variable_item_list_reset | ( | VariableItemList * | variable_item_list | ) |
Clear all elements from list.
variable_item_list | VariableItemList instance |
void variable_item_list_set_enter_callback | ( | VariableItemList * | variable_item_list, |
VariableItemListEnterCallback | callback, | ||
void * | context ) |
Set enter callback.
variable_item_list | VariableItemList instance |
callback | VariableItemListEnterCallback instance |
context | pointer to context |
void variable_item_set_current_value_index | ( | VariableItem * | item, |
uint8_t | current_value_index ) |
Set item current selected index.
item | VariableItem* instance |
current_value_index | The current value index |
void variable_item_set_current_value_text | ( | VariableItem * | item, |
const char * | current_value_text ) |
Set item current selected text.
item | VariableItem* instance |
current_value_text | The current value text |
void variable_item_set_values_count | ( | VariableItem * | item, |
uint8_t | values_count ) |
Set number of values for item.
item | VariableItem* instance |
values_count | The new values count |