GUIslice
0.16.0
Embedded GUI in C
|
Functions that configure or modify an existing eleemnt. More...
Functions | |
void | gslc_ElemSetFillEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFillEn) |
Set the fill state for an Element. More... | |
void | gslc_ElemSetFrameEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFrameEn) |
Set the frame state for an Element. More... | |
void | gslc_ElemSetRoundEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bRoundEn) |
Set the rounded frame/fill state for an Element. More... | |
void | gslc_ElemSetCol (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colFrame, gslc_tsColor colFill, gslc_tsColor colFillGlow) |
Update the common color selection for an Element. More... | |
void | gslc_ElemSetGlowCol (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colFrameGlow, gslc_tsColor colFillGlow, gslc_tsColor colTxtGlow) |
Update the common color selection for glowing state of an Element. More... | |
void | gslc_ElemSetGroup (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int nGroupId) |
Set the group ID for an element. More... | |
int | gslc_ElemGetGroup (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the group ID for an element. More... | |
void | gslc_ElemSetRect (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsRect rElem) |
Set the position and size for an element. More... | |
gslc_tsRect | gslc_ElemGetRect (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the rectangular region for an element. More... | |
void | gslc_ElemSetTxtAlign (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, unsigned nAlign) |
Set the alignment of a textual element (horizontal and vertical) More... | |
void | gslc_ElemSetTxtMargin (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, unsigned nMargin) |
Set the margin around of a textual element. More... | |
void | gslc_ElemSetTxtMarginXY (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int8_t nMarginX, int8_t nMarginY) |
Set the margin around of a textual element (X & Y offsets can be different) More... | |
void | gslc_StrCopy (char *pDstStr, const char *pSrcStr, uint16_t nDstLen) |
Helper routine to perform string deep copy. More... | |
void | gslc_ElemSetTxtStr (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, const char *pStr) |
Update the text string associated with an Element. More... | |
char * | gslc_ElemGetTxtStr (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Fetch the current text string associated with an Element. More... | |
void | gslc_ElemSetTxtCol (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colVal) |
Update the text string color associated with an Element ID. More... | |
void | gslc_ElemSetTxtMem (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teTxtFlags eFlags) |
Update the text string location in memory. More... | |
void | gslc_ElemSetTxtEnc (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teTxtFlags eFlags) |
Update the text string encoding mode. More... | |
void | gslc_ElemUpdateFont (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int nFontId) |
Update the Font selected for an Element's text. More... | |
void | gslc_ElemSetRedraw (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teRedrawType eRedraw) |
Update the need-redraw status for an element. More... | |
gslc_teRedrawType | gslc_ElemGetRedraw (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the need-redraw status for an element. More... | |
void | gslc_ElemSetGlowEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bGlowEn) |
Update the glowing enable for an element. More... | |
void | gslc_ElemSetClickEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bClickEn) |
Update the click enable for an element. More... | |
void | gslc_ElemSetTouchFunc (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_TOUCH funcCb) |
Update the touch function callback for an element. More... | |
void | gslc_ElemSetStyleFrom (gslc_tsGui *pGui, gslc_tsElemRef *pElemRefSrc, gslc_tsElemRef *pElemRefDest) |
Copy style settings from one element to another. More... | |
bool | gslc_ElemGetGlowEn (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the glowing enable for an element. More... | |
void | gslc_ElemSetGlow (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bGlowing) |
Update the glowing indicator for an element. More... | |
bool | gslc_ElemGetGlow (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the glowing indicator for an element. More... | |
void | gslc_ElemSetVisible (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bVisible) |
Update the visibility status for an element. More... | |
bool | gslc_ElemGetVisible (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Get the visibility status for an element. More... | |
bool | gslc_ElemGetOnScreen (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef) |
Determine whether an element is visible on the screen. More... | |
void | gslc_ElemSetDrawFunc (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_DRAW funcCb) |
Assign the drawing callback function for an element. More... | |
void | gslc_ElemSetTickFunc (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_TICK funcCb) |
Assign the tick callback function for an element. More... | |
bool | gslc_ElemOwnsCoord (gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nX, int16_t nY, bool bOnlyClickEn) |
Determine if a coordinate is inside of an element. More... | |
Functions that configure or modify an existing eleemnt.
bool gslc_ElemGetGlow | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the glowing indicator for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
bool gslc_ElemGetGlowEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the glowing enable for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
int gslc_ElemGetGroup | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the group ID for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
bool gslc_ElemGetOnScreen | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Determine whether an element is visible on the screen.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
gslc_tsRect gslc_ElemGetRect | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the rectangular region for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
gslc_teRedrawType gslc_ElemGetRedraw | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the need-redraw status for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
char* gslc_ElemGetTxtStr | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Fetch the current text string associated with an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
bool gslc_ElemGetVisible | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef | ||
) |
Get the visibility status for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
bool gslc_ElemOwnsCoord | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int16_t | nX, | ||
int16_t | nY, | ||
bool | bOnlyClickEn | ||
) |
Determine if a coordinate is inside of an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Element reference used for boundary test |
[in] | nX | X coordinate to test |
[in] | nY | Y coordinate to test |
[in] | bOnlyClickEn | Only output true if element was also marked as "clickable" (eg. bClickEn=true) |
void gslc_ElemSetClickEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bClickEn | ||
) |
Update the click enable for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bClickEn | True if element should support click events |
void gslc_ElemSetCol | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colFrame, | ||
gslc_tsColor | colFill, | ||
gslc_tsColor | colFillGlow | ||
) |
Update the common color selection for an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colFrame | Color for the frame |
[in] | colFill | Color for the fill |
[in] | colFillGlow | Color for the fill when glowing |
void gslc_ElemSetDrawFunc | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
GSLC_CB_DRAW | funcCb | ||
) |
Assign the drawing callback function for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | funcCb | Function pointer to drawing routine (or NULL for default)) |
void gslc_ElemSetFillEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bFillEn | ||
) |
Set the fill state for an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bFillEn | True if filled, false otherwise |
void gslc_ElemSetFrameEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bFrameEn | ||
) |
Set the frame state for an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bFrameEn | True if framed, false otherwise |
void gslc_ElemSetGlow | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bGlowing | ||
) |
Update the glowing indicator for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bGlowing | True if element is glowing |
void gslc_ElemSetGlowCol | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colFrameGlow, | ||
gslc_tsColor | colFillGlow, | ||
gslc_tsColor | colTxtGlow | ||
) |
Update the common color selection for glowing state of an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colFrameGlow | Color for the frame when glowing |
[in] | colFillGlow | Color for the fill when glowing |
[in] | colTxtGlow | Color for the text when glowing |
void gslc_ElemSetGlowEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bGlowEn | ||
) |
Update the glowing enable for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bGlowEn | True if element should support glowing |
void gslc_ElemSetGroup | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int | nGroupId | ||
) |
Set the group ID for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nGroupId | Group ID to assign |
void gslc_ElemSetRect | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsRect | rElem | ||
) |
Set the position and size for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | rElem | Rect region (top-left coord, width, height) |
void gslc_ElemSetRedraw | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_teRedrawType | eRedraw | ||
) |
Update the need-redraw status for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | eRedraw | Redraw state to set |
void gslc_ElemSetRoundEn | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bRoundEn | ||
) |
Set the rounded frame/fill state for an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bRoundEn | True if rounded, false otherwise |
void gslc_ElemSetStyleFrom | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRefSrc, | ||
gslc_tsElemRef * | pElemRefDest | ||
) |
Copy style settings from one element to another.
[in] | pGui | Pointer to GUI |
[in] | pElemRefSrc | Pointer to source Element reference |
[in] | pElemRefDest | Pointer to destination Element reference |
void gslc_ElemSetTickFunc | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
GSLC_CB_TICK | funcCb | ||
) |
Assign the tick callback function for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | funcCb | Function pointer to tick routine (or NULL for none)) |
void gslc_ElemSetTouchFunc | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
GSLC_CB_TOUCH | funcCb | ||
) |
Update the touch function callback for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | funcCb | Pointer to the touch callback function |
void gslc_ElemSetTxtAlign | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
unsigned | nAlign | ||
) |
Set the alignment of a textual element (horizontal and vertical)
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nAlign | Alignment to specify:
|
void gslc_ElemSetTxtCol | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_tsColor | colVal | ||
) |
Update the text string color associated with an Element ID.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | colVal | RGB color to change to |
void gslc_ElemSetTxtEnc | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_teTxtFlags | eFlags | ||
) |
Update the text string encoding mode.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | eFlags | Flags associated with text encoding (GSLC_TXT_ENC_*) |
void gslc_ElemSetTxtMargin | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
unsigned | nMargin | ||
) |
Set the margin around of a textual element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nMargin | Number of pixels gap to leave surrounding text |
void gslc_ElemSetTxtMarginXY | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int8_t | nMarginX, | ||
int8_t | nMarginY | ||
) |
Set the margin around of a textual element (X & Y offsets can be different)
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nMarginX | Number of pixels gap to offset text horizontally |
[in] | nMarginY | Number of pixels gap to offset text vertically |
void gslc_ElemSetTxtMem | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
gslc_teTxtFlags | eFlags | ||
) |
Update the text string location in memory.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | eFlags | Flags associated with text memory location (GSLC_TXT_MEM_*) |
void gslc_ElemSetTxtStr | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
const char * | pStr | ||
) |
Update the text string associated with an Element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | pStr | String to copy into element |
void gslc_ElemSetVisible | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
bool | bVisible | ||
) |
Update the visibility status for an element.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | bVisible | True if element is shown, false if hidden |
void gslc_ElemUpdateFont | ( | gslc_tsGui * | pGui, |
gslc_tsElemRef * | pElemRef, | ||
int | nFontId | ||
) |
Update the Font selected for an Element's text.
[in] | pGui | Pointer to GUI |
[in] | pElemRef | Pointer to Element reference |
[in] | nFontId | Font ID to select |
void gslc_StrCopy | ( | char * | pDstStr, |
const char * | pSrcStr, | ||
uint16_t | nDstLen | ||
) |
Helper routine to perform string deep copy.
[in,out] | pDstStr | Pointer to destination buffer |
[in] | nDstLen | Size of destination buffer (includes NULL) |
[in] | pSrcStr | Pointer to source buffer |