#include <GfxMenuConfig.h>
Public Types | |
enum | GridDrawingMode : uint8_t { DRAW_TEXTUAL_ITEM , DRAW_INTEGER_AS_UP_DOWN , DRAW_INTEGER_AS_SCROLL , DRAW_AS_ICON_ONLY , DRAW_AS_ICON_TEXT , DRAW_TITLE_ITEM } |
enum | GridJustification : uint8_t { CORE_JUSTIFY_LEFT = 1 , CORE_JUSTIFY_RIGHT = 2 , CORE_JUSTIFY_CENTER = 3 , CORE_JUSTIFY_VALUE_REQUIRED = 0b1000 , CORE_JUSTIFY_NAME_REQUIRED = 0b0100 , JUSTIFY_TITLE_LEFT_VALUE_RIGHT = 0 , JUSTIFY_TITLE_LEFT_WITH_VALUE = CORE_JUSTIFY_LEFT | CORE_JUSTIFY_NAME_REQUIRED | CORE_JUSTIFY_VALUE_REQUIRED , JUSTIFY_CENTER_WITH_VALUE = CORE_JUSTIFY_CENTER | CORE_JUSTIFY_NAME_REQUIRED | CORE_JUSTIFY_VALUE_REQUIRED , JUSTIFY_RIGHT_WITH_VALUE = CORE_JUSTIFY_RIGHT | CORE_JUSTIFY_NAME_REQUIRED | CORE_JUSTIFY_VALUE_REQUIRED , JUSTIFY_LEFT_NO_VALUE = CORE_JUSTIFY_LEFT | CORE_JUSTIFY_NAME_REQUIRED , JUSTIFY_CENTER_NO_VALUE = CORE_JUSTIFY_CENTER | CORE_JUSTIFY_NAME_REQUIRED , JUSTIFY_RIGHT_NO_VALUE = CORE_JUSTIFY_RIGHT | CORE_JUSTIFY_NAME_REQUIRED , JUSTIFY_LEFT_VALUE_ONLY = CORE_JUSTIFY_LEFT | CORE_JUSTIFY_VALUE_REQUIRED , JUSTIFY_CENTER_VALUE_ONLY = CORE_JUSTIFY_CENTER | CORE_JUSTIFY_VALUE_REQUIRED , JUSTIFY_RIGHT_VALUE_ONLY = CORE_JUSTIFY_RIGHT | CORE_JUSTIFY_VALUE_REQUIRED } |
Public Member Functions | |
GridPosition (const GridPosition &other)=default | |
GridPosition & | operator= (const GridPosition &other)=default |
GridPosition (GridDrawingMode mode, GridJustification justification, int row, int height=0) | |
GridPosition (GridDrawingMode mode, GridJustification just, int size, int pos, int row, int hei) | |
GridDrawingMode | getDrawingMode () const |
GridJustification | getJustification () const |
int | getGridSize () const |
int | getGridHeight () const |
int | getGridPosition () const |
int | getRow () const |
Provides a platform independent means of identifying where on the screen a particular menu item resides using a simple grid layout
Represents how the item in this position should be drawn.
Represents the justification of both the item name and the value within the items drawing space. This controls exactly what text is presented, and the position too.
|
inline |
Create a simple grid position that represents a row with a single column with optional override of the row height
mode | the mode in which to draw the item |
justification | the desired justification for this item |
row | the row on which to draw the item |
height | the height of the item or leave blank for default |
|
inline |
Create a more complex multi column grid with height, this represents a single row with one or more columns, a position in the columns, and if need be, a height override.
mode | the mode in which to draw the item |
justification | the desired justification for this item |
size | the number of columns in the row |
pos | the column position in the row |
row | the row on which to draw the item |
hei | the height of the row, or 0 for the default height. |