GUIslice  0.16.0
Embedded GUI in C
XTemplate.c File Reference
#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XTemplate.h"
#include <stdio.h>
Include dependency graph for XTemplate.c:

Functions

gslc_tsElemRefgslc_ElemXTemplateCreate (gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsXTemplate *pXData, gslc_tsRect rElem, char *pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
 Create an Extended Text Field Element. More...
 
bool gslc_ElemXTemplateDraw (void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw)
 Draw the template element on the screen. More...
 
bool gslc_ElemXTemplateTouch (void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t nRelY)
 Handle touch events to template element. More...
 

Variables

const char GSLC_PMEM ERRSTR_NULL []
 
const char GSLC_PMEM ERRSTR_PXD_NULL []
 

Function Documentation

gslc_tsElemRef* gslc_ElemXTemplateCreate ( gslc_tsGui pGui,
int16_t  nElemId,
int16_t  nPage,
gslc_tsXTemplate pXData,
gslc_tsRect  rElem,
char *  pStrBuf,
uint8_t  nStrBufMax,
int16_t  nFontId 
)

Create an Extended Text Field Element.

Parameters
[in]pGuiPointer to GUI
[in]nElemIdElement ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
[in]nPagePage ID to attach element to
[in]pXDataPtr to extended element data structure
[in]rElemRectangle coordinates defining element size
[in]pStrBufPtr to string buffer
[in]nStrBufMaxMaximum buffer alength allocated to pStrBuf
[in]nFontIdID of font to use for text output
Returns
Pointer to Element reference or NULL if failure
bool gslc_ElemXTemplateDraw ( void *  pvGui,
void *  pvElemRef,
gslc_teRedrawType  eRedraw 
)

Draw the template element on the screen.

Parameters
[in]pvGuiVoid ptr to GUI (typecast to gslc_tsGui*)
[in]pvElemRefVoid ptr to Element reference (typecast to gslc_tsElemRef*)
[in]eRedrawRedraw mode
Returns
true if success, false otherwise
bool gslc_ElemXTemplateTouch ( void *  pvGui,
void *  pvElemRef,
gslc_teTouch  eTouch,
int16_t  nRelX,
int16_t  nRelY 
)

Handle touch events to template element.

Parameters
[in]pvGuiVoid ptr to GUI (typecast to gslc_tsGui*)
[in]pvElemRefVoid ptr to Element reference (typecast to gslc_tsElemRef*)
[in]eTouchTouch event type
[in]nRelXTouch X coord relative to element
[in]nRelYTouch Y coord relative to element
Returns
true if success, false otherwise

Variable Documentation

const char GSLC_PMEM ERRSTR_NULL[]
const char GSLC_PMEM ERRSTR_PXD_NULL[]