Pebble Foundation Classes
0.2.0
C++ for Pebble
|
Data structure containing all the callbacks of a MenuLayer. More...
#include <pebble.h>
Data structure containing all the callbacks of a MenuLayer.
MenuLayerDrawBackgroundCallback MenuLayerCallbacks::draw_background |
Callback that gets called before any cells are drawn. This supports two states, either highlighted or not highlighted. If highlighted is specified, it is expected to be colored in the same style as the menu's cells are. If this callback is not specified, it will default to the colors set with menu_layer_set_normal_colors and menu_layer_set_highlight_colors.
MenuLayerDrawHeaderCallback MenuLayerCallbacks::draw_header |
Callback that gets called to render a section header. This gets called for each section header, every time it needs to be re-rendered.
.get_header_height
is NULL
. Causes undefined behavior otherwise. MenuLayerDrawRowCallback MenuLayerCallbacks::draw_row |
Callback that gets called to render a menu item. This gets called for each menu item, every time it needs to be re-rendered.
NULL
causes undefined behavior. MenuLayerDrawSeparatorCallback MenuLayerCallbacks::draw_separator |
Callback that gets called to render a separator. This gets called for each separator, every time it needs to be re-rendered.
.get_separator_height
is NULL
. Causes undefined behavior otherwise. MenuLayerGetCellHeightCallback MenuLayerCallbacks::get_cell_height |
Callback that gets called to get the height of a cell. This can get called at various moments throughout the life of a menu.
NULL
, the default height of MENU_CELL_BASIC_CELL_HEIGHT pixels is used. Developers may wish to use MENU_CELL_ROUND_FOCUSED_SHORT_CELL_HEIGHT and MENU_CELL_ROUND_UNFOCUSED_SHORT_CELL_HEIGHT on a round display to respect the system aesthetic. MenuLayerGetHeaderHeightCallback MenuLayerCallbacks::get_header_height |
Callback that gets called to get the height of a section header. This can get called at various moments throughout the life of a menu.
NULL
, the default height of 0 pixels is used. This disables section headers. MenuLayerGetNumberOfRowsInSectionsCallback MenuLayerCallbacks::get_num_rows |
Callback that gets called to get the number of rows in a section. This can get called at various moments throughout the life of a menu.
NULL
causes undefined behavior. MenuLayerGetNumberOfSectionsCallback MenuLayerCallbacks::get_num_sections |
Callback that gets called to get the number of sections in the menu. This can get called at various moments throughout the life of a menu.
NULL
, the number of sections defaults to 1. MenuLayerGetSeparatorHeightCallback MenuLayerCallbacks::get_separator_height |
Callback that gets called to get the height of a separator This can get called at various moments throughout the life of a menu.
NULL
, the default height of 0 is used. MenuLayerSelectCallback MenuLayerCallbacks::select_click |
Callback that gets called when the user triggers a click with the SELECT button.
NULL
, click events for the SELECT button are ignored. MenuLayerSelectCallback MenuLayerCallbacks::select_long_click |
Callback that gets called when the user triggers a long click with the SELECT button.
NULL
, long click events for the SELECT button are ignored. MenuLayerSelectionChangedCallback MenuLayerCallbacks::selection_changed |
Callback that gets called whenever the selection changes.
NULL
, selection change events are ignored. MenuLayerSelectionWillChangeCallback MenuLayerCallbacks::selection_will_change |
Callback that gets called before the selected cell changes. This gets called before the selected item in the MenuLayer is changed, and will allow for the selected cell to be overridden. This allows for skipping cells in the menu, locking selection onto a given item,