Go to the source code of this file.
|
#define | GSLC_TYPEX_TOGGLEBTN |
|
#define | gslc_ElemXTogglebtnCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, colThumb_, colOnState_, colOffState_, bCircular_, bChecked_, cbTouch) |
| Create a Togglebtn button Element. More...
|
|
|
gslc_tsElemRef * | gslc_ElemXTogglebtnCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXTogglebtn *pXData, gslc_tsRect rElem, gslc_tsColor colThumb, gslc_tsColor colOnState, gslc_tsColor colOffState, bool bCircular, bool bChecked, GSLC_CB_TOUCH cbTouch) |
| Create a Togglebtn button Element. More...
|
|
bool | gslc_ElemXTogglebtnGetState (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
| Get a Togglebtn element's current state. More...
|
|
void | gslc_ElemXTogglebtnSetState (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bOn) |
| Set a Togglebtn element's current state. More...
|
|
void | gslc_ElemXTogglebtnToggleState (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
| Toggle a Togglebtn element's current state. More...
|
|
bool | gslc_ElemXTogglebtnDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw) |
| Draw a Togglebtn element on the screen. More...
|
|
bool | gslc_ElemXTogglebtnTouch (void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t nRelY) |
| Handle touch events to Togglebtn element. More...
|
|
gslc_tsElemRef * | gslc_ElemXTogglebtnFindSelected (gslc_tsGui *pGui, int16_t nGroupId) |
| Find the togglebtn within a group that has been selected. More...
|
|
#define gslc_ElemXTogglebtnCreate_P |
( |
|
pGui, |
|
|
|
nElemId, |
|
|
|
nPage, |
|
|
|
nX, |
|
|
|
nY, |
|
|
|
nW, |
|
|
|
nH, |
|
|
|
colThumb_, |
|
|
|
colOnState_, |
|
|
|
colOffState_, |
|
|
|
bCircular_, |
|
|
|
bChecked_, |
|
|
|
cbTouch |
|
) |
| |
Create a Togglebtn button 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] | nX | X coordinate of element |
[in] | nY | Y coordinate of element |
[in] | nW | Width of element |
[in] | nH | Height of element |
[in] | colThumb_ | Color of thumb |
[in] | colOnState_ | Color to indicate on position |
[in] | colOffState_ | Color to indicate off position |
[in] | bCircular_ | Style of the toggle button circular or rectangular |
[in] | bChecked_ | Default state |
[in] | cbTouch | Callback for touch events |
- Returns
- none
#define GSLC_TYPEX_TOGGLEBTN |
gslc_tsElemRef* gslc_ElemXTogglebtnCreate |
( |
gslc_tsGui * |
pGui, |
|
|
int16_t |
nElemId, |
|
|
int16_t |
nPage, |
|
|
gslc_tsXTogglebtn * |
pXData, |
|
|
gslc_tsRect |
rElem, |
|
|
gslc_tsColor |
colThumb, |
|
|
gslc_tsColor |
colOnState, |
|
|
gslc_tsColor |
colOffState, |
|
|
bool |
bCircular, |
|
|
bool |
bChecked, |
|
|
GSLC_CB_TOUCH |
cbTouch |
|
) |
| |
Create a Togglebtn button 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 togglebtn size |
[in] | colThumb | Color of thumb |
[in] | colOnState | Color to indicate on position |
[in] | colOffState | Color to indicate off position |
[in] | bCircular | Style of the toggle button circular or rectangular |
[in] | bChecked | Default state |
[in] | cbTouch | Callback for touch events |
- Returns
- Pointer to Element reference or NULL if failure
bool gslc_ElemXTogglebtnDraw |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teRedrawType |
eRedraw |
|
) |
| |
Draw a Togglebtn 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
Find the togglebtn within a group that has been selected.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nGroupId | Group ID to search |
- Returns
- Element Ptr or NULL if none selected
Get a Togglebtn element's current state.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
- Returns
- Current state
Set a Togglebtn element's current state.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bOn | New state |
- Returns
- none
Toggle a Togglebtn element's current state.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
- Returns
- none
bool gslc_ElemXTogglebtnTouch |
( |
void * |
pvGui, |
|
|
void * |
pvElemRef, |
|
|
gslc_teTouch |
eTouch, |
|
|
int16_t |
nRelX, |
|
|
int16_t |
nRelY |
|
) |
| |
Handle touch events to Togglebtn 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