Functions that create GUI elements.
More...
|
gslc_tsElemRef * | gslc_ElemCreateTxt (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem, char *pStrBuf, uint8_t nStrBufMax, int16_t nFontId) |
| Create a Text Element. More...
|
|
gslc_tsElemRef * | gslc_ElemCreateBtnTxt (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem, char *pStrBuf, uint8_t nStrBufMax, int16_t nFontId, GSLC_CB_TOUCH cbTouch) |
| Create a textual Button Element. More...
|
|
gslc_tsElemRef * | gslc_ElemCreateBtnImg (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem, gslc_tsImgRef sImgRef, gslc_tsImgRef sImgRefSel, GSLC_CB_TOUCH cbTouch) |
| Create a graphical Button Element. More...
|
|
gslc_tsElemRef * | gslc_ElemCreateBox (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem) |
| Create a Box Element. More...
|
|
gslc_tsElemRef * | gslc_ElemCreateLine (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1) |
| Create a Line Element. More...
|
|
gslc_tsElemRef * | gslc_ElemCreateImg (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem, gslc_tsImgRef sImgRef) |
| Create an image Element. More...
|
|
Functions that create GUI elements.
Create a Box Element.
- Draws a box with frame and fill
- 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] | rElem | Rectangle coordinates defining box size |
- Returns
- Pointer to the Element reference or NULL if failure
Create a graphical Button Element.
- Creates a clickable element that uses a BMP image with no frame or fill
- Transparency is supported by bitmap color (0xFF00FF)
- 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] | rElem | Rectangle coordinates defining image size |
[in] | sImgRef | Image reference to load (unselected state) |
[in] | sImgRefSel | Image reference to load (selected state) |
[in] | cbTouch | Callback for touch events |
- Returns
- Pointer to the Element reference or NULL if failure
Create a textual Button Element.
- Creates a clickable element that has a textual label with frame and fill
- 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] | rElem | Rectangle coordinates defining text background size |
[in] | pStrBuf | String to copy into element |
[in] | nStrBufMax | Maximum length of string buffer (pStrBuf). Only applicable if GSLC_LOCAL_STR=0. Ignored if GSLC_LOCAL_STR=1.) |
[in] | nFontId | Font ID to use for text display |
[in] | cbTouch | Callback for touch events |
- Returns
- Pointer to the Element reference or NULL if failure
Create an image 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] | rElem | Rectangle coordinates defining box size |
[in] | sImgRef | Image reference to load |
- Returns
- Pointer to the Element reference or NULL if failure
gslc_tsElemRef* gslc_ElemCreateLine |
( |
gslc_tsGui * |
pGui, |
|
|
int16_t |
nElemId, |
|
|
int16_t |
nPage, |
|
|
int16_t |
nX0, |
|
|
int16_t |
nY0, |
|
|
int16_t |
nX1, |
|
|
int16_t |
nY1 |
|
) |
| |
Create a Line Element.
- Draws a line with fill color
- 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] | nX0 | X coordinate of line startpoint |
[in] | nY0 | Y coordinate of line startpoint |
[in] | nX1 | X coordinate of line endpoint |
[in] | nY1 | Y coordinate of line endpoint |
- Returns
- Pointer to the Element reference or NULL if failure
Create a Text Element.
- Draws a text string with filled background
- 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] | rElem | Rectangle coordinates defining text background size |
[in] | pStrBuf | String to copy into element |
[in] | nStrBufMax | Maximum length of string buffer (pStrBuf). Only applicable if GSLC_LOCAL_STR=0. Ignored if GSLC_LOCAL_STR=1.) |
[in] | nFontId | Font ID to use for text display |
- Returns
- Pointer to the Element reference or NULL if failure