Go to the source code of this file.
|
gslc_tsElemRef * | gslc_ElemXKeyPadCreate_Alpha (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXKeyPad *pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Alpha *pConfig) |
| Create a KeyPad Element. More...
|
|
gslc_tsXKeyPadCfg_Alpha | gslc_ElemXKeyPadCfgInit_Alpha () |
| Initialize the KeyPad config structure. More...
|
|
void | gslc_ElemXKeyPadReset_Alpha (void *pvConfig) |
| Callback function to reset internal state. More...
|
|
void | gslc_ElemXKeyPadTxtInit_Alpha (void *pvKeyPad) |
| Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet(). More...
|
|
void | gslc_ElemXKeyPadLabelGet_Alpha (void *pvKeyPad, uint8_t nId, uint8_t nStrMax, char *pStr) |
| Callback function to retrieve the label associated with a KeyPad button. More...
|
|
void | gslc_ElemXKeyPadStyleGet_Alpha (void *pvKeyPad, uint8_t nId, bool *pbVisible, gslc_tsColor *pcolTxt, gslc_tsColor *pcolFrame, gslc_tsColor *pcolFill, gslc_tsColor *pcolGlow) |
| Callback function to retrieve the style associated with a KeyPad button. More...
|
|
void | gslc_ElemXKeyPadBtnEvt_Alpha (void *pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult *psResult) |
| Callback function activated when a key has been pressed. More...
|
|
Callback function activated when a key has been pressed.
This callback is used to enable the KeyPad variant to handle any events associated with the key press and update any internal state.
- The callback is also used to determine whether any redraw actions need to be taken.
- Parameters
-
[in] | pvKeyPad | Void ptr to the KeyPad |
[in] | nId | KeyPad key ID |
[out] | psResult | The returned state vector (including redraw) |
- Returns
- none
Initialize the KeyPad config structure.
- This routine should be called to initialize the configuration data structure before calling any of the KeyPad config APIs
- Returns
- Initialized KeyPad config structure
Create a KeyPad Element.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nElemId | Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen) |
[in] | nPage | Page ID to attach element to |
[in] | pXData | Ptr to extended element data structure |
[in] | nX0 | X KeyPad Starting Coordinate |
[in] | nY0 | Y KeyPad Starting Coordinate |
[in] | nFontId | Font ID to use for drawing the element |
[in] | pConfig | Ptr to config options |
- Returns
- Pointer to Element or NULL if failure
void gslc_ElemXKeyPadLabelGet_Alpha |
( |
void * |
pvKeyPad, |
|
|
uint8_t |
nId, |
|
|
uint8_t |
nStrMax, |
|
|
char * |
pStr |
|
) |
| |
Callback function to retrieve the label associated with a KeyPad button.
This is called during the drawing of the KeyPad layout.
- Parameters
-
[in] | pvKeyPad | Void ptr to the KeyPad |
[in] | nId | KeyPad key ID |
[in] | nStrMax | Maximum length of return string (including NULL) |
[out] | pStr | Buffer for the returned label |
- Returns
- none
void gslc_ElemXKeyPadReset_Alpha |
( |
void * |
pvConfig | ) |
|
Callback function to reset internal state.
- Parameters
-
[in] | pvConfig | Void ptr to the KeyPad config |
- Returns
- none
Callback function to retrieve the style associated with a KeyPad button.
This is called during the drawing of the KeyPad layout.
- This function is used to assign the color and visibility state of the keys at runtime.
- This function can also be used to change the appearance dynamically, according to internal state (eg. dimmed buttons).
- Parameters
-
[in] | pvKeyPad | Void ptr to the KeyPad |
[in] | nId | KeyPad key ID |
[out] | pbVisible | The returned visibility state |
[out] | pcolTxt | The returned text color |
[out] | pcolFrame | The returned key's frame color |
[out] | pcolFill | The returned key's fill color |
[out] | pcolGlow | The returned key's fill color when highlighted |
- Returns
- none
void gslc_ElemXKeyPadTxtInit_Alpha |
( |
void * |
pvKeyPad | ) |
|
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
- This is used to ensure any KeyPad variant state can be kept in sync with the text string.
- For example, if a numeric KeyPad is initiaized with a string that contains a minus sign, an internal negation flag might be set.
- Parameters
-
[in] | pvKeyPad | Void ptr to the KeyPad |
- Returns
- none