tcMenu
Public Types | Public Member Functions | List of all members
tcgfx::GridPosition Class Reference

#include <GfxMenuConfig.h>

Public Types

enum  GridDrawingMode : byte {
  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 : byte {
  JUSTIFY_TITLE_LEFT_VALUE_RIGHT, JUSTIFY_TITLE_LEFT_WITH_VALUE, JUSTIFY_CENTER_WITH_VALUE, JUSTIFY_RIGHT_WITH_VALUE,
  JUSTIFY_LEFT_NO_VALUE, JUSTIFY_CENTER_NO_VALUE, JUSTIFY_RIGHT_NO_VALUE
}
 

Public Member Functions

 GridPosition (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
 

Detailed Description

Provides a platform independent means of identifying where on the screen a particular menu item resides using a simple grid layout

Member Enumeration Documentation

◆ GridDrawingMode

Represents how the item in this position should be drawn.

Enumerator
DRAW_TEXTUAL_ITEM 

Drawn as text in the form of Item on the left, value on the right

DRAW_INTEGER_AS_UP_DOWN 

Drawn two buttons with the value in the middle, to move through a range of values

DRAW_INTEGER_AS_SCROLL 

Drawn as a scroll slider, to move through a series of values

DRAW_AS_ICON_ONLY 

Drawn as an icon with no text underneath

DRAW_AS_ICON_TEXT 

Drawn as an icon with text underneath

DRAW_TITLE_ITEM 

Drawn as a title, usually reserved for the title at the top of the page

Constructor & Destructor Documentation

◆ GridPosition() [1/2]

tcgfx::GridPosition::GridPosition ( GridDrawingMode  mode,
GridJustification  justification,
int  row,
int  height = 0 
)
inline

Create a simple grid position that represents a row with a single column with optional override of the row height

Parameters
modethe mode in which to draw the item
heightthe height of the item or leave blank for default

◆ GridPosition() [2/2]

tcgfx::GridPosition::GridPosition ( GridDrawingMode  mode,
GridJustification  just,
int  size,
int  pos,
int  row,
int  hei 
)
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.

Parameters
modethe mode in which to draw the item
sizethe number of columns in the row
posthe column position in the row
heithe height of the row, or 0 for the default height.

The documentation for this class was generated from the following file: