|
GUIslice
0.16.0
Embedded GUI in C
|
#include "GUIslice.h"#include "GUIslice_drv.h"#include "elem/XKeyPad.h"#include "elem/XKeyPad_Num.h"#include <stdio.h>#include "elem/XKeyPad_Num-setup.h"
Functions | |
| void | gslc_XKeyPadValSetSign_Num (gslc_tsXKeyPad *pXKeyPad, bool bPositive) |
| void | gslc_ElemXKeyPadReset_Num (void *pvConfig) |
| Callback function to reset internal state. More... | |
| void | gslc_ElemXKeyPadTxtInit_Num (void *pvKeyPad) |
| Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet(). More... | |
| void | gslc_ElemXKeyPadLabelGet_Num (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_Num (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_Num (void *pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult *psResult) |
| Callback function activated when a key has been pressed. More... | |
| gslc_tsXKeyPadCfg_Num | gslc_ElemXKeyPadCfgInit_Num () |
| Initialize the KeyPad config structure. More... | |
| gslc_tsElemRef * | gslc_ElemXKeyPadCreate_Num (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXKeyPad *pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Num *pConfig) |
| Create a KeyPad Element. More... | |
| void | gslc_ElemXKeyPadCfgSetFloatEn_Num (gslc_tsXKeyPadCfg_Num *pConfig, bool bEn) |
| Update the KeyPad configuration to enable floating point numbers. More... | |
| void | gslc_ElemXKeyPadCfgSetSignEn_Num (gslc_tsXKeyPadCfg_Num *pConfig, bool bEn) |
| Update the KeyPad configuration to enable negative numbers. More... | |
Variables | |
| const char GSLC_PMEM | ERRSTR_NULL [] |
| const char GSLC_PMEM | ERRSTR_PXD_NULL [] |
| void gslc_ElemXKeyPadBtnEvt_Num | ( | void * | pvKeyPad, |
| uint8_t | nId, | ||
| gslc_tsXKeyPadResult * | psResult | ||
| ) |
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.
| [in] | pvKeyPad | Void ptr to the KeyPad |
| [in] | nId | KeyPad key ID |
| [out] | psResult | The returned state vector (including redraw) |
| gslc_tsXKeyPadCfg_Num gslc_ElemXKeyPadCfgInit_Num | ( | ) |
Initialize the KeyPad config structure.
| void gslc_ElemXKeyPadCfgSetFloatEn_Num | ( | gslc_tsXKeyPadCfg_Num * | pConfig, |
| bool | bEn | ||
| ) |
Update the KeyPad configuration to enable floating point numbers.
| [in] | pConfig | Pointer to the XKeyPad variant config structure |
| [in] | bEn | Enable flag (true if floating point enabled) |
| void gslc_ElemXKeyPadCfgSetSignEn_Num | ( | gslc_tsXKeyPadCfg_Num * | pConfig, |
| bool | bEn | ||
| ) |
Update the KeyPad configuration to enable negative numbers.
| [in] | pConfig | Pointer to the XKeyPad variant config structure |
| [in] | bEn | Enable flag (true if negative numbers enabled) |
| gslc_tsElemRef* gslc_ElemXKeyPadCreate_Num | ( | gslc_tsGui * | pGui, |
| int16_t | nElemId, | ||
| int16_t | nPage, | ||
| gslc_tsXKeyPad * | pXData, | ||
| int16_t | nX0, | ||
| int16_t | nY0, | ||
| int8_t | nFontId, | ||
| gslc_tsXKeyPadCfg_Num * | pConfig | ||
| ) |
Create a KeyPad Element.
| [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 |
| void gslc_ElemXKeyPadLabelGet_Num | ( | 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.
| [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 |
| void gslc_ElemXKeyPadReset_Num | ( | void * | pvConfig | ) |
Callback function to reset internal state.
| [in] | pvConfig | Void ptr to the KeyPad config |
| void gslc_ElemXKeyPadStyleGet_Num | ( | 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.
This is called during the drawing of the KeyPad layout.
| [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 |
| void gslc_ElemXKeyPadTxtInit_Num | ( | void * | pvKeyPad | ) |
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
| [in] | pvKeyPad | Void ptr to the KeyPad |
| void gslc_XKeyPadValSetSign_Num | ( | gslc_tsXKeyPad * | pXKeyPad, |
| bool | bPositive | ||
| ) |
| const char GSLC_PMEM ERRSTR_NULL[] |
| const char GSLC_PMEM ERRSTR_PXD_NULL[] |