Grid

Microchip Graphics Library

Microchip Graphics Library
Grid

Grid supports Keyboard and Touchscreen inputs, replying to their events with the following messages: 

1. GRID_MSG_TOUCHED 

2. GRID_MSG_ITEM_SELECTED 

3. GRID_MSG_LEFT 

4. GRID_MSG_RIGHT 

5. GRID_MSG_UP 

6. GRID_MSG_DOWN 

See GridTranslateMsg() and GridMsgDefault() for details. 

 

The Grid lines are drawn using the EmbossLitColor, the string drawn using the TextColor0 and the background is drawn using the CommonBkColor.

Functions
 
Name 
Description 
 
This function creates a GRID object with the parameters given. It automatically attaches the new object into a global linked list of objects and returns the address of the object. 
 
This function renders the object on the screen using the current parameter settings. Location of the object is determined by the left, top, right and bottom parameters. The colors used are dependent on the state of the object. The font used is determined by the style scheme set.
When rendering objects of the same type, each object must be rendered completely before the rendering of the next object is started. This is to avoid incomplete object rendering. 
 
This function clears the state of the cell (or Grid Item) specified by the column and row. 
 
This function removes all grid items for the given Grid and frees the memory used. 
 
This function removes all grid items for the given Grid and frees the memory used. 
 
This function sets the Grid Item state and data. 
 
This function sets the state of the Grid Item or cell. 
 
This function sets the focus of the specified Grid Item or cell. 
 
This function performs the actual state change based on the translated message given. The following state changes are supported:  
 
This function evaluates the message from a user if the message will affect the object or not. The table below enumerates the translated messages for each event of the touch screen and keyboard inputs.
 
Macros
Name 
Description 
This macro returns the x position of the focused cell. 
This macro returns the y position of the focused cell. 
Status of an out of bounds cell GridSetCell() operation. 
Status of a successful GridSetCell() operation. 
Structures
Name 
Description 
GRID 
Defines the parameters required for a grid Object. Clipping is not supported in grid object. 
Defines the grid item. 
Topics
Name 
Description 
List of Grid bit states. 
List of Grid Items bit states. 
Links
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved