![]() |
BSB Developer Docs
|
Scrollable menu widget that hosts SMenuItem heir items. More...
#include "private/smenu_item.h"Go to the source code of this file.
Typedefs | |
| typedef struct SMenu | SMenu |
| SMenu opaque structure. | |
Functions | |
| SMenu * | smenu_alloc (Widget *parent, bool is_cursor_enabled) |
| Create a new SMenu instance. | |
| void | smenu_free (SMenu *instance) |
| Delete an SMenu instance and all of its items. | |
| Widget * | smenu_get_base (SMenu *instance) |
| Get a pointer to the base class instance. | |
| void | smenu_set_selected_item_index (SMenu *instance, size_t index) |
| Select the item in an SMenu instance at the given position. | |
| size_t | smenu_get_selected_item_index (SMenu *instance) |
| Get the position of the selected item in an SMenu instance. | |
| SMenu * | smenu_get_from_item (SMenuItem *item) |
| Get the menu an item belongs to. | |
| void | smenu_reset (SMenu *instance) |
| Remove all items from an SMenu instance. | |
Scrollable menu widget that hosts SMenuItem heir items.
Create a new SMenu instance.
| [in,out] | parent | pointer to the parent Widget instance |
| [in] | is_cursor_enabled | whether the menu shows a cursor indicator next to the item in focus |
| void smenu_free | ( | SMenu * | instance | ) |
Delete an SMenu instance and all of its items.
| [in,out] | instance | pointer to the SMenu instance to be deleted |
Get a pointer to the base class instance.
The return value can be used in all Widget methods.
| [in,out] | instance | pointer to the SMenu instance to be queried |
Get the menu an item belongs to.
| [in] | item | pointer to the menu item instance to be queried |
NULL if the item is not attached to a menu | size_t smenu_get_selected_item_index | ( | SMenu * | instance | ) |
Get the position of the selected item in an SMenu instance.
| [in] | instance | pointer to the SMenu instance to be queried |
| void smenu_reset | ( | SMenu * | instance | ) |
Remove all items from an SMenu instance.
The menu instance itself, along with its settings, remains valid.
| [in,out] | instance | pointer to the SMenu instance to be modified |
| void smenu_set_selected_item_index | ( | SMenu * | instance, |
| size_t | index ) |
Select the item in an SMenu instance at the given position.
| [in,out] | instance | pointer to the SMenu instance to be modified |
| [in] | index | zero-based position of the item to be selected |