Go to the source code of this file.
|
gslc_tsElemRef * | gslc_ElemXSpinnerCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXSpinner *pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, int16_t nIncr, int8_t nFontId, int8_t nButtonSz, GSLC_CB_INPUT cbInput) |
| Create a Spinner Element. More...
|
|
bool | gslc_ElemXSpinnerSetChars (void *pvGui, gslc_tsElemRef *pElemRef, uint8_t cIncr, uint8_t cDecr) |
| Set Up and Down characters for the Spinner element. More...
|
|
bool | gslc_ElemXSpinnerDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw) |
| Draw a Spinner element on the screen. More...
|
|
int | gslc_ElemXSpinnerGetCounter (gslc_tsGui *pGui, gslc_tsXSpinner *pSpinner) |
| Get the current counter associated with Spinner. More...
|
|
void | gslc_ElemXSpinnerSetCounter (gslc_tsGui *pGui, gslc_tsXSpinner *pSpinner, int16_t nCount) |
| Set the current counter associated with Spinner. More...
|
|
bool | gslc_ElemXSpinnerClick (void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY) |
| Handle a click event within the Spinner. More...
|
|
bool | gslc_ElemXSpinnerTouch (void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t nRelY) |
| Handle touch (up,down,move) events to Spinner element. More...
|
|
#define GSLC_TYPEX_SPINNER |
#define XSPINNER_CB_STATE_UPDATE |
#define XSPINNER_COMP_CNT |
bool gslc_ElemXSpinnerClick |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teTouch |
eTouch, |
|
|
int16_t |
nX, |
|
|
int16_t |
nY |
|
) |
| |
Handle a click event within the Spinner.
- This is called internally by the Spinner touch handler
- Parameters
-
[in] | pvGui | Void ptr to GUI (typecast to gslc_tsGui*) |
[in] | pvElemRef | Void ptr to Element reference (typecast to gslc_tsElemRef*) |
[in] | eTouch | Touch event type |
[in] | nX | Touch X coord |
[in] | nY | Touch Y coord |
- Returns
- none
gslc_tsElemRef* gslc_ElemXSpinnerCreate |
( |
gslc_tsGui * |
pGui, |
|
|
int16_t |
nElemId, |
|
|
int16_t |
nPage, |
|
|
gslc_tsXSpinner * |
pXData, |
|
|
gslc_tsRect |
rElem, |
|
|
int16_t |
nMin, |
|
|
int16_t |
nMax, |
|
|
int16_t |
nVal, |
|
|
int16_t |
nIncr, |
|
|
int8_t |
nFontId, |
|
|
int8_t |
nButtonSz, |
|
|
GSLC_CB_INPUT |
cbInput |
|
) |
| |
Create a Spinner 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] | rElem | Rectangle coordinates defining overall size |
[in] | nMin | Minimum value of Spinner |
[in] | nMax | Maximum value of Spinner |
[in] | nVal | Starting value of Spinner |
[in] | nIncr | Increment Spinner by this value |
[in] | nFontId | Font ID to use for drawing the element |
[in] | nButtonSz | Size of individual buttons |
[in] | cbInput | Callback for touch events |
- Returns
- Pointer to Element or NULL if failure
bool gslc_ElemXSpinnerDraw |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teRedrawType |
eRedraw |
|
) |
| |
Draw a Spinner element on the screen.
- Parameters
-
[in] | pvGui | Void ptr to GUI (typecast to gslc_tsGui*) |
[in] | pvElemRef | Void ptr to Element reference (typecast to gslc_tsElemRef*) |
[in] | eRedraw | Redraw mode |
- Returns
- true if success, false otherwise
Get the current counter associated with Spinner.
- Parameters
-
[in] | pGui | Ptr to GUI |
[in] | pSpinner | Ptr to Element |
- Returns
- Current counter value
bool gslc_ElemXSpinnerSetChars |
( |
void * |
pvGui, |
|
|
gslc_tsElemRef * |
pElemRef, |
|
|
uint8_t |
cIncr, |
|
|
uint8_t |
cDecr |
|
) |
| |
Set Up and Down characters for the Spinner element.
- Parameters
-
[in] | pvGui | Void ptr to GUI (typecast to gslc_tsGui*) |
[in] | pElemRef | Ptr to ElementRef |
[in] | cIncr | Character to use to indicate incrementing the spinner |
[in] | cDecr | Character to use to indicate decrementing the spinner |
- Returns
- true if success, false otherwise
Set the current counter associated with Spinner.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pSpinner | Ptr to Element |
[in] | nCount | New counter value |
- Returns
- none
bool gslc_ElemXSpinnerTouch |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teTouch |
eTouch, |
|
|
int16_t |
nRelX, |
|
|
int16_t |
nRelY |
|
) |
| |
Handle touch (up,down,move) events to Spinner element.
- Parameters
-
[in] | pvGui | Void ptr to GUI (typecast to gslc_tsGui*) |
[in] | pvElemRef | Void ptr to Element reference (typecast to gslc_tsElemRef*) |
[in] | eTouch | Touch event type |
[in] | nRelX | Touch X coord relative to element |
[in] | nRelY | Touch Y coord relative to element |
- Returns
- true if success, false otherwise