![]() |
BSB Developer Docs
|
Base class for smenu item widgets. More...
#include "../../widget.h"Go to the source code of this file.
Typedefs | |
| typedef struct SMenuItem | SMenuItem |
| SMenuItem opaque structure. | |
| typedef void(* | SMenuItemCallback) (SMenuItem *item) |
| SMenu item callback function type. | |
Enumerations | |
| enum | SMenuItemCursorState { SMenuItemCursorStateHidden , SMenuItemCursorStateTransparent , SMenuItemCursorStateNormal , SMenuItemCursorStatesCount } |
| Cursor indicator states of a menu item. More... | |
Functions | |
| Widget * | smenu_item_get_base (SMenuItem *instance) |
| Get a pointer to the base class instance. | |
| void | smenu_item_set_cursor_state (SMenuItem *instance, SMenuItemCursorState state) |
| Set the cursor indicator state of a menu item. | |
| void | smenu_item_set_callback (SMenuItem *instance, SMenuItemCallback callback) |
| Set the item event callback. | |
Base class for smenu item widgets.
| typedef void(* SMenuItemCallback) (SMenuItem *item) |
SMenu item callback function type.
The widget context can be retrieved inside the callback with widget_get_context.
| [in,out] | item | pointer to the activated item instance |
| enum SMenuItemCursorState |
Get a pointer to the base class instance.
The return value can be used in all Widget methods.
| [in,out] | instance | pointer to the SMenuItem instance to be queried |
| void smenu_item_set_callback | ( | SMenuItem * | instance, |
| SMenuItemCallback | callback ) |
Set the item event callback.
| [in,out] | instance | pointer to the SMenuItem instance to be modified |
| [in] | callback | pointer to the function to call upon item event (may be NULL) |
| void smenu_item_set_cursor_state | ( | SMenuItem * | instance, |
| SMenuItemCursorState | state ) |
Set the cursor indicator state of a menu item.
| [in,out] | instance | pointer to the SMenuItem instance to be modified |
| [in] | state | cursor indicator state to set |