0% found this document useful (0 votes)
383 views754 pages

GUIslice Ref

This document is a Doxygen generated reference for the GUIslice library version 0.17.0. It includes sections that provide an overview of the library and its modules, classes, data structures, files, and documentation for functions within various modules like general functions, graphics functions, primitive drawing functions, and font functions.

Uploaded by

Aurel Bodenmann
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
383 views754 pages

GUIslice Ref

This document is a Doxygen generated reference for the GUIslice library version 0.17.0. It includes sections that provide an overview of the library and its modules, classes, data structures, files, and documentation for functions within various modules like general functions, graphics functions, primitive drawing functions, and font functions.

Uploaded by

Aurel Bodenmann
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 754

GUIslice

0.17.0

Generated by Doxygen 1.8.13


Contents

1 GUIslice library 1

2 Todo List 3

3 Module Index 5

3.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Hierarchical Index 7

4.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Data Structure Index 9

5.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

6 File Index 11

6.1 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

7 Module Documentation 13

7.1 General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7.1.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7.1.2.1 gslc_DebugPrintf() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7.1.2.2 gslc_GetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7.1.2.3 gslc_GetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

7.1.2.4 gslc_GetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

7.1.2.5 gslc_GetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

7.1.2.6 gslc_GetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ii CONTENTS

7.1.2.7 gslc_GetVer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

7.1.2.8 gslc_GuiRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

7.1.2.9 gslc_Init() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

7.1.2.10 gslc_InitDebug() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

7.1.2.11 gslc_Quit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

7.1.2.12 gslc_SetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

7.1.2.13 gslc_SetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7.1.2.14 gslc_SetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7.1.2.15 gslc_SetTransparentColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

7.1.2.16 gslc_Update() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

7.2 Graphics General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

7.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

7.2.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

7.2.2.1 gslc_ClipLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

7.2.2.2 gslc_ClipPt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

7.2.2.3 gslc_ClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

7.2.2.4 gslc_ColorBlend2() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

7.2.2.5 gslc_ColorBlend3() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

7.2.2.6 gslc_ColorEqual() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

7.2.2.7 gslc_cosFX() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

7.2.2.8 gslc_ExpandRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

7.2.2.9 gslc_GetImageFromFile() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

7.2.2.10 gslc_GetImageFromProg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

7.2.2.11 gslc_GetImageFromRam() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

7.2.2.12 gslc_GetImageFromSD() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

7.2.2.13 gslc_InvalidateRgnAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

7.2.2.14 gslc_InvalidateRgnPage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

7.2.2.15 gslc_InvalidateRgnReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

7.2.2.16 gslc_InvalidateRgnScreen() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

7.2.2.17 gslc_IsInRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Generated by Doxygen
CONTENTS iii

7.2.2.18 gslc_IsInWH() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

7.2.2.19 gslc_PolarToXY() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

7.2.2.20 gslc_sinFX() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

7.2.2.21 gslc_UnionRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

7.3 Graphics Primitive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

7.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.3.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.3.2.1 gslc_DrawFillCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.3.2.2 gslc_DrawFillGradSector() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.3.2.3 gslc_DrawFillQuad() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

7.3.2.4 gslc_DrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7.3.2.5 gslc_DrawFillRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7.3.2.6 gslc_DrawFillSector() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

7.3.2.7 gslc_DrawFillTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

7.3.2.8 gslc_DrawFrameCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.3.2.9 gslc_DrawFrameQuad() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.3.2.10 gslc_DrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.3.2.11 gslc_DrawFrameRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.3.2.12 gslc_DrawFrameTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7.3.2.13 gslc_DrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7.3.2.14 gslc_DrawLineH() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7.3.2.15 gslc_DrawLinePolar() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7.3.2.16 gslc_DrawLineV() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

7.3.2.17 gslc_DrawSetPixel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

7.4 Font Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

7.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

7.4.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

7.4.2.1 gslc_FontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

7.4.2.2 gslc_FontGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

7.4.2.3 gslc_FontSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Generated by Doxygen
iv CONTENTS

7.4.2.4 gslc_FontSetMode() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

7.5 Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7.5.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7.5.2.1 gslc_GetPageCur() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7.5.2.2 gslc_PageAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

7.5.2.3 gslc_PageFindElemById() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

7.5.2.4 gslc_PageRedrawGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

7.5.2.5 gslc_PageRedrawSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

7.5.2.6 gslc_PopupHide() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

7.5.2.7 gslc_PopupShow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

7.5.2.8 gslc_SetPageBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

7.5.2.9 gslc_SetPageCur() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

7.5.2.10 gslc_SetPageOverlay() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

7.5.2.11 gslc_SetStackPage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

7.5.2.12 gslc_SetStackState() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

7.6 Element Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

7.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

7.7 Element: Creation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

7.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

7.7.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

7.7.2.1 gslc_ElemCreateBox() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

7.7.2.2 gslc_ElemCreateBtnImg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

7.7.2.3 gslc_ElemCreateBtnTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

7.7.2.4 gslc_ElemCreateImg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

7.7.2.5 gslc_ElemCreateLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

7.7.2.6 gslc_ElemCreateTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

7.8 Element: General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.8.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Generated by Doxygen
CONTENTS v

7.8.2.1 gslc_ElemGetId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.9 Element: Update Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

7.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

7.9.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

7.9.2.1 gslc_ElemCalcRectState() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

7.9.2.2 gslc_ElemCalcResizeForFocus() . . . . . . . . . . . . . . . . . . . . . . . . . 64

7.9.2.3 gslc_ElemGetEdit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

7.9.2.4 gslc_ElemGetFocus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

7.9.2.5 gslc_ElemGetFocusEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

7.9.2.6 gslc_ElemGetGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

7.9.2.7 gslc_ElemGetGlowEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

7.9.2.8 gslc_ElemGetGroup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

7.9.2.9 gslc_ElemGetOnScreen() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

7.9.2.10 gslc_ElemGetRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

7.9.2.11 gslc_ElemGetRedraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

7.9.2.12 gslc_ElemGetTxtStr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

7.9.2.13 gslc_ElemGetVisible() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

7.9.2.14 gslc_ElemGrowRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

7.9.2.15 gslc_ElemOwnsCoord() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

7.9.2.16 gslc_ElemSetClickEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

7.9.2.17 gslc_ElemSetCol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

7.9.2.18 gslc_ElemSetDrawFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

7.9.2.19 gslc_ElemSetEdit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

7.9.2.20 gslc_ElemSetFillEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

7.9.2.21 gslc_ElemSetFocus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

7.9.2.22 gslc_ElemSetFocusEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

7.9.2.23 gslc_ElemSetFrameEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

7.9.2.24 gslc_ElemSetGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

7.9.2.25 gslc_ElemSetGlowCol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

7.9.2.26 gslc_ElemSetGlowEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Generated by Doxygen
vi CONTENTS

7.9.2.27 gslc_ElemSetGroup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

7.9.2.28 gslc_ElemSetRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

7.9.2.29 gslc_ElemSetRedraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

7.9.2.30 gslc_ElemSetRoundEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

7.9.2.31 gslc_ElemSetStyleFrom() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

7.9.2.32 gslc_ElemSetTickFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

7.9.2.33 gslc_ElemSetTouchFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

7.9.2.34 gslc_ElemSetTxtAlign() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

7.9.2.35 gslc_ElemSetTxtCol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

7.9.2.36 gslc_ElemSetTxtEnc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

7.9.2.37 gslc_ElemSetTxtMargin() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

7.9.2.38 gslc_ElemSetTxtMarginXY() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

7.9.2.39 gslc_ElemSetTxtMem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

7.9.2.40 gslc_ElemSetTxtStr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

7.9.2.41 gslc_ElemSetVisible() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

7.9.2.42 gslc_ElemUpdateFont() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

7.9.2.43 gslc_ResetRectState() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

7.9.2.44 gslc_StrCopy() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

7.10 Touchscreen Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

7.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

7.10.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

7.10.2.1 TOUCH_ROTATION_DATA [1/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.2 TOUCH_ROTATION_DATA [2/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.3 TOUCH_ROTATION_FLIPX [1/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.4 TOUCH_ROTATION_FLIPX [2/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.5 TOUCH_ROTATION_FLIPY [1/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.6 TOUCH_ROTATION_FLIPY [2/2] . . . . . . . . . . . . . . . . . . . . . . . . 85

7.10.2.7 TOUCH_ROTATION_SWAPXY [1/2] . . . . . . . . . . . . . . . . . . . . . . 86

7.10.2.8 TOUCH_ROTATION_SWAPXY [2/2] . . . . . . . . . . . . . . . . . . . . . . 86

7.10.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Generated by Doxygen
CONTENTS vii

7.10.3.1 gslc_GetTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

7.10.3.2 gslc_InitTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

7.10.3.3 gslc_SetTouchPressCal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

7.10.3.4 gslc_SetTouchRemapCal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

7.10.3.5 gslc_SetTouchRemapEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

7.10.3.6 gslc_SetTouchRemapYX() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

7.11 Input Mapping Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

7.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

7.11.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

7.11.2.1 gslc_FocusElemGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

7.11.2.2 gslc_FocusElemIndSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

7.11.2.3 gslc_FocusElemStep() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

7.11.2.4 gslc_FocusPageStep() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

7.11.2.5 gslc_FocusSetToTrackedElem() . . . . . . . . . . . . . . . . . . . . . . . . . . 92

7.11.2.6 gslc_InitInputMap() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

7.11.2.7 gslc_InputMapAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

7.11.2.8 gslc_SetPinPollFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

7.12 General Purpose Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.2.1 GSLC_DEBUG2_PRINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.2.2 GSLC_DEBUG2_PRINT_CONST . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.2.3 GSLC_DEBUG_PRINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

7.12.2.4 GSLC_DEBUG_PRINT_CONST . . . . . . . . . . . . . . . . . . . . . . . . . 96

7.13 Flash-based Element Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7.13.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7.13.2.1 gslc_ElemCreateBox_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7.13.2.2 gslc_ElemCreateBtnTxt_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

7.13.2.3 gslc_ElemCreateLine_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Generated by Doxygen
viii CONTENTS

7.13.2.4 gslc_ElemCreateTxt_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

7.13.2.5 gslc_ElemCreateTxt_P_R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

7.13.2.6 gslc_ElemCreateTxt_P_R_ext . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

7.14 Internal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

7.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

7.14.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

7.14.2.1 abPageStackActive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

7.14.2.2 abPageStackDoDraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

7.14.2.3 apPageStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.4 asElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.5 asElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.6 asFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.7 asInputMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.8 asPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

7.14.2.9 b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.10 bEventPending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.11 bInvalidateEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.12 bRedrawNeeded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.13 bRedrawPartialEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.14 bScreenNeedFlip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7.14.2.15 bScreenNeedRedraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.16 bTouchRemapEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.17 bTouchRemapYX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.18 colBack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.19 colElemFill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.20 colElemFillGlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

7.14.2.21 colElemFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7.14.2.22 colElemFrameGlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7.14.2.23 colElemText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7.14.2.24 colElemTextGlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Generated by Doxygen
CONTENTS ix

7.14.2.25 colFocus [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7.14.2.26 colFocus [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

7.14.2.27 colFocusEdit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.28 colFocusNone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.29 colFrm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.30 colInner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.31 colTxtBack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.32 colTxtFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.33 eAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

7.14.2.34 eElemFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.35 eEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.36 eFontRefMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.37 eFontRefType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.38 eImgFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.39 eInitStatTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.14.2.40 eTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.41 eTxtAlign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.42 eTxtFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.43 eType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.44 g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.45 h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

7.14.2.46 nActionVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.47 nDisp0H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.48 nDisp0W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.49 nDispDepth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.50 nDispH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.51 nDispW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.14.2.52 nElemAutoIdNext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.14.2.53 nElemCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.14.2.54 nElemIndTracked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Generated by Doxygen
x CONTENTS

7.14.2.55 nElemMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.14.2.56 nElemRefCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.14.2.57 nElemRefMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

7.14.2.58 nFeatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.59 nFlipX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.60 nFlipY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.61 nFocusElemInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.62 nFocusElemMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.63 nFocusPageInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

7.14.2.64 nFocusSavedElemInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.65 nFocusSavedPageInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.66 nFontCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.67 nFontMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.68 nFrameRateCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.69 nFrameRateStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

7.14.2.70 nGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.71 nId [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.72 nId [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.73 nInputMapCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.74 nInputMapMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.75 nInputMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

7.14.2.76 nPageCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.77 nPageId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.78 nPageMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.79 nRotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.80 nRoundRadius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.81 nSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

7.14.2.82 nStrBufMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.14.2.83 nSubType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.14.2.84 nSwapXY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Generated by Doxygen
CONTENTS xi

7.14.2.85 nTouchCalPressMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.14.2.86 nTouchCalPressMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.14.2.87 nTouchCalXMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

7.14.2.88 nTouchCalXMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.89 nTouchCalYMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.90 nTouchCalYMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.91 nTouchLastPress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.92 nTouchLastX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.93 nTouchLastY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

7.14.2.94 nTouchRotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.95 nTxtMarginX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.96 nTxtMarginY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.97 nType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.98 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.99 nX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

7.14.2.100nY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.101pElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.102pElemRefParent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.103pElemRefTracked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.104pFname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.105pFocusElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

7.14.2.106pFocusPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.107pfuncPinPoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.108pfuncXDraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.109pfuncXEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.110pfuncXTick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.111pfuncXTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

7.14.2.112pImgBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.14.2.113pStrBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.14.2.114pTxtFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Generated by Doxygen
xii CONTENTS

7.14.2.115pvData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.14.2.116pvDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.14.2.117pvFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.14.2.118pvImgRaw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.119pvScope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.120pXData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.121r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.122rBounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.123rElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

7.14.2.124rFocus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.125rFull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.126rInner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.127rInvalidateRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.128sCollect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.129sElemRefTmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.130sElemTmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

7.14.2.131sElemTmpProg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.132sEventPend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.133sEventTouchPend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.134sImgRefBkgnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.135sImgRefGlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.136sImgRefNorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

7.14.2.137sTransCol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.14.2.138w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.14.2.139x [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.14.2.140x [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.14.2.141y [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.14.2.142y [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

7.15 Internal: Misc Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

7.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Generated by Doxygen
CONTENTS xiii

7.15.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

7.15.2.1 gslc_ResetImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

7.16 Internal: Element Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

7.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

7.16.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

7.16.2.1 gslc_DrawTxtBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

7.16.2.2 gslc_ElemAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

7.16.2.3 gslc_ElemCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

7.16.2.4 gslc_ElemDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

7.16.2.5 gslc_ElemDrawByRef() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

7.16.2.6 gslc_ElemSetImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

7.16.2.7 gslc_GetElemFromRef() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

7.16.2.8 gslc_GetElemFromRefD() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

7.16.2.9 gslc_GetElemRefFlag() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

7.16.2.10 gslc_GetXDataFromRef() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

7.16.2.11 gslc_SetElemRefFlag() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

7.16.2.12 gslc_SetFocusCol() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

7.16.2.13 gslc_SetRoundRadius() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

7.17 Internal: Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

7.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

7.17.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

7.17.2.1 gslc_ElemEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

7.17.2.2 gslc_ElemSendEventTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

7.17.2.3 gslc_EventCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

7.17.2.4 gslc_PageEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

7.17.2.5 gslc_PageFindById() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

7.17.2.6 gslc_PageFlipGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

7.17.2.7 gslc_PageFlipGo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

7.17.2.8 gslc_PageFlipSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

7.17.2.9 gslc_PageRedrawCalc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Generated by Doxygen
xiv CONTENTS

7.17.2.10 gslc_PageRedrawGo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

7.18 Internal: Element Collection Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

7.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

7.18.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

7.18.2.1 gslc_CollectElemAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

7.18.2.2 gslc_CollectFindElemById() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

7.18.2.3 gslc_CollectFindElemFromCoord() . . . . . . . . . . . . . . . . . . . . . . . . 150

7.18.2.4 gslc_CollectGetElemRefTracked() . . . . . . . . . . . . . . . . . . . . . . . . . 150

7.18.2.5 gslc_CollectGetNextId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

7.18.2.6 gslc_CollectGetRedraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

7.18.2.7 gslc_CollectReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

7.18.2.8 gslc_CollectSetElemTracked() . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

7.18.2.9 gslc_CollectSetParent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

7.19 Internal: Element Collection Event Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

7.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

7.19.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

7.19.2.1 gslc_CollectEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

7.19.2.2 gslc_CollectInput() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

7.19.2.3 gslc_CollectTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

7.19.2.4 gslc_CollectTouchCompound() . . . . . . . . . . . . . . . . . . . . . . . . . . 156

7.20 Internal: Tracking Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.20.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.20.2.1 gslc_InputMapLookup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.20.2.2 gslc_TrackInput() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

7.20.2.3 gslc_TrackTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

7.21 Internal: Cleanup Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.21.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.21.2.1 gslc_CollectDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.21.2.2 gslc_ElemDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.21.2.3 gslc_GuiDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.21.2.4 gslc_PageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.21.2.5 gslc_ResetElem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

7.21.2.6 gslc_ResetFont() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Generated by Doxygen
CONTENTS xv

8 Data Structure Documentation 165

8.1 gslc_tsCollect Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

8.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

8.2 gslc_tsColor Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

8.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

8.3 gslc_tsDriver Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

8.3.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

8.3.1.1 nColBkgnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

8.3.1.2 pvFontLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

8.3.1.3 rClipRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

8.4 gslc_tsElem Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

8.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

8.5 gslc_tsElemRef Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

8.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

8.6 gslc_tsEvent Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

8.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

8.7 gslc_tsEventTouch Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

8.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

8.8 gslc_tsFont Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

8.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

8.9 gslc_tsGui Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

8.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

8.10 gslc_tsImgRef Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

8.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

8.11 gslc_tsInputMap Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

8.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

8.12 gslc_tsKey Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

8.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2.1 nCol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Generated by Doxygen
xvi CONTENTS

8.12.2.2 nColSpan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2.3 nId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2.4 nRow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2.5 nRowSpan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

8.12.2.6 nType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.13 gslc_tsLabelSpecial Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.13.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.13.2.1 nId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.13.2.2 pLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

8.14 gslc_tsPage Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

8.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

8.15 gslc_tsPt Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

8.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

8.16 gslc_tsRect Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

8.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

8.17 gslc_tsRectState Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

8.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

8.18 gslc_tsXCheckbox Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

8.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

8.18.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

8.18.2.1 bChecked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

8.18.2.2 bRadio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

8.18.2.3 colCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

8.18.2.4 nStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

8.18.2.5 pfuncXToggle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

8.19 gslc_tsXGauge Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

8.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

8.19.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

8.19.2.1 bFlip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Generated by Doxygen
CONTENTS xvii

8.19.2.2 bIndicFill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.3 bValLastValid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.4 bVert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.5 colGauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.6 colTick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.7 nIndicLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

8.19.2.8 nIndicTip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.9 nMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.10 nMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.11 nStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.12 nTickCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.13 nTickLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

8.19.2.14 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

8.19.2.15 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

8.20 gslc_tsXGlowball Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

8.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

8.20.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

8.20.2.1 colBg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

8.20.2.2 nAngEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

8.20.2.3 nAngStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.4 nMidX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.5 nMidY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.6 nNumRings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.7 nQuality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.8 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

8.20.2.9 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

8.20.2.10 pRings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

8.21 gslc_tsXGlowballRing Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

8.21.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

8.21.1.1 cCol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

Generated by Doxygen
xviii CONTENTS

8.21.1.2 nRad1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

8.21.1.3 nRad2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

8.22 gslc_tsXGraph Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

8.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

8.22.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

8.22.2.1 bScrollEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

8.22.2.2 colGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.3 eStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.4 nBufCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.5 nBufMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.6 nMargin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.7 nPlotIndMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

8.22.2.8 nPlotIndStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.9 nPlotValMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.10 nPlotValMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.11 nScrollPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.12 nWndHeight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.13 nWndWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

8.22.2.14 pBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

8.23 gslc_tsXKeyPad Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

8.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.1 acBuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.2 nBufferLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.3 nBufferMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.4 nCursorPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.5 nFocusKeyInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

8.23.2.6 nGlowKeyInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

8.23.2.7 nScrollPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

8.23.2.8 pConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Generated by Doxygen
CONTENTS xix

8.23.2.9 pfuncCb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

8.23.2.10 pTargetRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

8.23.2.11 sRedraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

8.24 gslc_tsXKeyPadCfg Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

8.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

8.24.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

8.24.2.1 bRoundEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

8.24.2.2 eLayoutDef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

8.24.2.3 eLayoutSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

8.24.2.4 nButtonSpaceX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.5 nButtonSpaceY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.6 nButtonSzH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.7 nButtonSzW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.8 nDispMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.9 nFontId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

8.24.2.10 nFrameMargin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.11 nMaxCols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.12 nMaxRows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.13 nOffsetX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.14 nOffsetY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.15 pfuncBtnEvt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

8.24.2.16 pfuncLabelGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.24.2.17 pfuncReset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.24.2.18 pfuncStyleGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.24.2.19 pfuncTxtInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.24.2.20 pLayout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.24.2.21 pLayouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

8.25 gslc_tsXKeyPadCfg_Alpha Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

8.25.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

8.25.1.1 sBaseCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Generated by Doxygen
xx CONTENTS

8.26 gslc_tsXKeyPadCfg_Num Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

8.26.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

8.26.1.1 bFloatEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

8.26.1.2 bSignEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

8.26.1.3 bValDecimalPt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

8.26.1.4 bValPositive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

8.26.1.5 sBaseCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

8.27 gslc_tsXKeyPadData Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

8.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

8.27.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

8.27.2.1 pStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

8.27.2.2 pTargetRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

8.28 gslc_tsXKeyPadResult Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

8.28.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.28.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.28.2.1 eRedrawState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.28.2.2 nRedrawKeyId1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.28.2.3 nRedrawKeyId2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.29 gslc_tsXListbox Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

8.29.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.29.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.29.2.1 bFocusLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.29.2.2 bGlowLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.29.2.3 bItemAutoSizeH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

8.29.2.4 bItemAutoSizeW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.29.2.5 bNeedRecalc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.29.2.6 colGap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.29.2.7 nBufItemsMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.29.2.8 nBufItemsPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

8.29.2.9 nCols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Generated by Doxygen
CONTENTS xxi

8.29.2.10 nItemCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.11 nItemCurSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.12 nItemCurSelLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.13 nItemGap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.14 nItemH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.15 nItemSavedSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

8.29.2.16 nItemTop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.17 nItemW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.18 nMarginH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.19 nMarginW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.20 nRows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.21 pBufItems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

8.29.2.22 pfuncXSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

8.30 gslc_tsXProgress Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

8.30.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.1 bFlip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.2 bValLastValid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.3 bVert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.4 colGauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.5 nMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

8.30.2.6 nMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

8.30.2.7 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

8.30.2.8 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

8.31 gslc_tsXRadial Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

8.31.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

8.31.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

8.31.2.1 bFlip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

8.31.2.2 bIndicFill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8.31.2.3 bValLastValid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

Generated by Doxygen
xxii CONTENTS

8.31.2.4 colGauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8.31.2.5 colTick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8.31.2.6 nIndicLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8.31.2.7 nIndicTip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

8.31.2.8 nMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.31.2.9 nMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.31.2.10 nTickCnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.31.2.11 nTickLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.31.2.12 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.31.2.13 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

8.32 gslc_tsXRamp Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

8.32.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

8.32.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

8.32.2.1 bValLastValid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

8.32.2.2 nMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

8.32.2.3 nMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

8.32.2.4 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

8.32.2.5 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

8.33 gslc_tsXRingGauge Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

8.33.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.33.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.33.2.1 acStrLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.33.2.2 bGradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.33.2.3 colRing1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

8.33.2.4 colRing2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.5 colRingRemain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.6 nAngRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.7 nAngStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.8 nQuality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.9 nSegGap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Generated by Doxygen
CONTENTS xxiii

8.33.2.10 nThickness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

8.33.2.11 nVal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

8.33.2.12 nValLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

8.33.2.13 nValMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

8.33.2.14 nValMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

8.34 gslc_tsXSeekbar Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

8.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

8.34.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

8.34.2.1 bFrameThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.2 bTrimThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.3 bVert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.4 colFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.5 colProgress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.6 colRemain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

8.34.2.7 colThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.8 colTick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.9 colTrim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.10 nPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.11 nPosMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.12 nPosMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

8.34.2.13 nProgressW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.34.2.14 nRemainW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.34.2.15 nThumbSz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.34.2.16 nTickDiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.34.2.17 nTickLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.34.2.18 pfuncXPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

8.35 gslc_tsXSelNum Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

8.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

8.35.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

8.35.2.1 acElemTxt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Generated by Doxygen
xxiv CONTENTS

8.35.2.2 asElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.35.2.3 asElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.35.2.4 nCounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.35.2.5 sCollect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.36 gslc_tsXSlider Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

8.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

8.36.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

8.36.2.1 bSnapEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

8.36.2.2 bTrim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

8.36.2.3 bVert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.4 colTick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.5 colTrim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.6 nPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.7 nPosMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.8 nPosMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

8.36.2.9 nThumbSz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

8.36.2.10 nTickDiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

8.36.2.11 nTickLen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

8.36.2.12 pfuncXPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

8.37 gslc_tsXSpinner Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

8.37.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

8.37.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

8.37.2.1 acDecr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

8.37.2.2 acElemTxt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

8.37.2.3 acIncr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

8.37.2.4 asElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

8.37.2.5 asElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

8.37.2.6 nCounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

8.37.2.7 nIncr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

8.37.2.8 nMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

Generated by Doxygen
CONTENTS xxv

8.37.2.9 nMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.37.2.10 pElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.37.2.11 pfuncXInput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.37.2.12 sCollect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.38 gslc_tsXTemplate Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.38.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

8.39 gslc_tsXTextbox Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

8.39.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

8.39.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.1 bScrollEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.2 bWrapEn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.3 nBufCols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.4 nBufPosX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.5 nBufPosY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

8.39.2.6 nBufRows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.7 nChSizeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.8 nChSizeY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.9 nCurPosX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.10 nCurPosY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.11 nMarginX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

8.39.2.12 nMarginY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.13 nRedrawRow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.14 nScrollPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.15 nWndCols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.16 nWndRows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.17 nWndRowStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

8.39.2.18 pBuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

8.40 gslc_tsXTogglebtn Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

8.40.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

8.40.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Generated by Doxygen
xxvi CONTENTS

8.40.2.1 bCircular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241


8.40.2.2 bOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.40.2.3 colOffState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.40.2.4 colOnState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.40.2.5 colThumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.40.2.6 nMyPageId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.40.2.7 pfunctUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.41 gslc_tsXToggleImgbtn Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.41.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.41.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.41.2.1 bOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
8.41.2.2 nMyPageId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.41.2.3 pfunctUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.42 THPoint Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.42.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.42.1.1 THPoint() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.42.1.2 THPoint() [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.2.1 operator"!=() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.2.2 operator==() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.3 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.3.1 x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.3.2 y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.42.3.3 z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
8.43 TouchHandler Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.43.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.43.1.1 TouchHandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.43.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.43.2.1 begin() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.43.2.2 getPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.43.2.3 scale() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.43.2.4 setCalibration() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.43.2.5 setSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.43.2.6 setSwapFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.44 TouchHandler_XPT2046 Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.44.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.44.1.1 TouchHandler_XPT2046() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.2.1 begin() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.2.2 getPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.3 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.3.1 spi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.44.3.2 touchDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

Generated by Doxygen
CONTENTS xxvii

9 File Documentation 249

9.1 README.md File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

9.2 src/elem/XCheckbox.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

9.2.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

9.2.1.1 gslc_ElemXCheckboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

9.2.1.2 gslc_ElemXCheckboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

9.2.1.3 gslc_ElemXCheckboxFindChecked() . . . . . . . . . . . . . . . . . . . . . . . 251

9.2.1.4 gslc_ElemXCheckboxGetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 252

9.2.1.5 gslc_ElemXCheckboxSetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 252

9.2.1.6 gslc_ElemXCheckboxSetStateFunc() . . . . . . . . . . . . . . . . . . . . . . . 252

9.2.1.7 gslc_ElemXCheckboxSetStateHelp() . . . . . . . . . . . . . . . . . . . . . . . 253

9.2.1.8 gslc_ElemXCheckboxToggleState() . . . . . . . . . . . . . . . . . . . . . . . . 253

9.2.1.9 gslc_ElemXCheckboxTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

9.2.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

9.2.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

9.2.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

9.3 src/elem/XCheckbox.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

9.3.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

9.3.1.1 gslc_ElemXCheckboxCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . 256

9.3.1.2 GSLC_TYPEX_CHECKBOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

9.3.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

9.3.2.1 GSLC_CB_XCHECKBOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

9.3.3 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

9.3.3.1 gslc_teXCheckboxStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

9.3.4 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

9.3.4.1 gslc_ElemXCheckboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

9.3.4.2 gslc_ElemXCheckboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

9.3.4.3 gslc_ElemXCheckboxFindChecked() . . . . . . . . . . . . . . . . . . . . . . . 259

9.3.4.4 gslc_ElemXCheckboxGetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 259

9.3.4.5 gslc_ElemXCheckboxSetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 260

Generated by Doxygen
xxviii CONTENTS

9.3.4.6 gslc_ElemXCheckboxSetStateFunc() . . . . . . . . . . . . . . . . . . . . . . . 260

9.3.4.7 gslc_ElemXCheckboxToggleState() . . . . . . . . . . . . . . . . . . . . . . . . 260

9.3.4.8 gslc_ElemXCheckboxTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

9.4 src/elem/XGauge.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

9.4.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

9.4.1.1 gslc_ElemXGaugeCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263

9.4.1.2 gslc_ElemXGaugeDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263

9.4.1.3 gslc_ElemXGaugeDrawProgressBar() . . . . . . . . . . . . . . . . . . . . . . . 264

9.4.1.4 gslc_ElemXGaugeSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

9.4.1.5 gslc_ElemXGaugeSetIndicator() . . . . . . . . . . . . . . . . . . . . . . . . . . 265

9.4.1.6 gslc_ElemXGaugeSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

9.4.1.7 gslc_ElemXGaugeSetTicks() . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

9.4.1.8 gslc_ElemXGaugeUpdate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

9.4.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

9.4.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

9.4.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

9.5 src/elem/XGauge.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

9.5.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

9.5.1.1 gslc_ElemXGaugeCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

9.5.1.2 GSLC_TYPEX_GAUGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

9.5.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

9.5.2.1 gslc_teXGaugeStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

9.5.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

9.5.3.1 gslc_ElemXGaugeCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

9.5.3.2 gslc_ElemXGaugeDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

9.5.3.3 gslc_ElemXGaugeDrawProgressBar() . . . . . . . . . . . . . . . . . . . . . . . 272

9.5.3.4 gslc_ElemXGaugeSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

9.5.3.5 gslc_ElemXGaugeSetIndicator() . . . . . . . . . . . . . . . . . . . . . . . . . . 273

9.5.3.6 gslc_ElemXGaugeSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

9.5.3.7 gslc_ElemXGaugeSetTicks() . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

Generated by Doxygen
CONTENTS xxix

9.5.3.8 gslc_ElemXGaugeUpdate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

9.6 src/elem/XGlowball.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

9.6.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

9.6.1.1 drawXGlowball() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

9.6.1.2 drawXGlowballArc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

9.6.1.3 drawXGlowballRing() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

9.6.1.4 gslc_ElemXGlowballCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

9.6.1.5 gslc_ElemXGlowballDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

9.6.1.6 gslc_ElemXGlowballSetAngles() . . . . . . . . . . . . . . . . . . . . . . . . . . 277

9.6.1.7 gslc_ElemXGlowballSetColorBack() . . . . . . . . . . . . . . . . . . . . . . . . 278

9.6.1.8 gslc_ElemXGlowballSetQuality() . . . . . . . . . . . . . . . . . . . . . . . . . 278

9.6.1.9 gslc_ElemXGlowballSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

9.6.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

9.6.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

9.6.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

9.7 src/elem/XGlowball.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

9.7.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.7.1.1 GSLC_TYPEX_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.7.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.7.2.1 drawXGlowball() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.7.2.2 drawXGlowballArc() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.7.2.3 drawXGlowballRing() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

9.7.2.4 gslc_ElemXGlowballCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

9.7.2.5 gslc_ElemXGlowballDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

9.7.2.6 gslc_ElemXGlowballSetAngles() . . . . . . . . . . . . . . . . . . . . . . . . . . 282

9.7.2.7 gslc_ElemXGlowballSetColorBack() . . . . . . . . . . . . . . . . . . . . . . . . 282

9.7.2.8 gslc_ElemXGlowballSetQuality() . . . . . . . . . . . . . . . . . . . . . . . . . 282

9.7.2.9 gslc_ElemXGlowballSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

9.8 src/elem/XGraph.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

9.8.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

Generated by Doxygen
xxx CONTENTS

9.8.1.1 gslc_ElemXGraphAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

9.8.1.2 gslc_ElemXGraphCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

9.8.1.3 gslc_ElemXGraphDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

9.8.1.4 gslc_ElemXGraphScrollSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

9.8.1.5 gslc_ElemXGraphSetRange() . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

9.8.1.6 gslc_ElemXGraphSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

9.8.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

9.8.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

9.8.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

9.9 src/elem/XGraph.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

9.9.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

9.9.1.1 GSLC_TYPEX_GRAPH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

9.9.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

9.9.2.1 gslc_teXGraphStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

9.9.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

9.9.3.1 gslc_ElemXGraphAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

9.9.3.2 gslc_ElemXGraphCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

9.9.3.3 gslc_ElemXGraphDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

9.9.3.4 gslc_ElemXGraphScrollSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

9.9.3.5 gslc_ElemXGraphSetRange() . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

9.9.3.6 gslc_ElemXGraphSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

9.10 src/elem/XKeyPad.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

9.10.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

9.10.1.1 gslc_ElemXKeyPadCfgInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

9.10.1.2 gslc_ElemXKeyPadCfgSetButtonSpace() . . . . . . . . . . . . . . . . . . . . . 294

9.10.1.3 gslc_ElemXKeyPadCfgSetButtonSz() . . . . . . . . . . . . . . . . . . . . . . . 295

9.10.1.4 gslc_ElemXKeyPadCfgSetRoundEn() . . . . . . . . . . . . . . . . . . . . . . . 295

9.10.1.5 gslc_ElemXKeyPadDataTargetIdGet() . . . . . . . . . . . . . . . . . . . . . . . 296

9.10.1.6 gslc_ElemXKeyPadDataValGet() . . . . . . . . . . . . . . . . . . . . . . . . . 296

9.10.1.7 gslc_ElemXKeyPadInputAsk() . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

Generated by Doxygen
CONTENTS xxxi

9.10.1.8 gslc_ElemXKeyPadInputGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

9.10.1.9 gslc_ElemXKeyPadReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

9.10.1.10 gslc_ElemXKeyPadTargetRefSet() . . . . . . . . . . . . . . . . . . . . . . . . . 298

9.10.1.11 gslc_ElemXKeyPadValGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

9.10.1.12 gslc_ElemXKeyPadValSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

9.10.1.13 gslc_ElemXKeyPadValSetCb() . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

9.10.1.14 gslc_XKeyPadAdjustScroll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

9.10.1.15 gslc_XKeyPadCreateBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

9.10.1.16 gslc_XKeyPadDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

9.10.1.17 gslc_XKeyPadDrawKey() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

9.10.1.18 gslc_XKeyPadDrawLayout() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

9.10.1.19 gslc_XKeyPadDrawVirtualBtn() . . . . . . . . . . . . . . . . . . . . . . . . . . 301

9.10.1.20 gslc_XKeyPadDrawVirtualTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . 303

9.10.1.21 gslc_XKeyPadFocusSetDefault() . . . . . . . . . . . . . . . . . . . . . . . . . 304

9.10.1.22 gslc_XKeyPadLayoutSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

9.10.1.23 gslc_XKeyPadLookupId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

9.10.1.24 gslc_XKeyPadLookupSpecialId() . . . . . . . . . . . . . . . . . . . . . . . . . 305

9.10.1.25 gslc_XKeyPadMapEvent() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

9.10.1.26 gslc_XKeyPadPendRedrawAddKey() . . . . . . . . . . . . . . . . . . . . . . . 306

9.10.1.27 gslc_XKeyPadPendRedrawAddTxt() . . . . . . . . . . . . . . . . . . . . . . . . 306

9.10.1.28 gslc_XKeyPadPendRedrawReset() . . . . . . . . . . . . . . . . . . . . . . . . 306

9.10.1.29 gslc_XKeyPadRedrawUpdate() . . . . . . . . . . . . . . . . . . . . . . . . . . 306

9.10.1.30 gslc_XKeyPadSizeAllGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

9.10.1.31 gslc_XKeyPadSizeGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

9.10.1.32 gslc_XKeyPadTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

9.10.1.33 gslc_XKeyPadTrackSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

9.10.1.34 gslc_XKeyPadTxtAddCh() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

9.10.1.35 gslc_XKeyPadTxtAddStr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

9.10.1.36 gslc_XKeyPadTxtDelCh() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

9.10.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

Generated by Doxygen
xxxii CONTENTS

9.10.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

9.10.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

9.11 src/elem/XKeyPad.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

9.11.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.1 DEBUG_XKEYPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.2 GSLC_TYPEX_KEYPAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.3 XKEYPAD_BUF_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.4 XKEYPAD_CB_STATE_CANCEL . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.5 XKEYPAD_CB_STATE_DONE . . . . . . . . . . . . . . . . . . . . . . . . . . 314

9.11.1.6 XKEYPAD_CB_STATE_UPDATE . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.7 XKEYPAD_CURSOR_CH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.8 XKEYPAD_CURSOR_ENHANCED . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.9 XKEYPAD_KEY_LEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.10 XKEYPAD_REDRAW_ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.11 XKEYPAD_REDRAW_FULL . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.12 XKEYPAD_REDRAW_KEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.13 XKEYPAD_REDRAW_NONE . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

9.11.1.14 XKEYPAD_REDRAW_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.1 GSLC_CB_XKEYPAD_BTN_EVT . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.2 GSLC_CB_XKEYPAD_LABEL_GET . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.3 GSLC_CB_XKEYPAD_RESET . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.4 GSLC_CB_XKEYPAD_SYTLE_GET . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.5 GSLC_CB_XKEYPAD_TXT_INIT . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.2.6 gslc_tsKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.3 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.3.1 anonymous enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

9.11.3.2 anonymous enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

9.11.3.3 gslc_tsXKeyPadAttrib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

9.11.4 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Generated by Doxygen
CONTENTS xxxiii

9.11.4.1 gslc_ElemXKeyPadCfgInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

9.11.4.2 gslc_ElemXKeyPadCfgSetButtonSpace() . . . . . . . . . . . . . . . . . . . . . 318

9.11.4.3 gslc_ElemXKeyPadCfgSetButtonSz() . . . . . . . . . . . . . . . . . . . . . . . 318

9.11.4.4 gslc_ElemXKeyPadCfgSetRoundEn() . . . . . . . . . . . . . . . . . . . . . . . 319

9.11.4.5 gslc_ElemXKeyPadDataTargetIdGet() . . . . . . . . . . . . . . . . . . . . . . . 319

9.11.4.6 gslc_ElemXKeyPadDataValGet() . . . . . . . . . . . . . . . . . . . . . . . . . 320

9.11.4.7 gslc_ElemXKeyPadInputAsk() . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

9.11.4.8 gslc_ElemXKeyPadInputGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

9.11.4.9 gslc_ElemXKeyPadTargetRefSet() . . . . . . . . . . . . . . . . . . . . . . . . . 321

9.11.4.10 gslc_ElemXKeyPadValGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

9.11.4.11 gslc_ElemXKeyPadValSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

9.11.4.12 gslc_ElemXKeyPadValSetCb() . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

9.11.4.13 gslc_XKeyPadCreateBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

9.11.4.14 gslc_XKeyPadDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

9.11.4.15 gslc_XKeyPadDrawKey() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

9.11.4.16 gslc_XKeyPadDrawVirtualBtn() . . . . . . . . . . . . . . . . . . . . . . . . . . 325

9.11.4.17 gslc_XKeyPadDrawVirtualTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . 326

9.11.4.18 gslc_XKeyPadFocusSetDefault() . . . . . . . . . . . . . . . . . . . . . . . . . 327

9.11.4.19 gslc_XKeyPadLayoutSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

9.11.4.20 gslc_XKeyPadLookupId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

9.11.4.21 gslc_XKeyPadLookupSpecialId() . . . . . . . . . . . . . . . . . . . . . . . . . 328

9.11.4.22 gslc_XKeyPadPendRedrawAddKey() . . . . . . . . . . . . . . . . . . . . . . . 328

9.11.4.23 gslc_XKeyPadPendRedrawAddTxt() . . . . . . . . . . . . . . . . . . . . . . . . 329

9.11.4.24 gslc_XKeyPadPendRedrawReset() . . . . . . . . . . . . . . . . . . . . . . . . 329

9.11.4.25 gslc_XKeyPadRedrawUpdate() . . . . . . . . . . . . . . . . . . . . . . . . . . 329

9.11.4.26 gslc_XKeyPadSizeAllGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

9.11.4.27 gslc_XKeyPadSizeGet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

9.11.4.28 gslc_XKeyPadTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

9.11.4.29 gslc_XKeyPadTrackSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

9.11.4.30 gslc_XKeyPadTxtAddCh() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

Generated by Doxygen
xxxiv CONTENTS

9.11.4.31 gslc_XKeyPadTxtAddStr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332

9.11.4.32 gslc_XKeyPadTxtDelCh() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332

9.11.5 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.11.5.1 RBIT_CTRL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.11.5.2 RBIT_KEYALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.11.5.3 RBIT_KEYONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.11.5.4 RBIT_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.12 src/elem/XKeyPad_Alpha-setup.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

9.12.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.1 XKEYPAD_COL_BASIC_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.2 XKEYPAD_COL_BASIC_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.3 XKEYPAD_COL_DEF_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.4 XKEYPAD_COL_DEF_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.5 XKEYPAD_COL_DEF_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

9.12.1.6 XKEYPAD_COL_DEF_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.7 XKEYPAD_COL_DISABLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.8 XKEYPAD_COL_DISABLE_TXT . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.9 XKEYPAD_COL_ENTER_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.10 XKEYPAD_COL_ENTER_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.11 XKEYPAD_COL_ESC_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.12 XKEYPAD_COL_ESC_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.13 XKEYPAD_COL_SCROLL_L_FILL . . . . . . . . . . . . . . . . . . . . . . . . 336

9.12.1.14 XKEYPAD_COL_SCROLL_L_GLOW . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.15 XKEYPAD_COL_SCROLL_R_FILL . . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.16 XKEYPAD_COL_SCROLL_R_GLOW . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.17 XKEYPAD_COL_SPACE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.18 XKEYPAD_COL_SPACE_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.19 XKEYPAD_COL_TEXT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.20 XKEYPAD_COL_TEXT_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . 337

9.12.1.21 XKEYPAD_COL_TEXT_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

Generated by Doxygen
CONTENTS xxxv

9.12.1.22 XKEYPAD_DISP_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.23 XKEYPAD_EXTEND_CHAR . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.24 XKEYPAD_KEY_H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.25 XKEYPAD_KEY_W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.26 XKEYPAD_LABEL_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.27 XKEYPAD_SPACING_X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.1.28 XKEYPAD_SPACING_Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.2.1 gslc_teXKeyPadSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

9.12.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.1 KEYPAD_LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.2 KEYPAD_LAYOUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.3 KEYPAD_SET_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.4 KEYPAD_SPECIAL_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.5 KEYPAD_SPECIAL_SELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

9.12.3.6 XKEYPAD_LABEL_SPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

9.12.3.7 XKEYPAD_LAYOUT_DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . 340

9.13 src/elem/XKeyPad_Alpha.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

9.13.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

9.13.1.1 gslc_ElemXKeyPadBtnEvt_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 341

9.13.1.2 gslc_ElemXKeyPadCfgInit_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 342

9.13.1.3 gslc_ElemXKeyPadCreate_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 342

9.13.1.4 gslc_ElemXKeyPadLabelGet_Alpha() . . . . . . . . . . . . . . . . . . . . . . . 343

9.13.1.5 gslc_ElemXKeyPadReset_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . . 343

9.13.1.6 gslc_ElemXKeyPadStyleGet_Alpha() . . . . . . . . . . . . . . . . . . . . . . . 343

9.13.1.7 gslc_ElemXKeyPadTxtInit_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 344

9.13.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

9.13.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

9.13.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

9.14 src/elem/XKeyPad_Alpha.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

Generated by Doxygen
xxxvi CONTENTS

9.14.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

9.14.1.1 gslc_ElemXKeyPadBtnEvt_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 347

9.14.1.2 gslc_ElemXKeyPadCfgInit_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 347

9.14.1.3 gslc_ElemXKeyPadCreate_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 347

9.14.1.4 gslc_ElemXKeyPadLabelGet_Alpha() . . . . . . . . . . . . . . . . . . . . . . . 348

9.14.1.5 gslc_ElemXKeyPadReset_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . . 348

9.14.1.6 gslc_ElemXKeyPadStyleGet_Alpha() . . . . . . . . . . . . . . . . . . . . . . . 349

9.14.1.7 gslc_ElemXKeyPadTxtInit_Alpha() . . . . . . . . . . . . . . . . . . . . . . . . 349

9.15 src/elem/XKeyPad_Num-setup.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

9.15.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

9.15.1.1 XKEYPAD_COL_BASIC_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

9.15.1.2 XKEYPAD_COL_BASIC_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 352

9.15.1.3 XKEYPAD_COL_DECIMAL_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 352

9.15.1.4 XKEYPAD_COL_DECIMAL_GLOW . . . . . . . . . . . . . . . . . . . . . . . . 352

9.15.1.5 XKEYPAD_COL_DEF_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.6 XKEYPAD_COL_DEF_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.7 XKEYPAD_COL_DEF_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.8 XKEYPAD_COL_DEF_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.9 XKEYPAD_COL_DISABLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.10 XKEYPAD_COL_DISABLE_TXT . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.11 XKEYPAD_COL_ENTER_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.12 XKEYPAD_COL_ENTER_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 353

9.15.1.13 XKEYPAD_COL_ESC_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.14 XKEYPAD_COL_ESC_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.15 XKEYPAD_COL_MINUS_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.16 XKEYPAD_COL_MINUS_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.17 XKEYPAD_COL_SCROLL_L_FILL . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.18 XKEYPAD_COL_SCROLL_L_GLOW . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.19 XKEYPAD_COL_SCROLL_R_FILL . . . . . . . . . . . . . . . . . . . . . . . . 354

9.15.1.20 XKEYPAD_COL_SCROLL_R_GLOW . . . . . . . . . . . . . . . . . . . . . . . 354

Generated by Doxygen
CONTENTS xxxvii

9.15.1.21 XKEYPAD_COL_SPACE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.22 XKEYPAD_COL_SPACE_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.23 XKEYPAD_COL_TEXT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.24 XKEYPAD_COL_TEXT_GLOW . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.25 XKEYPAD_COL_TEXT_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.26 XKEYPAD_DISP_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.27 XKEYPAD_EXTEND_CHAR . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.28 XKEYPAD_KEY_H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

9.15.1.29 XKEYPAD_KEY_W . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.1.30 XKEYPAD_LABEL_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.1.31 XKEYPAD_SPACING_X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.1.32 XKEYPAD_SPACING_Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.2.1 anonymous enum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.2.2 gslc_teXKeyPadSel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

9.15.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.1 KEYPAD_LABEL_DECIMAL_PT . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.2 KEYPAD_LABEL_NEGATIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.3 KEYPAD_LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.4 KEYPAD_LAYOUTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.5 KEYPAD_SET_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

9.15.3.6 KEYPAD_SPECIAL_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

9.15.3.7 XKEYPAD_LAYOUT_DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . 358

9.16 src/elem/XKeyPad_Num.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

9.16.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

9.16.1.1 gslc_ElemXKeyPadBtnEvt_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 359

9.16.1.2 gslc_ElemXKeyPadCfgInit_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 360

9.16.1.3 gslc_ElemXKeyPadCfgSetFloatEn_Num() . . . . . . . . . . . . . . . . . . . . 360

9.16.1.4 gslc_ElemXKeyPadCfgSetSignEn_Num() . . . . . . . . . . . . . . . . . . . . . 360

9.16.1.5 gslc_ElemXKeyPadCreate_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 361

Generated by Doxygen
xxxviii CONTENTS

9.16.1.6 gslc_ElemXKeyPadLabelGet_Num() . . . . . . . . . . . . . . . . . . . . . . . 361

9.16.1.7 gslc_ElemXKeyPadReset_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 362

9.16.1.8 gslc_ElemXKeyPadStyleGet_Num() . . . . . . . . . . . . . . . . . . . . . . . . 362

9.16.1.9 gslc_ElemXKeyPadTxtInit_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 363

9.16.1.10 gslc_XKeyPadValSetSign_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 363

9.16.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

9.16.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

9.16.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

9.17 src/elem/XKeyPad_Num.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

9.17.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365

9.17.1.1 gslc_ElemXKeyPadBtnEvt_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 366

9.17.1.2 gslc_ElemXKeyPadCfgInit_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 366

9.17.1.3 gslc_ElemXKeyPadCfgSetFloatEn_Num() . . . . . . . . . . . . . . . . . . . . 366

9.17.1.4 gslc_ElemXKeyPadCfgSetSignEn_Num() . . . . . . . . . . . . . . . . . . . . . 367

9.17.1.5 gslc_ElemXKeyPadCreate_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 367

9.17.1.6 gslc_ElemXKeyPadLabelGet_Num() . . . . . . . . . . . . . . . . . . . . . . . 368

9.17.1.7 gslc_ElemXKeyPadReset_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 368

9.17.1.8 gslc_ElemXKeyPadStyleGet_Num() . . . . . . . . . . . . . . . . . . . . . . . . 369

9.17.1.9 gslc_ElemXKeyPadTxtInit_Num() . . . . . . . . . . . . . . . . . . . . . . . . . 369

9.18 src/elem/XListbox.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370

9.18.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

9.18.1.1 XLISTBOX_MAX_STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

9.18.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

9.18.2.1 gslc_ElemXListboxAddItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

9.18.2.2 gslc_ElemXListboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

9.18.2.3 gslc_ElemXListboxDeleteItemAt() . . . . . . . . . . . . . . . . . . . . . . . . . 373

9.18.2.4 gslc_ElemXListboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

9.18.2.5 gslc_ElemXListboxGetItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

9.18.2.6 gslc_ElemXListboxGetItemAddr() . . . . . . . . . . . . . . . . . . . . . . . . . 374

9.18.2.7 gslc_ElemXListboxGetItemCnt() . . . . . . . . . . . . . . . . . . . . . . . . . . 374

Generated by Doxygen
CONTENTS xxxix

9.18.2.8 gslc_ElemXListboxGetSel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

9.18.2.9 gslc_ElemXListboxInsertItemAt() . . . . . . . . . . . . . . . . . . . . . . . . . 375

9.18.2.10 gslc_ElemXListboxItemsSetGap() . . . . . . . . . . . . . . . . . . . . . . . . . 376

9.18.2.11 gslc_ElemXListboxItemsSetSize() . . . . . . . . . . . . . . . . . . . . . . . . . 376

9.18.2.12 gslc_ElemXListboxRecalcSize() . . . . . . . . . . . . . . . . . . . . . . . . . . 377

9.18.2.13 gslc_ElemXListboxReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

9.18.2.14 gslc_ElemXListboxSetMargin() . . . . . . . . . . . . . . . . . . . . . . . . . . 377

9.18.2.15 gslc_ElemXListboxSetScrollPos() . . . . . . . . . . . . . . . . . . . . . . . . . 378

9.18.2.16 gslc_ElemXListboxSetSel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

9.18.2.17 gslc_ElemXListboxSetSelFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . 379

9.18.2.18 gslc_ElemXListboxSetSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

9.18.2.19 gslc_ElemXListboxTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

9.18.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

9.18.3.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

9.18.3.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

9.19 src/elem/XListbox.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

9.19.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

9.19.1.1 GSLC_TYPEX_LISTBOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

9.19.1.2 XLISTBOX_BUF_OH_R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

9.19.1.3 XLISTBOX_SEL_NONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

9.19.1.4 XLISTBOX_SIZE_AUTO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.2.1 GSLC_CB_XLISTBOX_SEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.3.1 gslc_ElemXListboxAddItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.3.2 gslc_ElemXListboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

9.19.3.3 gslc_ElemXListboxDeleteItemAt() . . . . . . . . . . . . . . . . . . . . . . . . . 384

9.19.3.4 gslc_ElemXListboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385

9.19.3.5 gslc_ElemXListboxGetItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385

9.19.3.6 gslc_ElemXListboxGetItemCnt() . . . . . . . . . . . . . . . . . . . . . . . . . . 386

Generated by Doxygen
xl CONTENTS

9.19.3.7 gslc_ElemXListboxGetSel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386

9.19.3.8 gslc_ElemXListboxInsertItemAt() . . . . . . . . . . . . . . . . . . . . . . . . . 386

9.19.3.9 gslc_ElemXListboxItemsSetGap() . . . . . . . . . . . . . . . . . . . . . . . . . 387

9.19.3.10 gslc_ElemXListboxItemsSetSize() . . . . . . . . . . . . . . . . . . . . . . . . . 387

9.19.3.11 gslc_ElemXListboxReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388

9.19.3.12 gslc_ElemXListboxSetMargin() . . . . . . . . . . . . . . . . . . . . . . . . . . 388

9.19.3.13 gslc_ElemXListboxSetScrollPos() . . . . . . . . . . . . . . . . . . . . . . . . . 389

9.19.3.14 gslc_ElemXListboxSetSel() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389

9.19.3.15 gslc_ElemXListboxSetSelFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . 389

9.19.3.16 gslc_ElemXListboxSetSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

9.19.3.17 gslc_ElemXListboxTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

9.20 src/elem/XProgress.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391

9.20.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

9.20.1.1 gslc_ElemXProgressCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

9.20.1.2 gslc_ElemXProgressDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

9.20.1.3 gslc_ElemXProgressDrawHelp() . . . . . . . . . . . . . . . . . . . . . . . . . . 393

9.20.1.4 gslc_ElemXProgressSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

9.20.1.5 gslc_ElemXProgressSetGaugeCol() . . . . . . . . . . . . . . . . . . . . . . . . 394

9.20.1.6 gslc_ElemXProgressSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

9.20.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

9.20.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

9.20.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

9.21 src/elem/XProgress.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

9.21.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

9.21.1.1 gslc_ElemXProgressCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

9.21.1.2 GSLC_TYPEX_PROGRESS . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

9.21.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

9.21.2.1 gslc_ElemXProgressCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

9.21.2.2 gslc_ElemXProgressDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

9.21.2.3 gslc_ElemXProgressDrawHelp() . . . . . . . . . . . . . . . . . . . . . . . . . . 399

Generated by Doxygen
CONTENTS xli

9.21.2.4 gslc_ElemXProgressSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

9.21.2.5 gslc_ElemXProgressSetGaugeCol() . . . . . . . . . . . . . . . . . . . . . . . . 400

9.21.2.6 gslc_ElemXProgressSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

9.22 src/elem/XRadial.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

9.22.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

9.22.1.1 gslc_ElemXRadialCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

9.22.1.2 gslc_ElemXRadialDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

9.22.1.3 gslc_ElemXRadialDrawRadial() . . . . . . . . . . . . . . . . . . . . . . . . . . 403

9.22.1.4 gslc_ElemXRadialDrawRadialHelp() . . . . . . . . . . . . . . . . . . . . . . . . 403

9.22.1.5 gslc_ElemXRadialSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

9.22.1.6 gslc_ElemXRadialSetIndicator() . . . . . . . . . . . . . . . . . . . . . . . . . . 404

9.22.1.7 gslc_ElemXRadialSetTicks() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

9.22.1.8 gslc_ElemXRadialSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

9.22.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

9.22.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

9.22.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

9.23 src/elem/XRadial.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

9.23.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

9.23.1.1 gslc_ElemXRadialCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

9.23.1.2 GSLC_TYPEX_RADIAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

9.23.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

9.23.2.1 gslc_ElemXRadialCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

9.23.2.2 gslc_ElemXRadialDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

9.23.2.3 gslc_ElemXRadialDrawRadial() . . . . . . . . . . . . . . . . . . . . . . . . . . 410

9.23.2.4 gslc_ElemXRadialSetFlip() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410

9.23.2.5 gslc_ElemXRadialSetIndicator() . . . . . . . . . . . . . . . . . . . . . . . . . . 411

9.23.2.6 gslc_ElemXRadialSetTicks() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

9.23.2.7 gslc_ElemXRadialSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

9.24 src/elem/XRamp.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

9.24.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Generated by Doxygen
xlii CONTENTS

9.24.1.1 gslc_ElemXRampCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

9.24.1.2 gslc_ElemXRampDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

9.24.1.3 gslc_ElemXRampDrawHelp() . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

9.24.1.4 gslc_ElemXRampSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

9.24.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

9.24.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

9.24.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

9.25 src/elem/XRamp.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

9.25.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

9.25.1.1 gslc_ElemXRampCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

9.25.1.2 GSLC_TYPEX_RAMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418

9.25.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418

9.25.2.1 gslc_ElemXRampCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418

9.25.2.2 gslc_ElemXRampDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

9.25.2.3 gslc_ElemXRampDrawHelp() . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

9.25.2.4 gslc_ElemXRampSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

9.26 src/elem/XRingGauge.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

9.26.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

9.26.1.1 gslc_ElemXRingGaugeCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . 422

9.26.1.2 gslc_ElemXRingGaugeDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

9.26.1.3 gslc_ElemXRingGaugeSetAngleRange() . . . . . . . . . . . . . . . . . . . . . 423

9.26.1.4 gslc_ElemXRingGaugeSetColorActiveFlat() . . . . . . . . . . . . . . . . . . . . 424

9.26.1.5 gslc_ElemXRingGaugeSetColorActiveGradient() . . . . . . . . . . . . . . . . . 424

9.26.1.6 gslc_ElemXRingGaugeSetColorInactive() . . . . . . . . . . . . . . . . . . . . . 424

9.26.1.7 gslc_ElemXRingGaugeSetQuality() . . . . . . . . . . . . . . . . . . . . . . . . 425

9.26.1.8 gslc_ElemXRingGaugeSetThickness() . . . . . . . . . . . . . . . . . . . . . . 425

9.26.1.9 gslc_ElemXRingGaugeSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . 426

9.26.1.10 gslc_ElemXRingGaugeSetValRange() . . . . . . . . . . . . . . . . . . . . . . . 427

9.26.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

9.26.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

Generated by Doxygen
CONTENTS xliii

9.26.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

9.27 src/elem/XRingGauge.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

9.27.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

9.27.1.1 GSLC_TYPEX_RING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

9.27.1.2 XRING_STR_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

9.27.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

9.27.2.1 gslc_ElemXRingGaugeCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . 429

9.27.2.2 gslc_ElemXRingGaugeDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . 430

9.27.2.3 gslc_ElemXRingGaugeSetAngleRange() . . . . . . . . . . . . . . . . . . . . . 430

9.27.2.4 gslc_ElemXRingGaugeSetColorActiveFlat() . . . . . . . . . . . . . . . . . . . . 431

9.27.2.5 gslc_ElemXRingGaugeSetColorActiveGradient() . . . . . . . . . . . . . . . . . 432

9.27.2.6 gslc_ElemXRingGaugeSetColorInactive() . . . . . . . . . . . . . . . . . . . . . 432

9.27.2.7 gslc_ElemXRingGaugeSetQuality() . . . . . . . . . . . . . . . . . . . . . . . . 433

9.27.2.8 gslc_ElemXRingGaugeSetThickness() . . . . . . . . . . . . . . . . . . . . . . 433

9.27.2.9 gslc_ElemXRingGaugeSetVal() . . . . . . . . . . . . . . . . . . . . . . . . . . 434

9.27.2.10 gslc_ElemXRingGaugeSetValRange() . . . . . . . . . . . . . . . . . . . . . . . 434

9.28 src/elem/XSeekbar.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

9.28.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436

9.28.1.1 gslc_ElemXSeekbarCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436

9.28.1.2 gslc_ElemXSeekbarDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437

9.28.1.3 gslc_ElemXSeekbarGetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . 437

9.28.1.4 gslc_ElemXSeekbarSetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . 437

9.28.1.5 gslc_ElemXSeekbarSetPosFunc() . . . . . . . . . . . . . . . . . . . . . . . . . 438

9.28.1.6 gslc_ElemXSeekbarSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

9.28.1.7 gslc_ElemXSeekbarTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

9.28.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

9.28.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

9.28.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

9.29 src/elem/XSeekbar.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

9.29.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

Generated by Doxygen
xliv CONTENTS

9.29.1.1 gslc_ElemXSeekbarCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . 442

9.29.1.2 GSLC_TYPEX_SEEKBAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

9.29.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

9.29.2.1 GSLC_CB_XSEEKBAR_POS . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

9.29.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

9.29.3.1 gslc_ElemXSeekbarCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

9.29.3.2 gslc_ElemXSeekbarDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

9.29.3.3 gslc_ElemXSeekbarGetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . 445

9.29.3.4 gslc_ElemXSeekbarSetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . 445

9.29.3.5 gslc_ElemXSeekbarSetPosFunc() . . . . . . . . . . . . . . . . . . . . . . . . . 445

9.29.3.6 gslc_ElemXSeekbarSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

9.29.3.7 gslc_ElemXSeekbarTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

9.30 src/elem/XSelNum.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

9.30.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448

9.30.1.1 gslc_ElemXSelNumClick() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448

9.30.1.2 gslc_ElemXSelNumCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

9.30.1.3 gslc_ElemXSelNumDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

9.30.1.4 gslc_ElemXSelNumGetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 450

9.30.1.5 gslc_ElemXSelNumSetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 450

9.30.1.6 gslc_ElemXSelNumTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

9.30.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

9.30.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

9.30.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

9.30.2.3 SELNUM_ID_BTN_DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

9.30.2.4 SELNUM_ID_BTN_INC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

9.30.2.5 SELNUM_ID_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

9.31 src/elem/XSelNum.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

9.31.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

9.31.1.1 GSLC_TYPEX_SELNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

9.31.1.2 SELNUM_STR_LEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

Generated by Doxygen
CONTENTS xlv

9.31.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

9.31.2.1 gslc_ElemXSelNumClick() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

9.31.2.2 gslc_ElemXSelNumCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

9.31.2.3 gslc_ElemXSelNumDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

9.31.2.4 gslc_ElemXSelNumGetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 455

9.31.2.5 gslc_ElemXSelNumSetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 455

9.31.2.6 gslc_ElemXSelNumTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

9.32 src/elem/XSlider.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

9.32.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457

9.32.1.1 gslc_ElemXSliderCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

9.32.1.2 gslc_ElemXSliderDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

9.32.1.3 gslc_ElemXSliderGetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

9.32.1.4 gslc_ElemXSliderSetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

9.32.1.5 gslc_ElemXSliderSetPosFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . 460

9.32.1.6 gslc_ElemXSliderSetSnapEn() . . . . . . . . . . . . . . . . . . . . . . . . . . 460

9.32.1.7 gslc_ElemXSliderSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

9.32.1.8 gslc_ElemXSliderTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

9.32.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

9.32.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

9.32.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

9.33 src/elem/XSlider.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

9.33.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

9.33.1.1 gslc_ElemXSliderCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

9.33.1.2 GSLC_TYPEX_SLIDER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

9.33.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

9.33.2.1 GSLC_CB_XSLIDER_POS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

9.33.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

9.33.3.1 gslc_ElemXSliderCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

9.33.3.2 gslc_ElemXSliderDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

9.33.3.3 gslc_ElemXSliderGetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

Generated by Doxygen
xlvi CONTENTS

9.33.3.4 gslc_ElemXSliderSetPos() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

9.33.3.5 gslc_ElemXSliderSetPosFunc() . . . . . . . . . . . . . . . . . . . . . . . . . . 467

9.33.3.6 gslc_ElemXSliderSetSnapEn() . . . . . . . . . . . . . . . . . . . . . . . . . . 467

9.33.3.7 gslc_ElemXSliderSetStyle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468

9.33.3.8 gslc_ElemXSliderTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468

9.34 src/elem/XSpinner.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

9.34.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

9.34.1.1 gslc_ElemXSpinnerClick() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

9.34.1.2 gslc_ElemXSpinnerCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471

9.34.1.3 gslc_ElemXSpinnerDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471

9.34.1.4 gslc_ElemXSpinnerGetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 472

9.34.1.5 gslc_ElemXSpinnerSetChars() . . . . . . . . . . . . . . . . . . . . . . . . . . 472

9.34.1.6 gslc_ElemXSpinnerSetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 473

9.34.1.7 gslc_ElemXSpinnerTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473

9.34.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.34.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.34.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.34.2.3 SPINNER_ID_BTN_DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.34.2.4 SPINNER_ID_BTN_INC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.34.2.5 SPINNER_ID_TXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

9.35 src/elem/XSpinner.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

9.35.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

9.35.1.1 GSLC_TYPEX_SPINNER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

9.35.1.2 XSPINNER_CB_STATE_UPDATE . . . . . . . . . . . . . . . . . . . . . . . . 476

9.35.1.3 XSPINNER_COMP_CNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

9.35.1.4 XSPINNER_STR_LEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

9.35.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

9.35.2.1 gslc_ElemXSpinnerClick() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

9.35.2.2 gslc_ElemXSpinnerCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

9.35.2.3 gslc_ElemXSpinnerDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478

Generated by Doxygen
CONTENTS xlvii

9.35.2.4 gslc_ElemXSpinnerGetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 478

9.35.2.5 gslc_ElemXSpinnerSetChars() . . . . . . . . . . . . . . . . . . . . . . . . . . 479

9.35.2.6 gslc_ElemXSpinnerSetCounter() . . . . . . . . . . . . . . . . . . . . . . . . . 479

9.35.2.7 gslc_ElemXSpinnerTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480

9.36 src/elem/XTemplate.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480

9.36.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

9.36.1.1 gslc_ElemXTemplateCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

9.36.1.2 gslc_ElemXTemplateDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

9.36.1.3 gslc_ElemXTemplateTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

9.36.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483

9.36.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483

9.36.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483

9.37 src/elem/XTemplate.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483

9.37.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

9.37.1.1 GSLC_TYPEX_TEMPLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

9.37.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

9.37.2.1 gslc_ElemXTemplateCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

9.37.2.2 gslc_ElemXTemplateDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

9.37.2.3 gslc_ElemXTemplateTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486

9.38 src/elem/XTextbox.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486

9.38.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487

9.38.1.1 gslc_ElemXTextboxAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

9.38.1.2 gslc_ElemXTextboxBufAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

9.38.1.3 gslc_ElemXTextboxColReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

9.38.1.4 gslc_ElemXTextboxColSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

9.38.1.5 gslc_ElemXTextboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

9.38.1.6 gslc_ElemXTextboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490

9.38.1.7 gslc_ElemXTextboxLineWrAdv() . . . . . . . . . . . . . . . . . . . . . . . . . . 490

9.38.1.8 gslc_ElemXTextboxReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

9.38.1.9 gslc_ElemXTextboxScrollSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

Generated by Doxygen
xlviii CONTENTS

9.38.1.10 gslc_ElemXTextboxWrapSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

9.38.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

9.38.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

9.38.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

9.39 src/elem/XTextbox.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

9.39.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.1.1 GSLC_TYPEX_TEXTBOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.1.2 GSLC_XTEXTBOX_CODE_COL_RESET . . . . . . . . . . . . . . . . . . . . 494

9.39.1.3 GSLC_XTEXTBOX_CODE_COL_SET . . . . . . . . . . . . . . . . . . . . . . 494

9.39.1.4 XTEXTBOX_REDRAW_ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.1.5 XTEXTBOX_REDRAW_NONE . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.2.1 gslc_ElemXTextboxAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

9.39.2.2 gslc_ElemXTextboxColReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . 495

9.39.2.3 gslc_ElemXTextboxColSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495

9.39.2.4 gslc_ElemXTextboxCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

9.39.2.5 gslc_ElemXTextboxDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

9.39.2.6 gslc_ElemXTextboxReset() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497

9.39.2.7 gslc_ElemXTextboxScrollSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 497

9.39.2.8 gslc_ElemXTextboxWrapSet() . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

9.40 src/elem/XTogglebtn.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

9.40.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499

9.40.1.1 gslc_ElemXTogglebtnCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 500

9.40.1.2 gslc_ElemXTogglebtnDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500

9.40.1.3 gslc_ElemXTogglebtnDrawCircularHelp() . . . . . . . . . . . . . . . . . . . . . 501

9.40.1.4 gslc_ElemXTogglebtnDrawRectangularHelp() . . . . . . . . . . . . . . . . . . . 501

9.40.1.5 gslc_ElemXTogglebtnFindSelected() . . . . . . . . . . . . . . . . . . . . . . . 501

9.40.1.6 gslc_ElemXTogglebtnGetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 502

9.40.1.7 gslc_ElemXTogglebtnSetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 502

9.40.1.8 gslc_ElemXTogglebtnSetStateHelp() . . . . . . . . . . . . . . . . . . . . . . . 502

Generated by Doxygen
CONTENTS xlix

9.40.1.9 gslc_ElemXTogglebtnToggleState() . . . . . . . . . . . . . . . . . . . . . . . . 503

9.40.1.10 gslc_ElemXTogglebtnTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

9.40.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

9.40.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

9.40.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

9.41 src/elem/XTogglebtn.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

9.41.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505

9.41.1.1 gslc_ElemXTogglebtnCreate_P . . . . . . . . . . . . . . . . . . . . . . . . . . 505

9.41.1.2 GSLC_TYPEX_TOGGLEBTN . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

9.41.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

9.41.2.1 gslc_ElemXTogglebtnCreate() . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

9.41.2.2 gslc_ElemXTogglebtnDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

9.41.2.3 gslc_ElemXTogglebtnFindSelected() . . . . . . . . . . . . . . . . . . . . . . . 507

9.41.2.4 gslc_ElemXTogglebtnGetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 509

9.41.2.5 gslc_ElemXTogglebtnSetState() . . . . . . . . . . . . . . . . . . . . . . . . . . 509

9.41.2.6 gslc_ElemXTogglebtnToggleState() . . . . . . . . . . . . . . . . . . . . . . . . 510

9.41.2.7 gslc_ElemXTogglebtnTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . 510

9.42 src/elem/XToggleImgbtn.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511

9.42.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

9.42.1.1 gslc_ElemXToggleImgbtnCreate() . . . . . . . . . . . . . . . . . . . . . . . . . 512

9.42.1.2 gslc_ElemXToggleImgbtnDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . 512

9.42.1.3 gslc_ElemXToggleImgbtnFindSelected() . . . . . . . . . . . . . . . . . . . . . 513

9.42.1.4 gslc_ElemXToggleImgbtnGetState() . . . . . . . . . . . . . . . . . . . . . . . . 513

9.42.1.5 gslc_ElemXToggleImgbtnSetState() . . . . . . . . . . . . . . . . . . . . . . . . 514

9.42.1.6 gslc_ElemXToggleImgbtnSetStateHelp() . . . . . . . . . . . . . . . . . . . . . 514

9.42.1.7 gslc_ElemXToggleImgbtnToggleState() . . . . . . . . . . . . . . . . . . . . . . 514

9.42.1.8 gslc_ElemXToggleImgbtnTouch() . . . . . . . . . . . . . . . . . . . . . . . . . 515

9.42.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

9.42.2.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

9.42.2.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Generated by Doxygen
l CONTENTS

9.43 src/elem/XToggleImgbtn.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

9.43.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

9.43.1.1 gslc_ElemXToggleImgbtnCreate_P . . . . . . . . . . . . . . . . . . . . . . . . 517

9.43.1.2 GSLC_TYPEX_TOGGLEIMGBTN . . . . . . . . . . . . . . . . . . . . . . . . . 518

9.43.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518

9.43.2.1 gslc_ElemXToggleImgbtnCreate() . . . . . . . . . . . . . . . . . . . . . . . . . 518

9.43.2.2 gslc_ElemXToggleImgbtnDraw() . . . . . . . . . . . . . . . . . . . . . . . . . . 519

9.43.2.3 gslc_ElemXToggleImgbtnFindSelected() . . . . . . . . . . . . . . . . . . . . . 519

9.43.2.4 gslc_ElemXToggleImgbtnGetState() . . . . . . . . . . . . . . . . . . . . . . . . 519

9.43.2.5 gslc_ElemXToggleImgbtnSetState() . . . . . . . . . . . . . . . . . . . . . . . . 520

9.43.2.6 gslc_ElemXToggleImgbtnToggleState() . . . . . . . . . . . . . . . . . . . . . . 520

9.43.2.7 gslc_ElemXToggleImgbtnTouch() . . . . . . . . . . . . . . . . . . . . . . . . . 521

9.44 src/GUIslice.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521

9.44.1 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530

9.44.1.1 gslc_teDebugPrintState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530

9.44.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530

9.44.2.1 gslc_DrawFillSectorBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

9.44.2.2 gslc_ElemCanFocus() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

9.44.2.3 gslc_ElemGetEditEn() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

9.44.2.4 gslc_FontSetBase() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

9.44.2.5 gslc_ImgRefEqual() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.2.6 gslc_OrderCoord() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.2.7 gslc_SwapCoords() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.3 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.3.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.3.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.3.3 g_pfDebugOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

9.44.3.4 m_nLUTSinF0X16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

9.45 src/GUIslice.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

9.45.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

Generated by Doxygen
CONTENTS li

9.45.1.1 GSLC_2PI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

9.45.1.2 GSLC_ALIGN_BOT_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

9.45.1.3 GSLC_ALIGN_BOT_MID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

9.45.1.4 GSLC_ALIGN_BOT_RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.5 GSLC_ALIGN_MID_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.6 GSLC_ALIGN_MID_MID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.7 GSLC_ALIGN_MID_RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.8 GSLC_ALIGN_TOP_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.9 GSLC_ALIGN_TOP_MID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

9.45.1.10 GSLC_ALIGN_TOP_RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.11 GSLC_ALIGNH_LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.12 GSLC_ALIGNH_MID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.13 GSLC_ALIGNH_RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.14 GSLC_ALIGNV_BOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.15 GSLC_ALIGNV_MID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

9.45.1.16 GSLC_ALIGNV_TOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.17 GSLC_COL_BLACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.18 GSLC_COL_BLUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.19 GSLC_COL_BLUE_DK1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.20 GSLC_COL_BLUE_DK2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.21 GSLC_COL_BLUE_DK3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

9.45.1.22 GSLC_COL_BLUE_DK4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.23 GSLC_COL_BLUE_LT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.24 GSLC_COL_BLUE_LT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.25 GSLC_COL_BLUE_LT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.26 GSLC_COL_BLUE_LT4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.27 GSLC_COL_BROWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552

9.45.1.28 GSLC_COL_CYAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

9.45.1.29 GSLC_COL_GRAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

9.45.1.30 GSLC_COL_GRAY_DK1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

Generated by Doxygen
lii CONTENTS

9.45.1.31 GSLC_COL_GRAY_DK2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

9.45.1.32 GSLC_COL_GRAY_DK3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

9.45.1.33 GSLC_COL_GRAY_DK4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

9.45.1.34 GSLC_COL_GRAY_LT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.35 GSLC_COL_GRAY_LT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.36 GSLC_COL_GRAY_LT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.37 GSLC_COL_GRAY_LT4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.38 GSLC_COL_GREEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.39 GSLC_COL_GREEN_DK1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

9.45.1.40 GSLC_COL_GREEN_DK2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.41 GSLC_COL_GREEN_DK3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.42 GSLC_COL_GREEN_DK4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.43 GSLC_COL_GREEN_LT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.44 GSLC_COL_GREEN_LT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.45 GSLC_COL_GREEN_LT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

9.45.1.46 GSLC_COL_GREEN_LT4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.47 GSLC_COL_MAGENTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.48 GSLC_COL_ORANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.49 GSLC_COL_PURPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.50 GSLC_COL_RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.51 GSLC_COL_RED_DK1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

9.45.1.52 GSLC_COL_RED_DK2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.53 GSLC_COL_RED_DK3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.54 GSLC_COL_RED_DK4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.55 GSLC_COL_RED_LT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.56 GSLC_COL_RED_LT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.57 GSLC_COL_RED_LT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

9.45.1.58 GSLC_COL_RED_LT4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

9.45.1.59 GSLC_COL_TEAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

9.45.1.60 GSLC_COL_WHITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

Generated by Doxygen
CONTENTS liii

9.45.1.61 GSLC_COL_YELLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

9.45.1.62 GSLC_COL_YELLOW_DK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

9.45.1.63 GSLC_COLMONO_BLACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

9.45.1.64 GSLC_COLMONO_WHITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.65 GSLC_ELEM_FEA_CLICK_EN . . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.66 GSLC_ELEM_FEA_EDIT_EN . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.67 GSLC_ELEM_FEA_FILL_EN . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.68 GSLC_ELEM_FEA_FOCUS_EN . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.69 GSLC_ELEM_FEA_FRAME_EN . . . . . . . . . . . . . . . . . . . . . . . . . 559

9.45.1.70 GSLC_ELEM_FEA_GLOW_EN . . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.71 GSLC_ELEM_FEA_NONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.72 GSLC_ELEM_FEA_NOSHRINK . . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.73 GSLC_ELEM_FEA_ROUND_EN . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.74 GSLC_ELEM_FEA_VALID . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.75 GSLC_ELEMREF_DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . 560

9.45.1.76 GSLC_FEATURE_FOCUS_ON_TOUCH . . . . . . . . . . . . . . . . . . . . . 561

9.45.1.77 GSLC_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.1.78 GSLC_MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.1.79 GSLC_PMEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.2.1 GSLC_CB_DEBUG_OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.2.2 GSLC_CB_DRAW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

9.45.2.3 GSLC_CB_EVENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.4 GSLC_CB_INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.5 GSLC_CB_PIN_POLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.6 GSLC_CB_TICK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.7 GSLC_CB_TOUCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.8 gslc_tsColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

9.45.2.9 gslc_tsElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

9.45.2.10 gslc_tsEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

Generated by Doxygen
liv CONTENTS

9.45.2.11 gslc_tsEventTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

9.45.2.12 gslc_tsPt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

9.45.2.13 gslc_tsRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

9.45.2.14 gslc_tsRectState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

9.45.3 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

9.45.3.1 gslc_teAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

9.45.3.2 gslc_teElemId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

9.45.3.3 gslc_teElemInd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565

9.45.3.4 gslc_teElemRefFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565

9.45.3.5 gslc_teEventSubType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

9.45.3.6 gslc_teEventType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

9.45.3.7 gslc_teFontId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

9.45.3.8 gslc_teFontRefMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567

9.45.3.9 gslc_teFontRefType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567

9.45.3.10 gslc_teGroupId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

9.45.3.11 gslc_teImgRefFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

9.45.3.12 gslc_teInitStat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

9.45.3.13 gslc_teInputMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

9.45.3.14 gslc_teInputRawEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

9.45.3.15 gslc_tePageId . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

9.45.3.16 gslc_tePin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570

9.45.3.17 gslc_teRedrawType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570

9.45.3.18 gslc_teStackPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571

9.45.3.19 gslc_teTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571

9.45.3.20 gslc_teTxtFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571

9.45.3.21 gslc_teTypeCore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572

9.45.4 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572

9.45.4.1 g_pfDebugOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

9.46 src/GUIslice_config.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

9.47 src/GUIslice_drv.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

Generated by Doxygen
CONTENTS lv

9.48 src/GUIslice_drv_adagfx.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

9.49 src/GUIslice_drv_adagfx.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574

9.49.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

9.49.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

9.49.2.1 DRV_HAS_DRAW_BMP_MEM . . . . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.2 DRV_HAS_DRAW_CIRCLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.3 DRV_HAS_DRAW_CIRCLE_FRAME . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.4 DRV_HAS_DRAW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.5 DRV_HAS_DRAW_POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.6 DRV_HAS_DRAW_POINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

9.49.2.7 DRV_HAS_DRAW_RECT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 578

9.49.2.8 DRV_HAS_DRAW_RECT_FRAME . . . . . . . . . . . . . . . . . . . . . . . . 578

9.49.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL . . . . . . . . . . . . . . . . . . . . . 578

9.49.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME . . . . . . . . . . . . . . . . . . . 578

9.49.2.11 DRV_HAS_DRAW_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

9.49.2.12 DRV_HAS_DRAW_TRI_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

9.49.2.13 DRV_HAS_DRAW_TRI_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . 579

9.49.2.14 DRV_OVERRIDE_TXT_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 579

9.49.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

9.49.3.1 gslc_DrvAdaptColorToRaw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

9.49.3.2 gslc_DrvDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579

9.49.3.3 gslc_DrvDrawBkgnd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580

9.49.3.4 gslc_DrvDrawBmp24FromMem() . . . . . . . . . . . . . . . . . . . . . . . . . 580

9.49.3.5 gslc_DrvDrawBmp24FromSD() . . . . . . . . . . . . . . . . . . . . . . . . . . 581

9.49.3.6 gslc_DrvDrawFillCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581

9.49.3.7 gslc_DrvDrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582

9.49.3.8 gslc_DrvDrawFillRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . 582

9.49.3.9 gslc_DrvDrawFillTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582

9.49.3.10 gslc_DrvDrawFrameCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583

9.49.3.11 gslc_DrvDrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584

Generated by Doxygen
lvi CONTENTS

9.49.3.12 gslc_DrvDrawFrameRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . 584

9.49.3.13 gslc_DrvDrawFrameTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 584

9.49.3.14 gslc_DrvDrawImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

9.49.3.15 gslc_DrvDrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586

9.49.3.16 gslc_DrvDrawMonoFromMem() . . . . . . . . . . . . . . . . . . . . . . . . . . 586

9.49.3.17 gslc_DrvDrawPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587

9.49.3.18 gslc_DrvDrawPoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587

9.49.3.19 gslc_DrvDrawTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588

9.49.3.20 gslc_DrvFontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588

9.49.3.21 gslc_DrvFontsDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589

9.49.3.22 gslc_DrvGetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589

9.49.3.23 gslc_DrvGetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589

9.49.3.24 gslc_DrvGetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590

9.49.3.25 gslc_DrvGetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590

9.49.3.26 gslc_DrvGetTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591

9.49.3.27 gslc_DrvGetTxtSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591

9.49.3.28 gslc_DrvImageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592

9.49.3.29 gslc_DrvInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592

9.49.3.30 gslc_DrvInitTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593

9.49.3.31 gslc_DrvInitTs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593

9.49.3.32 gslc_DrvLoadImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593

9.49.3.33 gslc_DrvPageFlipNow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594

9.49.3.34 gslc_DrvRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594

9.49.3.35 gslc_DrvSetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

9.49.3.36 gslc_DrvSetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

9.49.3.37 gslc_DrvSetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

9.49.3.38 gslc_DrvSetElemImageGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 596

9.49.3.39 gslc_DrvSetElemImageNorm() . . . . . . . . . . . . . . . . . . . . . . . . . . 596

9.50 src/GUIslice_drv_m5stack.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

9.51 src/GUIslice_drv_m5stack.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

Generated by Doxygen
CONTENTS lvii

9.51.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600

9.51.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600

9.51.2.1 DRV_HAS_DRAW_BMP_MEM . . . . . . . . . . . . . . . . . . . . . . . . . . 600

9.51.2.2 DRV_HAS_DRAW_CIRCLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 600

9.51.2.3 DRV_HAS_DRAW_CIRCLE_FRAME . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.4 DRV_HAS_DRAW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.5 DRV_HAS_DRAW_POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.6 DRV_HAS_DRAW_POINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.7 DRV_HAS_DRAW_RECT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.8 DRV_HAS_DRAW_RECT_FRAME . . . . . . . . . . . . . . . . . . . . . . . . 601

9.51.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL . . . . . . . . . . . . . . . . . . . . . 602

9.51.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME . . . . . . . . . . . . . . . . . . . 602

9.51.2.11 DRV_HAS_DRAW_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602

9.51.2.12 DRV_HAS_DRAW_TRI_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 602

9.51.2.13 DRV_HAS_DRAW_TRI_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . 602

9.51.2.14 DRV_OVERRIDE_TXT_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 602

9.51.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

9.51.3.1 gslc_DrvAdaptColorToRaw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

9.51.3.2 gslc_DrvDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

9.51.3.3 gslc_DrvDrawBkgnd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

9.51.3.4 gslc_DrvDrawBmp24FromMem() . . . . . . . . . . . . . . . . . . . . . . . . . 604

9.51.3.5 gslc_DrvDrawFillCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604

9.51.3.6 gslc_DrvDrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605

9.51.3.7 gslc_DrvDrawFillRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . 605

9.51.3.8 gslc_DrvDrawFillTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606

9.51.3.9 gslc_DrvDrawFrameCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606

9.51.3.10 gslc_DrvDrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607

9.51.3.11 gslc_DrvDrawFrameRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . 607

9.51.3.12 gslc_DrvDrawFrameTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 608

9.51.3.13 gslc_DrvDrawImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608

Generated by Doxygen
lviii CONTENTS

9.51.3.14 gslc_DrvDrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

9.51.3.15 gslc_DrvDrawMonoFromMem() . . . . . . . . . . . . . . . . . . . . . . . . . . 609

9.51.3.16 gslc_DrvDrawPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610

9.51.3.17 gslc_DrvDrawPoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610

9.51.3.18 gslc_DrvDrawTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

9.51.3.19 gslc_DrvDrawTxtAlign() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611

9.51.3.20 gslc_DrvFontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612

9.51.3.21 gslc_DrvFontsDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612

9.51.3.22 gslc_DrvGetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613

9.51.3.23 gslc_DrvGetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613

9.51.3.24 gslc_DrvGetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614

9.51.3.25 gslc_DrvGetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614

9.51.3.26 gslc_DrvGetTxtSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614

9.51.3.27 gslc_DrvImageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615

9.51.3.28 gslc_DrvInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615

9.51.3.29 gslc_DrvInitTs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616

9.51.3.30 gslc_DrvLoadImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616

9.51.3.31 gslc_DrvPageFlipNow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617

9.51.3.32 gslc_DrvRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617

9.51.3.33 gslc_DrvSetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618

9.51.3.34 gslc_DrvSetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618

9.51.3.35 gslc_DrvSetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618

9.51.3.36 gslc_DrvSetElemImageGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 619

9.51.3.37 gslc_DrvSetElemImageNorm() . . . . . . . . . . . . . . . . . . . . . . . . . . 619

9.51.4 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

9.51.4.1 ERRSTR_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

9.51.4.2 ERRSTR_PXD_NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

9.52 src/GUIslice_drv_sdl.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

9.53 src/GUIslice_drv_sdl.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620

9.53.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

Generated by Doxygen
CONTENTS lix

9.53.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

9.53.2.1 DRV_HAS_DRAW_POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

9.53.2.2 DRV_OVERRIDE_TXT_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 623

9.53.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

9.53.3.1 gslc_DrvAdaptColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

9.53.3.2 gslc_DrvAdaptRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

9.53.3.3 gslc_DrvCleanStart() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

9.53.3.4 gslc_DrvDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

9.53.3.5 gslc_DrvDrawBkgnd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625

9.53.3.6 gslc_DrvDrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625

9.53.3.7 gslc_DrvDrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625

9.53.3.8 gslc_DrvDrawImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627

9.53.3.9 gslc_DrvDrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627

9.53.3.10 gslc_DrvDrawPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628

9.53.3.11 gslc_DrvDrawPoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628

9.53.3.12 gslc_DrvDrawTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629

9.53.3.13 gslc_DrvFontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629

9.53.3.14 gslc_DrvFontsDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630

9.53.3.15 gslc_DrvGetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630

9.53.3.16 gslc_DrvGetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

9.53.3.17 gslc_DrvGetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

9.53.3.18 gslc_DrvGetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

9.53.3.19 gslc_DrvGetTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632

9.53.3.20 gslc_DrvGetTxtSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632

9.53.3.21 gslc_DrvImageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633

9.53.3.22 gslc_DrvInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633

9.53.3.23 gslc_DrvInitTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634

9.53.3.24 gslc_DrvLoadImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634

9.53.3.25 gslc_DrvPageFlipNow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

9.53.3.26 gslc_DrvReportInfoPost() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

Generated by Doxygen
lx CONTENTS

9.53.3.27 gslc_DrvReportInfoPre() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

9.53.3.28 gslc_DrvRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

9.53.3.29 gslc_DrvSetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636

9.53.3.30 gslc_DrvSetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636

9.53.3.31 gslc_DrvSetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637

9.53.3.32 gslc_DrvSetElemImageGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 637

9.53.3.33 gslc_DrvSetElemImageNorm() . . . . . . . . . . . . . . . . . . . . . . . . . . 637

9.54 src/GUIslice_drv_tft_espi.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638

9.55 src/GUIslice_drv_tft_espi.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638

9.55.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

9.55.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

9.55.2.1 DRV_HAS_DRAW_BMP_MEM . . . . . . . . . . . . . . . . . . . . . . . . . . 641

9.55.2.2 DRV_HAS_DRAW_CIRCLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.3 DRV_HAS_DRAW_CIRCLE_FRAME . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.4 DRV_HAS_DRAW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.5 DRV_HAS_DRAW_POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.6 DRV_HAS_DRAW_POINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.7 DRV_HAS_DRAW_RECT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 642

9.55.2.8 DRV_HAS_DRAW_RECT_FRAME . . . . . . . . . . . . . . . . . . . . . . . . 643

9.55.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL . . . . . . . . . . . . . . . . . . . . . 643

9.55.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME . . . . . . . . . . . . . . . . . . . 643

9.55.2.11 DRV_HAS_DRAW_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643

9.55.2.12 DRV_HAS_DRAW_TRI_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 643

9.55.2.13 DRV_HAS_DRAW_TRI_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . 643

9.55.2.14 DRV_OVERRIDE_TXT_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.55.2.15 GSLC_SPIFFS_EN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.55.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.55.3.1 gslc_DrvAdaptColorToRaw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.55.3.2 gslc_DrvDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.55.3.3 gslc_DrvDrawBkgnd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

Generated by Doxygen
CONTENTS lxi

9.55.3.4 gslc_DrvDrawBmp24FromMem() . . . . . . . . . . . . . . . . . . . . . . . . . 646

9.55.3.5 gslc_DrvDrawFillCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646

9.55.3.6 gslc_DrvDrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647

9.55.3.7 gslc_DrvDrawFillRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . 647

9.55.3.8 gslc_DrvDrawFillTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

9.55.3.9 gslc_DrvDrawFrameCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

9.55.3.10 gslc_DrvDrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649

9.55.3.11 gslc_DrvDrawFrameRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . 649

9.55.3.12 gslc_DrvDrawFrameTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 650

9.55.3.13 gslc_DrvDrawImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650

9.55.3.14 gslc_DrvDrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651

9.55.3.15 gslc_DrvDrawMonoFromMem() . . . . . . . . . . . . . . . . . . . . . . . . . . 651

9.55.3.16 gslc_DrvDrawPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652

9.55.3.17 gslc_DrvDrawPoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652

9.55.3.18 gslc_DrvDrawTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653

9.55.3.19 gslc_DrvDrawTxtAlign() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653

9.55.3.20 gslc_DrvFontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654

9.55.3.21 gslc_DrvFontsDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654

9.55.3.22 gslc_DrvGetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655

9.55.3.23 gslc_DrvGetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655

9.55.3.24 gslc_DrvGetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656

9.55.3.25 gslc_DrvGetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656

9.55.3.26 gslc_DrvGetTxtSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656

9.55.3.27 gslc_DrvImageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657

9.55.3.28 gslc_DrvInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657

9.55.3.29 gslc_DrvInitTs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658

9.55.3.30 gslc_DrvLoadImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658

9.55.3.31 gslc_DrvPageFlipNow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659

9.55.3.32 gslc_DrvRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659

9.55.3.33 gslc_DrvSetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660

Generated by Doxygen
lxii CONTENTS

9.55.3.34 gslc_DrvSetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660

9.55.3.35 gslc_DrvSetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660

9.55.3.36 gslc_DrvSetElemImageGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 661

9.55.3.37 gslc_DrvSetElemImageNorm() . . . . . . . . . . . . . . . . . . . . . . . . . . 661

9.56 src/GUIslice_drv_utft.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662

9.57 src/GUIslice_drv_utft.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662

9.57.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665

9.57.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665

9.57.2.1 DRV_HAS_DRAW_BMP_MEM . . . . . . . . . . . . . . . . . . . . . . . . . . 665

9.57.2.2 DRV_HAS_DRAW_CIRCLE_FILL . . . . . . . . . . . . . . . . . . . . . . . . . 665

9.57.2.3 DRV_HAS_DRAW_CIRCLE_FRAME . . . . . . . . . . . . . . . . . . . . . . . 665

9.57.2.4 DRV_HAS_DRAW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.5 DRV_HAS_DRAW_POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.6 DRV_HAS_DRAW_POINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.7 DRV_HAS_DRAW_RECT_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.8 DRV_HAS_DRAW_RECT_FRAME . . . . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL . . . . . . . . . . . . . . . . . . . . . 666

9.57.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME . . . . . . . . . . . . . . . . . . . 667

9.57.2.11 DRV_HAS_DRAW_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.2.12 DRV_HAS_DRAW_TRI_FILL . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.2.13 DRV_HAS_DRAW_TRI_FRAME . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.2.14 DRV_OVERRIDE_TXT_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.3.1 gslc_DrvAdaptColorToRaw() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.3.2 gslc_DrvDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667

9.57.3.3 gslc_DrvDrawBkgnd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668

9.57.3.4 gslc_DrvDrawBmp24FromMem() . . . . . . . . . . . . . . . . . . . . . . . . . 668

9.57.3.5 gslc_DrvDrawFillCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

9.57.3.6 gslc_DrvDrawFillRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

9.57.3.7 gslc_DrvDrawFillRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . 670

Generated by Doxygen
CONTENTS lxiii

9.57.3.8 gslc_DrvDrawFillTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670

9.57.3.9 gslc_DrvDrawFrameCircle() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671

9.57.3.10 gslc_DrvDrawFrameRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671

9.57.3.11 gslc_DrvDrawFrameRoundRect() . . . . . . . . . . . . . . . . . . . . . . . . . 672

9.57.3.12 gslc_DrvDrawFrameTriangle() . . . . . . . . . . . . . . . . . . . . . . . . . . . 672

9.57.3.13 gslc_DrvDrawImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

9.57.3.14 gslc_DrvDrawLine() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

9.57.3.15 gslc_DrvDrawMonoFromMem() . . . . . . . . . . . . . . . . . . . . . . . . . . 674

9.57.3.16 gslc_DrvDrawPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674

9.57.3.17 gslc_DrvDrawPoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675

9.57.3.18 gslc_DrvDrawTxt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675

9.57.3.19 gslc_DrvFontAdd() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

9.57.3.20 gslc_DrvFontsDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

9.57.3.21 gslc_DrvGetDriverDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

9.57.3.22 gslc_DrvGetDriverTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677

9.57.3.23 gslc_DrvGetNameDisp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677

9.57.3.24 gslc_DrvGetNameTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678

9.57.3.25 gslc_DrvGetTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678

9.57.3.26 gslc_DrvGetTxtSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679

9.57.3.27 gslc_DrvImageDestruct() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679

9.57.3.28 gslc_DrvInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680

9.57.3.29 gslc_DrvInitTouch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680

9.57.3.30 gslc_DrvInitTs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681

9.57.3.31 gslc_DrvLoadImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681

9.57.3.32 gslc_DrvPageFlipNow() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681

9.57.3.33 gslc_DrvRotate() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682

9.57.3.34 gslc_DrvSetBkgndColor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682

9.57.3.35 gslc_DrvSetBkgndImage() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683

9.57.3.36 gslc_DrvSetClipRect() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683

9.57.3.37 gslc_DrvSetElemImageGlow() . . . . . . . . . . . . . . . . . . . . . . . . . . . 684

Generated by Doxygen
lxiv CONTENTS

9.57.3.38 gslc_DrvSetElemImageNorm() . . . . . . . . . . . . . . . . . . . . . . . . . . 684

9.58 src/GUIslice_ex.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684

9.59 src/GUIslice_th.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685

9.59.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685

9.59.1.1 gslc_getTouchHandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686

9.59.1.2 gslc_InitTouchHandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686

9.59.2 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686

9.59.2.1 pTouchHandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686

9.60 src/GUIslice_th.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686

9.60.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687

9.60.1.1 gslc_getTouchHandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687

9.60.1.2 gslc_InitTouchHandler() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687

9.61 src/GUIslice_th_XPT2046.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687

9.62 src/GUIslice_version.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

9.62.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

9.62.1.1 GUISLICE_VER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

Generated by Doxygen
Chapter 1

GUIslice library

A lightweight GUI framework for embedded displays

Design your GUI with a drag & drop builder, then apply the same code to a wide range of displays, libraries and
controllers with the cross-platform framework. Open source MIT license grants free commercial usage.

• Extensive Documentation guides available

• GUIslice API documentation (online) & (PDF)

• Active development: see latest updates & work in progress

• Release history

• Website (www.impulseadventure.com)

• Support email: [email protected]

• GUIslice by Calvin Hass and GitHub contributors, Builder by Paul Conti

Features

• Pure C library, no dynamic memory allocation

• Widgets:

– text, images, buttons, checkboxes, radio buttons, sliders, custom keypads, listbox, radial controls,
scrolling textbox / terminal, graphs, etc. plus extensions and multiple pages.

• Cross-platform GUIslice Builder application to generate layouts

• Platform-independent GUI core currently supports:

– Adafruit-GFX, TFT_eSPI, mcufriend, UTFT, LCDGFX, SDL1.2, SDL2.0

• Devices:

– Raspberry Pi, Arduino, ATmega2560, ESP8266 / NodeMCU, ESP32, M5stack, Teensy 3 / T4, WIO
Terminal, Feather M0 (Cortex-M0), nRF52 (Cortex-M4F), LINUX, Beaglebone Black, STM32, Due, etc.

• Typical displays:
2 GUIslice library

– PiTFT, Adafruit TFT 3.5" / 2.8" / 2.4" / 2.2" / 1.44", FeatherWing TFT, OLED 0.96", mcufriend, BuyDisplay
/ EastRising 4.3" 5" 7", Waveshare, 4D Cape

• Display drivers include:

– ILI9341, ST7735, SSD1306, HX8347D, HX8357, PCD8544, RA8875, RA8876, ILI9225, ILI9341_t3,
ILI9341_due

• Touchscreen control including:

– STMPE610, FT6206, FT5206, XPT2046, 4-wire, tslib, URTouch, Adafruit Seesaw

• IDE Support:

– GUIslice has been tested for use in the Arduino IDE and Platform IO environments, in addition to LINUX
make

• Foreign characters / UTF-8 encoding (in SDL mode), anti-aliased fonts (in TFT_eSPI mode)

• Dynamic display rotation

• GPIO / pin / keyboard / Adafruit Seesaw navigation for non-touchscreen devices

Screenshots

GUIslice Builder

• Includes cross-platform (Windows, LINUX and Mac) desktop application to generate GUIslice layouts

• Please refer to GUIslice Builder wiki for documentation

Disclaimer

The Software is not designed for use in devices or situations where there may be physical injury if the Software has
errors.

Generated by Doxygen
Chapter 2

Todo List

Global gslc_ElemGetEditEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)


Doc
Global gslc_ElemGetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Doc
Global gslc_ElemSetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocusEn)
Doc
Global gslc_InputMapLookup (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal,
gslc_teAction ∗peAction, int16_t ∗pnActionVal)
Doc.
Global gslc_XKeyPadFocusSetDefault (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Doc
Global gslc_XKeyPadPendRedrawAddKey (gslc_tsXKeyPadResult ∗pResult, int16_t nId)
Doc
Global gslc_XKeyPadPendRedrawAddTxt (gslc_tsXKeyPadResult ∗pResult)
Doc
Global gslc_XKeyPadPendRedrawReset (gslc_tsXKeyPadResult ∗pResult)
Doc
Global gslc_XKeyPadRedrawUpdate (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Doc
Global gslc_XKeyPadTrackSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nInd, gslc_tsXKey←-
PadAttrib eAttrib)
Doc
4 Todo List

Generated by Doxygen
Chapter 3

Module Index

3.1 Modules

Here is a list of all modules:

General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Graphics General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Graphics Primitive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Font Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Element Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Element: Creation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Element: General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Element: Update Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Touchscreen Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Input Mapping Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
General Purpose Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Flash-based Element Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Internal Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Internal: Misc Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Internal: Element Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Internal: Page Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Internal: Element Collection Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Internal: Element Collection Event Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Internal: Tracking Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Internal: Cleanup Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
6 Module Index

Generated by Doxygen
Chapter 4

Hierarchical Index

4.1 Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

gslc_tsCollect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
gslc_tsColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
gslc_tsDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
gslc_tsElem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
gslc_tsElemRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
gslc_tsEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
gslc_tsEventTouch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
gslc_tsFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
gslc_tsGui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
gslc_tsImgRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
gslc_tsInputMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
gslc_tsKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
gslc_tsLabelSpecial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
gslc_tsPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
gslc_tsPt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
gslc_tsRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
gslc_tsRectState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
gslc_tsXCheckbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
gslc_tsXGauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
gslc_tsXGlowball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
gslc_tsXGlowballRing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
gslc_tsXGraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
gslc_tsXKeyPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
gslc_tsXKeyPadCfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
gslc_tsXKeyPadCfg_Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
gslc_tsXKeyPadCfg_Num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
gslc_tsXKeyPadData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
gslc_tsXKeyPadResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
gslc_tsXListbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
gslc_tsXProgress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
gslc_tsXRadial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
gslc_tsXRamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
gslc_tsXRingGauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
gslc_tsXSeekbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
gslc_tsXSelNum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
8 Hierarchical Index

gslc_tsXSlider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
gslc_tsXSpinner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
gslc_tsXTemplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
gslc_tsXTextbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
gslc_tsXTogglebtn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
gslc_tsXToggleImgbtn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
THPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
TouchHandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
TouchHandler_XPT2046 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

Generated by Doxygen
Chapter 5

Data Structure Index

5.1 Data Structures

Here are the data structures with brief descriptions:

gslc_tsCollect
Element collection struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
gslc_tsColor
Color structure. Defines RGB triplet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
gslc_tsDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
gslc_tsElem
Element Struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
gslc_tsElemRef
Element reference structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
gslc_tsEvent
Event structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
gslc_tsEventTouch
Structure used to pass touch data through event . . . . . . . . . . . . . . . . . . . . . . . . . 171
gslc_tsFont
Font reference structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
gslc_tsGui
GUI structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
gslc_tsImgRef
Image reference structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
gslc_tsInputMap
Input mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
gslc_tsKey
Key information. Defines everything we need to know about a particular key . . . . . . . . . . 176
gslc_tsLabelSpecial
Key Label strings for special buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
gslc_tsPage
Page structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
gslc_tsPt
Define point coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
gslc_tsRect
Rectangular region. Defines X,Y corner coordinates plus dimensions . . . . . . . . . . . . . . 180
gslc_tsRectState
State associated with an element's region . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
gslc_tsXCheckbox
Extended data for Checkbox element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
10 Data Structure Index

gslc_tsXGauge
Extended data for Gauge element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
gslc_tsXGlowball
Extended data for Slider element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
gslc_tsXGlowballRing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
gslc_tsXGraph
Extended data for Graph element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
gslc_tsXKeyPad
Extended data for KeyPad element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
gslc_tsXKeyPadCfg
Configuration for the KeyPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
gslc_tsXKeyPadCfg_Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
gslc_tsXKeyPadCfg_Num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
gslc_tsXKeyPadData
Input callback data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
gslc_tsXKeyPadResult
Return status for XKeyPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
gslc_tsXListbox
Extended data for Listbox element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
gslc_tsXProgress
Extended data for Gauge element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
gslc_tsXRadial
Extended data for Gauge element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
gslc_tsXRamp
Extended data for Gauge element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
gslc_tsXRingGauge
Extended data for XRingGauge element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
gslc_tsXSeekbar
Extended data for Seekbar element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
gslc_tsXSelNum
Extended data for SelNum element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
gslc_tsXSlider
Extended data for Slider element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
gslc_tsXSpinner
Extended data for Spinner element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
gslc_tsXTemplate
Callback function for slider feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
gslc_tsXTextbox
Extended data for Textbox element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
gslc_tsXTogglebtn
Extended data for Togglebtn element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
gslc_tsXToggleImgbtn
Extended data for ToggleImgbtn element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
THPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
TouchHandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
TouchHandler_XPT2046 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

Generated by Doxygen
Chapter 6

File Index

6.1 File List

Here is a list of all files with brief descriptions:

src/GUIslice.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
src/GUIslice.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
src/GUIslice_config.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
src/GUIslice_drv.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
src/GUIslice_drv_adagfx.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
src/GUIslice_drv_adagfx.h
GUIslice library (driver layer for Adafruit-GFX) . . . . . . . . . . . . . . . . . . . . . . . . . . 574
src/GUIslice_drv_m5stack.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
src/GUIslice_drv_m5stack.h
GUIslice library (driver layer for M5stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
src/GUIslice_drv_sdl.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
src/GUIslice_drv_sdl.h
GUIslice library (driver layer for LINUX / SDL) . . . . . . . . . . . . . . . . . . . . . . . . . . 620
src/GUIslice_drv_tft_espi.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
src/GUIslice_drv_tft_espi.h
GUIslice library (driver layer for TFT-eSPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
src/GUIslice_drv_utft.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
src/GUIslice_drv_utft.h
GUIslice library (driver layer for UTFT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
src/GUIslice_ex.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
src/GUIslice_th.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
src/GUIslice_th.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
src/GUIslice_th_XPT2046.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
src/GUIslice_version.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
src/elem/XCheckbox.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
src/elem/XCheckbox.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
src/elem/XGauge.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
src/elem/XGauge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
src/elem/XGlowball.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
src/elem/XGlowball.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
src/elem/XGraph.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
src/elem/XGraph.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
src/elem/XKeyPad.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
src/elem/XKeyPad.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
src/elem/XKeyPad_Alpha-setup.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
12 File Index

src/elem/XKeyPad_Alpha.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
src/elem/XKeyPad_Alpha.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
src/elem/XKeyPad_Num-setup.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
src/elem/XKeyPad_Num.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
src/elem/XKeyPad_Num.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
src/elem/XListbox.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
src/elem/XListbox.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
src/elem/XProgress.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
src/elem/XProgress.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
src/elem/XRadial.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
src/elem/XRadial.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
src/elem/XRamp.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
src/elem/XRamp.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
src/elem/XRingGauge.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
src/elem/XRingGauge.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
src/elem/XSeekbar.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
src/elem/XSeekbar.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
src/elem/XSelNum.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
src/elem/XSelNum.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
src/elem/XSlider.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
src/elem/XSlider.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
src/elem/XSpinner.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
src/elem/XSpinner.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
src/elem/XTemplate.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
src/elem/XTemplate.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
src/elem/XTextbox.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
src/elem/XTextbox.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
src/elem/XTogglebtn.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
src/elem/XTogglebtn.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
src/elem/XToggleImgbtn.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
src/elem/XToggleImgbtn.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

Generated by Doxygen
Chapter 7

Module Documentation

7.1 General Functions

General functions for configuring the GUI.

Functions
• char ∗ gslc_GetVer (gslc_tsGui ∗pGui)
Get the GUIslice version number.
• const char ∗ gslc_GetNameDisp (gslc_tsGui ∗pGui)
Get the GUIslice display driver name.
• const char ∗ gslc_GetNameTouch (gslc_tsGui ∗pGui)
Get the GUIslice touch driver name.
• void ∗ gslc_GetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_GetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• bool gslc_Init (gslc_tsGui ∗pGui, void ∗pvDriver, gslc_tsPage ∗asPage, uint8_t nMaxPage, gslc_tsFont ∗as←-
Font, uint8_t nMaxFont)
Initialize the GUIslice library.
• void gslc_InitDebug (GSLC_CB_DEBUG_OUT pfunc)
Initialize debug output.
• void gslc_DebugPrintf (const char ∗pFmt,...)
Optimized printf routine for GUIslice debug/error output.
• bool gslc_GuiRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Dynamically change rotation, automatically adapt touchscreen axes swap/flip.
• void gslc_Quit (gslc_tsGui ∗pGui)
Exit the GUIslice environment.
• void gslc_Update (gslc_tsGui ∗pGui)
Perform main GUIslice handling functions.
• bool gslc_SetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_SetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_SetTransparentColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the color to use for image transparency.
• gslc_tsRect gslc_GetClipRect (gslc_tsGui ∗pGui)
Get the current the clipping rectangle.
• bool gslc_SetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for further drawing.
14 Module Documentation

7.1.1 Detailed Description

General functions for configuring the GUI.

7.1.2 Function Documentation

7.1.2.1 gslc_DebugPrintf()

void gslc_DebugPrintf (
const char ∗ pFmt,
... )

Optimized printf routine for GUIslice debug/error output.

• Only supports 's','d','u' tokens

• Calls on the output function configured in gslc_InitDebug()

Parameters

in pFmt Format string to use for printing


in ... Variable parameter list

Returns

none

7.1.2.2 gslc_GetClipRect()

gslc_tsRect gslc_GetClipRect (
gslc_tsGui ∗ pGui )

Get the current the clipping rectangle.

Parameters

in pGui Pointer to GUI

Returns

rect for active clipping region

Generated by Doxygen
7.1 General Functions 15

7.1.2.3 gslc_GetDriverDisp()

void∗ gslc_GetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

7.1.2.4 gslc_GetDriverTouch()

void∗ gslc_GetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

7.1.2.5 gslc_GetNameDisp()

const char∗ gslc_GetNameDisp (


gslc_tsGui ∗ pGui )

Get the GUIslice display driver name.

Generated by Doxygen
16 Module Documentation

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

7.1.2.6 gslc_GetNameTouch()

const char∗ gslc_GetNameTouch (


gslc_tsGui ∗ pGui )

Get the GUIslice touch driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

7.1.2.7 gslc_GetVer()

char∗ gslc_GetVer (
gslc_tsGui ∗ pGui )

Get the GUIslice version number.

Parameters

in pGui Pointer to GUI

Returns

String containing version number

7.1.2.8 gslc_GuiRotate()

bool gslc_GuiRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Generated by Doxygen
7.1 General Functions 17

Dynamically change rotation, automatically adapt touchscreen axes swap/flip.

The function assumes that the touchscreen settings for swap and flip in the GUIslice config are valid for the config-
ured GSLC_ROTATE.

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if success, false otherwise

7.1.2.9 gslc_Init()

bool gslc_Init (
gslc_tsGui ∗ pGui,
void ∗ pvDriver,
gslc_tsPage ∗ asPage,
uint8_t nMaxPage,
gslc_tsFont ∗ asFont,
uint8_t nMaxFont )

Initialize the GUIslice library.

• Configures the primary screen surface(s)

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_Init().

Parameters

in pGui Pointer to GUI


in pvDriver Void pointer to Driver struct (gslc_tsDriver∗)
in asPage Pointer to Page array
in nMaxPage Size of Page array
in asFont Pointer to Font array
in nMaxFont Size of Font array

Returns

true if success, false if fail

Generated by Doxygen
18 Module Documentation

7.1.2.10 gslc_InitDebug()

void gslc_InitDebug (
GSLC_CB_DEBUG_OUT pfunc )

Initialize debug output.

• Defines the user function used for debug/error output

• pfunc is responsible for outputing a single character

• For Arduino, this user function would typically call Serial.print()

Parameters

in pfunc Pointer to user character-out function

Returns

none

7.1.2.11 gslc_Quit()

void gslc_Quit (
gslc_tsGui ∗ pGui )

Exit the GUIslice environment.

• Calls lower-level destructors to clean up any initialized subsystems and deletes any created elements or fonts

Parameters

in pGui Pointer to GUI

Returns

None

7.1.2.12 gslc_SetBkgndColor()

bool gslc_SetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

Generated by Doxygen
7.1 General Functions 19

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

7.1.2.13 gslc_SetBkgndImage()

bool gslc_SetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

true if success, false if fail

7.1.2.14 gslc_SetClipRect()

bool gslc_SetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for further drawing.

Parameters

in pGui Pointer to GUI


in pRect Pointer to Rect for clipping (or NULL for entire screen)

Generated by Doxygen
20 Module Documentation

Returns

true if success, false if error

7.1.2.15 gslc_SetTransparentColor()

bool gslc_SetTransparentColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the color to use for image transparency.

• Drawing a BMP with transparency enabled will cause regions in this specific color to appear transparent

• This API overrides the config option GSLC_BMP_TRANS_RGB

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

7.1.2.16 gslc_Update()

void gslc_Update (
gslc_tsGui ∗ pGui )

Perform main GUIslice handling functions.

• Handles any touch events

• Performs any necessary screen redraw

Parameters

in pGui Pointer to GUI

Returns

None

Generated by Doxygen
7.2 Graphics General Functions 21

7.2 Graphics General Functions

Helper functions that support graphics operations.

Functions

• bool gslc_IsInRect (int16_t nSelX, int16_t nSelY, gslc_tsRect rRect)


Determine if a coordinate is inside of a rectangular region.
• gslc_tsRect gslc_ExpandRect (gslc_tsRect rRect, int16_t nExpandW, int16_t nExpandH)
Expand or contract a rectangle in width and/or height (equal amounts on both side), based on the centerpoint of the
rectangle.
• bool gslc_IsInWH (int16_t nSelX, int16_t nSelY, uint16_t nWidth, uint16_t nHeight)
Determine if a coordinate is inside of a width x height region.
• void gslc_UnionRect (gslc_tsRect ∗pRect, gslc_tsRect rAddRect)
Expand a rect to include another rect.
• void gslc_InvalidateRgnReset (gslc_tsGui ∗pGui)
Reset the invalidation region.
• void gslc_InvalidateRgnPage (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Include an entire page (eg.
• void gslc_InvalidateRgnScreen (gslc_tsGui ∗pGui)
Mark the entire screen as invalidated.
• void gslc_InvalidateRgnAdd (gslc_tsGui ∗pGui, gslc_tsRect rAddRect)
Add a rectangular region to the invalidation region.
• bool gslc_ClipPt (gslc_tsRect ∗pClipRect, int16_t nX, int16_t nY)
Perform basic clipping of a single point to a clipping region.
• bool gslc_ClipLine (gslc_tsRect ∗pClipRect, int16_t ∗pnX0, int16_t ∗pnY0, int16_t ∗pnX1, int16_t ∗pnY1)
Perform basic clipping of a line to a clipping region.
• bool gslc_ClipRect (gslc_tsRect ∗pClipRect, gslc_tsRect ∗pRect)
Perform basic clipping of a rectangle to a clipping region.
• gslc_tsImgRef gslc_GetImageFromFile (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in LINUX filesystem.
• gslc_tsImgRef gslc_GetImageFromSD (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in SD card.
• gslc_tsImgRef gslc_GetImageFromRam (unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in SRAM.
• gslc_tsImgRef gslc_GetImageFromProg (const unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in program memory (PROGMEM)
• void gslc_PolarToXY (uint16_t nRad, int16_t n64Ang, int16_t ∗nDX, int16_t ∗nDY)
Convert polar coordinate to cartesian.
• int16_t gslc_sinFX (int16_t n64Ang)
Calculate fixed-point sine function from fractional degrees.
• int16_t gslc_cosFX (int16_t n64Ang)
Calculate fixed-point cosine function from fractional degrees.
• gslc_tsColor gslc_ColorBlend2 (gslc_tsColor colStart, gslc_tsColor colEnd, uint16_t nMidAmt, uint16_t n←-
BlendAmt)
Create a color based on a blend between two colors.
• gslc_tsColor gslc_ColorBlend3 (gslc_tsColor colStart, gslc_tsColor colMid, gslc_tsColor colEnd, uint16_t n←-
MidAmt, uint16_t nBlendAmt)
Create a color based on a blend between three colors.
• bool gslc_ColorEqual (gslc_tsColor a, gslc_tsColor b)
Check whether two colors are equal.

Generated by Doxygen
22 Module Documentation

7.2.1 Detailed Description

Helper functions that support graphics operations.

7.2.2 Function Documentation

7.2.2.1 gslc_ClipLine()

bool gslc_ClipLine (
gslc_tsRect ∗ pClipRect,
int16_t ∗ pnX0,
int16_t ∗ pnY0,
int16_t ∗ pnX1,
int16_t ∗ pnY1 )

Perform basic clipping of a line to a clipping region.

• Implements Cohen-Sutherland algorithm

• Coordinates in parameter list are modified to fit the region

Parameters

in pClipRect Pointer to clipping region


in,out pnX0 Ptr to X coordinate of line start
in,out pnY0 Ptr to Y coordinate of line start
in,out pnX1 Ptr to X coordinate of line end
in,out pnY1 Ptr to Y coordinate of line end

Returns

true if line is visible, false if it should be discarded

7.2.2.2 gslc_ClipPt()

bool gslc_ClipPt (
gslc_tsRect ∗ pClipRect,
int16_t nX,
int16_t nY )

Perform basic clipping of a single point to a clipping region.

Generated by Doxygen
7.2 Graphics General Functions 23

Parameters

in pClipRect Pointer to clipping region


in nX X coordinate of point
in nY Y coordinate of point

Returns

true if point is visible, false if it should be discarded

7.2.2.3 gslc_ClipRect()

bool gslc_ClipRect (
gslc_tsRect ∗ pClipRect,
gslc_tsRect ∗ pRect )

Perform basic clipping of a rectangle to a clipping region.

• Coordinates in parameter rect are modified to fit the region

Parameters

in pClipRect Pointer to clipping region


in,out pRect Ptr to rectangle

Returns

true if rect is visible, false if it should be discarded

7.2.2.4 gslc_ColorBlend2()

gslc_tsColor gslc_ColorBlend2 (
gslc_tsColor colStart,
gslc_tsColor colEnd,
uint16_t nMidAmt,
uint16_t nBlendAmt )

Create a color based on a blend between two colors.

Parameters

in colStart Starting color


in colEnd Ending color
in nMidAmt Position (0..1000) between start and end color at which the midpoint between colors should
appear. Normally set to 500 (half-way).
Generated by Doxygen
in nBlendAmt The position (0..1000) between start and end at which we want to calculate the resulting
blended color.
24 Module Documentation

Returns

Blended color

7.2.2.5 gslc_ColorBlend3()

gslc_tsColor gslc_ColorBlend3 (
gslc_tsColor colStart,
gslc_tsColor colMid,
gslc_tsColor colEnd,
uint16_t nMidAmt,
uint16_t nBlendAmt )

Create a color based on a blend between three colors.

Parameters

in colStart Starting color


in colMid Intermediate color
in colEnd Ending color
in nMidAmt Position (0..1000) between start and end color at which the intermediate color should
appear.
in nBlendAmt The position (0..1000) between start and end at which we want to calculate the resulting
blended color.

Returns

Blended color

7.2.2.6 gslc_ColorEqual()

bool gslc_ColorEqual (
gslc_tsColor a,
gslc_tsColor b )

Check whether two colors are equal.

Parameters
in a First color
in b Second color

Returns

True iff a and b are the same color.

Generated by Doxygen
7.2 Graphics General Functions 25

7.2.2.7 gslc_cosFX()

int16_t gslc_cosFX (
int16_t n64Ang )

Calculate fixed-point cosine function from fractional degrees.

• Depending on configuration, the result is derived from either floating point math library or fixed point lookup
table.

• gslc_cosFX(nAngDeg∗64)/32768.0 = cos(nAngDeg∗2pi/360)

Parameters

in n64Ang Angle (in units of 1/64 degrees)

Returns

Fixed-point cosine result. Signed 16-bit; divide by 32768 to get the actual value.

7.2.2.8 gslc_ExpandRect()

gslc_tsRect gslc_ExpandRect (
gslc_tsRect rRect,
int16_t nExpandW,
int16_t nExpandH )

Expand or contract a rectangle in width and/or height (equal amounts on both side), based on the centerpoint of the
rectangle.

Parameters

in rRect Rectangular region before resizing


in nExpandW Number of pixels to expand the width (if positive) of contract the width (if negative)
in nExpandH Number of pixels to expand the height (if positive) of contract the height (if negative)

Returns

gslc_tsRect() with resized dimensions

7.2.2.9 gslc_GetImageFromFile()

gslc_tsImgRef gslc_GetImageFromFile (
const char ∗ pFname,
gslc_teImgRefFlags eFmt )

Create an image reference to a bitmap file in LINUX filesystem.

Generated by Doxygen
26 Module Documentation

Parameters

in pFname Pointer to filename string of image in filesystem


in eFmt Image format

Returns

Loaded image reference

7.2.2.10 gslc_GetImageFromProg()

gslc_tsImgRef gslc_GetImageFromProg (
const unsigned char ∗ pImgBuf,
gslc_teImgRefFlags eFmt )

Create an image reference to a bitmap in program memory (PROGMEM)

Parameters

in pImgBuf Pointer to image buffer in memory


in eFmt Image format

Returns

Loaded image reference

7.2.2.11 gslc_GetImageFromRam()

gslc_tsImgRef gslc_GetImageFromRam (
unsigned char ∗ pImgBuf,
gslc_teImgRefFlags eFmt )

Create an image reference to a bitmap in SRAM.

Parameters

in pImgBuf Pointer to image buffer in memory


in eFmt Image format

Returns

Loaded image reference

Generated by Doxygen
7.2 Graphics General Functions 27

7.2.2.12 gslc_GetImageFromSD()

gslc_tsImgRef gslc_GetImageFromSD (
const char ∗ pFname,
gslc_teImgRefFlags eFmt )

Create an image reference to a bitmap file in SD card.

Parameters

in pFname Pointer to filename string of image in SD card


in eFmt Image format

Returns

Loaded image reference

7.2.2.13 gslc_InvalidateRgnAdd()

void gslc_InvalidateRgnAdd (
gslc_tsGui ∗ pGui,
gslc_tsRect rAddRect )

Add a rectangular region to the invalidation region.

• This is usually called when an element has been modified

Parameters

in pGui Pointer to GUI


in rAddRect Rectangle to add to the invalidation region

Returns

none

7.2.2.14 gslc_InvalidateRgnPage()

void gslc_InvalidateRgnPage (
gslc_tsGui ∗ pGui,
gslc_tsPage ∗ pPage )

Include an entire page (eg.

from a page stack) in the invalidation region

Generated by Doxygen
28 Module Documentation

Parameters

in pGui Pointer to GUI


in pPage Pointer to page

Returns

none

7.2.2.15 gslc_InvalidateRgnReset()

void gslc_InvalidateRgnReset (
gslc_tsGui ∗ pGui )

Reset the invalidation region.

Parameters

in pGui Pointer to GUI

Returns

none

7.2.2.16 gslc_InvalidateRgnScreen()

void gslc_InvalidateRgnScreen (
gslc_tsGui ∗ pGui )

Mark the entire screen as invalidated.

Parameters

in pGui Pointer to GUI

Returns

none

7.2.2.17 gslc_IsInRect()

bool gslc_IsInRect (
int16_t nSelX,

Generated by Doxygen
7.2 Graphics General Functions 29

int16_t nSelY,
gslc_tsRect rRect )

Determine if a coordinate is inside of a rectangular region.

• This routine is useful in determining if a touch coordinate is inside of a button.

Parameters

in nSelX X coordinate to test


in nSelY X coordinate to test
in rRect Rectangular region to compare against

Returns

true if inside region, false otherwise

7.2.2.18 gslc_IsInWH()

bool gslc_IsInWH (
int16_t nSelX,
int16_t nSelY,
uint16_t nWidth,
uint16_t nHeight )

Determine if a coordinate is inside of a width x height region.

• This routine is useful in determining if a relative coordinate is within a given W x H dimension

Parameters

in nSelX X coordinate to test


in nSelY X coordinate to test
in nWidth Width to test against
in nHeight Height to test against

Returns

true if inside region, false otherwise

7.2.2.19 gslc_PolarToXY()

void gslc_PolarToXY (
uint16_t nRad,

Generated by Doxygen
30 Module Documentation

int16_t n64Ang,
int16_t ∗ nDX,
int16_t ∗ nDY )

Convert polar coordinate to cartesian.

Parameters

in nRad Radius of ray


in n64Ang Angle of ray (in units of 1/64 degrees, 0 is up)
out nDX X offset for ray end
out nDY Y offset for ray end

Returns

none

7.2.2.20 gslc_sinFX()

int16_t gslc_sinFX (
int16_t n64Ang )

Calculate fixed-point sine function from fractional degrees.

• Depending on configuration, the result is derived from either floating point math library or fixed point lookup
table.

• gslc_sinFX(nAngDeg∗64)/32768.0 = sin(nAngDeg∗2pi/360)

Parameters

in n64Ang Angle (in units of 1/64 degrees)

Returns

Fixed-point sine result. Signed 16-bit; divide by 32768 to get the actual value.

7.2.2.21 gslc_UnionRect()

void gslc_UnionRect (
gslc_tsRect ∗ pRect,
gslc_tsRect rAddRect )

Expand a rect to include another rect.

• This routine can be useful to modify an invalidation region to include another modified element

Generated by Doxygen
7.2 Graphics General Functions 31

Parameters
in pRect Initial rect region
in rAddRect Rectangle to add to the rect region

Returns

none

Generated by Doxygen
32 Module Documentation

7.3 Graphics Primitive Functions

These routines cause immediate drawing to occur on the primary screen.

Functions

• void gslc_DrawSetPixel (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Set a pixel on the active screen to the given color with lock.
• void gslc_DrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor nCol)
Draw an arbitrary line using Bresenham's algorithm.
• void gslc_DrawLineH (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nW, gslc_tsColor nCol)
Draw a horizontal line.
• void gslc_DrawLineV (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nH, gslc_tsColor nCol)
Draw a vertical line.
• void gslc_DrawLinePolar (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nRadStart, uint16_t nRadEnd,
int16_t n64Ang, gslc_tsColor nCol)
Draw a polar ray segment.
• void gslc_DrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• void gslc_DrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a framed rounded rectangle.
• void gslc_DrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• void gslc_DrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• void gslc_DrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a framed circle.
• void gslc_DrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor n←-
Col)
Draw a filled circle.
• void gslc_DrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• void gslc_DrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t nX2,
int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• void gslc_DrawFrameQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a framed quadrilateral.
• void gslc_DrawFillQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a filled quadrilateral.
• void gslc_DrawFillGradSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t n←-
Rad1, int16_t nRad2, gslc_tsColor cArcStart, gslc_tsColor cArcEnd, int16_t nAngSecStart, int16_t nAng←-
SecEnd, int16_t nAngGradStart, int16_t nAngGradRange)
Draw a gradient filled sector of a circle with support for inner and outer radius.
• void gslc_DrawFillSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t nRad1,
int16_t nRad2, gslc_tsColor cArc, int16_t nAngSecStart, int16_t nAngSecEnd)
Draw a flat filled sector of a circle with support for inner and outer radius.

Generated by Doxygen
7.3 Graphics Primitive Functions 33

7.3.1 Detailed Description

These routines cause immediate drawing to occur on the primary screen.

7.3.2 Function Documentation

7.3.2.1 gslc_DrawFillCircle()

void gslc_DrawFillCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a filled circle.

Parameters

in pGui Pointer to GUI


in nMidX Center X coordinate
in nMidY Center Y coordinate
in nRadius Radius of circle
in nCol Color RGB value for the fill

Returns

none

7.3.2.2 gslc_DrawFillGradSector()

void gslc_DrawFillGradSector (
gslc_tsGui ∗ pGui,
int16_t nQuality,
int16_t nMidX,
int16_t nMidY,
int16_t nRad1,
int16_t nRad2,
gslc_tsColor cArcStart,
gslc_tsColor cArcEnd,
int16_t nAngSecStart,
int16_t nAngSecEnd,
int16_t nAngGradStart,
int16_t nAngGradRange )

Draw a gradient filled sector of a circle with support for inner and outer radius.

Generated by Doxygen
34 Module Documentation

• Can be used to create a ring or pie chart

• Note that the gradient fill is defined by both the color stops (cArcStart..cArcEnd) as well as a gradient angular
range (nAngGradStart..nAngGradStart+nAngGradRange). This gradient angular range can be differeng from
the drawing angular range (nAngSegStart..nAngSecEnd) to enable more advanced control styling / updates.

Parameters

in pGui Pointer to GUI


in nQuality Number of segments used to depict a full circle. The higher the value, the smoother
the resulting arcs. A value of 72 provides 360/72=5 degrees per segment which is a
reasonable compromise between smoothness and performance. Note that
360/nQuality should be an integer result, thus the allowable quality settings are: 360
(max quality), 180, 120, 90, 72, 60, 45, 40, 36 (low quality), etc.
in nMidX Midpoint X coordinate of circle
in nMidY Midpoint Y coordinate of circle
in nRad1 Inner sector radius (0 for sector / pie, non-zero for ring)
in nRad2 Outer sector radius. Delta from nRad1 defines ring thickness.
in cArcStart Start color for gradient fill (with angular range defined by
nAngGradStart,nAngGradRange)
in cArcEnd End color for gradient fill
in nAngSecStart Angle of start of sector drawing (0 at top), measured in degrees.
in nAngSecEnd Angle of end of sector drawing (0 at top), measured in degrees.
in nAngGradStart For gradient fill, defines the starting angle associated with the starting color
(cArcStart)
in nAngGradRange For gradient fill, defines the angular range associated with the start-to-end color
range (cArcStart..cArcEnd)

Returns

none

7.3.2.3 gslc_DrawFillQuad()

void gslc_DrawFillQuad (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ psPt,
gslc_tsColor nCol )

Draw a filled quadrilateral.

Parameters

in pGui Pointer to GUI


in psPt Pointer to array of 4 points
in nCol Color RGB value for the frame

Generated by Doxygen
7.3 Graphics Primitive Functions 35

Returns

true if success, false if error

7.3.2.4 gslc_DrawFillRect()

void gslc_DrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

none

7.3.2.5 gslc_DrawFillRoundRect()

void gslc_DrawFillRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a filled rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nRadius Radius for the rounded corners
in nCol Color RGB value to fill

Returns

none

Generated by Doxygen
36 Module Documentation

7.3.2.6 gslc_DrawFillSector()

void gslc_DrawFillSector (
gslc_tsGui ∗ pGui,
int16_t nQuality,
int16_t nMidX,
int16_t nMidY,
int16_t nRad1,
int16_t nRad2,
gslc_tsColor cArc,
int16_t nAngSecStart,
int16_t nAngSecEnd )

Draw a flat filled sector of a circle with support for inner and outer radius.

• Can be used to create a ring or pie chart

Parameters

in pGui Pointer to GUI


in nQuality Number of segments used to depict a full circle. The higher the value, the smoother the
resulting arcs. A value of 72 provides 360/72=5 degrees per segment which is a
reasonable compromise between smoothness and performance.
in nMidX Midpoint X coordinate of circle
in nMidY Midpoint Y coordinate of circle
in nRad1 Inner sector radius (0 for sector / pie, non-zero for ring)
in nRad2 Outer sector radius. Delta from nRad1 defines ring thickness.
in cArc Color for flat fill
in nAngSecStart Angle of start of sector drawing (0 at top), measured in degrees.
in nAngSecEnd Angle of end of sector drawing (0 at top), measured in degrees.

Returns

none

7.3.2.7 gslc_DrawFillTriangle()

void gslc_DrawFillTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a filled triangle.

Generated by Doxygen
7.3 Graphics Primitive Functions 37

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value for the fill

Returns

true if success, false if error

7.3.2.8 gslc_DrawFrameCircle()

void gslc_DrawFrameCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a framed circle.

Parameters

in pGui Pointer to GUI


in nMidX Center X coordinate
in nMidY Center Y coordinate
in nRadius Radius of circle
in nCol Color RGB value for the frame

Returns

none

7.3.2.9 gslc_DrawFrameQuad()

void gslc_DrawFrameQuad (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ psPt,
gslc_tsColor nCol )

Draw a framed quadrilateral.

Generated by Doxygen
38 Module Documentation

Parameters

in pGui Pointer to GUI


in psPt Pointer to array of 4 points
in nCol Color RGB value for the frame

Returns

true if success, false if error

7.3.2.10 gslc_DrawFrameRect()

void gslc_DrawFrameRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value for the frame

Returns

none

7.3.2.11 gslc_DrawFrameRoundRect()

void gslc_DrawFrameRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a framed rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nRadius Radius for the rounded corners
in nCol Color RGB value for the frame

Generated by Doxygen
7.3 Graphics Primitive Functions 39

Returns

none

7.3.2.12 gslc_DrawFrameTriangle()

void gslc_DrawFrameTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a framed triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value for the frame

Returns

true if success, false if error

7.3.2.13 gslc_DrawLine()

void gslc_DrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw an arbitrary line using Bresenham's algorithm.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
40 Module Documentation

Parameters

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
in nCol Color RGB value for the line

Returns

none

7.3.2.14 gslc_DrawLineH()

void gslc_DrawLineH (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
uint16_t nW,
gslc_tsColor nCol )

Draw a horizontal line.

• Note that direction of line is in +ve X axis

Parameters

in pGui Pointer to GUI


in nX X coordinate of line startpoint
in nY Y coordinate of line startpoint
in nW Width of line (in +X direction)
in nCol Color RGB value for the line

Returns

none

7.3.2.15 gslc_DrawLinePolar()

void gslc_DrawLinePolar (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,

Generated by Doxygen
7.3 Graphics Primitive Functions 41

uint16_t nRadStart,
uint16_t nRadEnd,
int16_t n64Ang,
gslc_tsColor nCol )

Draw a polar ray segment.

Parameters

in pGui Pointer to GUI


in nX X coordinate of line startpoint
in nY Y coordinate of line startpoint
in nRadStart Starting radius of line
in nRadEnd Ending radius of line
in n64Ang Angle of ray (degrees ∗ 64). 0 is up, +90∗64 is to right From -180∗64 to +180∗64
in nCol Color RGB value for the line

Returns

none

7.3.2.16 gslc_DrawLineV()

void gslc_DrawLineV (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
uint16_t nH,
gslc_tsColor nCol )

Draw a vertical line.

• Note that direction of line is in +ve Y axis

Parameters

in pGui Pointer to GUI


in nX X coordinate of line startpoint
in nY Y coordinate of line startpoint
in nH Height of line (in +Y direction)
in nCol Color RGB value for the line

Returns

none

Generated by Doxygen
42 Module Documentation

7.3.2.17 gslc_DrawSetPixel()

void gslc_DrawSetPixel (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Set a pixel on the active screen to the given color with lock.

• Calls upon gslc_DrvDrawSetPixelRaw() but wraps with a surface lock lock

• If repeated access is needed, use gslc_DrvDrawSetPixelRaw() instead

Parameters

in pGui Pointer to GUI


in nX Pixel X coordinate to set
in nY Pixel Y coordinate to set
in nCol Color pixel value to assign

Returns

none

Generated by Doxygen
7.4 Font Functions 43

7.4 Font Functions

Functions that load fonts.

Functions

• bool gslc_FontAdd (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and assign font ID (nFontId).
• bool gslc_FontSet (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and store as font ID (nFontId)
• gslc_tsFont ∗ gslc_FontGet (gslc_tsGui ∗pGui, int16_t nFontId)
Fetch a font from its ID value.
• bool gslc_FontSetMode (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefMode eFontMode)
Set the font operating mode.

7.4.1 Detailed Description

Functions that load fonts.

7.4.2 Function Documentation

7.4.2.1 gslc_FontAdd()

bool gslc_FontAdd (
gslc_tsGui ∗ pGui,
int16_t nFontId,
gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font into the local font cache and assign font ID (nFontId).

• Font is stored into next available internal array element

• NOTE: Use FontSet() instead

Parameters

in pGui Pointer to GUI


in nFontId ID to use when referencing this font
in eFontRefType Font reference type (eg. filename or pointer)
in pvFontRef Reference pointer to identify the font. In the case of SDL mode, it is a filepath to the font
file. In the case of Arduino it is a pointer value to the font bitmap array (GFXFont)
in nFontSz Typeface size to use (only used in SDL mode)
Generated by Doxygen
44 Module Documentation

Returns

true if load was successful, false otherwise

7.4.2.2 gslc_FontGet()

gslc_tsFont∗ gslc_FontGet (
gslc_tsGui ∗ pGui,
int16_t nFontId )

Fetch a font from its ID value.

Parameters

in pGui Pointer to GUI


in n←- ID value used to reference the font (supplied originally to gslc_FontAdd()
FontId

Returns

A pointer to the font structure or NULL if error

7.4.2.3 gslc_FontSet()

bool gslc_FontSet (
gslc_tsGui ∗ pGui,
int16_t nFontId,
gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font into the local font cache and store as font ID (nFontId)

• Font is stored into index nFontId, so nFontId must be from separate font enum (0-based).

• Example: enum { E_FONT_BTN, E_FONT_TXT, MAX_FONT };

Parameters

in pGui Pointer to GUI


in nFontId ID to use when referencing this font
in eFontRefType Font reference type (eg. filename or pointer)
in pvFontRef Reference pointer to identify the font. In the case of SDL mode, it is a filepath to the font
file. In the case of Arduino it is a pointer value to the font bitmap array (GFXFont)
in nFontSz Typeface size to use (only used in SDL mode)

Generated by Doxygen
7.4 Font Functions 45

Returns

true if load was successful, false otherwise

7.4.2.4 gslc_FontSetMode()

bool gslc_FontSetMode (
gslc_tsGui ∗ pGui,
int16_t nFontId,
gslc_teFontRefMode eFontMode )

Set the font operating mode.

Parameters

in pGui Pointer to GUI


in nFontId ID value used to reference the font (supplied originally to gslc_FontAdd()
in,out eFontMode Font mode to assign to this font

Returns

true if success

Generated by Doxygen
46 Module Documentation

7.5 Page Functions

Functions that operate at the page level.

Functions

• int gslc_GetPageCur (gslc_tsGui ∗pGui)


Fetch the current page ID.
• void gslc_SetStackPage (gslc_tsGui ∗pGui, uint8_t nStackPos, int16_t nPageId)
Assign a page to the page stack.
• void gslc_SetStackState (gslc_tsGui ∗pGui, uint8_t nStackPos, bool bActive, bool bDoDraw)
Change the status of a page in a page stack.
• void gslc_SetPageBase (gslc_tsGui ∗pGui, int16_t nPageId)
Assigns a page for the base layer in the page stack.
• void gslc_SetPageCur (gslc_tsGui ∗pGui, int16_t nPageId)
Select a page for the current layer in the page stack.
• void gslc_SetPageOverlay (gslc_tsGui ∗pGui, int16_t nPageId)
Select a page for the overlay layer in the page stack.
• void gslc_PopupShow (gslc_tsGui ∗pGui, int16_t nPageId, bool bModal)
Show a popup dialog.
• void gslc_PopupHide (gslc_tsGui ∗pGui)
Hides the currently active popup dialog.
• void gslc_PageRedrawSet (gslc_tsGui ∗pGui, bool bRedraw)
Update the need-redraw status for the current page.
• bool gslc_PageRedrawGet (gslc_tsGui ∗pGui)
Get the need-redraw status for the current page.
• void gslc_PageAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗psElem, uint16_t nMaxElem, gslc_←-
tsElemRef ∗psElemRef, uint16_t nMaxElemRef)
Add a page to the GUI.
• gslc_tsElemRef ∗ gslc_PageFindElemById (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Find an element in the GUI by its Page ID and Element ID.

7.5.1 Detailed Description

Functions that operate at the page level.

7.5.2 Function Documentation

7.5.2.1 gslc_GetPageCur()

int gslc_GetPageCur (
gslc_tsGui ∗ pGui )

Fetch the current page ID.

Generated by Doxygen
7.5 Page Functions 47

Parameters

in pGui Pointer to GUI

Returns

Page ID

7.5.2.2 gslc_PageAdd()

void gslc_PageAdd (
gslc_tsGui ∗ pGui,
int16_t nPageId,
gslc_tsElem ∗ psElem,
uint16_t nMaxElem,
gslc_tsElemRef ∗ psElemRef,
uint16_t nMaxElemRef )

Add a page to the GUI.

• This call associates an element array with the collection within the page

• Once a page has been added to the GUI, elements can be added to the page by specifying the same page
ID

Parameters

in pGui Pointer to GUI


in nPageId Page ID to assign
in psElem Internal element array storage to associate with the page
in nMaxElem Maximum number of elements that can be added to the internal element array (ie.
RAM))
in psElemRef Internal element reference array storage to associate with the page. All elements,
whether they are located in the internal element array or in external Flash (PROGMEM)
storage, require an entry in the element reference array.
in nMaxElemRef Maximum number of elements in the reference array. This is effectively the maximum
number of elements that can appear on a page, irrespective of whether it is stored in
RAM or Flash (PROGMEM).

Returns

none

7.5.2.3 gslc_PageFindElemById()

gslc_tsElemRef∗ gslc_PageFindElemById (
gslc_tsGui ∗ pGui,

Generated by Doxygen
48 Module Documentation

int16_t nPageId,
int16_t nElemId )

Find an element in the GUI by its Page ID and Element ID.

Parameters

in pGui Pointer to GUI


in n←- Page ID to search
PageId
in n←- Element ID to search
ElemId

Returns

Ptr to an element or NULL if none found

7.5.2.4 gslc_PageRedrawGet()

bool gslc_PageRedrawGet (
gslc_tsGui ∗ pGui )

Get the need-redraw status for the current page.

Parameters

in pGui Pointer to GUI

Returns

True if redraw required, false otherwise

7.5.2.5 gslc_PageRedrawSet()

void gslc_PageRedrawSet (
gslc_tsGui ∗ pGui,
bool bRedraw )

Update the need-redraw status for the current page.

Parameters

in pGui Pointer to GUI


in bRedraw True if redraw required, false otherwise

Generated by Doxygen
7.5 Page Functions 49

Returns

none

7.5.2.6 gslc_PopupHide()

void gslc_PopupHide (
gslc_tsGui ∗ pGui )

Hides the currently active popup dialog.

Parameters

in pGui Pointer to GUI

Returns

none

7.5.2.7 gslc_PopupShow()

void gslc_PopupShow (
gslc_tsGui ∗ pGui,
int16_t nPageId,
bool bModal )

Show a popup dialog.

• Popup dialogs use the overlay layer in the page stack

Parameters

in pGui Pointer to GUI


in n←- Page ID to use as the popup dialog
PageId
in bModal If true, popup is modal (other layers won't accept touch). If false, popup is modeless (other
layers still accept touch)

Returns

none

Generated by Doxygen
50 Module Documentation

7.5.2.8 gslc_SetPageBase()

void gslc_SetPageBase (
gslc_tsGui ∗ pGui,
int16_t nPageId )

Assigns a page for the base layer in the page stack.

Parameters

in pGui Pointer to GUI


in n←- Page ID to select (or GSLC_PAGE_NONE to disable)
PageId

Returns

none

7.5.2.9 gslc_SetPageCur()

void gslc_SetPageCur (
gslc_tsGui ∗ pGui,
int16_t nPageId )

Select a page for the current layer in the page stack.

Parameters

in pGui Pointer to GUI


in n←- Page ID to select
PageId

Returns

none

7.5.2.10 gslc_SetPageOverlay()

void gslc_SetPageOverlay (
gslc_tsGui ∗ pGui,
int16_t nPageId )

Select a page for the overlay layer in the page stack.

Generated by Doxygen
7.5 Page Functions 51

Parameters

in pGui Pointer to GUI


in n←- Page ID to select (or GSLC_PAGE_NONE to disable)
PageId

Returns

none

7.5.2.11 gslc_SetStackPage()

void gslc_SetStackPage (
gslc_tsGui ∗ pGui,
uint8_t nStackPos,
int16_t nPageId )

Assign a page to the page stack.

Parameters

in pGui Pointer to GUI


in nStackPos Position to update in the page stack (0..GSLC_STACK__MAX-1)
in nPageId Page ID to select as current

Returns

none

7.5.2.12 gslc_SetStackState()

void gslc_SetStackState (
gslc_tsGui ∗ pGui,
uint8_t nStackPos,
bool bActive,
bool bDoDraw )

Change the status of a page in a page stack.

Parameters

in pGui Pointer to GUI


in nStackPos Position to update in the page stack (0..GSLC_STACK__MAX-1)
in bActive Indicate if page should receive touch events
in bDoDraw Indicate if page should continue to be redrawn. If pages in the stack are overlapping and an
element in a lower layer continues to receive updates, then the element may "show
Generated by Doxygen through" the layers above it. In such cases where pages in the stack are overlapping and
lower pages contain dynamically updating elements, it may be best to disable redraw while
the overlapping page is visible (by setting bDoDraw to false).
52 Module Documentation

Returns

none

Generated by Doxygen
7.6 Element Functions 53

7.6 Element Functions

Functions that are used to create and manipulate elements.

Collaboration diagram for Element Functions:

Element: Creation Functions

Element Functions Element: Update Functions

Element: General Functions

Modules

• Element: Creation Functions


Functions that create GUI elements.
• Element: General Functions
General-purpose functions that operate on Elements.
• Element: Update Functions
Functions that configure or modify an existing eleemnt.

7.6.1 Detailed Description

Functions that are used to create and manipulate elements.

Generated by Doxygen
54 Module Documentation

7.7 Element: Creation Functions

Functions that create GUI elements.

Collaboration diagram for Element: Creation Functions:

Element Functions Element: Creation Functions

Functions

• 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.
• 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.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateBox (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem)
Create a Box Element.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateImg (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem, gslc_tsImgRef sImgRef)
Create an image Element.

7.7.1 Detailed Description

Functions that create GUI elements.

7.7.2 Function Documentation

Generated by Doxygen
7.7 Element: Creation Functions 55

7.7.2.1 gslc_ElemCreateBox()

gslc_tsElemRef∗ gslc_ElemCreateBox (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsRect rElem )

Create a Box Element.

• Draws a box with frame and fill

Generated by Doxygen
56 Module Documentation

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
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

7.7.2.2 gslc_ElemCreateBtnImg()

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.

• 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

Generated by Doxygen
7.7 Element: Creation Functions 57

7.7.2.3 gslc_ElemCreateBtnTxt()

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.

• 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

7.7.2.4 gslc_ElemCreateImg()

gslc_tsElemRef∗ gslc_ElemCreateImg (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsRect rElem,
gslc_tsImgRef sImgRef )

Create an image Element.

• Draws an image

Generated by Doxygen
58 Module Documentation

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
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

7.7.2.5 gslc_ElemCreateLine()

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 n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
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

Generated by Doxygen
7.7 Element: Creation Functions 59

7.7.2.6 gslc_ElemCreateTxt()

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.

• 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

Generated by Doxygen
60 Module Documentation

7.8 Element: General Functions

General-purpose functions that operate on Elements.

Collaboration diagram for Element: General Functions:

Element Functions Element: General Functions

Functions

• int gslc_ElemGetId (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)


Get an Element ID from an element structure.

7.8.1 Detailed Description

General-purpose functions that operate on Elements.

7.8.2 Function Documentation

7.8.2.1 gslc_ElemGetId()

int gslc_ElemGetId (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get an Element ID from an element structure.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference structure

Returns

ID of element or GSLC_ID_NONE if not found

Generated by Doxygen
7.9 Element: Update Functions 61

7.9 Element: Update Functions

Functions that configure or modify an existing eleemnt.

Collaboration diagram for Element: Update Functions:

Element Functions Element: Update Functions

Functions

• void gslc_ElemSetFillEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFillEn)


Set the fill state for an Element.
• void gslc_ElemSetFrameEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFrameEn)
Set the frame state for an Element.
• void gslc_ElemSetRoundEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bRoundEn)
Set the rounded frame/fill state for an Element.
• 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.
• 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.
• void gslc_ElemSetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nGroupId)
Set the group ID for an element.
• int gslc_ElemGetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the group ID for an element.
• void gslc_ElemSetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRect rElem)
Set the position and size for an element.
• gslc_tsRect gslc_ElemGetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the rectangular region for an element.
• void gslc_ElemSetTxtAlign (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nAlign)
Set the alignment of a textual element (horizontal and vertical)
• void gslc_ElemSetTxtMargin (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nMargin)
Set the margin around of a textual element.
• void gslc_ElemSetTxtMarginXY (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nMarginX, int8_t n←-
MarginY)
Set the margin around of a textual element (X & Y offsets can be different)
• void gslc_StrCopy (char ∗pDstStr, const char ∗pSrcStr, uint16_t nDstLen)
Helper routine to perform string deep copy.
• void gslc_ElemSetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStr)
Update the text string associated with an Element.
• char ∗ gslc_ElemGetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Fetch the current text string associated with an Element.

Generated by Doxygen
62 Module Documentation

• void gslc_ElemSetTxtCol (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colVal)


Update the text string color associated with an Element ID.
• void gslc_ElemSetTxtMem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string location in memory.
• void gslc_ElemSetTxtEnc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string encoding mode.
• void gslc_ElemUpdateFont (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nFontId)
Update the Font selected for an Element's text.
• void gslc_ElemSetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Update the need-redraw status for an element.
• gslc_teRedrawType gslc_ElemGetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the need-redraw status for an element.
• void gslc_ElemSetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowEn)
Update the glowing enable for an element.
• void gslc_ElemSetClickEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bClickEn)
Update the click enable for an element.
• void gslc_ElemSetTouchFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TOUCH funcCb)
Update the touch function callback for an element.
• void gslc_ElemSetStyleFrom (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefSrc, gslc_tsElemRef ∗pElem←-
RefDest)
Copy style settings from one element to another.
• void gslc_ResetRectState (gslc_tsRectState ∗pState)
Reset the element region state struct.
• void gslc_ElemCalcRectState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRectState ∗pState)
Calculate the element region state struct.
• int8_t gslc_ElemCalcResizeForFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Calculate the change in dimensions of an element to account for any change in focus and/or frame attributes.
• void gslc_ElemGrowRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nDelta)
Increase or decrease the size of an element's region.
• bool gslc_ElemGetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the glowing enable for an element.
• void gslc_ElemSetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowing)
Update the glowing indicator for an element.
• bool gslc_ElemGetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the glowing indicator for an element.
• bool gslc_ElemGetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focus enable for an element.
• void gslc_ElemSetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocusEn)
Set the focus enable for an element.
• void gslc_ElemSetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocused)
Update the focused indicator for an element.
• bool gslc_ElemGetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focused indicator for an element.
• void gslc_ElemSetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bEditing)
Update the editing indicator for an element.
• bool gslc_ElemGetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the editing indicator for an element.
• void gslc_ElemSetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bVisible)
Update the visibility status for an element.
• bool gslc_ElemGetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the visibility status for an element.

Generated by Doxygen
7.9 Element: Update Functions 63

• bool gslc_ElemGetOnScreen (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)


Determine whether an element is visible on the screen.
• void gslc_ElemSetDrawFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_DRAW funcCb)
Assign the drawing callback function for an element.
• void gslc_ElemSetTickFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TICK funcCb)
Assign the tick callback function for an element.
• bool gslc_ElemOwnsCoord (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nX, int16_t nY, bool b←-
OnlyClickEn)
Determine if a coordinate is inside of an element.

7.9.1 Detailed Description

Functions that configure or modify an existing eleemnt.

7.9.2 Function Documentation

7.9.2.1 gslc_ElemCalcRectState()

void gslc_ElemCalcRectState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsRectState ∗ pState )

Calculate the element region state struct.

• Establishes the size of the frame and inner regions

• Determines the color of various parts of the element (focus rect, frame, text, fll, etc.)

• The region state is calculated based upon the element's attributes, including the frame enable, ability to
support focus, whether the contents can be shrunk to accommodate a frame, and the current state of fo-
cus/edit/etc.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
out pState Pointer to element region state

Returns

none

Generated by Doxygen
64 Module Documentation

7.9.2.2 gslc_ElemCalcResizeForFocus()

int8_t gslc_ElemCalcResizeForFocus (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Calculate the change in dimensions of an element to account for any change in focus and/or frame attributes.

It also takes into account the "NoShrink" attribute which indicates that an element's contents can't be reduced in
size (eg. because they contain a fixed-sized image).

• This routine is usually called whenever an element is created and also whenever size-impacting features are
adjusted (eg. ElemSetFrameEn).

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

The increase (or decrease) in size of the element

7.9.2.3 gslc_ElemGetEdit()

bool gslc_ElemGetEdit (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the editing indicator for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element is being edited

7.9.2.4 gslc_ElemGetFocus()

bool gslc_ElemGetFocus (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the focused indicator for an element.

Generated by Doxygen
7.9 Element: Update Functions 65

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element is focused

7.9.2.5 gslc_ElemGetFocusEn()

bool gslc_ElemGetFocusEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the focus enable for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element supports focus

Todo Doc

7.9.2.6 gslc_ElemGetGlow()

bool gslc_ElemGetGlow (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the glowing indicator for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Generated by Doxygen
66 Module Documentation

Returns

True if element is glowing

7.9.2.7 gslc_ElemGetGlowEn()

bool gslc_ElemGetGlowEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the glowing enable for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element supports glowing

7.9.2.8 gslc_ElemGetGroup()

int gslc_ElemGetGroup (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the group ID for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Group ID or GSLC_GROUP_ID_NONE if unassigned

7.9.2.9 gslc_ElemGetOnScreen()

bool gslc_ElemGetOnScreen (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Determine whether an element is visible on the screen.

Generated by Doxygen
7.9 Element: Update Functions 67

• This function takes into account both the element's "Visible" state as well as whether the element's associated
page is active in the page stack.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element appears on the screen, false otherwise

7.9.2.10 gslc_ElemGetRect()

gslc_tsRect gslc_ElemGetRect (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the rectangular region for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Rect region of an element

7.9.2.11 gslc_ElemGetRedraw()

gslc_teRedrawType gslc_ElemGetRedraw (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the need-redraw status for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Generated by Doxygen
68 Module Documentation

Returns

Redraw status

7.9.2.12 gslc_ElemGetTxtStr()

char∗ gslc_ElemGetTxtStr (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Fetch the current text string associated with an Element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Pointer to character array string

7.9.2.13 gslc_ElemGetVisible()

bool gslc_ElemGetVisible (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the visibility status for an element.

• Note that the visibility state is independent of whether or not the page associated with the element is actively
displayed.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

True if element is marked as visible, false if hidden

Generated by Doxygen
7.9 Element: Update Functions 69

7.9.2.14 gslc_ElemGrowRect()

void gslc_ElemGrowRect (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nDelta )

Increase or decrease the size of an element's region.

• Update the redraw status as needed

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nDelta The increase of element size (negative for decrease)

Returns

none

7.9.2.15 gslc_ElemOwnsCoord()

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.

• This routine is useful in determining if a touch coordinate is inside of a button.

Parameters

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)

Returns

true if inside element, false otherwise

Generated by Doxygen
70 Module Documentation

7.9.2.16 gslc_ElemSetClickEn()

void gslc_ElemSetClickEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bClickEn )

Update the click enable for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bClickEn True if element should support click events

Returns

none

7.9.2.17 gslc_ElemSetCol()

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.

Parameters

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

Returns

none

7.9.2.18 gslc_ElemSetDrawFunc()

void gslc_ElemSetDrawFunc (
gslc_tsGui ∗ pGui,

Generated by Doxygen
7.9 Element: Update Functions 71

gslc_tsElemRef ∗ pElemRef,
GSLC_CB_DRAW funcCb )

Assign the drawing callback function for an element.

• This allows the user to override the default rendering for an element, enabling the creation of a custom
element

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to drawing routine (or NULL for default))

Returns

none

7.9.2.19 gslc_ElemSetEdit()

void gslc_ElemSetEdit (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bEditing )

Update the editing indicator for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bEditing True if element is being edited

Returns

none

7.9.2.20 gslc_ElemSetFillEn()

void gslc_ElemSetFillEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFillEn )

Set the fill state for an Element.

Generated by Doxygen
72 Module Documentation

• If not filled, the element can support transparency against an arbitrary background, but this can require full
screen redraws if the element is updated.

• If filled, the background fill color can be changed by gslc_ElemSetCol()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFillEn True if filled, false otherwise

Returns

none

7.9.2.21 gslc_ElemSetFocus()

void gslc_ElemSetFocus (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFocused )

Update the focused indicator for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFocused True if element is focused

Returns

none

7.9.2.22 gslc_ElemSetFocusEn()

void gslc_ElemSetFocusEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFocusEn )

Set the focus enable for an element.

Generated by Doxygen
7.9 Element: Update Functions 73

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFocusEn Enable focus if 1, 0 if not supported

Returns

none

Todo Doc

7.9.2.23 gslc_ElemSetFrameEn()

void gslc_ElemSetFrameEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFrameEn )

Set the frame state for an Element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFrameEn True if framed, false otherwise

Returns

none

7.9.2.24 gslc_ElemSetGlow()

void gslc_ElemSetGlow (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bGlowing )

Update the glowing indicator for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bGlowing True if element is glowing

Generated by Doxygen
74 Module Documentation

Returns

none

7.9.2.25 gslc_ElemSetGlowCol()

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.

Parameters

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

Returns

none

7.9.2.26 gslc_ElemSetGlowEn()

void gslc_ElemSetGlowEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bGlowEn )

Update the glowing enable for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bGlowEn True if element should support glowing

Returns

none

Generated by Doxygen
7.9 Element: Update Functions 75

7.9.2.27 gslc_ElemSetGroup()

void gslc_ElemSetGroup (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int nGroupId )

Set the group ID for an element.

• Typically used to associate radio button elements together

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nGroupId Group ID to assign

Returns

none

7.9.2.28 gslc_ElemSetRect()

void gslc_ElemSetRect (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsRect rElem )

Set the position and size for an element.

• This updates the element's rectangular region, which can be used to relocate or resize an element at runtime

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in rElem Rect region (top-left coord, width, height)

Returns

none

Generated by Doxygen
76 Module Documentation

7.9.2.29 gslc_ElemSetRedraw()

void gslc_ElemSetRedraw (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Update the need-redraw status for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in eRedraw Redraw state to set

Returns

none

7.9.2.30 gslc_ElemSetRoundEn()

void gslc_ElemSetRoundEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bRoundEn )

Set the rounded frame/fill state for an Element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bRoundEn True if rounded, false otherwise

Returns

none

7.9.2.31 gslc_ElemSetStyleFrom()

void gslc_ElemSetStyleFrom (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRefSrc,
gslc_tsElemRef ∗ pElemRefDest )

Copy style settings from one element to another.

Generated by Doxygen
7.9 Element: Update Functions 77

Parameters

in pGui Pointer to GUI


in pElemRefSrc Pointer to source Element reference
in pElemRefDest Pointer to destination Element reference

Returns

none

7.9.2.32 gslc_ElemSetTickFunc()

void gslc_ElemSetTickFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_TICK funcCb )

Assign the tick callback function for an element.

• This allows the user to provide background updates to an element triggered by the main loop call to gslc_←-
Update()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to tick routine (or NULL for none))

Returns

none

7.9.2.33 gslc_ElemSetTouchFunc()

void gslc_ElemSetTouchFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_TOUCH funcCb )

Update the touch function callback for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
Generated by Doxygen
in funcCb Pointer to the touch callback function
78 Module Documentation

Returns

none

7.9.2.34 gslc_ElemSetTxtAlign()

void gslc_ElemSetTxtAlign (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
unsigned nAlign )

Set the alignment of a textual element (horizontal and vertical)

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nAlign Alignment to specify:

• GSLC_ALIGN_TOP_LEFT

• GSLC_ALIGN_TOP_MID

• GSLC_ALIGN_TOP_RIGHT

• GSLC_ALIGN_MID_LEFT

• GSLC_ALIGN_MID_MID

• GSLC_ALIGN_MID_RIGHT

• GSLC_ALIGN_BOT_LEFT

• GSLC_ALIGN_BOT_MID

• GSLC_ALIGN_BOT_RIGHT

Returns

none

7.9.2.35 gslc_ElemSetTxtCol()

void gslc_ElemSetTxtCol (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colVal )

Update the text string color associated with an Element ID.

Generated by Doxygen
7.9 Element: Update Functions 79

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colVal RGB color to change to

Returns

none

7.9.2.36 gslc_ElemSetTxtEnc()

void gslc_ElemSetTxtEnc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teTxtFlags eFlags )

Update the text string encoding mode.

• This function can be used to indicate that the element's text string is encoded in UTF-8, which supports
extended / foreign character maps

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in eFlags Flags associated with text encoding (GSLC_TXT_ENC_∗)

Returns

none

7.9.2.37 gslc_ElemSetTxtMargin()

void gslc_ElemSetTxtMargin (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
unsigned nMargin )

Set the margin around of a textual element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
Generated by Doxygen
in nMargin Number of pixels gap to leave surrounding text
80 Module Documentation

Returns

none

7.9.2.38 gslc_ElemSetTxtMarginXY()

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)

Parameters

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

Returns

none

7.9.2.39 gslc_ElemSetTxtMem()

void gslc_ElemSetTxtMem (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teTxtFlags eFlags )

Update the text string location in memory.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in eFlags Flags associated with text memory location (GSLC_TXT_MEM_∗)

Returns

none

Generated by Doxygen
7.9 Element: Update Functions 81

7.9.2.40 gslc_ElemSetTxtStr()

void gslc_ElemSetTxtStr (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
const char ∗ pStr )

Update the text string associated with an Element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in pStr String to copy into element

Returns

none

7.9.2.41 gslc_ElemSetVisible()

void gslc_ElemSetVisible (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bVisible )

Update the visibility status for an element.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bVisible True if element is shown, false if hidden

Returns

none

7.9.2.42 gslc_ElemUpdateFont()

void gslc_ElemUpdateFont (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int nFontId )

Update the Font selected for an Element's text.

Generated by Doxygen
82 Module Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nFontId Font ID to select

Returns

none

7.9.2.43 gslc_ResetRectState()

void gslc_ResetRectState (
gslc_tsRectState ∗ pState )

Reset the element region state struct.

Parameters

out pState Pointer to the element region structure

Returns

none

7.9.2.44 gslc_StrCopy()

void gslc_StrCopy (
char ∗ pDstStr,
const char ∗ pSrcStr,
uint16_t nDstLen )

Helper routine to perform string deep copy.

• Includes termination

• Similar to strncpy() except:

– nDstLen is the total buffer size (including terminator)


– A terminator is added at the end of the buffer

Parameters

in,out pDstStr Pointer to destination buffer


in nDstLen Size of destination buffer (includes NULL)
in pSrcStr Pointer to source buffer
Generated by Doxygen
7.9 Element: Update Functions 83

Returns

none

Generated by Doxygen
84 Module Documentation

7.10 Touchscreen Functions

Functions that configure and respond to a touch device.

Macros

• #define TOUCH_ROTATION_DATA
Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.
• #define TOUCH_ROTATION_DATA
Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.
• #define TOUCH_ROTATION_SWAPXY(rotation)
• #define TOUCH_ROTATION_SWAPXY(rotation)
• #define TOUCH_ROTATION_FLIPX(rotation)
• #define TOUCH_ROTATION_FLIPX(rotation)
• #define TOUCH_ROTATION_FLIPY(rotation)
• #define TOUCH_ROTATION_FLIPY(rotation)

Functions

• bool gslc_InitTouch (gslc_tsGui ∗pGui, const char ∗acDev)


Initialize the touchscreen device driver.
• bool gslc_GetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRawEvent
∗peInputEvent, int16_t ∗pnInputVal)
Initialize the touchscreen device driver.
• void gslc_SetTouchRemapEn (gslc_tsGui ∗pGui, bool bEn)
Configure touchscreen remapping.
• void gslc_SetTouchRemapCal (gslc_tsGui ∗pGui, uint16_t nXMin, uint16_t nXMax, uint16_t nYMin, uint16_t
nYMax)
Configure touchscreen calibration remapping values.
• void gslc_SetTouchPressCal (gslc_tsGui ∗pGui, uint16_t nPressMin, uint16_t nPressMax)
Configure touchscreen calibration pressure values.
• void gslc_SetTouchRemapYX (gslc_tsGui ∗pGui, bool bSwap)
Configure touchscreen XY swap.

7.10.1 Detailed Description

Functions that configure and respond to a touch device.

7.10.2 Macro Definition Documentation

Generated by Doxygen
7.10 Touchscreen Functions 85

7.10.2.1 TOUCH_ROTATION_DATA [1/2]

#define TOUCH_ROTATION_DATA

Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.

7.10.2.2 TOUCH_ROTATION_DATA [2/2]

#define TOUCH_ROTATION_DATA

Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.

7.10.2.3 TOUCH_ROTATION_FLIPX [1/2]

#define TOUCH_ROTATION_FLIPX(
rotation )

7.10.2.4 TOUCH_ROTATION_FLIPX [2/2]

#define TOUCH_ROTATION_FLIPX(
rotation )

7.10.2.5 TOUCH_ROTATION_FLIPY [1/2]

#define TOUCH_ROTATION_FLIPY(
rotation )

7.10.2.6 TOUCH_ROTATION_FLIPY [2/2]

#define TOUCH_ROTATION_FLIPY(
rotation )

Generated by Doxygen
86 Module Documentation

7.10.2.7 TOUCH_ROTATION_SWAPXY [1/2]

#define TOUCH_ROTATION_SWAPXY(
rotation )

7.10.2.8 TOUCH_ROTATION_SWAPXY [2/2]

#define TOUCH_ROTATION_SWAPXY(
rotation )

7.10.3 Function Documentation

7.10.3.1 gslc_GetTouch()

bool gslc_GetTouch (
gslc_tsGui ∗ pGui,
int16_t ∗ pnX,
int16_t ∗ pnY,
uint16_t ∗ pnPress,
gslc_teInputRawEvent ∗ peInputEvent,
int16_t ∗ pnInputVal )

Initialize the touchscreen device driver.

Parameters

in pGui Pointer to GUI


out pnX Ptr to int to contain latest touch X coordinate
out pnY Ptr to int to contain latest touch Y coordinate
out pnPress Ptr to int to contain latest touch pressure value
out peInputEvent Indication of event type
out pnInputVal Additional data for event type

Returns

true if touch event, false otherwise

7.10.3.2 gslc_InitTouch()

bool gslc_InitTouch (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Initialize the touchscreen device driver.

Generated by Doxygen
7.10 Touchscreen Functions 87

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen (or "" if not applicable)) eg. "/dev/input/touchscreen"

Returns

true if successful

7.10.3.3 gslc_SetTouchPressCal()

void gslc_SetTouchPressCal (
gslc_tsGui ∗ pGui,
uint16_t nPressMin,
uint16_t nPressMax )

Configure touchscreen calibration pressure values.

• Only used if calibration remapping has been enabled

Parameters

in pGui Pointer to GUI


in nPressMin Resistive touchscreen pressure min value
in nPressMax Resistive touchscreen pressure max value

Returns

none

7.10.3.4 gslc_SetTouchRemapCal()

void gslc_SetTouchRemapCal (
gslc_tsGui ∗ pGui,
uint16_t nXMin,
uint16_t nXMax,
uint16_t nYMin,
uint16_t nYMax )

Configure touchscreen calibration remapping values.

• Only used if calibration remapping has been enabled

Generated by Doxygen
88 Module Documentation

Parameters

in pGui Pointer to GUI


in nXMin Resistive touchscreen X_MIN calibration value
in nXMax Resistive touchscreen X_MAX calibration value
in nYMin Resistive touchscreen Y_MIN calibration value
in nYMax Resistive touchscreen Y_MAX calibration value

Returns

none

7.10.3.5 gslc_SetTouchRemapEn()

void gslc_SetTouchRemapEn (
gslc_tsGui ∗ pGui,
bool bEn )

Configure touchscreen remapping.

Parameters

in pGui Pointer to GUI


in bEn Enable touchscreen remapping?

Returns

none

7.10.3.6 gslc_SetTouchRemapYX()

void gslc_SetTouchRemapYX (
gslc_tsGui ∗ pGui,
bool bSwap )

Configure touchscreen XY swap.

Parameters

in pGui Pointer to GUI


in bSwap Enable touchscreen XY swap

Generated by Doxygen
7.10 Touchscreen Functions 89

Returns

none

Generated by Doxygen
90 Module Documentation

7.11 Input Mapping Functions

Functions that handle GPIO / pin and keyboard input.

Functions

• void gslc_SetPinPollFunc (gslc_tsGui ∗pGui, GSLC_CB_PIN_POLL pfunc)


Specify the callback function that is used to collect the state of any external inputs (eg.
• void gslc_InitInputMap (gslc_tsGui ∗pGui, gslc_tsInputMap ∗asInputMap, uint8_t nInputMapMax)
Specify the mapping between external pin inputs (fetched by the SetPinPollFunc() callback and the GUI actions.
• void gslc_InputMapAdd (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc_te←-
Action eAction, int16_t nActionVal)
Add an entry into the external input mapping table.
• gslc_tsElemRef ∗ gslc_FocusElemGet (gslc_tsGui ∗pGui)
Find the currently focused element.
• void gslc_FocusPageStep (gslc_tsGui ∗pGui, bool bNext)
Advance the focus to the next page in the page stack.
• int16_t gslc_FocusElemStep (gslc_tsGui ∗pGui, bool bNext)
Advance the focus to the next element in the focused page.
• void gslc_FocusElemIndSet (gslc_tsGui ∗pGui, int16_t nPageInd, int16_t nElemInd, bool bFocus)
Change the focus to the indexed element on the specified page.
• void gslc_FocusSetToTrackedElem (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Change the focus to the currently-tracked element.

7.11.1 Detailed Description

Functions that handle GPIO / pin and keyboard input.

7.11.2 Function Documentation

7.11.2.1 gslc_FocusElemGet()

gslc_tsElemRef∗ gslc_FocusElemGet (
gslc_tsGui ∗ pGui )

Find the currently focused element.

Parameters

in pGui Pointer to GUI

Returns

Element reference of focused widget, or NULL if none

Generated by Doxygen
7.11 Input Mapping Functions 91

7.11.2.2 gslc_FocusElemIndSet()

void gslc_FocusElemIndSet (
gslc_tsGui ∗ pGui,
int16_t nPageInd,
int16_t nElemInd,
bool bFocus )

Change the focus to the indexed element on the specified page.

• First clear any existing focus before setting a new focus

Parameters

in pGui Pointer to GUI


in nPageInd The index of the page containing the element
in nElemInd The index of the element containing the element
in bFocus If true, enables the focus on the specified element after clearing the focus on the old
element. If false, no focus is enabled after clearing any existing focus.

Returns

none

7.11.2.3 gslc_FocusElemStep()

int16_t gslc_FocusElemStep (
gslc_tsGui ∗ pGui,
bool bNext )

Advance the focus to the next element in the focused page.

Parameters

in pGui Pointer to GUI


in bNext Advance to next element if true, previous if false

Returns

none

Generated by Doxygen
92 Module Documentation

7.11.2.4 gslc_FocusPageStep()

void gslc_FocusPageStep (
gslc_tsGui ∗ pGui,
bool bNext )

Advance the focus to the next page in the page stack.

Parameters

in pGui Pointer to GUI


in bNext Advance to next page if true, previous if false

Returns

none

7.11.2.5 gslc_FocusSetToTrackedElem()

void gslc_FocusSetToTrackedElem (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect )

Change the focus to the currently-tracked element.

Parameters

in pGui Pointer to GUI


in pCollect The active element collection to examine

Returns

none

7.11.2.6 gslc_InitInputMap()

void gslc_InitInputMap (
gslc_tsGui ∗ pGui,
gslc_tsInputMap ∗ asInputMap,
uint8_t nInputMapMax )

Specify the mapping between external pin inputs (fetched by the SetPinPollFunc() callback and the GUI actions.

• This is used to enable external controls to navigate and manipulate the GUI.

Generated by Doxygen
7.11 Input Mapping Functions 93

Parameters

in pGui Pointer to GUI


in asInputMap Pointer to the input mapping table
in nInputMapMax Total number of entries in mapping table

Returns

none

7.11.2.7 gslc_InputMapAdd()

void gslc_InputMapAdd (
gslc_tsGui ∗ pGui,
gslc_teInputRawEvent eInputEvent,
int16_t nInputVal,
gslc_teAction eAction,
int16_t nActionVal )

Add an entry into the external input mapping table.

Parameters

in pGui Pointer to GUI


in eInputEvent The event to detect
in nInputVal The value associated with the detected event
in eAction The action to take in the GUI
in nActionVal An optional parameter to associate with the GUI action

Returns

none

7.11.2.8 gslc_SetPinPollFunc()

void gslc_SetPinPollFunc (
gslc_tsGui ∗ pGui,
GSLC_CB_PIN_POLL pfunc )

Specify the callback function that is used to collect the state of any external inputs (eg.

buttons, pins, encoders, etc.)

Generated by Doxygen
94 Module Documentation

Parameters

in pGui Pointer to GUI


in pfunc Pointer to the callback function

Returns

none

Generated by Doxygen
7.12 General Purpose Macros 95

7.12 General Purpose Macros

Macros that are used throughout the GUI for debug.

Macros
• #define GSLC_DEBUG_PRINT(sFmt, ...)
Macro to enable optional debug output.
• #define GSLC_DEBUG2_PRINT(sFmt, ...)
• #define GSLC_DEBUG_PRINT_CONST(sFmt, ...)
• #define GSLC_DEBUG2_PRINT_CONST(sFmt, ...)

7.12.1 Detailed Description

Macros that are used throughout the GUI for debug.

7.12.2 Macro Definition Documentation

7.12.2.1 GSLC_DEBUG2_PRINT

#define GSLC_DEBUG2_PRINT(
sFmt,
... )

7.12.2.2 GSLC_DEBUG2_PRINT_CONST

#define GSLC_DEBUG2_PRINT_CONST(
sFmt,
... )

7.12.2.3 GSLC_DEBUG_PRINT

#define GSLC_DEBUG_PRINT(
sFmt,
... )

Macro to enable optional debug output.

• Supports printf formatting via gslc_DebugPrintf()

• Supports storing the format string in PROGMEM

• Note that at least one variable argument must be provided to the macro after the format string. This is a
limitation of the macro definition. If no parameters are needed, then simply pass 0. For example: GSLC_D←-
EBUG_PRINT("Loaded OK",0);

Generated by Doxygen
96 Module Documentation

Parameters

in sFmt Format string for debug message

7.12.2.4 GSLC_DEBUG_PRINT_CONST

#define GSLC_DEBUG_PRINT_CONST(
sFmt,
... )

Generated by Doxygen
7.13 Flash-based Element Macros 97

7.13 Flash-based Element Macros

Macros that represent element creation routines based in FLASH memory.

Macros
• #define gslc_ElemCreateTxt_P(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, pFont, colTxt, colFrame, col←-
Fill, nAlignTxt, bFrameEn, bFillEn)
Create a read-only text element.
• #define gslc_ElemCreateTxt_P_R(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, strLength, pFont, colTxt,
colFrame, colFill, nAlignTxt, bFrameEn, bFillEn)
Create a read-write text element (element in Flash, string in RAM)
• #define gslc_ElemCreateTxt_P_R_ext(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, strLength, pFont, col←-
Txt, colTxtGlow, colFrame, colFill, nAlignTxt, nMarginX, nMarginY, bFrameEn, bFillEn, bClickEn, bGlowEn,
pfuncXEvent, pfuncXDraw, pfuncXTouch, pfuncXTick)
Create a read-write text element (element in Flash, string in RAM) with extended customization options.
• #define gslc_ElemCreateBox_P(pGui, nElemId, nPage, nX, nY, nW, nH, colFrame, colFill, bFrameEn, bFillEn,
pfuncXDraw, pfuncXTick)
Create a read-only box element.
• #define gslc_ElemCreateLine_P(pGui, nElemId, nPage, nX0, nY0, nX1, nY1, colFill)
Create a read-only line element.
• #define gslc_ElemCreateBtnTxt_P(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, pFont, colTxt, colFrame,
colFill, colFrameGlow, colFillGlow, nAlignTxt, bFrameEn, bFillEn, callFunc, extraData)
Create a text button element.

7.13.1 Detailed Description

Macros that represent element creation routines based in FLASH memory.

7.13.2 Macro Definition Documentation

7.13.2.1 gslc_ElemCreateBox_P

#define gslc_ElemCreateBox_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
colFrame,
colFill,
bFrameEn,
bFillEn,
pfuncXDraw,
pfuncXTick )

Create a read-only box element.

Generated by Doxygen
98 Module Documentation

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 colFrame Color for the frame
in colFill Color for the fill
in bFrameEn True if framed, false otherwise
in bFillEn True if filled, false otherwise
in pfuncXDraw Pointer to custom draw callback (or NULL if default)
in pfuncXTick Pointer to custom tick callback (or NULL if default)

7.13.2.2 gslc_ElemCreateBtnTxt_P

#define gslc_ElemCreateBtnTxt_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
strTxt,
pFont,
colTxt,
colFrame,
colFill,
colFrameGlow,
colFillGlow,
nAlignTxt,
bFrameEn,
bFillEn,
callFunc,
extraData )

Create a text button element.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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

Generated by Doxygen
7.13 Flash-based Element Macros 99

Parameters
in strTxt Text string to display
in pFont Pointer to font resource
in colTxt Color for the text
in colFrame Color for the frame
in colFill Color for the fill
in colFrameGlow Color for the frame when glowing
in colFillGlow Color for the fill when glowing
in nAlignTxt Text alignment
in bFrameEn True if framed, false otherwise
in bFillEn True if filled, false otherwise
in callFunc Callback function for button press
in extraData Ptr to extended data structure

7.13.2.3 gslc_ElemCreateLine_P

#define gslc_ElemCreateLine_P(
pGui,
nElemId,
nPage,
nX0,
nY0,
nX1,
nY1,
colFill )

Create a read-only line element.

Parameters

in pGui Pointer to GUI


in n←- Unique element ID to assign
ElemId
in nPage Page ID to attach element to
in nX0 X coordinate of line start
in nY0 Y coordinate of line start
in nX1 X coordinate of line end
in nY1 Y coordinate of line end
in colFill Color for the line

7.13.2.4 gslc_ElemCreateTxt_P

#define gslc_ElemCreateTxt_P(
pGui,

Generated by Doxygen
100 Module Documentation

nElemId,
nPage,
nX,
nY,
nW,
nH,
strTxt,
pFont,
colTxt,
colFrame,
colFill,
nAlignTxt,
bFrameEn,
bFillEn )

Create a read-only text element.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 strTxt Text string to display
in pFont Pointer to font resource
in colTxt Color for the text
in colFrame Color for the frame
in colFill Color for the fill
in nAlignTxt Text alignment
in bFrameEn True if framed, false otherwise
in bFillEn True if filled, false otherwise

7.13.2.5 gslc_ElemCreateTxt_P_R

#define gslc_ElemCreateTxt_P_R(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
strTxt,
strLength,
pFont,
colTxt,
colFrame,
colFill,

Generated by Doxygen
7.13 Flash-based Element Macros 101

nAlignTxt,
bFrameEn,
bFillEn )

Create a read-write text element (element in Flash, string in RAM)

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 strTxt Text string to display
in strLength Length of text string
in pFont Pointer to font resource
in colTxt Color for the text
in colFrame Color for the frame
in colFill Color for the fill
in nAlignTxt Text alignment
in bFrameEn True if framed, false otherwise
in bFillEn True if filled, false otherwise

7.13.2.6 gslc_ElemCreateTxt_P_R_ext

#define gslc_ElemCreateTxt_P_R_ext(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
strTxt,
strLength,
pFont,
colTxt,
colTxtGlow,
colFrame,
colFill,
nAlignTxt,
nMarginX,
nMarginY,
bFrameEn,
bFillEn,
bClickEn,
bGlowEn,
pfuncXEvent,
pfuncXDraw,

Generated by Doxygen
102 Module Documentation

pfuncXTouch,
pfuncXTick )

Create a read-write text element (element in Flash, string in RAM) with extended customization options.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 strTxt Text string to display
in strLength Length of text string
in pFont Pointer to font resource
in colTxt Color for the text
in colTxtGlow Color for the text when glowing
in colFrame Color for the frame
in colFill Color for the fill
in nAlignTxt Text alignment
in nMarginX Text margin (X offset)
in nMarginY Text margin (Y offset)
in bFrameEn True if framed, false otherwise
in bFillEn True if filled, false otherwise
in bClickEn True if accept click events, false otherwise
in bGlowEn True if supports glow state, false otherwise
in pfuncXEvent Callback function ptr for Event
in pfuncXDraw Callback function ptr for Redraw
in pfuncXTouch Callback function ptr for Touch
in pfuncXTick Callback function ptr for Timer tick

Generated by Doxygen
7.14 Internal Functions 103

7.14 Internal Functions

These functions are internal to the GUIslice implementation and are not intended to be called by user code and
subject to change even in minor releases.

Collaboration diagram for Internal Functions:

Internal: Page Functions

Internal: Element Collection


Functions

Internal: Element Functions

Internal Functions Internal: Misc Functions

Internal: Cleanup Functions

Internal: Element Collection


Event Functions

Internal: Tracking
Functions

Modules

• Internal: Misc Functions


• Internal: Element Functions
• Internal: Page Functions
• Internal: Element Collection Functions
• Internal: Element Collection Event Functions
• Internal: Tracking Functions
• Internal: Cleanup Functions

Variables

• int16_t gslc_tsRect::x
X coordinate of corner.
• int16_t gslc_tsRect::y

Generated by Doxygen
104 Module Documentation

Y coordinate of corner.
• uint16_t gslc_tsRect::w
Width of region.
• uint16_t gslc_tsRect::h
Height of region.
• int16_t gslc_tsPt::x
X coordinate.
• int16_t gslc_tsPt::y
Y coordinate.
• uint8_t gslc_tsColor::r
RGB red value.
• uint8_t gslc_tsColor::g
RGB green value.
• uint8_t gslc_tsColor::b
RGB blue value.
• gslc_tsRect gslc_tsRectState::rFocus
• gslc_tsRect gslc_tsRectState::rFull
• gslc_tsRect gslc_tsRectState::rInner
• gslc_tsColor gslc_tsRectState::colFocus
• gslc_tsColor gslc_tsRectState::colFrm
• gslc_tsColor gslc_tsRectState::colInner
• gslc_tsColor gslc_tsRectState::colBack
• gslc_tsColor gslc_tsRectState::colTxtFore
• gslc_tsColor gslc_tsRectState::colTxtBack
• gslc_teEventType gslc_tsEvent::eType
Event type.
• uint8_t gslc_tsEvent::nSubType
Event sub-type.
• void ∗ gslc_tsEvent::pvScope
Event target scope (eg. Page,Collection,Event)
• void ∗ gslc_tsEvent::pvData
Generic data pointer for event.
• gslc_teTouch gslc_tsEventTouch::eTouch
Touch state.
• int16_t gslc_tsEventTouch::nX
Touch X coordinate (or param1)
• int16_t gslc_tsEventTouch::nY
Touch Y coordinate (or param2)
• int16_t gslc_tsFont::nId
Font ID specified by user.
• gslc_teFontRefType gslc_tsFont::eFontRefType
Font reference type.
• gslc_teFontRefMode gslc_tsFont::eFontRefMode
Font reference mode.
• const void ∗ gslc_tsFont::pvFont
Void ptr to the font reference (type defined by driver)
• uint16_t gslc_tsFont::nSize
Font size.
• const unsigned char ∗ gslc_tsImgRef::pImgBuf
Pointer to input image buffer in memory [RAM,FLASH].
• const char ∗ gslc_tsImgRef::pFname

Generated by Doxygen
7.14 Internal Functions 105

Pathname to input image file [FILE,SD].


• gslc_teImgRefFlags gslc_tsImgRef::eImgFlags
Image reference flags.
• void ∗ gslc_tsImgRef::pvImgRaw
Ptr to raw output image data (for pre-loaded images)
• gslc_tsElem ∗ gslc_tsElemRef::pElem
Pointer to element in memory [RAM,FLASH].
• gslc_teElemRefFlags gslc_tsElemRef::eElemFlags
Element reference flags.
• int16_t gslc_tsElem::nId
Element ID specified by user.
• uint16_t gslc_tsElem::nFeatures
Element feature vector (appearance/behavior))
• int16_t gslc_tsElem::nType
Element type enumeration.
• gslc_tsRect gslc_tsElem::rElem
Rect region containing element.
• int16_t gslc_tsElem::nGroup
Group ID that the element belongs to.
• gslc_tsColor gslc_tsElem::colElemFrame
Color for frame.
• gslc_tsColor gslc_tsElem::colElemFill
Color for background fill.
• gslc_tsColor gslc_tsElem::colElemFrameGlow
Color to use for frame when glowing.
• gslc_tsColor gslc_tsElem::colElemFillGlow
Color to use for fill when glowing.
• gslc_tsImgRef gslc_tsElem::sImgRefNorm
Image reference to draw (normal)
• gslc_tsImgRef gslc_tsElem::sImgRefGlow
Image reference to draw (glowing)
• gslc_tsElemRef ∗ gslc_tsElem::pElemRefParent
Parent element reference.
• char ∗ gslc_tsElem::pStrBuf
Ptr to text string buffer to overlay.
• uint8_t gslc_tsElem::nStrBufMax
Size of string buffer.
• gslc_teTxtFlags gslc_tsElem::eTxtFlags
Flags associated with text buffer.
• gslc_tsColor gslc_tsElem::colElemText
Color of overlay text.
• gslc_tsColor gslc_tsElem::colElemTextGlow
Color of overlay text when glowing.
• int8_t gslc_tsElem::eTxtAlign
Alignment of overlay text.
• int8_t gslc_tsElem::nTxtMarginX
Margin of overlay text within rect region (x offset)
• int8_t gslc_tsElem::nTxtMarginY
Margin of overlay text within rect region (y offset)
• gslc_tsFont ∗ gslc_tsElem::pTxtFont
Ptr to Font for overlay text.

Generated by Doxygen
106 Module Documentation

• void ∗ gslc_tsElem::pXData
Ptr to extended data structure.
• GSLC_CB_EVENT gslc_tsElem::pfuncXEvent
UNUSED: Callback func ptr for event tree (draw,touch,tick)
• GSLC_CB_DRAW gslc_tsElem::pfuncXDraw
Callback func ptr for custom drawing.
• GSLC_CB_TOUCH gslc_tsElem::pfuncXTouch
Callback func ptr for touch.
• GSLC_CB_TICK gslc_tsElem::pfuncXTick
Callback func ptr for timer/main loop tick.
• gslc_tsElem ∗ gslc_tsCollect::asElem
Array of elements.
• uint16_t gslc_tsCollect::nElemMax
Maximum number of elements to allocate (in RAM)
• uint16_t gslc_tsCollect::nElemCnt
Number of elements allocated.
• int16_t gslc_tsCollect::nElemAutoIdNext
Next Element ID for auto-assignment.
• gslc_tsElemRef ∗ gslc_tsCollect::asElemRef
Array of element references.
• uint16_t gslc_tsCollect::nElemRefMax
Maximum number of element references to allocate.
• uint16_t gslc_tsCollect::nElemRefCnt
Number of element references allocated.
• gslc_tsElemRef ∗ gslc_tsCollect::pElemRefTracked
Element reference currently being touch-tracked (NULL for none)
• int16_t gslc_tsCollect::nElemIndTracked
Element index currently being touch-tracked (GSLC_IND_NONE for none)
• gslc_tsCollect gslc_tsPage::sCollect
Collection of elements on page.
• int16_t gslc_tsPage::nPageId
Page identifier.
• gslc_tsRect gslc_tsPage::rBounds
Bounding rect for page elements.
• gslc_teInputRawEvent gslc_tsInputMap::eEvent
The input event.
• int16_t gslc_tsInputMap::nVal
The value associated with the input event.
• gslc_teAction gslc_tsInputMap::eAction
Resulting action.
• int16_t gslc_tsInputMap::nActionVal
The value for the output action.
• uint16_t gslc_tsGui::nDispW
Width of the display (pixels)
• uint16_t gslc_tsGui::nDispH
Height of the display (pixels)
• uint16_t gslc_tsGui::nDisp0W
Width of the display (pixels) in native orientation.
• uint16_t gslc_tsGui::nDisp0H
Height of the display (pixels) in native orientation.
• uint8_t gslc_tsGui::nDispDepth

Generated by Doxygen
7.14 Internal Functions 107

Bit depth of display (bits per pixel)


• uint8_t gslc_tsGui::nRotation
Adafruit GFX Rotation of display.
• uint8_t gslc_tsGui::nTouchRotation
Touchscreen rotation offset vs display.
• uint8_t gslc_tsGui::nSwapXY
Adafruit GFX Touch Swap x and y axes.
• uint8_t gslc_tsGui::nFlipX
Adafruit GFX Touch Flip x axis.
• uint8_t gslc_tsGui::nFlipY
Adafruit GFX Touch Flip x axis.
• int16_t gslc_tsGui::nTouchCalXMin
Calibration X minimum reading.
• int16_t gslc_tsGui::nTouchCalXMax
Calibration X maximum reading.
• int16_t gslc_tsGui::nTouchCalYMin
Calibration Y minimum reading.
• int16_t gslc_tsGui::nTouchCalYMax
Calibration Y maximum reading.
• int16_t gslc_tsGui::nTouchCalPressMin
Calibration minimum pressure threshold.
• int16_t gslc_tsGui::nTouchCalPressMax
Calibration maximum pressure threshold.
• gslc_tsFont ∗ gslc_tsGui::asFont
Collection of loaded fonts.
• uint8_t gslc_tsGui::nFontMax
Maximum number of fonts to allocate.
• uint8_t gslc_tsGui::nFontCnt
Number of fonts allocated.
• uint8_t gslc_tsGui::nRoundRadius
Radius for rounded elements.
• gslc_tsColor gslc_tsGui::sTransCol
Color used for transparent image regions (GSLC_BMP_TRANS_EN=1)
• gslc_tsElem gslc_tsGui::sElemTmp
Temporary element.
• gslc_tsElemRef gslc_tsGui::sElemRefTmp
Temporary element reference.
• gslc_tsElem gslc_tsGui::sElemTmpProg
Temporary element for Flash compatibility.
• gslc_teInitStat gslc_tsGui::eInitStatTouch
Status of touch initialization.
• int16_t gslc_tsGui::nTouchLastX
Last touch event X coord.
• int16_t gslc_tsGui::nTouchLastY
Last touch event Y coord.
• uint16_t gslc_tsGui::nTouchLastPress
Last touch event pressure (0=none))
• bool gslc_tsGui::bTouchRemapEn
Enable touch remapping?
• bool gslc_tsGui::bTouchRemapYX
Enable touch controller swapping of X & Y.

Generated by Doxygen
108 Module Documentation

• void ∗ gslc_tsGui::pvDriver
Driver-specific members (gslc_tsDriver∗)
• bool gslc_tsGui::bRedrawNeeded
Does anything on page require redraw?
• bool gslc_tsGui::bRedrawPartialEn
Driver supports partial page redraw.
• bool gslc_tsGui::bEventPending
Is there an event pending?
• gslc_tsEventTouch gslc_tsGui::sEventTouchPend
A touch event that has been deferred (if bEventPending=true)
• gslc_tsEvent gslc_tsGui::sEventPend
An event that has been deferred (if bEventPending=true)
• gslc_tsImgRef gslc_tsGui::sImgRefBkgnd
Image reference for background.
• uint8_t gslc_tsGui::nFrameRateCnt
Diagnostic frame rate count.
• uint8_t gslc_tsGui::nFrameRateStart
Diagnostic frame rate timestamp.
• gslc_tsPage ∗ gslc_tsGui::asPage
Array of all pages defined in system.
• uint8_t gslc_tsGui::nPageMax
Maximum number of pages that can be defined.
• uint8_t gslc_tsGui::nPageCnt
Current number of pages defined.
• gslc_tsPage ∗ gslc_tsGui::apPageStack [GSLC_STACK__MAX]
Stack of pages.
• bool gslc_tsGui::abPageStackActive [GSLC_STACK__MAX]
Whether page in stack can receive touch events.
• bool gslc_tsGui::abPageStackDoDraw [GSLC_STACK__MAX]
Whether page in stack is still actively drawn.
• bool gslc_tsGui::bScreenNeedRedraw
Screen requires a redraw.
• bool gslc_tsGui::bScreenNeedFlip
Screen requires a page flip.
• bool gslc_tsGui::bInvalidateEn
A region of the display has been invalidated.
• gslc_tsRect gslc_tsGui::rInvalidateRect
The rect region that has been invalidated.
• GSLC_CB_PIN_POLL gslc_tsGui::pfuncPinPoll
Callback func ptr for pin polling.
• gslc_tsInputMap ∗ gslc_tsGui::asInputMap
Array of input maps.
• uint8_t gslc_tsGui::nInputMapMax
Maximum number of input maps.
• uint8_t gslc_tsGui::nInputMapCnt
Current number of input maps.
• uint8_t gslc_tsGui::nInputMode
Input mode: 0=navigate, 1=edit.
• int16_t gslc_tsGui::nFocusPageInd
Index of page in stack currently in focus.
• gslc_tsPage ∗ gslc_tsGui::pFocusPage

Generated by Doxygen
7.14 Internal Functions 109

Page ptr currently in focus.


• gslc_tsElemRef ∗ gslc_tsGui::pFocusElemRef
Reference to element in focus.
• int16_t gslc_tsGui::nFocusElemInd
Index of element in page currently in focus.
• int16_t gslc_tsGui::nFocusElemMax
Max number of elements in page in focus.
• gslc_tsColor gslc_tsGui::colFocusNone
Focus frame color when not in focus (typically background color)
• gslc_tsColor gslc_tsGui::colFocus
Focus frame color when in focus.
• gslc_tsColor gslc_tsGui::colFocusEdit
Focus frame color when in focus and edit mode.
• int16_t gslc_tsGui::nFocusSavedPageInd
Focus page index saved prior to popup/overlay.
• int16_t gslc_tsGui::nFocusSavedElemInd
Focus element index saved prior to popup/overlay.

7.14.1 Detailed Description

These functions are internal to the GUIslice implementation and are not intended to be called by user code and
subject to change even in minor releases.

• The following functions are generally not required for typical users of GUIslice. However, for advanced usage
more direct access may be required.

7.14.2 Variable Documentation

7.14.2.1 abPageStackActive

bool gslc_tsGui::abPageStackActive[GSLC_STACK__MAX]

Whether page in stack can receive touch events.

7.14.2.2 abPageStackDoDraw

bool gslc_tsGui::abPageStackDoDraw[GSLC_STACK__MAX]

Whether page in stack is still actively drawn.

Generated by Doxygen
110 Module Documentation

7.14.2.3 apPageStack

gslc_tsPage∗ gslc_tsGui::apPageStack[GSLC_STACK__MAX]

Stack of pages.

7.14.2.4 asElem

gslc_tsElem∗ gslc_tsCollect::asElem

Array of elements.

7.14.2.5 asElemRef

gslc_tsElemRef∗ gslc_tsCollect::asElemRef

Array of element references.

7.14.2.6 asFont

gslc_tsFont∗ gslc_tsGui::asFont

Collection of loaded fonts.

7.14.2.7 asInputMap

gslc_tsInputMap∗ gslc_tsGui::asInputMap

Array of input maps.

7.14.2.8 asPage

gslc_tsPage∗ gslc_tsGui::asPage

Array of all pages defined in system.

Generated by Doxygen
7.14 Internal Functions 111

7.14.2.9 b

uint8_t gslc_tsColor::b

RGB blue value.

7.14.2.10 bEventPending

bool gslc_tsGui::bEventPending

Is there an event pending?

7.14.2.11 bInvalidateEn

bool gslc_tsGui::bInvalidateEn

A region of the display has been invalidated.

7.14.2.12 bRedrawNeeded

bool gslc_tsGui::bRedrawNeeded

Does anything on page require redraw?

7.14.2.13 bRedrawPartialEn

bool gslc_tsGui::bRedrawPartialEn

Driver supports partial page redraw.

If true, only changed elements are redrawn during next page redraw command. If false, entire page is redrawn when
any element has been updated prior to next page redraw command.

7.14.2.14 bScreenNeedFlip

bool gslc_tsGui::bScreenNeedFlip

Screen requires a page flip.

Generated by Doxygen
112 Module Documentation

7.14.2.15 bScreenNeedRedraw

bool gslc_tsGui::bScreenNeedRedraw

Screen requires a redraw.

7.14.2.16 bTouchRemapEn

bool gslc_tsGui::bTouchRemapEn

Enable touch remapping?

7.14.2.17 bTouchRemapYX

bool gslc_tsGui::bTouchRemapYX

Enable touch controller swapping of X & Y.

7.14.2.18 colBack

gslc_tsColor gslc_tsRectState::colBack

7.14.2.19 colElemFill

gslc_tsColor gslc_tsElem::colElemFill

Color for background fill.

7.14.2.20 colElemFillGlow

gslc_tsColor gslc_tsElem::colElemFillGlow

Color to use for fill when glowing.

Generated by Doxygen
7.14 Internal Functions 113

7.14.2.21 colElemFrame

gslc_tsColor gslc_tsElem::colElemFrame

Color for frame.

7.14.2.22 colElemFrameGlow

gslc_tsColor gslc_tsElem::colElemFrameGlow

Color to use for frame when glowing.

7.14.2.23 colElemText

gslc_tsColor gslc_tsElem::colElemText

Color of overlay text.

7.14.2.24 colElemTextGlow

gslc_tsColor gslc_tsElem::colElemTextGlow

Color of overlay text when glowing.

7.14.2.25 colFocus [1/2]

gslc_tsColor gslc_tsRectState::colFocus

7.14.2.26 colFocus [2/2]

gslc_tsColor gslc_tsGui::colFocus

Focus frame color when in focus.

Generated by Doxygen
114 Module Documentation

7.14.2.27 colFocusEdit

gslc_tsColor gslc_tsGui::colFocusEdit

Focus frame color when in focus and edit mode.

7.14.2.28 colFocusNone

gslc_tsColor gslc_tsGui::colFocusNone

Focus frame color when not in focus (typically background color)

7.14.2.29 colFrm

gslc_tsColor gslc_tsRectState::colFrm

7.14.2.30 colInner

gslc_tsColor gslc_tsRectState::colInner

7.14.2.31 colTxtBack

gslc_tsColor gslc_tsRectState::colTxtBack

7.14.2.32 colTxtFore

gslc_tsColor gslc_tsRectState::colTxtFore

7.14.2.33 eAction

gslc_teAction gslc_tsInputMap::eAction

Resulting action.

Generated by Doxygen
7.14 Internal Functions 115

7.14.2.34 eElemFlags

gslc_teElemRefFlags gslc_tsElemRef::eElemFlags

Element reference flags.

7.14.2.35 eEvent

gslc_teInputRawEvent gslc_tsInputMap::eEvent

The input event.

7.14.2.36 eFontRefMode

gslc_teFontRefMode gslc_tsFont::eFontRefMode

Font reference mode.

7.14.2.37 eFontRefType

gslc_teFontRefType gslc_tsFont::eFontRefType

Font reference type.

7.14.2.38 eImgFlags

gslc_teImgRefFlags gslc_tsImgRef::eImgFlags

Image reference flags.

7.14.2.39 eInitStatTouch

gslc_teInitStat gslc_tsGui::eInitStatTouch

Status of touch initialization.

Generated by Doxygen
116 Module Documentation

7.14.2.40 eTouch

gslc_teTouch gslc_tsEventTouch::eTouch

Touch state.

7.14.2.41 eTxtAlign

int8_t gslc_tsElem::eTxtAlign

Alignment of overlay text.

7.14.2.42 eTxtFlags

gslc_teTxtFlags gslc_tsElem::eTxtFlags

Flags associated with text buffer.

7.14.2.43 eType

gslc_teEventType gslc_tsEvent::eType

Event type.

7.14.2.44 g

uint8_t gslc_tsColor::g

RGB green value.

7.14.2.45 h

uint16_t gslc_tsRect::h

Height of region.

Generated by Doxygen
7.14 Internal Functions 117

7.14.2.46 nActionVal

int16_t gslc_tsInputMap::nActionVal

The value for the output action.

7.14.2.47 nDisp0H

uint16_t gslc_tsGui::nDisp0H

Height of the display (pixels) in native orientation.

7.14.2.48 nDisp0W

uint16_t gslc_tsGui::nDisp0W

Width of the display (pixels) in native orientation.

7.14.2.49 nDispDepth

uint8_t gslc_tsGui::nDispDepth

Bit depth of display (bits per pixel)

7.14.2.50 nDispH

uint16_t gslc_tsGui::nDispH

Height of the display (pixels)

7.14.2.51 nDispW

uint16_t gslc_tsGui::nDispW

Width of the display (pixels)

Generated by Doxygen
118 Module Documentation

7.14.2.52 nElemAutoIdNext

int16_t gslc_tsCollect::nElemAutoIdNext

Next Element ID for auto-assignment.

7.14.2.53 nElemCnt

uint16_t gslc_tsCollect::nElemCnt

Number of elements allocated.

7.14.2.54 nElemIndTracked

int16_t gslc_tsCollect::nElemIndTracked

Element index currently being touch-tracked (GSLC_IND_NONE for none)

7.14.2.55 nElemMax

uint16_t gslc_tsCollect::nElemMax

Maximum number of elements to allocate (in RAM)

7.14.2.56 nElemRefCnt

uint16_t gslc_tsCollect::nElemRefCnt

Number of element references allocated.

7.14.2.57 nElemRefMax

uint16_t gslc_tsCollect::nElemRefMax

Maximum number of element references to allocate.

Generated by Doxygen
7.14 Internal Functions 119

7.14.2.58 nFeatures

uint16_t gslc_tsElem::nFeatures

Element feature vector (appearance/behavior))

7.14.2.59 nFlipX

uint8_t gslc_tsGui::nFlipX

Adafruit GFX Touch Flip x axis.

7.14.2.60 nFlipY

uint8_t gslc_tsGui::nFlipY

Adafruit GFX Touch Flip x axis.

7.14.2.61 nFocusElemInd

int16_t gslc_tsGui::nFocusElemInd

Index of element in page currently in focus.

7.14.2.62 nFocusElemMax

int16_t gslc_tsGui::nFocusElemMax

Max number of elements in page in focus.

7.14.2.63 nFocusPageInd

int16_t gslc_tsGui::nFocusPageInd

Index of page in stack currently in focus.

Generated by Doxygen
120 Module Documentation

7.14.2.64 nFocusSavedElemInd

int16_t gslc_tsGui::nFocusSavedElemInd

Focus element index saved prior to popup/overlay.

7.14.2.65 nFocusSavedPageInd

int16_t gslc_tsGui::nFocusSavedPageInd

Focus page index saved prior to popup/overlay.

7.14.2.66 nFontCnt

uint8_t gslc_tsGui::nFontCnt

Number of fonts allocated.

7.14.2.67 nFontMax

uint8_t gslc_tsGui::nFontMax

Maximum number of fonts to allocate.

7.14.2.68 nFrameRateCnt

uint8_t gslc_tsGui::nFrameRateCnt

Diagnostic frame rate count.

7.14.2.69 nFrameRateStart

uint8_t gslc_tsGui::nFrameRateStart

Diagnostic frame rate timestamp.

Generated by Doxygen
7.14 Internal Functions 121

7.14.2.70 nGroup

int16_t gslc_tsElem::nGroup

Group ID that the element belongs to.

7.14.2.71 nId [1/2]

int16_t gslc_tsFont::nId

Font ID specified by user.

7.14.2.72 nId [2/2]

int16_t gslc_tsElem::nId

Element ID specified by user.

7.14.2.73 nInputMapCnt

uint8_t gslc_tsGui::nInputMapCnt

Current number of input maps.

7.14.2.74 nInputMapMax

uint8_t gslc_tsGui::nInputMapMax

Maximum number of input maps.

7.14.2.75 nInputMode

uint8_t gslc_tsGui::nInputMode

Input mode: 0=navigate, 1=edit.

Generated by Doxygen
122 Module Documentation

7.14.2.76 nPageCnt

uint8_t gslc_tsGui::nPageCnt

Current number of pages defined.

7.14.2.77 nPageId

int16_t gslc_tsPage::nPageId

Page identifier.

7.14.2.78 nPageMax

uint8_t gslc_tsGui::nPageMax

Maximum number of pages that can be defined.

7.14.2.79 nRotation

uint8_t gslc_tsGui::nRotation

Adafruit GFX Rotation of display.

7.14.2.80 nRoundRadius

uint8_t gslc_tsGui::nRoundRadius

Radius for rounded elements.

7.14.2.81 nSize

uint16_t gslc_tsFont::nSize

Font size.

Generated by Doxygen
7.14 Internal Functions 123

7.14.2.82 nStrBufMax

uint8_t gslc_tsElem::nStrBufMax

Size of string buffer.

7.14.2.83 nSubType

uint8_t gslc_tsEvent::nSubType

Event sub-type.

7.14.2.84 nSwapXY

uint8_t gslc_tsGui::nSwapXY

Adafruit GFX Touch Swap x and y axes.

7.14.2.85 nTouchCalPressMax

int16_t gslc_tsGui::nTouchCalPressMax

Calibration maximum pressure threshold.

7.14.2.86 nTouchCalPressMin

int16_t gslc_tsGui::nTouchCalPressMin

Calibration minimum pressure threshold.

7.14.2.87 nTouchCalXMax

int16_t gslc_tsGui::nTouchCalXMax

Calibration X maximum reading.

Generated by Doxygen
124 Module Documentation

7.14.2.88 nTouchCalXMin

int16_t gslc_tsGui::nTouchCalXMin

Calibration X minimum reading.

7.14.2.89 nTouchCalYMax

int16_t gslc_tsGui::nTouchCalYMax

Calibration Y maximum reading.

7.14.2.90 nTouchCalYMin

int16_t gslc_tsGui::nTouchCalYMin

Calibration Y minimum reading.

7.14.2.91 nTouchLastPress

uint16_t gslc_tsGui::nTouchLastPress

Last touch event pressure (0=none))

7.14.2.92 nTouchLastX

int16_t gslc_tsGui::nTouchLastX

Last touch event X coord.

7.14.2.93 nTouchLastY

int16_t gslc_tsGui::nTouchLastY

Last touch event Y coord.

Generated by Doxygen
7.14 Internal Functions 125

7.14.2.94 nTouchRotation

uint8_t gslc_tsGui::nTouchRotation

Touchscreen rotation offset vs display.

7.14.2.95 nTxtMarginX

int8_t gslc_tsElem::nTxtMarginX

Margin of overlay text within rect region (x offset)

7.14.2.96 nTxtMarginY

int8_t gslc_tsElem::nTxtMarginY

Margin of overlay text within rect region (y offset)

7.14.2.97 nType

int16_t gslc_tsElem::nType

Element type enumeration.

7.14.2.98 nVal

int16_t gslc_tsInputMap::nVal

The value associated with the input event.

7.14.2.99 nX

int16_t gslc_tsEventTouch::nX

Touch X coordinate (or param1)

Generated by Doxygen
126 Module Documentation

7.14.2.100 nY

int16_t gslc_tsEventTouch::nY

Touch Y coordinate (or param2)

7.14.2.101 pElem

gslc_tsElem∗ gslc_tsElemRef::pElem

Pointer to element in memory [RAM,FLASH].

7.14.2.102 pElemRefParent

gslc_tsElemRef∗ gslc_tsElem::pElemRefParent

Parent element reference.

Used during redraw to notify parent elements that they require redraw as well. Primary usage is in compound
elements. NOTE: Although this field is only used in GLSC_COMPOUND mode, it is not wrapped in an ifdef because
the ElemCreate∗_P() function macros currently initialize this field.

7.14.2.103 pElemRefTracked

gslc_tsElemRef∗ gslc_tsCollect::pElemRefTracked

Element reference currently being touch-tracked (NULL for none)

7.14.2.104 pFname

const char∗ gslc_tsImgRef::pFname

Pathname to input image file [FILE,SD].

7.14.2.105 pFocusElemRef

gslc_tsElemRef∗ gslc_tsGui::pFocusElemRef

Reference to element in focus.

Generated by Doxygen
7.14 Internal Functions 127

7.14.2.106 pFocusPage

gslc_tsPage∗ gslc_tsGui::pFocusPage

Page ptr currently in focus.

7.14.2.107 pfuncPinPoll

GSLC_CB_PIN_POLL gslc_tsGui::pfuncPinPoll

Callback func ptr for pin polling.

7.14.2.108 pfuncXDraw

GSLC_CB_DRAW gslc_tsElem::pfuncXDraw

Callback func ptr for custom drawing.

7.14.2.109 pfuncXEvent

GSLC_CB_EVENT gslc_tsElem::pfuncXEvent

UNUSED: Callback func ptr for event tree (draw,touch,tick)

7.14.2.110 pfuncXTick

GSLC_CB_TICK gslc_tsElem::pfuncXTick

Callback func ptr for timer/main loop tick.

7.14.2.111 pfuncXTouch

GSLC_CB_TOUCH gslc_tsElem::pfuncXTouch

Callback func ptr for touch.

Generated by Doxygen
128 Module Documentation

7.14.2.112 pImgBuf

const unsigned char∗ gslc_tsImgRef::pImgBuf

Pointer to input image buffer in memory [RAM,FLASH].

7.14.2.113 pStrBuf

char∗ gslc_tsElem::pStrBuf

Ptr to text string buffer to overlay.

7.14.2.114 pTxtFont

gslc_tsFont∗ gslc_tsElem::pTxtFont

Ptr to Font for overlay text.

7.14.2.115 pvData

void∗ gslc_tsEvent::pvData

Generic data pointer for event.

This member is used to either pass a pointer to a simple data datatype (such as Element or Collection) or to a
another structure that contains multiple fields.

7.14.2.116 pvDriver

void∗ gslc_tsGui::pvDriver

Driver-specific members (gslc_tsDriver∗)

7.14.2.117 pvFont

const void∗ gslc_tsFont::pvFont

Void ptr to the font reference (type defined by driver)

Generated by Doxygen
7.14 Internal Functions 129

7.14.2.118 pvImgRaw

void∗ gslc_tsImgRef::pvImgRaw

Ptr to raw output image data (for pre-loaded images)

7.14.2.119 pvScope

void∗ gslc_tsEvent::pvScope

Event target scope (eg. Page,Collection,Event)

7.14.2.120 pXData

void∗ gslc_tsElem::pXData

Ptr to extended data structure.

7.14.2.121 r

uint8_t gslc_tsColor::r

RGB red value.

7.14.2.122 rBounds

gslc_tsRect gslc_tsPage::rBounds

Bounding rect for page elements.

7.14.2.123 rElem

gslc_tsRect gslc_tsElem::rElem

Rect region containing element.

Generated by Doxygen
130 Module Documentation

7.14.2.124 rFocus

gslc_tsRect gslc_tsRectState::rFocus

7.14.2.125 rFull

gslc_tsRect gslc_tsRectState::rFull

7.14.2.126 rInner

gslc_tsRect gslc_tsRectState::rInner

7.14.2.127 rInvalidateRect

gslc_tsRect gslc_tsGui::rInvalidateRect

The rect region that has been invalidated.

7.14.2.128 sCollect

gslc_tsCollect gslc_tsPage::sCollect

Collection of elements on page.

7.14.2.129 sElemRefTmp

gslc_tsElemRef gslc_tsGui::sElemRefTmp

Temporary element reference.

7.14.2.130 sElemTmp

gslc_tsElem gslc_tsGui::sElemTmp

Temporary element.

Generated by Doxygen
7.14 Internal Functions 131

7.14.2.131 sElemTmpProg

gslc_tsElem gslc_tsGui::sElemTmpProg

Temporary element for Flash compatibility.

7.14.2.132 sEventPend

gslc_tsEvent gslc_tsGui::sEventPend

An event that has been deferred (if bEventPending=true)

7.14.2.133 sEventTouchPend

gslc_tsEventTouch gslc_tsGui::sEventTouchPend

A touch event that has been deferred (if bEventPending=true)

7.14.2.134 sImgRefBkgnd

gslc_tsImgRef gslc_tsGui::sImgRefBkgnd

Image reference for background.

7.14.2.135 sImgRefGlow

gslc_tsImgRef gslc_tsElem::sImgRefGlow

Image reference to draw (glowing)

7.14.2.136 sImgRefNorm

gslc_tsImgRef gslc_tsElem::sImgRefNorm

Image reference to draw (normal)

Generated by Doxygen
132 Module Documentation

7.14.2.137 sTransCol

gslc_tsColor gslc_tsGui::sTransCol

Color used for transparent image regions (GSLC_BMP_TRANS_EN=1)

7.14.2.138 w

uint16_t gslc_tsRect::w

Width of region.

7.14.2.139 x [1/2]

int16_t gslc_tsRect::x

X coordinate of corner.

7.14.2.140 x [2/2]

int16_t gslc_tsPt::x

X coordinate.

7.14.2.141 y [1/2]

int16_t gslc_tsRect::y

Y coordinate of corner.

7.14.2.142 y [2/2]

int16_t gslc_tsPt::y

Y coordinate.

Generated by Doxygen
7.15 Internal: Misc Functions 133

7.15 Internal: Misc Functions

Collaboration diagram for Internal: Misc Functions:

Internal Functions Internal: Misc Functions

Functions

• gslc_tsImgRef gslc_ResetImage ()
Create a blank image reference structure.

7.15.1 Detailed Description

7.15.2 Function Documentation

7.15.2.1 gslc_ResetImage()

gslc_tsImgRef gslc_ResetImage ( )

Create a blank image reference structure.

Returns

Image reference struct

Generated by Doxygen
134 Module Documentation

7.16 Internal: Element Functions

Collaboration diagram for Internal: Element Functions:

Internal Functions Internal: Element Functions

Functions

• gslc_tsElem gslc_ElemCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPageId, int16_t nType, gslc_ts←-
Rect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create a new element with default styling.
• gslc_tsElemRef ∗ gslc_ElemAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗pElem, gslc_teElem←-
RefFlags eFlags)
Add the Element to the list of generated elements in the GUI environment.
• uint8_t gslc_GetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask)
Get the flags associated with an element reference.
• void gslc_SetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask, uint8_t n←-
FlagVal)
Set the flags associated with an element reference.
• gslc_tsElem ∗ gslc_GetElemFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Returns a pointer to an element from an element reference, copying from FLASH to RAM if element is stored in
PROGMEM.
• gslc_tsElem ∗ gslc_GetElemFromRefD (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nLineNum)
Returns a pointer to an element from an element reference.
• void ∗ gslc_GetXDataFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nType, int16_t nLine←-
Num)
Returns a pointer to the data structure associated with an extended element.
• void gslc_ElemSetImage (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsImgRef sImgRef, gslc_ts←-
ImgRef sImgRefSel)
Set an element to use a bitmap image.
• bool gslc_ElemDrawByRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Draw an element to the active display.
• void gslc_ElemDraw (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Draw an element to the active display.
• void gslc_DrawTxtBase (gslc_tsGui ∗pGui, char ∗pStrBuf, gslc_tsRect rTxt, gslc_tsFont ∗pTxtFont, gslc←-
_teTxtFlags eTxtFlags, int8_t eTxtAlign, gslc_tsColor colTxt, gslc_tsColor colBg, int16_t nMarginW, int16_t
nMarginH)
Draw text with full text justification.
• void gslc_SetRoundRadius (gslc_tsGui ∗pGui, uint8_t nRadius)
Set the global rounded radius.
• void gslc_SetFocusCol (gslc_tsGui ∗pGui, gslc_tsColor colFocusNone, gslc_tsColor colFocus, gslc_tsColor
colFocusEdit)
Set the global focus color choices.

Generated by Doxygen
7.16 Internal: Element Functions 135

7.16.1 Detailed Description

7.16.2 Function Documentation

7.16.2.1 gslc_DrawTxtBase()

void gslc_DrawTxtBase (
gslc_tsGui ∗ pGui,
char ∗ pStrBuf,
gslc_tsRect rTxt,
gslc_tsFont ∗ pTxtFont,
gslc_teTxtFlags eTxtFlags,
int8_t eTxtAlign,
gslc_tsColor colTxt,
gslc_tsColor colBg,
int16_t nMarginW,
int16_t nMarginH )

Draw text with full text justification.

• This function is usually only required by internal GUIslice rendering operations but is made available for
custom element usage as well

Parameters

in pGui Pointer to GUI


in pStrBuf Pointer to text string buffer
in rTxt Rectangle region to contain the text
in pTxtFont Pointer to the font
in eTxtFlags Text string attributes
in eTxtAlign Text alignment / justification mode
in colTxt Text foreground color
in colBg Text background color
in nMarginW Horizontal margin within rect region to keep text away
in nMarginH Vertical margin within rect region to keep text away

Returns

none

7.16.2.2 gslc_ElemAdd()

gslc_tsElemRef∗ gslc_ElemAdd (
gslc_tsGui ∗ pGui,

Generated by Doxygen
136 Module Documentation

int16_t nPageId,
gslc_tsElem ∗ pElem,
gslc_teElemRefFlags eFlags )

Add the Element to the list of generated elements in the GUI environment.

• NOTE: The content of pElem is copied so the pointer can be released after the call.

Parameters

in pGui Pointer to GUI


in n←- Page ID to add element to (GSLC_PAGE_NONE to skip in case of temporary creation for
PageId compound elements)
in pElem Pointer to Element to add
in eFlags Flags describing the element (eg. whether the element should be stored in internal RAM array
or is located in Flash/PROGMEM).

Returns

Pointer to Element reference or NULL if fail

7.16.2.3 gslc_ElemCreate()

gslc_tsElem gslc_ElemCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPageId,
int16_t nType,
gslc_tsRect rElem,
char ∗ pStrBuf,
uint8_t nStrBufMax,
int16_t nFontId )

Create a new element with default styling.

Parameters

in pGui Pointer to GUI


in nElemId User-supplied ID for referencing this element (or GSLC_ID_AUTO to auto-generate)
in nPageId The page ID on which this page should be associated
in nType Enumeration that indicates the type of element that is requested for creation. The type
adjusts the visual representation and default styling.
in rElem Rectangle region framing the element
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 for textual elements

Generated by Doxygen
7.16 Internal: Element Functions 137

Returns

Initialized structure

7.16.2.4 gslc_ElemDraw()

void gslc_ElemDraw (
gslc_tsGui ∗ pGui,
int16_t nPageId,
int16_t nElemId )

Draw an element to the active display.

• Element is referenced by a page ID and element ID

• Provides similar functionality as ElemDrawByRef() but accepts page and element IDs

Parameters

in pGui Pointer to GUI


in n←- ID of page containing element
PageId
in n←- ID of element
ElemId

Returns

none

7.16.2.5 gslc_ElemDrawByRef()

bool gslc_ElemDrawByRef (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Draw an element to the active display.

• Element is referenced by an element pointer

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element reference to draw
in eRedraw Redraw mode

Generated by Doxygen
138 Module Documentation

Returns

true if success, false otherwise

7.16.2.6 gslc_ElemSetImage()

void gslc_ElemSetImage (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsImgRef sImgRef,
gslc_tsImgRef sImgRefSel )

Set an element to use a bitmap image.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference to update
in sImgRef Image reference (normal state)
in sImgRefSel Image reference (glowing state)

Returns

none

7.16.2.7 gslc_GetElemFromRef()

gslc_tsElem∗ gslc_GetElemFromRef (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Returns a pointer to an element from an element reference, copying from FLASH to RAM if element is stored in
PROGMEM.

This function enables all APIs to work with Elements irrespective of whether they were created in RAM or Flash.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element Reference

Returns

Pointer to Element after ensuring that it is accessible from RAM

Generated by Doxygen
7.16 Internal: Element Functions 139

7.16.2.8 gslc_GetElemFromRefD()

gslc_tsElem∗ gslc_GetElemFromRefD (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nLineNum )

Returns a pointer to an element from an element reference.

This is a wrapper for GetElemFromRef() including debug checking for invalid pointers.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element Reference
in nLineNum Line number from calling function (ie. LINE)

Returns

Pointer to Element after ensuring that it is accessible from RAM

7.16.2.9 gslc_GetElemRefFlag()

uint8_t gslc_GetElemRefFlag (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nFlagMask )

Get the flags associated with an element reference.

Parameters

in pGui Pointer to GUI


in pElemRef Element reference pointer
in nFlagMask Flags to read

Returns

Values associated with the element reference flags (subject to the flag mask)

7.16.2.10 gslc_GetXDataFromRef()

void∗ gslc_GetXDataFromRef (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,

Generated by Doxygen
140 Module Documentation

int16_t nType,
int16_t nLineNum )

Returns a pointer to the data structure associated with an extended element.

• Example usage: gslc_tsXListbox∗ pListbox = (gslc_tsXListbox∗)gslc_GetXDataFromRef(pGui, pElemRef,


GSLC_TYPEX_LISTBOX, LINE);

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element Reference
in nType Expected type indicator (ie. GSLC_TYPEX_∗)
in nLineNum Line number from calling function (ie. LINE)

Returns

Void pointer to extended data (pXData), or NULL if error. Needs to be typecasted accordingly.

7.16.2.11 gslc_SetElemRefFlag()

void gslc_SetElemRefFlag (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nFlagMask,
uint8_t nFlagVal )

Set the flags associated with an element reference.

Parameters

in pGui Pointer to GUI


in pElemRef Element reference pointer
in nFlagMask Flags to read
in nFlagVal Values to assign to masked flags

Returns

none

7.16.2.12 gslc_SetFocusCol()

void gslc_SetFocusCol (
gslc_tsGui ∗ pGui,

Generated by Doxygen
7.16 Internal: Element Functions 141

gslc_tsColor colFocusNone,
gslc_tsColor colFocus,
gslc_tsColor colFocusEdit )

Set the global focus color choices.

• These colors will be used when depicting focus frames around elements

Parameters

in pGui Pointer to GUI


in colFocusNone The color to use when the element is not in focus. This is typically set to match the
background color.
in colFocus The color to use when the element is in focus.
in colFocusEdit The color to use when the element is in edit mode.

Returns

none

7.16.2.13 gslc_SetRoundRadius()

void gslc_SetRoundRadius (
gslc_tsGui ∗ pGui,
uint8_t nRadius )

Set the global rounded radius.

• Used for rounded rectangles

Parameters

in pGui Pointer to GUI


in nRadius Radius for rounded elements

Returns

none

Generated by Doxygen
142 Module Documentation

7.17 Internal: Page Functions

Collaboration diagram for Internal: Page Functions:

Internal Functions Internal: Page Functions

Functions
• bool gslc_PageEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for a page.
• void gslc_PageRedrawGo (gslc_tsGui ∗pGui)
Redraw all elements on the active page.
• void gslc_PageFlipSet (gslc_tsGui ∗pGui, bool bNeeded)
Indicate whether the screen requires page flip.
• bool gslc_PageFlipGet (gslc_tsGui ∗pGui)
Get state of pending page flip state.
• void gslc_PageFlipGo (gslc_tsGui ∗pGui)
Update the visible screen if page has been marked for flipping.
• gslc_tsPage ∗ gslc_PageFindById (gslc_tsGui ∗pGui, int16_t nPageId)
Find a page in the GUI by its ID.
• void gslc_PageRedrawCalc (gslc_tsGui ∗pGui)
Perform a redraw calculation on the page to determine if additional elements should also be redrawn.
• gslc_tsEvent gslc_EventCreate (gslc_tsGui ∗pGui, gslc_teEventType eType, uint8_t nSubType, void ∗pv←-
Scope, void ∗pvData)
Create an event structure.
• bool gslc_ElemEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for an element.
• bool gslc_ElemSendEventTouch (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefTracked, gslc_teTouch e←-
Touch, int16_t nX, int16_t nY)
Trigger an element's touch event.

7.17.1 Detailed Description

7.17.2 Function Documentation

7.17.2.1 gslc_ElemEvent()

bool gslc_ElemEvent (
void ∗ pvGui,
gslc_tsEvent sEvent )

Common event handler function for an element.

Generated by Doxygen
7.17 Internal: Page Functions 143

Parameters

in pvGui Void pointer to GUI


in sEvent Event data structure

Returns

true if success, false if fail

7.17.2.2 gslc_ElemSendEventTouch()

bool gslc_ElemSendEventTouch (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRefTracked,
gslc_teTouch eTouch,
int16_t nX,
int16_t nY )

Trigger an element's touch event.

This is an optional behavior useful in some extended element types.

Parameters

in pGui Pointer to GUI


in pElemRefTracked Pointer to tracked Element reference (or NULL for none))
in eTouch Touch event type
in nX X coordinate of event (absolute coordinate)
in nY Y coordinate of event (absolute coordinate)

Returns

true if success, false if error

7.17.2.3 gslc_EventCreate()

gslc_tsEvent gslc_EventCreate (
gslc_tsGui ∗ pGui,
gslc_teEventType eType,
uint8_t nSubType,
void ∗ pvScope,
void ∗ pvData )

Create an event structure.

Generated by Doxygen
144 Module Documentation

Parameters

in pGui Pointer to GUI


in eType Event type (draw, touch, tick, etc.)
in nSubType Refinement of event type (or 0 if unused)
in pvScope Void ptr to object receiving event so that the event handler will have the context
in pvData Void ptr to additional data associated with the event (eg. coordinates for touch events)

Returns

None

7.17.2.4 gslc_PageEvent()

bool gslc_PageEvent (
void ∗ pvGui,
gslc_tsEvent sEvent )

Common event handler function for a page.

Parameters

in pvGui Void pointer to GUI


in sEvent Event data structure

Returns

true if success, false if fail

7.17.2.5 gslc_PageFindById()

gslc_tsPage∗ gslc_PageFindById (
gslc_tsGui ∗ pGui,
int16_t nPageId )

Find a page in the GUI by its ID.

Parameters

in pGui Pointer to GUI


in n←- Page ID to search
PageId

Generated by Doxygen
7.17 Internal: Page Functions 145

Returns

Ptr to a page or NULL if none found

7.17.2.6 gslc_PageFlipGet()

bool gslc_PageFlipGet (
gslc_tsGui ∗ pGui )

Get state of pending page flip state.

Parameters

in pGui Pointer to GUI

Returns

True if screen requires page flip

7.17.2.7 gslc_PageFlipGo()

void gslc_PageFlipGo (
gslc_tsGui ∗ pGui )

Update the visible screen if page has been marked for flipping.

• On some hardware this can trigger a double-buffering page flip.

Parameters

in pGui Pointer to GUI

Returns

None

7.17.2.8 gslc_PageFlipSet()

void gslc_PageFlipSet (
gslc_tsGui ∗ pGui,
bool bNeeded )

Indicate whether the screen requires page flip.

Generated by Doxygen
146 Module Documentation

• This is generally called with bNeeded=true whenever drawing has been done to the active page. Page flip is
actually performed later when calling PageFlipGo().

Parameters

in pGui Pointer to GUI


in bNeeded True if screen requires page flip

Returns

None

7.17.2.9 gslc_PageRedrawCalc()

void gslc_PageRedrawCalc (
gslc_tsGui ∗ pGui )

Perform a redraw calculation on the page to determine if additional elements should also be redrawn.

This routine checks to see if any transparent elements have been marked as needing redraw. If so, the whole page
may be marked as needing redraw (or at least the other elements that have been exposed underneath).

Parameters

in pGui Pointer to GUI

Returns

none

7.17.2.10 gslc_PageRedrawGo()

void gslc_PageRedrawGo (
gslc_tsGui ∗ pGui )

Redraw all elements on the active page.

Only the elements that have been marked as needing redraw are rendered unless the entire page has been marked
as needing redraw (in which case everything is drawn)

Parameters

in pGui Pointer to GUI

Generated by Doxygen
7.17 Internal: Page Functions 147

Returns

none

Generated by Doxygen
148 Module Documentation

7.18 Internal: Element Collection Functions

Collaboration diagram for Internal: Element Collection Functions:

Internal: Element Collection


Internal Functions
Functions

Functions

• void gslc_CollectReset (gslc_tsCollect ∗pCollect, gslc_tsElem ∗asElem, uint16_t nElemMax, gslc_tsElemRef


∗asElemRef, uint16_t nElemRefMax)
Reset the members of an element collection.
• gslc_tsElemRef ∗ gslc_CollectElemAdd (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, const gslc_tsElem ∗p←-
Elem, gslc_teElemRefFlags eFlags)
Add an element to a collection.
• bool gslc_CollectGetRedraw (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Determine if any elements in a collection need redraw.
• gslc_tsElemRef ∗ gslc_CollectFindElemById (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nElemId)
Find an element in a collection by its Element ID.
• gslc_tsElemRef ∗ gslc_CollectFindElemFromCoord (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nX,
int16_t nY, int16_t ∗pnElemInd)
Find an element in a collection by a coordinate coordinate.
• int gslc_CollectGetNextId (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Allocate the next available Element ID in a collection.
• gslc_tsElemRef ∗ gslc_CollectGetElemRefTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Get the element within a collection that is currently being tracked.
• void gslc_CollectSetElemTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRef,
int16_t nElemInd)
Set the element within a collection that is currently being tracked.
• void gslc_CollectSetParent (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRefParent)
Assign the parent element reference to all elements within a collection.

7.18.1 Detailed Description

7.18.2 Function Documentation

Generated by Doxygen
7.18 Internal: Element Collection Functions 149

7.18.2.1 gslc_CollectElemAdd()

gslc_tsElemRef∗ gslc_CollectElemAdd (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
const gslc_tsElem ∗ pElem,
gslc_teElemRefFlags eFlags )

Add an element to a collection.

• Note that the contents of pElem are copied to the collection's element array so the pElem pointer can be
discarded are the call is complete.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection
in pElem Ptr to the element to add
in eFlags Flags describing the element (eg. whether the element should be stored in internal RAM array
or is located in Flash/PROGMEM).

Returns

Pointer to the element reference in the collection that has been added or NULL if there was an error

7.18.2.2 gslc_CollectFindElemById()

gslc_tsElemRef∗ gslc_CollectFindElemById (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
int16_t nElemId )

Find an element in a collection by its Element ID.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection
in n←- Element ID to search for
ElemId

Returns

Pointer to the element reference in the collection that was found or NULL if no matches found

Generated by Doxygen
150 Module Documentation

7.18.2.3 gslc_CollectFindElemFromCoord()

gslc_tsElemRef∗ gslc_CollectFindElemFromCoord (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
int16_t nX,
int16_t nY,
int16_t ∗ pnElemInd )

Find an element in a collection by a coordinate coordinate.

• A match is found if the element is "clickable" (bClickEn=true) and the coordinate falls within the element's
bounds (rElem).

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection
in nX Absolute X coordinate to use for search
in nY Absolute Y coordinate to use for search
out pnElemInd Pointer to element index found

Returns

Pointer to the element reference in the collection that was found or NULL if no matches found

7.18.2.4 gslc_CollectGetElemRefTracked()

gslc_tsElemRef∗ gslc_CollectGetElemRefTracked (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect )

Get the element within a collection that is currently being tracked.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection

Returns

Pointer to the element reference in the collection that is currently being tracked or NULL if no elements are
being tracked

Generated by Doxygen
7.18 Internal: Element Collection Functions 151

7.18.2.5 gslc_CollectGetNextId()

int gslc_CollectGetNextId (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect )

Allocate the next available Element ID in a collection.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection

Returns

Element ID that is reserved for use

7.18.2.6 gslc_CollectGetRedraw()

bool gslc_CollectGetRedraw (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect )

Determine if any elements in a collection need redraw.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to Element collection

Returns

True if redraw required, false otherwise

7.18.2.7 gslc_CollectReset()

void gslc_CollectReset (
gslc_tsCollect ∗ pCollect,
gslc_tsElem ∗ asElem,
uint16_t nElemMax,
gslc_tsElemRef ∗ asElemRef,
uint16_t nElemRefMax )

Reset the members of an element collection.

Generated by Doxygen
152 Module Documentation

Parameters

in pCollect Pointer to the collection


in asElem Internal element array storage to associate with the collection
in nElemMax Maximum number of elements that can be added to the internal element array (ie.
RAM))
in asElemRef Internal element reference array storage to associate with the collection. All elements,
whether they are located in the internal element array or in external Flash (PROGMEM)
storage, require an entry in the element reference array.
in nElemRefMax Maximum number of elements in the reference array. This is effectively the maximum
number of elements that can appear in the collection, irrespective of whether it is stored
in RAM or Flash (PROGMEM).

Returns

none

7.18.2.8 gslc_CollectSetElemTracked()

void gslc_CollectSetElemTracked (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
gslc_tsElemRef ∗ pElemRef,
int16_t nElemInd )

Set the element within a collection that is currently being tracked.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection
in pElemRef Ptr to element reference to mark as being tracked
in nElemInd Element index to mark as being tracked

Returns

none

7.18.2.9 gslc_CollectSetParent()

void gslc_CollectSetParent (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
gslc_tsElemRef ∗ pElemRefParent )

Assign the parent element reference to all elements within a collection.

Generated by Doxygen
7.18 Internal: Element Collection Functions 153

• This is generally used in the case of compound elements where updates to a sub-element should cause the
parent (compound element) to be redrawn as well.)

Parameters

in pGui Pointer to GUI


in pCollect Pointer to the collection
in pElemRefParent Ptr to element reference that is the parent

Returns

none

Generated by Doxygen
154 Module Documentation

7.19 Internal: Element Collection Event Functions

Collaboration diagram for Internal: Element Collection Event Functions:

Internal: Element Collection


Internal Functions
Event Functions

Functions

• bool gslc_CollectEvent (void ∗pvGui, gslc_tsEvent sEvent)


Common event handler function for an element collection.
• void gslc_CollectTouch (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle touch events within the element collection.
• bool gslc_CollectTouchCompound (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY, gslc_tsCollect ∗pCollect)
Handle dispatch of touch (up,down,move) events to compound elements sub elements.
• void gslc_CollectInput (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle direct input events within the element collection.

7.19.1 Detailed Description

7.19.2 Function Documentation

7.19.2.1 gslc_CollectEvent()

bool gslc_CollectEvent (
void ∗ pvGui,
gslc_tsEvent sEvent )

Common event handler function for an element collection.

Parameters

in pvGui Void pointer to GUI


in sEvent Event data structure

Generated by Doxygen
7.19 Internal: Element Collection Event Functions 155

Returns

true if success, false if fail

7.19.2.2 gslc_CollectInput()

void gslc_CollectInput (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
gslc_tsEventTouch ∗ pEventTouch )

Handle direct input events within the element collection.

Parameters

in pGui Pointer to the GUI


in pCollect Ptr to the element collection
in pEventTouch Ptr to the touch event structure

Returns

none

7.19.2.3 gslc_CollectTouch()

void gslc_CollectTouch (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
gslc_tsEventTouch ∗ pEventTouch )

Handle touch events within the element collection.

Parameters

in pGui Pointer to the GUI


in pCollect Ptr to the element collection
in pEventTouch Ptr to the touch event structure

Returns

none

Generated by Doxygen
156 Module Documentation

7.19.2.4 gslc_CollectTouchCompound()

bool gslc_CollectTouchCompound (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY,
gslc_tsCollect ∗ pCollect )

Handle dispatch of touch (up,down,move) events to compound elements sub elements.

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
in pCollect Collection containing sub elements

Returns

true if success, false otherwise

Generated by Doxygen
7.20 Internal: Tracking Functions 157

7.20 Internal: Tracking Functions

Collaboration diagram for Internal: Tracking Functions:

Internal: Tracking
Internal Functions
Functions

Functions

• void gslc_TrackTouch (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage, int16_t nX, int16_t nY, uint16_t nPress)
Handles a touch event and performs the necessary tracking, glowing and selection actions depending on the press
state.
• void gslc_TrackInput (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal)
Handles a direct input event and performs the necessary tracking, glowing and selection actions depending on the
state.
• bool gslc_InputMapLookup (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc←-
_teAction ∗peAction, int16_t ∗pnActionVal)

7.20.1 Detailed Description

7.20.2 Function Documentation

7.20.2.1 gslc_InputMapLookup()

bool gslc_InputMapLookup (
gslc_tsGui ∗ pGui,
gslc_teInputRawEvent eInputEvent,
int16_t nInputVal,
gslc_teAction ∗ peAction,
int16_t ∗ pnActionVal )

Todo Doc.

This API is experimental and subject to change

Convert an external input event into a GUI action

• Use the InputMap table to determine the action to take as a result of the external input event.

Generated by Doxygen
158 Module Documentation

Parameters

in pGui Pointer to GUI


in eInputEvent Indication of event type
in nInputVal Additional data for event type
out peAction The GUI action to take
out pnActionVal Additional parameter for the GUI action

Returns

true if a matching event was found, false if none

7.20.2.2 gslc_TrackInput()

void gslc_TrackInput (
gslc_tsGui ∗ pGui,
gslc_teInputRawEvent eInputEvent,
int16_t nInputVal )

Handles a direct input event and performs the necessary tracking, glowing and selection actions depending on the
state.

Parameters

in pGui Pointer to GUI


in eInputEvent Indication of event type
in nInputVal Additional data for event type

Returns

none

7.20.2.3 gslc_TrackTouch()

void gslc_TrackTouch (
gslc_tsGui ∗ pGui,
gslc_tsPage ∗ pPage,
int16_t nX,
int16_t nY,
uint16_t nPress )

Handles a touch event and performs the necessary tracking, glowing and selection actions depending on the press
state.

Generated by Doxygen
7.20 Internal: Tracking Functions 159

Parameters

in pGui Pointer to GUI


in pPage Pointer to current page
in nX X coordinate of touch event
in nY Y coordinate of touch event
in nPress Pressure level of touch event (0 for none, else touch)

Returns

none

Generated by Doxygen
160 Module Documentation

7.21 Internal: Cleanup Functions

Collaboration diagram for Internal: Cleanup Functions:

Internal Functions Internal: Cleanup Functions

Functions

• void gslc_GuiDestruct (gslc_tsGui ∗pGui)


Free up any surfaces associated with the GUI, pages, collections and elements.
• void gslc_PageDestruct (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Free up any members associated with a page.
• void gslc_CollectDestruct (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Free up any members associated with an element collection.
• void gslc_ElemDestruct (gslc_tsElem ∗pElem)
Free up any members associated with an element.
• void gslc_ResetFont (gslc_tsFont ∗pFont)
Initialize a Font struct.
• void gslc_ResetElem (gslc_tsElem ∗pElem)
Initialize an Element struct.

7.21.1 Detailed Description

7.21.2 Function Documentation

7.21.2.1 gslc_CollectDestruct()

void gslc_CollectDestruct (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect )

Free up any members associated with an element collection.

Parameters

in pGui Pointer to GUI


in pCollect Pointer to collection

Generated by Doxygen
7.21 Internal: Cleanup Functions 161

Returns

none

7.21.2.2 gslc_ElemDestruct()

void gslc_ElemDestruct (
gslc_tsElem ∗ pElem )

Free up any members associated with an element.

Parameters
in pElem Pointer to element

Returns

none

7.21.2.3 gslc_GuiDestruct()

void gslc_GuiDestruct (
gslc_tsGui ∗ pGui )

Free up any surfaces associated with the GUI, pages, collections and elements.

Also frees up any fonts.

• Called by gslc_Quit()

Parameters

in pGui Pointer to GUI

Returns

none

7.21.2.4 gslc_PageDestruct()

void gslc_PageDestruct (
gslc_tsGui ∗ pGui,
gslc_tsPage ∗ pPage )

Generated by Doxygen
162 Module Documentation

Free up any members associated with a page.

Generated by Doxygen
7.21 Internal: Cleanup Functions 163

Parameters

in pGui Pointer to GUI


in pPage Pointer to Page

Returns

none

7.21.2.5 gslc_ResetElem()

void gslc_ResetElem (
gslc_tsElem ∗ pElem )

Initialize an Element struct.

Parameters
in pElem Pointer to Element

Returns

none

7.21.2.6 gslc_ResetFont()

void gslc_ResetFont (
gslc_tsFont ∗ pFont )

Initialize a Font struct.

Parameters
in pFont Pointer to Font

Returns

none

Generated by Doxygen
164 Module Documentation

Generated by Doxygen
Chapter 8

Data Structure Documentation

8.1 gslc_tsCollect Struct Reference

Element collection struct.


#include <GUIslice.h>
Collaboration diagram for gslc_tsCollect:

gslc_tsElemRef gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pElemRefParent pElem pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

pElemRefTracked
gslc_tsElem
asElemRef

asElem

gslc_tsCollect

Data Fields
• gslc_tsElem ∗ asElem
Array of elements.
• uint16_t nElemMax
Maximum number of elements to allocate (in RAM)
• uint16_t nElemCnt
Number of elements allocated.
• int16_t nElemAutoIdNext
Next Element ID for auto-assignment.
• gslc_tsElemRef ∗ asElemRef
Array of element references.
• uint16_t nElemRefMax
Maximum number of element references to allocate.
• uint16_t nElemRefCnt
Number of element references allocated.
• gslc_tsElemRef ∗ pElemRefTracked
Element reference currently being touch-tracked (NULL for none)
• int16_t nElemIndTracked
Element index currently being touch-tracked (GSLC_IND_NONE for none)
166 Data Structure Documentation

8.1.1 Detailed Description

Element collection struct.

• Collections are used to maintain a list of elements and any touch tracking status.

• Pages and Compound Elements both instantiate a Collection

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.2 gslc_tsColor Struct Reference

Color structure. Defines RGB triplet.


#include <GUIslice.h>

Data Fields
• uint8_t r
RGB red value.
• uint8_t g
RGB green value.
• uint8_t b
RGB blue value.

8.2.1 Detailed Description

Color structure. Defines RGB triplet.


The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.3 gslc_tsDriver Struct Reference

#include <GUIslice_drv_adagfx.h>
Collaboration diagram for gslc_tsDriver:

gslc_tsRect gslc_tsColor

rClipRect nColBkgnd

gslc_tsDriver

Generated by Doxygen
8.3 gslc_tsDriver Struct Reference 167

Data Fields

• gslc_tsColor nColBkgnd
Background color (if not image-based)
• gslc_tsRect rClipRect
Clipping rectangle.
• const void ∗ pvFontLast
Last loadFont() reference.

8.3.1 Field Documentation

8.3.1.1 nColBkgnd

gslc_tsColor gslc_tsDriver::nColBkgnd

Background color (if not image-based)

8.3.1.2 pvFontLast

const void∗ gslc_tsDriver::pvFontLast

Last loadFont() reference.

8.3.1.3 rClipRect

gslc_tsRect gslc_tsDriver::rClipRect

Clipping rectangle.

The documentation for this struct was generated from the following files:

• src/GUIslice_drv_adagfx.h
• src/GUIslice_drv_m5stack.h
• src/GUIslice_drv_sdl.h
• src/GUIslice_drv_tft_espi.h
• src/GUIslice_drv_utft.h

Generated by Doxygen
168 Data Structure Documentation

8.4 gslc_tsElem Struct Reference

Element Struct.

#include <GUIslice.h>

Collaboration diagram for gslc_tsElem:

gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

gslc_tsElem

pElem pElemRefParent

gslc_tsElemRef

Data Fields

• int16_t nId
Element ID specified by user.
• uint16_t nFeatures
Element feature vector (appearance/behavior))
• int16_t nType
Element type enumeration.
• gslc_tsRect rElem
Rect region containing element.
• int16_t nGroup
Group ID that the element belongs to.
• gslc_tsColor colElemFrame
Color for frame.
• gslc_tsColor colElemFill
Color for background fill.
• gslc_tsColor colElemFrameGlow
Color to use for frame when glowing.
• gslc_tsColor colElemFillGlow
Color to use for fill when glowing.
• gslc_tsImgRef sImgRefNorm
Image reference to draw (normal)
• gslc_tsImgRef sImgRefGlow
Image reference to draw (glowing)
• gslc_tsElemRef ∗ pElemRefParent
Parent element reference.
• char ∗ pStrBuf

Generated by Doxygen
8.4 gslc_tsElem Struct Reference 169

Ptr to text string buffer to overlay.


• uint8_t nStrBufMax
Size of string buffer.
• gslc_teTxtFlags eTxtFlags
Flags associated with text buffer.
• gslc_tsColor colElemText
Color of overlay text.
• gslc_tsColor colElemTextGlow
Color of overlay text when glowing.
• int8_t eTxtAlign
Alignment of overlay text.
• int8_t nTxtMarginX
Margin of overlay text within rect region (x offset)
• int8_t nTxtMarginY
Margin of overlay text within rect region (y offset)
• gslc_tsFont ∗ pTxtFont
Ptr to Font for overlay text.
• void ∗ pXData
Ptr to extended data structure.
• GSLC_CB_EVENT pfuncXEvent
UNUSED: Callback func ptr for event tree (draw,touch,tick)
• GSLC_CB_DRAW pfuncXDraw
Callback func ptr for custom drawing.
• GSLC_CB_TOUCH pfuncXTouch
Callback func ptr for touch.
• GSLC_CB_TICK pfuncXTick
Callback func ptr for timer/main loop tick.

8.4.1 Detailed Description

Element Struct.

• Represents a single graphic element in the GUIslice environment

• A page is made up of a number of elements

• Each element is created with a user-specified ID for further accesses (or GSLC_ID_AUTO for it to be auto-
generated)

• Display order of elements in a page is based upon the creation order

• Extensions to the core element types is provided through the pXData reference and pfuncX∗ callback func-
tions.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

Generated by Doxygen
170 Data Structure Documentation

8.5 gslc_tsElemRef Struct Reference

Element reference structure.

#include <GUIslice.h>

Collaboration diagram for gslc_tsElemRef:

gslc_tsElemRef gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pElemRefParent pElem pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

gslc_tsElem

Data Fields

• gslc_tsElem ∗ pElem
Pointer to element in memory [RAM,FLASH].
• gslc_teElemRefFlags eElemFlags
Element reference flags.

8.5.1 Detailed Description

Element reference structure.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.6 gslc_tsEvent Struct Reference

Event structure.

#include <GUIslice.h>

Data Fields

• gslc_teEventType eType
Event type.
• uint8_t nSubType
Event sub-type.
• void ∗ pvScope
Event target scope (eg. Page,Collection,Event)
• void ∗ pvData
Generic data pointer for event.

Generated by Doxygen
8.7 gslc_tsEventTouch Struct Reference 171

8.6.1 Detailed Description

Event structure.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.7 gslc_tsEventTouch Struct Reference

Structure used to pass touch data through event.

#include <GUIslice.h>

Data Fields
• gslc_teTouch eTouch
Touch state.
• int16_t nX
Touch X coordinate (or param1)
• int16_t nY
Touch Y coordinate (or param2)

8.7.1 Detailed Description

Structure used to pass touch data through event.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.8 gslc_tsFont Struct Reference

Font reference structure.

#include <GUIslice.h>

Data Fields
• int16_t nId
Font ID specified by user.
• gslc_teFontRefType eFontRefType
Font reference type.
• gslc_teFontRefMode eFontRefMode
Font reference mode.
• const void ∗ pvFont
Void ptr to the font reference (type defined by driver)
• uint16_t nSize
Font size.

Generated by Doxygen
172 Data Structure Documentation

8.8.1 Detailed Description

Font reference structure.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.9 gslc_tsGui Struct Reference

GUI structure.

#include <GUIslice.h>

Collaboration diagram for gslc_tsGui:

sEventPend

gslc_tsEvent sEventTouchPend
pfuncXEvent gslc_tsEventTouch

asFont
gslc_tsFont
pTxtFont
gslc_tsInputMap asInputMap

sElemTmpProg
colElemFill sElemTmp
colElemFillGlow
colElemFrame pFocusElemRef gslc_tsGui
colElemTextGlow sElemRefTmp
pElem
colElemText gslc_tsElemRef pElemRefTracked
colElemFrameGlow gslc_tsElem pElemRefParent asElemRef
pFocusPage
gslc_tsColor asElem apPageStack
rElem asPage
sCollect
gslc_tsCollect gslc_tsPage
colFocusEdit
sTransCol
colFocus
colFocusNone
sImgRefGlow
sImgRefNorm

rBounds
gslc_tsRect

rInvalidateRect

gslc_tsImgRef
sImgRefBkgnd

Data Fields

• uint16_t nDispW
Width of the display (pixels)
• uint16_t nDispH
Height of the display (pixels)
• uint16_t nDisp0W
Width of the display (pixels) in native orientation.
• uint16_t nDisp0H
Height of the display (pixels) in native orientation.
• uint8_t nDispDepth
Bit depth of display (bits per pixel)
• uint8_t nRotation
Adafruit GFX Rotation of display.
• uint8_t nTouchRotation
Touchscreen rotation offset vs display.
• uint8_t nSwapXY
Adafruit GFX Touch Swap x and y axes.
• uint8_t nFlipX

Generated by Doxygen
8.9 gslc_tsGui Struct Reference 173

Adafruit GFX Touch Flip x axis.


• uint8_t nFlipY
Adafruit GFX Touch Flip x axis.
• int16_t nTouchCalXMin
Calibration X minimum reading.
• int16_t nTouchCalXMax
Calibration X maximum reading.
• int16_t nTouchCalYMin
Calibration Y minimum reading.
• int16_t nTouchCalYMax
Calibration Y maximum reading.
• int16_t nTouchCalPressMin
Calibration minimum pressure threshold.
• int16_t nTouchCalPressMax
Calibration maximum pressure threshold.
• gslc_tsFont ∗ asFont
Collection of loaded fonts.
• uint8_t nFontMax
Maximum number of fonts to allocate.
• uint8_t nFontCnt
Number of fonts allocated.
• uint8_t nRoundRadius
Radius for rounded elements.
• gslc_tsColor sTransCol
Color used for transparent image regions (GSLC_BMP_TRANS_EN=1)
• gslc_tsElem sElemTmp
Temporary element.
• gslc_tsElemRef sElemRefTmp
Temporary element reference.
• gslc_tsElem sElemTmpProg
Temporary element for Flash compatibility.
• gslc_teInitStat eInitStatTouch
Status of touch initialization.
• int16_t nTouchLastX
Last touch event X coord.
• int16_t nTouchLastY
Last touch event Y coord.
• uint16_t nTouchLastPress
Last touch event pressure (0=none))
• bool bTouchRemapEn
Enable touch remapping?
• bool bTouchRemapYX
Enable touch controller swapping of X & Y.
• void ∗ pvDriver
Driver-specific members (gslc_tsDriver∗)
• bool bRedrawNeeded
Does anything on page require redraw?
• bool bRedrawPartialEn
Driver supports partial page redraw.
• bool bEventPending
Is there an event pending?

Generated by Doxygen
174 Data Structure Documentation

• gslc_tsEventTouch sEventTouchPend
A touch event that has been deferred (if bEventPending=true)
• gslc_tsEvent sEventPend
An event that has been deferred (if bEventPending=true)
• gslc_tsImgRef sImgRefBkgnd
Image reference for background.
• uint8_t nFrameRateCnt
Diagnostic frame rate count.
• uint8_t nFrameRateStart
Diagnostic frame rate timestamp.
• gslc_tsPage ∗ asPage
Array of all pages defined in system.
• uint8_t nPageMax
Maximum number of pages that can be defined.
• uint8_t nPageCnt
Current number of pages defined.
• gslc_tsPage ∗ apPageStack [GSLC_STACK__MAX]
Stack of pages.
• bool abPageStackActive [GSLC_STACK__MAX]
Whether page in stack can receive touch events.
• bool abPageStackDoDraw [GSLC_STACK__MAX]
Whether page in stack is still actively drawn.
• bool bScreenNeedRedraw
Screen requires a redraw.
• bool bScreenNeedFlip
Screen requires a page flip.
• bool bInvalidateEn
A region of the display has been invalidated.
• gslc_tsRect rInvalidateRect
The rect region that has been invalidated.
• GSLC_CB_PIN_POLL pfuncPinPoll
Callback func ptr for pin polling.
• gslc_tsInputMap ∗ asInputMap
Array of input maps.
• uint8_t nInputMapMax
Maximum number of input maps.
• uint8_t nInputMapCnt
Current number of input maps.
• uint8_t nInputMode
Input mode: 0=navigate, 1=edit.
• int16_t nFocusPageInd
Index of page in stack currently in focus.
• gslc_tsPage ∗ pFocusPage
Page ptr currently in focus.
• gslc_tsElemRef ∗ pFocusElemRef
Reference to element in focus.
• int16_t nFocusElemInd
Index of element in page currently in focus.
• int16_t nFocusElemMax
Max number of elements in page in focus.
• gslc_tsColor colFocusNone

Generated by Doxygen
8.10 gslc_tsImgRef Struct Reference 175

Focus frame color when not in focus (typically background color)


• gslc_tsColor colFocus
Focus frame color when in focus.
• gslc_tsColor colFocusEdit
Focus frame color when in focus and edit mode.
• int16_t nFocusSavedPageInd
Focus page index saved prior to popup/overlay.
• int16_t nFocusSavedElemInd
Focus element index saved prior to popup/overlay.

8.9.1 Detailed Description

GUI structure.

• Contains all GUI state and content

• Maintains list of one or more pages

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.10 gslc_tsImgRef Struct Reference

Image reference structure.

#include <GUIslice.h>

Data Fields

• const unsigned char ∗ pImgBuf


Pointer to input image buffer in memory [RAM,FLASH].
• const char ∗ pFname
Pathname to input image file [FILE,SD].
• gslc_teImgRefFlags eImgFlags
Image reference flags.
• void ∗ pvImgRaw
Ptr to raw output image data (for pre-loaded images)

8.10.1 Detailed Description

Image reference structure.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

Generated by Doxygen
176 Data Structure Documentation

8.11 gslc_tsInputMap Struct Reference

Input mapping.

#include <GUIslice.h>

Data Fields
• gslc_teInputRawEvent eEvent
The input event.
• int16_t nVal
The value associated with the input event.
• gslc_teAction eAction
Resulting action.
• int16_t nActionVal
The value for the output action.

8.11.1 Detailed Description

Input mapping.

• Describes mapping from keyboard or GPIO input to a GUI action (such as changing the current element
focus)

• This is generally used to support keyboard or GPIO control over the GUI operation

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.12 gslc_tsKey Struct Reference

Key information. Defines everything we need to know about a particular key.

#include <XKeyPad.h>

Data Fields
• uint8_t nId
Unique identifier.
• uint8_t nRow
Row to place the key (0 is top-most)
• uint8_t nCol
Column to place the key (0 is left-most)
• uint8_t nRowSpan
Number of rows that key takes up (in units of nButtonSzH pixels)
• uint8_t nColSpan
Number of columns that key takes up (in units of nButtonSzW pixels)
• uint8_t nType
Key type.

Generated by Doxygen
8.12 gslc_tsKey Struct Reference 177

8.12.1 Detailed Description

Key information. Defines everything we need to know about a particular key.

8.12.2 Field Documentation

8.12.2.1 nCol

uint8_t gslc_tsKey::nCol

Column to place the key (0 is left-most)

8.12.2.2 nColSpan

uint8_t gslc_tsKey::nColSpan

Number of columns that key takes up (in units of nButtonSzW pixels)

8.12.2.3 nId

uint8_t gslc_tsKey::nId

Unique identifier.

8.12.2.4 nRow

uint8_t gslc_tsKey::nRow

Row to place the key (0 is top-most)

8.12.2.5 nRowSpan

uint8_t gslc_tsKey::nRowSpan

Number of rows that key takes up (in units of nButtonSzH pixels)

Generated by Doxygen
178 Data Structure Documentation

8.12.2.6 nType

uint8_t gslc_tsKey::nType

Key type.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

8.13 gslc_tsLabelSpecial Struct Reference

Key Label strings for special buttons.

#include <XKeyPad.h>

Data Fields

• uint8_t nId
• const char ∗ pLabel
Unique key ID.

8.13.1 Detailed Description

Key Label strings for special buttons.

• Includes ID and string

8.13.2 Field Documentation

8.13.2.1 nId

uint8_t gslc_tsLabelSpecial::nId

8.13.2.2 pLabel

const char∗ gslc_tsLabelSpecial::pLabel

Unique key ID.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

Generated by Doxygen
8.14 gslc_tsPage Struct Reference 179

8.14 gslc_tsPage Struct Reference

Page structure.

#include <GUIslice.h>

Collaboration diagram for gslc_tsPage:

gslc_tsRect gslc_tsEvent gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
rElem pfuncXEvent pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

gslc_tsElem

pElem pElemRefParent

rBounds gslc_tsElemRef asElem

pElemRefTracked
asElemRef

gslc_tsCollect

sCollect

gslc_tsPage

Data Fields

• gslc_tsCollect sCollect
Collection of elements on page.
• int16_t nPageId
Page identifier.
• gslc_tsRect rBounds
Bounding rect for page elements.

8.14.1 Detailed Description

Page structure.

• A page contains a collection of elements

• Many redraw functions operate at a page level

• Maintains state as to whether redraw or screen flip is required

The documentation for this struct was generated from the following file:

• src/GUIslice.h

Generated by Doxygen
180 Data Structure Documentation

8.15 gslc_tsPt Struct Reference

Define point coordinates.

#include <GUIslice.h>

Data Fields

• int16_t x
X coordinate.
• int16_t y
Y coordinate.

8.15.1 Detailed Description

Define point coordinates.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

8.16 gslc_tsRect Struct Reference

Rectangular region. Defines X,Y corner coordinates plus dimensions.

#include <GUIslice.h>

Data Fields

• int16_t x
X coordinate of corner.
• int16_t y
Y coordinate of corner.
• uint16_t w
Width of region.
• uint16_t h
Height of region.

8.16.1 Detailed Description

Rectangular region. Defines X,Y corner coordinates plus dimensions.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

Generated by Doxygen
8.17 gslc_tsRectState Struct Reference 181

8.17 gslc_tsRectState Struct Reference

State associated with an element's region.

#include <GUIslice.h>

Collaboration diagram for gslc_tsRectState:

gslc_tsRect gslc_tsColor

colFrm
colFocus
rInner
colTxtBack
rFull
colInner
rFocus
colTxtFore
colBack

gslc_tsRectState

Data Fields

• gslc_tsRect rFocus
• gslc_tsRect rFull
• gslc_tsRect rInner
• gslc_tsColor colFocus
• gslc_tsColor colFrm
• gslc_tsColor colInner
• gslc_tsColor colBack
• gslc_tsColor colTxtFore
• gslc_tsColor colTxtBack

8.17.1 Detailed Description

State associated with an element's region.

• This struct is used for gslc_ElemCalcRectState()

• Accounts for various rects including focus, frame and internal content

• Also contains the various colors associated with each region.

The documentation for this struct was generated from the following file:

• src/GUIslice.h

Generated by Doxygen
182 Data Structure Documentation

8.18 gslc_tsXCheckbox Struct Reference

Extended data for Checkbox element.

#include <XCheckbox.h>

Collaboration diagram for gslc_tsXCheckbox:

gslc_tsColor

colCheck

gslc_tsXCheckbox

Data Fields
• bool bRadio
Radio-button operation if true.
• gslc_teXCheckboxStyle nStyle
Drawing style for element.
• bool bChecked
Indicates if it is selected (checked)
• gslc_tsColor colCheck
Color of checked inner fill.
• GSLC_CB_XCHECKBOX pfuncXToggle
Callback event to say element has changed.

8.18.1 Detailed Description

Extended data for Checkbox element.

8.18.2 Field Documentation

8.18.2.1 bChecked

bool gslc_tsXCheckbox::bChecked

Indicates if it is selected (checked)

Generated by Doxygen
8.19 gslc_tsXGauge Struct Reference 183

8.18.2.2 bRadio

bool gslc_tsXCheckbox::bRadio

Radio-button operation if true.

8.18.2.3 colCheck

gslc_tsColor gslc_tsXCheckbox::colCheck

Color of checked inner fill.

8.18.2.4 nStyle

gslc_teXCheckboxStyle gslc_tsXCheckbox::nStyle

Drawing style for element.

8.18.2.5 pfuncXToggle

GSLC_CB_XCHECKBOX gslc_tsXCheckbox::pfuncXToggle

Callback event to say element has changed.

The documentation for this struct was generated from the following file:

• src/elem/XCheckbox.h

8.19 gslc_tsXGauge Struct Reference

Extended data for Gauge element.

#include <XGauge.h>
Collaboration diagram for gslc_tsXGauge:

gslc_tsColor

colGauge
colTick

gslc_tsXGauge

Generated by Doxygen
184 Data Structure Documentation

Data Fields

• int16_t nMin
Minimum control value.
• int16_t nMax
Maximum control value.
• int16_t nVal
Current control value.
• int16_t nValLast
Last value.
• bool bValLastValid
Last value valid?
• gslc_teXGaugeStyle nStyle
Gauge sub-type.
• gslc_tsColor colGauge
Color of gauge fill bar.
• gslc_tsColor colTick
Color of gauge tick marks.
• uint16_t nTickCnt
Number of gauge tick marks.
• uint16_t nTickLen
Length of gauge tick marks.
• bool bVert
Vertical if true, else Horizontal.
• bool bFlip
Reverse direction of gauge.
• uint16_t nIndicLen
Indicator length.
• uint16_t nIndicTip
Size of tip at end of indicator.
• bool bIndicFill
Fill the indicator if true.

8.19.1 Detailed Description

Extended data for Gauge element.

8.19.2 Field Documentation

8.19.2.1 bFlip

bool gslc_tsXGauge::bFlip

Reverse direction of gauge.

Generated by Doxygen
8.19 gslc_tsXGauge Struct Reference 185

8.19.2.2 bIndicFill

bool gslc_tsXGauge::bIndicFill

Fill the indicator if true.

8.19.2.3 bValLastValid

bool gslc_tsXGauge::bValLastValid

Last value valid?

8.19.2.4 bVert

bool gslc_tsXGauge::bVert

Vertical if true, else Horizontal.

8.19.2.5 colGauge

gslc_tsColor gslc_tsXGauge::colGauge

Color of gauge fill bar.

8.19.2.6 colTick

gslc_tsColor gslc_tsXGauge::colTick

Color of gauge tick marks.

8.19.2.7 nIndicLen

uint16_t gslc_tsXGauge::nIndicLen

Indicator length.

Generated by Doxygen
186 Data Structure Documentation

8.19.2.8 nIndicTip

uint16_t gslc_tsXGauge::nIndicTip

Size of tip at end of indicator.

8.19.2.9 nMax

int16_t gslc_tsXGauge::nMax

Maximum control value.

8.19.2.10 nMin

int16_t gslc_tsXGauge::nMin

Minimum control value.

8.19.2.11 nStyle

gslc_teXGaugeStyle gslc_tsXGauge::nStyle

Gauge sub-type.

8.19.2.12 nTickCnt

uint16_t gslc_tsXGauge::nTickCnt

Number of gauge tick marks.

8.19.2.13 nTickLen

uint16_t gslc_tsXGauge::nTickLen

Length of gauge tick marks.

Generated by Doxygen
8.20 gslc_tsXGlowball Struct Reference 187

8.19.2.14 nVal

int16_t gslc_tsXGauge::nVal

Current control value.

8.19.2.15 nValLast

int16_t gslc_tsXGauge::nValLast

Last value.

The documentation for this struct was generated from the following file:

• src/elem/XGauge.h

8.20 gslc_tsXGlowball Struct Reference

Extended data for Slider element.

#include <XGlowball.h>

Collaboration diagram for gslc_tsXGlowball:

gslc_tsColor

cCol

colBg gslc_tsXGlowballRing

pRings

gslc_tsXGlowball

Generated by Doxygen
188 Data Structure Documentation

Data Fields

• int16_t nMidX
Gauge midpoint X coord.
• int16_t nMidY
Gauge midpoint Y coord.
• gslc_tsXGlowballRing ∗ pRings
Ring definition array.
• uint8_t nNumRings
Number of rings in definition.
• uint16_t nQuality
Rendering quality (number of segments / rotation)
• int16_t nAngStart
Starting angle (0..510 degrees)
• int16_t nAngEnd
Ending angle (0..510 degrees)
• gslc_tsColor colBg
Background color (for redraw)
• int16_t nVal
Current value.
• int16_t nValLast
Previous value.

8.20.1 Detailed Description

Extended data for Slider element.

8.20.2 Field Documentation

8.20.2.1 colBg

gslc_tsColor gslc_tsXGlowball::colBg

Background color (for redraw)

8.20.2.2 nAngEnd

int16_t gslc_tsXGlowball::nAngEnd

Ending angle (0..510 degrees)

Generated by Doxygen
8.20 gslc_tsXGlowball Struct Reference 189

8.20.2.3 nAngStart

int16_t gslc_tsXGlowball::nAngStart

Starting angle (0..510 degrees)

8.20.2.4 nMidX

int16_t gslc_tsXGlowball::nMidX

Gauge midpoint X coord.

8.20.2.5 nMidY

int16_t gslc_tsXGlowball::nMidY

Gauge midpoint Y coord.

8.20.2.6 nNumRings

uint8_t gslc_tsXGlowball::nNumRings

Number of rings in definition.

8.20.2.7 nQuality

uint16_t gslc_tsXGlowball::nQuality

Rendering quality (number of segments / rotation)

8.20.2.8 nVal

int16_t gslc_tsXGlowball::nVal

Current value.

Generated by Doxygen
190 Data Structure Documentation

8.20.2.9 nValLast

int16_t gslc_tsXGlowball::nValLast

Previous value.

8.20.2.10 pRings

gslc_tsXGlowballRing∗ gslc_tsXGlowball::pRings

Ring definition array.

The documentation for this struct was generated from the following file:

• src/elem/XGlowball.h

8.21 gslc_tsXGlowballRing Struct Reference

#include <XGlowball.h>

Collaboration diagram for gslc_tsXGlowballRing:

gslc_tsColor

cCol

gslc_tsXGlowballRing

Data Fields

• uint8_t nRad1
• uint8_t nRad2
• gslc_tsColor cCol

8.21.1 Field Documentation

Generated by Doxygen
8.22 gslc_tsXGraph Struct Reference 191

8.21.1.1 cCol

gslc_tsColor gslc_tsXGlowballRing::cCol

8.21.1.2 nRad1

uint8_t gslc_tsXGlowballRing::nRad1

8.21.1.3 nRad2

uint8_t gslc_tsXGlowballRing::nRad2

The documentation for this struct was generated from the following file:

• src/elem/XGlowball.h

8.22 gslc_tsXGraph Struct Reference

Extended data for Graph element.

#include <XGraph.h>

Collaboration diagram for gslc_tsXGraph:

gslc_tsColor

colGraph

gslc_tsXGraph

Generated by Doxygen
192 Data Structure Documentation

Data Fields

• int16_t ∗ pBuf
Ptr to the data buffer (circular buffer))
• uint8_t nMargin
Margin for graph area within element rect.
• gslc_tsColor colGraph
Color of the graph.
• gslc_teXGraphStyle eStyle
Style of the graph.
• uint16_t nBufMax
Maximum number of points in buffer.
• bool bScrollEn
Enable for scrollbar.
• uint16_t nScrollPos
Current scrollbar position.
• uint16_t nWndHeight
Visible window height.
• uint16_t nWndWidth
Visible window width.
• int16_t nPlotValMax
Visible window maximum value.
• int16_t nPlotValMin
Visible window minimum value.
• uint16_t nPlotIndMax
Number of data points to show in window.
• uint16_t nBufCnt
Number of points in buffer.
• uint16_t nPlotIndStart
First row of current window.

8.22.1 Detailed Description

Extended data for Graph element.

8.22.2 Field Documentation

8.22.2.1 bScrollEn

bool gslc_tsXGraph::bScrollEn

Enable for scrollbar.

Generated by Doxygen
8.22 gslc_tsXGraph Struct Reference 193

8.22.2.2 colGraph

gslc_tsColor gslc_tsXGraph::colGraph

Color of the graph.

8.22.2.3 eStyle

gslc_teXGraphStyle gslc_tsXGraph::eStyle

Style of the graph.

8.22.2.4 nBufCnt

uint16_t gslc_tsXGraph::nBufCnt

Number of points in buffer.

8.22.2.5 nBufMax

uint16_t gslc_tsXGraph::nBufMax

Maximum number of points in buffer.

8.22.2.6 nMargin

uint8_t gslc_tsXGraph::nMargin

Margin for graph area within element rect.

8.22.2.7 nPlotIndMax

uint16_t gslc_tsXGraph::nPlotIndMax

Number of data points to show in window.

Generated by Doxygen
194 Data Structure Documentation

8.22.2.8 nPlotIndStart

uint16_t gslc_tsXGraph::nPlotIndStart

First row of current window.

8.22.2.9 nPlotValMax

int16_t gslc_tsXGraph::nPlotValMax

Visible window maximum value.

8.22.2.10 nPlotValMin

int16_t gslc_tsXGraph::nPlotValMin

Visible window minimum value.

8.22.2.11 nScrollPos

uint16_t gslc_tsXGraph::nScrollPos

Current scrollbar position.

8.22.2.12 nWndHeight

uint16_t gslc_tsXGraph::nWndHeight

Visible window height.

8.22.2.13 nWndWidth

uint16_t gslc_tsXGraph::nWndWidth

Visible window width.

Generated by Doxygen
8.23 gslc_tsXKeyPad Struct Reference 195

8.22.2.14 pBuf

int16_t∗ gslc_tsXGraph::pBuf

Ptr to the data buffer (circular buffer))


The documentation for this struct was generated from the following file:

• src/elem/XGraph.h

8.23 gslc_tsXKeyPad Struct Reference

Extended data for KeyPad element.


#include <XKeyPad.h>
Collaboration diagram for gslc_tsXKeyPad:

gslc_tsColor gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsEvent

colElemFill
colElemFillGlow
colElemFrame sImgRefGlow
rElem pTxtFont pfuncXEvent
colElemTextGlow sImgRefNorm
colElemText
colElemFrameGlow

gslc_tsXKeyPadResult gslc_tsKey pfuncStyleGet gslc_tsElem

pLayouts
pfuncBtnEvt pElem pElemRefParent
pLayout

sRedraw gslc_tsXKeyPadCfg gslc_tsElemRef

pConfig pTargetRef

gslc_tsXKeyPad

Data Fields
• uint8_t nBufferMax
Maximum number of characters stored in edit value string.
• uint8_t nBufferLen
Current number of characters stored in edit value string.
• char acBuffer [XKEYPAD_BUF_MAX]
Buffer storage for edit value string.
• uint8_t nCursorPos
Cursor position within the buffer.
• uint8_t nScrollPos
Display offset within the buffer.
• gslc_tsXKeyPadResult sRedraw
Pending redraw state.
• int16_t nFocusKeyInd
Indicate key in focus (GSLC_IND_NONE if none)
• int16_t nGlowKeyInd
Indicate key in glow (GSLC_IND_NONE if none)
• gslc_tsXKeyPadCfg ∗ pConfig
Ptr to config struct (may be derived variant)
• GSLC_CB_INPUT pfuncCb
Callback function for KeyPad actions.
• gslc_tsElemRef ∗ pTargetRef
Target element ref associated with keypad (GSLC_CB_INPUT)

Generated by Doxygen
196 Data Structure Documentation

8.23.1 Detailed Description

Extended data for KeyPad element.

8.23.2 Field Documentation

8.23.2.1 acBuffer

char gslc_tsXKeyPad::acBuffer[XKEYPAD_BUF_MAX]

Buffer storage for edit value string.

8.23.2.2 nBufferLen

uint8_t gslc_tsXKeyPad::nBufferLen

Current number of characters stored in edit value string.

8.23.2.3 nBufferMax

uint8_t gslc_tsXKeyPad::nBufferMax

Maximum number of characters stored in edit value string.

8.23.2.4 nCursorPos

uint8_t gslc_tsXKeyPad::nCursorPos

Cursor position within the buffer.

8.23.2.5 nFocusKeyInd

int16_t gslc_tsXKeyPad::nFocusKeyInd

Indicate key in focus (GSLC_IND_NONE if none)

Generated by Doxygen
8.23 gslc_tsXKeyPad Struct Reference 197

8.23.2.6 nGlowKeyInd

int16_t gslc_tsXKeyPad::nGlowKeyInd

Indicate key in glow (GSLC_IND_NONE if none)

8.23.2.7 nScrollPos

uint8_t gslc_tsXKeyPad::nScrollPos

Display offset within the buffer.

8.23.2.8 pConfig

gslc_tsXKeyPadCfg∗ gslc_tsXKeyPad::pConfig

Ptr to config struct (may be derived variant)

8.23.2.9 pfuncCb

GSLC_CB_INPUT gslc_tsXKeyPad::pfuncCb

Callback function for KeyPad actions.

8.23.2.10 pTargetRef

gslc_tsElemRef∗ gslc_tsXKeyPad::pTargetRef

Target element ref associated with keypad (GSLC_CB_INPUT)

8.23.2.11 sRedraw

gslc_tsXKeyPadResult gslc_tsXKeyPad::sRedraw

Pending redraw state.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

Generated by Doxygen
198 Data Structure Documentation

8.24 gslc_tsXKeyPadCfg Struct Reference

Configuration for the KeyPad.

#include <XKeyPad.h>

Collaboration diagram for gslc_tsXKeyPadCfg:

gslc_tsKey gslc_tsXKeyPadResult gslc_tsColor

pLayouts
pfuncBtnEvt pfuncStyleGet
pLayout

gslc_tsXKeyPadCfg

Data Fields

• uint8_t nDispMax
Maximum length to display.
• bool bRoundEn
Enable rounded corners.
• int8_t nButtonSzW
Button width (in pixels)
• int8_t nButtonSzH
Button height (in pixels)
• int8_t nButtonSpaceX
Button X spacing (in pixels)
• int8_t nButtonSpaceY
Button Y spacing (in pixels)
• gslc_tsKey ∗ pLayout
Current selected layout.
• gslc_tsKey ∗∗ pLayouts
Key Positions for each KeyPad layout.
• int8_t eLayoutDef
Default KeyPad layout (type gslc_teXKeyPadSel)
• int8_t eLayoutSel
Current KeyPad layout (type gslc_teXKeyPadSel)
• int16_t nFontId
Configured font for KeyPad labels.
• int16_t nOffsetX
Configured offset (X direction) for buttons from parent container.
• int16_t nOffsetY
Configured offset (Y direction) for buttons from parent container.

Generated by Doxygen
8.24 gslc_tsXKeyPadCfg Struct Reference 199

• int8_t nFrameMargin
Margin around text value field.
• uint8_t nMaxCols
Maximum number of columns to occupy.
• uint8_t nMaxRows
Maximum number of rows to occupy.
• GSLC_CB_XKEYPAD_RESET pfuncReset
Callback function whenever keypad needs to be reset.
• GSLC_CB_XKEYPAD_TXT_INIT pfuncTxtInit
Callback function whenever text string initialized.
• GSLC_CB_XKEYPAD_LABEL_GET pfuncLabelGet
Callback function to get a key label.
• GSLC_CB_XKEYPAD_SYTLE_GET pfuncStyleGet
Callback function to get a key's style.
• GSLC_CB_XKEYPAD_BTN_EVT pfuncBtnEvt
Callback function to handle a key.

8.24.1 Detailed Description

Configuration for the KeyPad.

8.24.2 Field Documentation

8.24.2.1 bRoundEn

bool gslc_tsXKeyPadCfg::bRoundEn

Enable rounded corners.

8.24.2.2 eLayoutDef

int8_t gslc_tsXKeyPadCfg::eLayoutDef

Default KeyPad layout (type gslc_teXKeyPadSel)

8.24.2.3 eLayoutSel

int8_t gslc_tsXKeyPadCfg::eLayoutSel

Current KeyPad layout (type gslc_teXKeyPadSel)

Generated by Doxygen
200 Data Structure Documentation

8.24.2.4 nButtonSpaceX

int8_t gslc_tsXKeyPadCfg::nButtonSpaceX

Button X spacing (in pixels)

8.24.2.5 nButtonSpaceY

int8_t gslc_tsXKeyPadCfg::nButtonSpaceY

Button Y spacing (in pixels)

8.24.2.6 nButtonSzH

int8_t gslc_tsXKeyPadCfg::nButtonSzH

Button height (in pixels)

8.24.2.7 nButtonSzW

int8_t gslc_tsXKeyPadCfg::nButtonSzW

Button width (in pixels)

8.24.2.8 nDispMax

uint8_t gslc_tsXKeyPadCfg::nDispMax

Maximum length to display.

8.24.2.9 nFontId

int16_t gslc_tsXKeyPadCfg::nFontId

Configured font for KeyPad labels.

Generated by Doxygen
8.24 gslc_tsXKeyPadCfg Struct Reference 201

8.24.2.10 nFrameMargin

int8_t gslc_tsXKeyPadCfg::nFrameMargin

Margin around text value field.

8.24.2.11 nMaxCols

uint8_t gslc_tsXKeyPadCfg::nMaxCols

Maximum number of columns to occupy.

8.24.2.12 nMaxRows

uint8_t gslc_tsXKeyPadCfg::nMaxRows

Maximum number of rows to occupy.

8.24.2.13 nOffsetX

int16_t gslc_tsXKeyPadCfg::nOffsetX

Configured offset (X direction) for buttons from parent container.

8.24.2.14 nOffsetY

int16_t gslc_tsXKeyPadCfg::nOffsetY

Configured offset (Y direction) for buttons from parent container.

8.24.2.15 pfuncBtnEvt

GSLC_CB_XKEYPAD_BTN_EVT gslc_tsXKeyPadCfg::pfuncBtnEvt

Callback function to handle a key.

Generated by Doxygen
202 Data Structure Documentation

8.24.2.16 pfuncLabelGet

GSLC_CB_XKEYPAD_LABEL_GET gslc_tsXKeyPadCfg::pfuncLabelGet

Callback function to get a key label.

8.24.2.17 pfuncReset

GSLC_CB_XKEYPAD_RESET gslc_tsXKeyPadCfg::pfuncReset

Callback function whenever keypad needs to be reset.

8.24.2.18 pfuncStyleGet

GSLC_CB_XKEYPAD_SYTLE_GET gslc_tsXKeyPadCfg::pfuncStyleGet

Callback function to get a key's style.

8.24.2.19 pfuncTxtInit

GSLC_CB_XKEYPAD_TXT_INIT gslc_tsXKeyPadCfg::pfuncTxtInit

Callback function whenever text string initialized.

8.24.2.20 pLayout

gslc_tsKey∗ gslc_tsXKeyPadCfg::pLayout

Current selected layout.

8.24.2.21 pLayouts

gslc_tsKey∗∗ gslc_tsXKeyPadCfg::pLayouts

Key Positions for each KeyPad layout.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

Generated by Doxygen
8.25 gslc_tsXKeyPadCfg_Alpha Struct Reference 203

8.25 gslc_tsXKeyPadCfg_Alpha Struct Reference

#include <XKeyPad_Alpha.h>

Collaboration diagram for gslc_tsXKeyPadCfg_Alpha:

gslc_tsKey gslc_tsXKeyPadResult gslc_tsColor

pLayouts
pfuncBtnEvt pfuncStyleGet
pLayout

gslc_tsXKeyPadCfg

sBaseCfg

gslc_tsXKeyPadCfg_Alpha

Data Fields

• gslc_tsXKeyPadCfg sBaseCfg
KeyPad base config struct.

8.25.1 Field Documentation

8.25.1.1 sBaseCfg

gslc_tsXKeyPadCfg gslc_tsXKeyPadCfg_Alpha::sBaseCfg

KeyPad base config struct.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad_Alpha.h

Generated by Doxygen
204 Data Structure Documentation

8.26 gslc_tsXKeyPadCfg_Num Struct Reference

#include <XKeyPad_Num.h>

Collaboration diagram for gslc_tsXKeyPadCfg_Num:

gslc_tsKey gslc_tsXKeyPadResult gslc_tsColor

pLayouts
pfuncBtnEvt pfuncStyleGet
pLayout

gslc_tsXKeyPadCfg

sBaseCfg

gslc_tsXKeyPadCfg_Num

Data Fields

• gslc_tsXKeyPadCfg sBaseCfg
KeyPad base config struct.
• bool bFloatEn
Enable floating point (ie. decimal point)
• bool bSignEn
Enable negative numbers.
• bool bValPositive
Is the current value positive? (1=positive, 0=negative)
• bool bValDecimalPt
Does the current value include a decimal point?

8.26.1 Field Documentation

8.26.1.1 bFloatEn

bool gslc_tsXKeyPadCfg_Num::bFloatEn

Enable floating point (ie. decimal point)

Generated by Doxygen
8.27 gslc_tsXKeyPadData Struct Reference 205

8.26.1.2 bSignEn

bool gslc_tsXKeyPadCfg_Num::bSignEn

Enable negative numbers.

8.26.1.3 bValDecimalPt

bool gslc_tsXKeyPadCfg_Num::bValDecimalPt

Does the current value include a decimal point?

8.26.1.4 bValPositive

bool gslc_tsXKeyPadCfg_Num::bValPositive

Is the current value positive? (1=positive, 0=negative)

8.26.1.5 sBaseCfg

gslc_tsXKeyPadCfg gslc_tsXKeyPadCfg_Num::sBaseCfg

KeyPad base config struct.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad_Num.h

8.27 gslc_tsXKeyPadData Struct Reference

Input callback data structure.

#include <XKeyPad.h>

Collaboration diagram for gslc_tsXKeyPadData:

gslc_tsElemRef gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pTargetRef pElemRefParent pElem pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

gslc_tsXKeyPadData gslc_tsElem

Generated by Doxygen
206 Data Structure Documentation

Data Fields

• char ∗ pStr
Final value of edited value field.
• gslc_tsElemRef ∗ pTargetRef
Target element reference to receive the value.

8.27.1 Detailed Description

Input callback data structure.

• This struct is returned in GSLC_CB_INPUT when the KeyPad edits are complete, and is used to provide the
resulting edited value.

8.27.2 Field Documentation

8.27.2.1 pStr

char∗ gslc_tsXKeyPadData::pStr

Final value of edited value field.

8.27.2.2 pTargetRef

gslc_tsElemRef∗ gslc_tsXKeyPadData::pTargetRef

Target element reference to receive the value.

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

8.28 gslc_tsXKeyPadResult Struct Reference

Return status for XKeyPad.

#include <XKeyPad.h>

Generated by Doxygen
8.28 gslc_tsXKeyPadResult Struct Reference 207

Data Fields

• int16_t eRedrawState
XKeyPad pending redraw state.
• int16_t nRedrawKeyId1
XKeyPad specific key (#1) to redraw (-1 for none)
• int16_t nRedrawKeyId2
XKeyPad specific key (#2) to redraw (-1 for none)

8.28.1 Detailed Description

Return status for XKeyPad.

• Includes any pending redraw state

8.28.2 Field Documentation

8.28.2.1 eRedrawState

int16_t gslc_tsXKeyPadResult::eRedrawState

XKeyPad pending redraw state.

8.28.2.2 nRedrawKeyId1

int16_t gslc_tsXKeyPadResult::nRedrawKeyId1

XKeyPad specific key (#1) to redraw (-1 for none)

8.28.2.3 nRedrawKeyId2

int16_t gslc_tsXKeyPadResult::nRedrawKeyId2

XKeyPad specific key (#2) to redraw (-1 for none)

The documentation for this struct was generated from the following file:

• src/elem/XKeyPad.h

Generated by Doxygen
208 Data Structure Documentation

8.29 gslc_tsXListbox Struct Reference

Extended data for Listbox element.

#include <XListbox.h>

Collaboration diagram for gslc_tsXListbox:

gslc_tsColor

colGap

gslc_tsXListbox

Data Fields

• uint8_t ∗ pBufItems
Buffer containing items.
• uint16_t nBufItemsMax
Max size of buffer containing items.
• uint16_t nBufItemsPos
Current buffer position.
• int16_t nItemCnt
Number of items in the list.
• int8_t nCols
Number of columns.
• int8_t nRows
Number of columns (or XLSITBOX_SIZE_AUTO to calculate)
• bool bNeedRecalc
Determine if sizing may need recalc.
• int8_t nMarginW
Margin inside main listbox area (X offset)
• int8_t nMarginH
Margin inside main listbox area (Y offset)
• int16_t nItemW
Width of listbox item.
• int16_t nItemH
Height of listbox item.
• int8_t nItemGap
Gap between listbox items.
• gslc_tsColor colGap
Gap color.

Generated by Doxygen
8.29 gslc_tsXListbox Struct Reference 209

• bool bItemAutoSizeW
Enable auto-sizing of items (in width)
• bool bItemAutoSizeH
Enable auto-sizing of items (in height)
• int16_t nItemCurSel
Currently selected item (XLISTBOX_SEL_NONE for none)
• int16_t nItemCurSelLast
Old selected item to redraw (XLISTBOX_SEL_NONE for none)
• int16_t nItemSavedSel
Persistent selected item (ie. saved selection)
• int16_t nItemTop
Item to show at top of list after scrolling (0 is default)
• bool bGlowLast
Last glow state.
• bool bFocusLast
Last focus state // TODO: Merge with bGlowLast.
• GSLC_CB_XLISTBOX_SEL pfuncXSel
Callback func ptr for selection update.

8.29.1 Detailed Description

Extended data for Listbox element.

8.29.2 Field Documentation

8.29.2.1 bFocusLast

bool gslc_tsXListbox::bFocusLast

Last focus state // TODO: Merge with bGlowLast.

8.29.2.2 bGlowLast

bool gslc_tsXListbox::bGlowLast

Last glow state.

8.29.2.3 bItemAutoSizeH

bool gslc_tsXListbox::bItemAutoSizeH

Enable auto-sizing of items (in height)

Generated by Doxygen
210 Data Structure Documentation

8.29.2.4 bItemAutoSizeW

bool gslc_tsXListbox::bItemAutoSizeW

Enable auto-sizing of items (in width)

8.29.2.5 bNeedRecalc

bool gslc_tsXListbox::bNeedRecalc

Determine if sizing may need recalc.

8.29.2.6 colGap

gslc_tsColor gslc_tsXListbox::colGap

Gap color.

8.29.2.7 nBufItemsMax

uint16_t gslc_tsXListbox::nBufItemsMax

Max size of buffer containing items.

8.29.2.8 nBufItemsPos

uint16_t gslc_tsXListbox::nBufItemsPos

Current buffer position.

8.29.2.9 nCols

int8_t gslc_tsXListbox::nCols

Number of columns.

Generated by Doxygen
8.29 gslc_tsXListbox Struct Reference 211

8.29.2.10 nItemCnt

int16_t gslc_tsXListbox::nItemCnt

Number of items in the list.

8.29.2.11 nItemCurSel

int16_t gslc_tsXListbox::nItemCurSel

Currently selected item (XLISTBOX_SEL_NONE for none)

8.29.2.12 nItemCurSelLast

int16_t gslc_tsXListbox::nItemCurSelLast

Old selected item to redraw (XLISTBOX_SEL_NONE for none)

8.29.2.13 nItemGap

int8_t gslc_tsXListbox::nItemGap

Gap between listbox items.

8.29.2.14 nItemH

int16_t gslc_tsXListbox::nItemH

Height of listbox item.

8.29.2.15 nItemSavedSel

int16_t gslc_tsXListbox::nItemSavedSel

Persistent selected item (ie. saved selection)

Generated by Doxygen
212 Data Structure Documentation

8.29.2.16 nItemTop

int16_t gslc_tsXListbox::nItemTop

Item to show at top of list after scrolling (0 is default)

8.29.2.17 nItemW

int16_t gslc_tsXListbox::nItemW

Width of listbox item.

8.29.2.18 nMarginH

int8_t gslc_tsXListbox::nMarginH

Margin inside main listbox area (Y offset)

8.29.2.19 nMarginW

int8_t gslc_tsXListbox::nMarginW

Margin inside main listbox area (X offset)

8.29.2.20 nRows

int8_t gslc_tsXListbox::nRows

Number of columns (or XLSITBOX_SIZE_AUTO to calculate)

8.29.2.21 pBufItems

uint8_t∗ gslc_tsXListbox::pBufItems

Buffer containing items.

Generated by Doxygen
8.30 gslc_tsXProgress Struct Reference 213

8.29.2.22 pfuncXSel

GSLC_CB_XLISTBOX_SEL gslc_tsXListbox::pfuncXSel

Callback func ptr for selection update.

The documentation for this struct was generated from the following file:

• src/elem/XListbox.h

8.30 gslc_tsXProgress Struct Reference

Extended data for Gauge element.

#include <XProgress.h>

Collaboration diagram for gslc_tsXProgress:

gslc_tsColor

colGauge

gslc_tsXProgress

Data Fields

• int16_t nMin
Minimum control value.
• int16_t nMax
Maximum control value.
• int16_t nVal
Current control value.
• int16_t nValLast
Last value.
• bool bValLastValid
Last value valid?
• gslc_tsColor colGauge
Color of gauge fill bar.
• bool bVert
Vertical if true, else Horizontal.
• bool bFlip
Reverse direction of gauge.

Generated by Doxygen
214 Data Structure Documentation

8.30.1 Detailed Description

Extended data for Gauge element.

8.30.2 Field Documentation

8.30.2.1 bFlip

bool gslc_tsXProgress::bFlip

Reverse direction of gauge.

8.30.2.2 bValLastValid

bool gslc_tsXProgress::bValLastValid

Last value valid?

8.30.2.3 bVert

bool gslc_tsXProgress::bVert

Vertical if true, else Horizontal.

8.30.2.4 colGauge

gslc_tsColor gslc_tsXProgress::colGauge

Color of gauge fill bar.

8.30.2.5 nMax

int16_t gslc_tsXProgress::nMax

Maximum control value.

Generated by Doxygen
8.31 gslc_tsXRadial Struct Reference 215

8.30.2.6 nMin

int16_t gslc_tsXProgress::nMin

Minimum control value.

8.30.2.7 nVal

int16_t gslc_tsXProgress::nVal

Current control value.

8.30.2.8 nValLast

int16_t gslc_tsXProgress::nValLast

Last value.

The documentation for this struct was generated from the following file:

• src/elem/XProgress.h

8.31 gslc_tsXRadial Struct Reference

Extended data for Gauge element.

#include <XRadial.h>

Collaboration diagram for gslc_tsXRadial:

gslc_tsColor

colGauge
colTick

gslc_tsXRadial

Generated by Doxygen
216 Data Structure Documentation

Data Fields

• int16_t nMin
Minimum control value.
• int16_t nMax
Maximum control value.
• int16_t nVal
Current control value.
• int16_t nValLast
Last value.
• bool bValLastValid
Last value valid?
• gslc_tsColor colGauge
Color of gauge fill bar.
• gslc_tsColor colTick
Color of gauge tick marks.
• uint16_t nTickCnt
Number of gauge tick marks.
• uint16_t nTickLen
Length of gauge tick marks.
• bool bFlip
Reverse direction of gauge.
• uint16_t nIndicLen
Indicator length.
• uint16_t nIndicTip
Size of tip at end of indicator.
• bool bIndicFill
Fill the indicator if true.

8.31.1 Detailed Description

Extended data for Gauge element.

8.31.2 Field Documentation

8.31.2.1 bFlip

bool gslc_tsXRadial::bFlip

Reverse direction of gauge.

Generated by Doxygen
8.31 gslc_tsXRadial Struct Reference 217

8.31.2.2 bIndicFill

bool gslc_tsXRadial::bIndicFill

Fill the indicator if true.

8.31.2.3 bValLastValid

bool gslc_tsXRadial::bValLastValid

Last value valid?

8.31.2.4 colGauge

gslc_tsColor gslc_tsXRadial::colGauge

Color of gauge fill bar.

8.31.2.5 colTick

gslc_tsColor gslc_tsXRadial::colTick

Color of gauge tick marks.

8.31.2.6 nIndicLen

uint16_t gslc_tsXRadial::nIndicLen

Indicator length.

8.31.2.7 nIndicTip

uint16_t gslc_tsXRadial::nIndicTip

Size of tip at end of indicator.

Generated by Doxygen
218 Data Structure Documentation

8.31.2.8 nMax

int16_t gslc_tsXRadial::nMax

Maximum control value.

8.31.2.9 nMin

int16_t gslc_tsXRadial::nMin

Minimum control value.

8.31.2.10 nTickCnt

uint16_t gslc_tsXRadial::nTickCnt

Number of gauge tick marks.

8.31.2.11 nTickLen

uint16_t gslc_tsXRadial::nTickLen

Length of gauge tick marks.

8.31.2.12 nVal

int16_t gslc_tsXRadial::nVal

Current control value.

8.31.2.13 nValLast

int16_t gslc_tsXRadial::nValLast

Last value.

The documentation for this struct was generated from the following file:

• src/elem/XRadial.h

Generated by Doxygen
8.32 gslc_tsXRamp Struct Reference 219

8.32 gslc_tsXRamp Struct Reference

Extended data for Gauge element.

#include <XRamp.h>

Data Fields

• int16_t nMin
Minimum control value.
• int16_t nMax
Maximum control value.
• int16_t nVal
Current control value.
• int16_t nValLast
Last value.
• bool bValLastValid
Last value valid?

8.32.1 Detailed Description

Extended data for Gauge element.

8.32.2 Field Documentation

8.32.2.1 bValLastValid

bool gslc_tsXRamp::bValLastValid

Last value valid?

8.32.2.2 nMax

int16_t gslc_tsXRamp::nMax

Maximum control value.

Generated by Doxygen
220 Data Structure Documentation

8.32.2.3 nMin

int16_t gslc_tsXRamp::nMin

Minimum control value.

8.32.2.4 nVal

int16_t gslc_tsXRamp::nVal

Current control value.

8.32.2.5 nValLast

int16_t gslc_tsXRamp::nValLast

Last value.

The documentation for this struct was generated from the following file:

• src/elem/XRamp.h

8.33 gslc_tsXRingGauge Struct Reference

Extended data for XRingGauge element.

#include <XRingGauge.h>

Collaboration diagram for gslc_tsXRingGauge:

gslc_tsColor

colRing1
colRingRemain
colRing2

gslc_tsXRingGauge

Generated by Doxygen
8.33 gslc_tsXRingGauge Struct Reference 221

Data Fields

• int16_t nValMin
• int16_t nValMax
• int16_t nAngStart
• int16_t nAngRange
• int16_t nQuality
• int8_t nThickness
• bool bGradient
• uint8_t nSegGap
• gslc_tsColor colRing1
• gslc_tsColor colRing2
• gslc_tsColor colRingRemain
• int16_t nVal
Current position value.
• int16_t nValLast
Previous position value.
• char acStrLast [XRING_STR_MAX]

8.33.1 Detailed Description

Extended data for XRingGauge element.

8.33.2 Field Documentation

8.33.2.1 acStrLast

char gslc_tsXRingGauge::acStrLast[XRING_STR_MAX]

8.33.2.2 bGradient

bool gslc_tsXRingGauge::bGradient

8.33.2.3 colRing1

gslc_tsColor gslc_tsXRingGauge::colRing1

Generated by Doxygen
222 Data Structure Documentation

8.33.2.4 colRing2

gslc_tsColor gslc_tsXRingGauge::colRing2

8.33.2.5 colRingRemain

gslc_tsColor gslc_tsXRingGauge::colRingRemain

8.33.2.6 nAngRange

int16_t gslc_tsXRingGauge::nAngRange

8.33.2.7 nAngStart

int16_t gslc_tsXRingGauge::nAngStart

8.33.2.8 nQuality

int16_t gslc_tsXRingGauge::nQuality

8.33.2.9 nSegGap

uint8_t gslc_tsXRingGauge::nSegGap

8.33.2.10 nThickness

int8_t gslc_tsXRingGauge::nThickness

Generated by Doxygen
8.34 gslc_tsXSeekbar Struct Reference 223

8.33.2.11 nVal

int16_t gslc_tsXRingGauge::nVal

Current position value.

8.33.2.12 nValLast

int16_t gslc_tsXRingGauge::nValLast

Previous position value.

8.33.2.13 nValMax

int16_t gslc_tsXRingGauge::nValMax

8.33.2.14 nValMin

int16_t gslc_tsXRingGauge::nValMin

The documentation for this struct was generated from the following file:

• src/elem/XRingGauge.h

8.34 gslc_tsXSeekbar Struct Reference

Extended data for Seekbar element.

#include <XSeekbar.h>
Collaboration diagram for gslc_tsXSeekbar:

gslc_tsColor

colRemain
colTrim
colTick
colThumb
colFrame
colProgress

gslc_tsXSeekbar

Generated by Doxygen
224 Data Structure Documentation

Data Fields

• bool bVert
Orientation: true if vertical, else horizontal.
• uint8_t nProgressW
Width of progress track.
• uint8_t nRemainW
Width of remaining track.
• uint8_t nThumbSz
Size of the thumb control.
• int16_t nPosMin
Minimum position value of the slider.
• int16_t nPosMax
Maximum position value of the slider.
• gslc_tsColor colProgress
Style: color of progress fill bar.
• gslc_tsColor colRemain
Style: color remaining fill bar.
• gslc_tsColor colThumb
Style: color of thumb.
• uint16_t nTickDiv
Style: number of tickmark divisions (0 for none)
• int16_t nTickLen
Style: length of tickmarks.
• gslc_tsColor colTick
Style: color of ticks.
• bool bTrimThumb
Style: show a trim color for thumb.
• gslc_tsColor colTrim
Style: color of trim.
• bool bFrameThumb
Style: draw frame around thumb.
• gslc_tsColor colFrame
Style: color of trim.
• int16_t nPos
Current position value of the slider.
• GSLC_CB_XSEEKBAR_POS pfuncXPos
Callback func ptr for position update.

8.34.1 Detailed Description

Extended data for Seekbar element.

8.34.2 Field Documentation

Generated by Doxygen
8.34 gslc_tsXSeekbar Struct Reference 225

8.34.2.1 bFrameThumb

bool gslc_tsXSeekbar::bFrameThumb

Style: draw frame around thumb.

8.34.2.2 bTrimThumb

bool gslc_tsXSeekbar::bTrimThumb

Style: show a trim color for thumb.

8.34.2.3 bVert

bool gslc_tsXSeekbar::bVert

Orientation: true if vertical, else horizontal.

8.34.2.4 colFrame

gslc_tsColor gslc_tsXSeekbar::colFrame

Style: color of trim.

8.34.2.5 colProgress

gslc_tsColor gslc_tsXSeekbar::colProgress

Style: color of progress fill bar.

8.34.2.6 colRemain

gslc_tsColor gslc_tsXSeekbar::colRemain

Style: color remaining fill bar.

Generated by Doxygen
226 Data Structure Documentation

8.34.2.7 colThumb

gslc_tsColor gslc_tsXSeekbar::colThumb

Style: color of thumb.

8.34.2.8 colTick

gslc_tsColor gslc_tsXSeekbar::colTick

Style: color of ticks.

8.34.2.9 colTrim

gslc_tsColor gslc_tsXSeekbar::colTrim

Style: color of trim.

8.34.2.10 nPos

int16_t gslc_tsXSeekbar::nPos

Current position value of the slider.

8.34.2.11 nPosMax

int16_t gslc_tsXSeekbar::nPosMax

Maximum position value of the slider.

8.34.2.12 nPosMin

int16_t gslc_tsXSeekbar::nPosMin

Minimum position value of the slider.

Generated by Doxygen
8.34 gslc_tsXSeekbar Struct Reference 227

8.34.2.13 nProgressW

uint8_t gslc_tsXSeekbar::nProgressW

Width of progress track.

8.34.2.14 nRemainW

uint8_t gslc_tsXSeekbar::nRemainW

Width of remaining track.

8.34.2.15 nThumbSz

uint8_t gslc_tsXSeekbar::nThumbSz

Size of the thumb control.

8.34.2.16 nTickDiv

uint16_t gslc_tsXSeekbar::nTickDiv

Style: number of tickmark divisions (0 for none)

8.34.2.17 nTickLen

int16_t gslc_tsXSeekbar::nTickLen

Style: length of tickmarks.

8.34.2.18 pfuncXPos

GSLC_CB_XSEEKBAR_POS gslc_tsXSeekbar::pfuncXPos

Callback func ptr for position update.

The documentation for this struct was generated from the following file:

• src/elem/XSeekbar.h

Generated by Doxygen
228 Data Structure Documentation

8.35 gslc_tsXSelNum Struct Reference

Extended data for SelNum element.

#include <XSelNum.h>

Collaboration diagram for gslc_tsXSelNum:

gslc_tsElemRef gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pElem pElemRefParent pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

pElemRefTracked
gslc_tsElem
asElemRef

asElemRef asElem

gslc_tsCollect asElem

sCollect

gslc_tsXSelNum

Data Fields
• int16_t nCounter
Counter for demo purposes.
• gslc_tsCollect sCollect
Collection management for sub-elements.
• gslc_tsElemRef asElemRef [4]
Storage for sub-element references.
• gslc_tsElem asElem [4]
Storage for sub-elements.
• char acElemTxt [4][SELNUM_STR_LEN]
Storage for strings.

8.35.1 Detailed Description

Extended data for SelNum element.

8.35.2 Field Documentation

8.35.2.1 acElemTxt

char gslc_tsXSelNum::acElemTxt[4][SELNUM_STR_LEN]

Storage for strings.

Generated by Doxygen
8.36 gslc_tsXSlider Struct Reference 229

8.35.2.2 asElem

gslc_tsElem gslc_tsXSelNum::asElem[4]

Storage for sub-elements.

8.35.2.3 asElemRef

gslc_tsElemRef gslc_tsXSelNum::asElemRef[4]

Storage for sub-element references.

8.35.2.4 nCounter

int16_t gslc_tsXSelNum::nCounter

Counter for demo purposes.

8.35.2.5 sCollect

gslc_tsCollect gslc_tsXSelNum::sCollect

Collection management for sub-elements.

The documentation for this struct was generated from the following file:

• src/elem/XSelNum.h

8.36 gslc_tsXSlider Struct Reference

Extended data for Slider element.

#include <XSlider.h>
Collaboration diagram for gslc_tsXSlider:

gslc_tsColor

colTrim
colTick

gslc_tsXSlider

Generated by Doxygen
230 Data Structure Documentation

Data Fields

• bool bVert
Orientation: true if vertical, else horizontal.
• bool bSnapEn
Enable for touch snap behavior.
• int16_t nThumbSz
Size of the thumb control.
• int16_t nPosMin
Minimum position value of the slider.
• int16_t nPosMax
Maximum position value of the slider.
• uint16_t nTickDiv
Style: number of tickmark divisions (0 for none)
• int16_t nTickLen
Style: length of tickmarks.
• gslc_tsColor colTick
Style: color of ticks.
• bool bTrim
Style: show a trim color.
• gslc_tsColor colTrim
Style: color of trim.
• int16_t nPos
Current position value of the slider.
• GSLC_CB_XSLIDER_POS pfuncXPos
Callback func ptr for position update.

8.36.1 Detailed Description

Extended data for Slider element.

8.36.2 Field Documentation

8.36.2.1 bSnapEn

bool gslc_tsXSlider::bSnapEn

Enable for touch snap behavior.

8.36.2.2 bTrim

bool gslc_tsXSlider::bTrim

Style: show a trim color.

Generated by Doxygen
8.36 gslc_tsXSlider Struct Reference 231

8.36.2.3 bVert

bool gslc_tsXSlider::bVert

Orientation: true if vertical, else horizontal.

8.36.2.4 colTick

gslc_tsColor gslc_tsXSlider::colTick

Style: color of ticks.

8.36.2.5 colTrim

gslc_tsColor gslc_tsXSlider::colTrim

Style: color of trim.

8.36.2.6 nPos

int16_t gslc_tsXSlider::nPos

Current position value of the slider.

8.36.2.7 nPosMax

int16_t gslc_tsXSlider::nPosMax

Maximum position value of the slider.

8.36.2.8 nPosMin

int16_t gslc_tsXSlider::nPosMin

Minimum position value of the slider.

Generated by Doxygen
232 Data Structure Documentation

8.36.2.9 nThumbSz

int16_t gslc_tsXSlider::nThumbSz

Size of the thumb control.

8.36.2.10 nTickDiv

uint16_t gslc_tsXSlider::nTickDiv

Style: number of tickmark divisions (0 for none)

8.36.2.11 nTickLen

int16_t gslc_tsXSlider::nTickLen

Style: length of tickmarks.

8.36.2.12 pfuncXPos

GSLC_CB_XSLIDER_POS gslc_tsXSlider::pfuncXPos

Callback func ptr for position update.

The documentation for this struct was generated from the following file:

• src/elem/XSlider.h

8.37 gslc_tsXSpinner Struct Reference

Extended data for Spinner element.

#include <XSpinner.h>
Collaboration diagram for gslc_tsXSpinner:

gslc_tsElemRef gslc_tsEvent gslc_tsRect gslc_tsFont gslc_tsImgRef gslc_tsColor

colElemFill
colElemFillGlow
sImgRefGlow colElemFrame
pElem pElemRefParent pfuncXEvent rElem pTxtFont
sImgRefNorm colElemTextGlow
colElemText
colElemFrameGlow

pElemRefTracked
gslc_tsElem
asElemRef

pElemRef
asElem
asElemRef

gslc_tsCollect asElem

sCollect

gslc_tsXSpinner

Generated by Doxygen
8.37 gslc_tsXSpinner Struct Reference 233

Data Fields

• int16_t nMin
Minimum control value.
• int16_t nMax
Maximum control value.
• int16_t nIncr
Increment by value.
• int16_t nCounter
Current value.
• GSLC_CB_INPUT pfuncXInput
Callback func ptr for input ready.
• gslc_tsElemRef ∗ pElemRef
Save our ElemRef for the callback.
• gslc_tsCollect sCollect
Collection management for sub-elements.
• gslc_tsElemRef asElemRef [XSPINNER_COMP_CNT]
Storage for sub-element references.
• gslc_tsElem asElem [XSPINNER_COMP_CNT]
Storage for sub-elements.
• char acElemTxt [1][XSPINNER_STR_LEN]
Storage for strings.
• char acIncr [2]
Increment character string.
• char acDecr [2]
Decrement character string.

8.37.1 Detailed Description

Extended data for Spinner element.

8.37.2 Field Documentation

8.37.2.1 acDecr

char gslc_tsXSpinner::acDecr[2]

Decrement character string.

8.37.2.2 acElemTxt

char gslc_tsXSpinner::acElemTxt[1][XSPINNER_STR_LEN]

Storage for strings.

Generated by Doxygen
234 Data Structure Documentation

8.37.2.3 acIncr

char gslc_tsXSpinner::acIncr[2]

Increment character string.

8.37.2.4 asElem

gslc_tsElem gslc_tsXSpinner::asElem[XSPINNER_COMP_CNT]

Storage for sub-elements.

8.37.2.5 asElemRef

gslc_tsElemRef gslc_tsXSpinner::asElemRef[XSPINNER_COMP_CNT]

Storage for sub-element references.

8.37.2.6 nCounter

int16_t gslc_tsXSpinner::nCounter

Current value.

8.37.2.7 nIncr

int16_t gslc_tsXSpinner::nIncr

Increment by value.

8.37.2.8 nMax

int16_t gslc_tsXSpinner::nMax

Maximum control value.

Generated by Doxygen
8.38 gslc_tsXTemplate Struct Reference 235

8.37.2.9 nMin

int16_t gslc_tsXSpinner::nMin

Minimum control value.

8.37.2.10 pElemRef

gslc_tsElemRef∗ gslc_tsXSpinner::pElemRef

Save our ElemRef for the callback.

8.37.2.11 pfuncXInput

GSLC_CB_INPUT gslc_tsXSpinner::pfuncXInput

Callback func ptr for input ready.

8.37.2.12 sCollect

gslc_tsCollect gslc_tsXSpinner::sCollect

Collection management for sub-elements.

The documentation for this struct was generated from the following file:

• src/elem/XSpinner.h

8.38 gslc_tsXTemplate Struct Reference

Callback function for slider feedback.

#include <XTemplate.h>

8.38.1 Detailed Description

Callback function for slider feedback.

Extended data for Slider element

The documentation for this struct was generated from the following file:

• src/elem/XTemplate.h

Generated by Doxygen
236 Data Structure Documentation

8.39 gslc_tsXTextbox Struct Reference

Extended data for Textbox element.

#include <XTextbox.h>

Data Fields

• char ∗ pBuf
Ptr to the text buffer (circular buffer))
• int8_t nMarginX
Margin for text area within element rect (X)
• int8_t nMarginY
Margin for text area within element rect (Y)
• bool bWrapEn
Enable for line wrapping.
• uint16_t nBufRows
Number of rows in buffer.
• uint16_t nBufCols
Number of columns in buffer.
• bool bScrollEn
Enable for scrollbar.
• uint16_t nScrollPos
Current scrollbar position.
• uint8_t nChSizeX
Width of characters (pixels)
• uint8_t nChSizeY
Height of characters (pixels)
• uint8_t nWndCols
Window X size.
• uint8_t nWndRows
Window Y size.
• uint8_t nCurPosX
Cursor X position.
• uint8_t nCurPosY
Cursor Y position.
• uint8_t nBufPosX
Buffer X position.
• uint8_t nBufPosY
Buffer Y position.
• uint8_t nWndRowStart
First row of current window.
• int16_t nRedrawRow
Specific row to update in redraw (if not -1)

8.39.1 Detailed Description

Extended data for Textbox element.

Generated by Doxygen
8.39 gslc_tsXTextbox Struct Reference 237

8.39.2 Field Documentation

8.39.2.1 bScrollEn

bool gslc_tsXTextbox::bScrollEn

Enable for scrollbar.

8.39.2.2 bWrapEn

bool gslc_tsXTextbox::bWrapEn

Enable for line wrapping.

8.39.2.3 nBufCols

uint16_t gslc_tsXTextbox::nBufCols

Number of columns in buffer.

8.39.2.4 nBufPosX

uint8_t gslc_tsXTextbox::nBufPosX

Buffer X position.

8.39.2.5 nBufPosY

uint8_t gslc_tsXTextbox::nBufPosY

Buffer Y position.

Generated by Doxygen
238 Data Structure Documentation

8.39.2.6 nBufRows

uint16_t gslc_tsXTextbox::nBufRows

Number of rows in buffer.

8.39.2.7 nChSizeX

uint8_t gslc_tsXTextbox::nChSizeX

Width of characters (pixels)

8.39.2.8 nChSizeY

uint8_t gslc_tsXTextbox::nChSizeY

Height of characters (pixels)

8.39.2.9 nCurPosX

uint8_t gslc_tsXTextbox::nCurPosX

Cursor X position.

8.39.2.10 nCurPosY

uint8_t gslc_tsXTextbox::nCurPosY

Cursor Y position.

8.39.2.11 nMarginX

int8_t gslc_tsXTextbox::nMarginX

Margin for text area within element rect (X)

Generated by Doxygen
8.39 gslc_tsXTextbox Struct Reference 239

8.39.2.12 nMarginY

int8_t gslc_tsXTextbox::nMarginY

Margin for text area within element rect (Y)

8.39.2.13 nRedrawRow

int16_t gslc_tsXTextbox::nRedrawRow

Specific row to update in redraw (if not -1)

8.39.2.14 nScrollPos

uint16_t gslc_tsXTextbox::nScrollPos

Current scrollbar position.

8.39.2.15 nWndCols

uint8_t gslc_tsXTextbox::nWndCols

Window X size.

8.39.2.16 nWndRows

uint8_t gslc_tsXTextbox::nWndRows

Window Y size.

8.39.2.17 nWndRowStart

uint8_t gslc_tsXTextbox::nWndRowStart

First row of current window.

Generated by Doxygen
240 Data Structure Documentation

8.39.2.18 pBuf

char∗ gslc_tsXTextbox::pBuf

Ptr to the text buffer (circular buffer))

The documentation for this struct was generated from the following file:

• src/elem/XTextbox.h

8.40 gslc_tsXTogglebtn Struct Reference

Extended data for Togglebtn element.

#include <XTogglebtn.h>

Collaboration diagram for gslc_tsXTogglebtn:

gslc_tsColor

colOffState
colOnState
colThumb

gslc_tsXTogglebtn

Data Fields

• bool bOn
Indicates if button is ON or OFF.
• int16_t nMyPageId
We need to track our page in case of grouping elements on a non current layer, like base layer.
• gslc_tsColor colThumb
Color of thumb.
• gslc_tsColor colOnState
Color of button in ON state.
• gslc_tsColor colOffState
Color of button in OFF state.
• bool bCircular
Style of the toggle button circular or rectangular.
• GSLC_CB_TOUCH pfunctUser
User's Callback event to say element has changed.

Generated by Doxygen
8.40 gslc_tsXTogglebtn Struct Reference 241

8.40.1 Detailed Description

Extended data for Togglebtn element.

8.40.2 Field Documentation

8.40.2.1 bCircular

bool gslc_tsXTogglebtn::bCircular

Style of the toggle button circular or rectangular.

8.40.2.2 bOn

bool gslc_tsXTogglebtn::bOn

Indicates if button is ON or OFF.

8.40.2.3 colOffState

gslc_tsColor gslc_tsXTogglebtn::colOffState

Color of button in OFF state.

8.40.2.4 colOnState

gslc_tsColor gslc_tsXTogglebtn::colOnState

Color of button in ON state.

8.40.2.5 colThumb

gslc_tsColor gslc_tsXTogglebtn::colThumb

Color of thumb.

Generated by Doxygen
242 Data Structure Documentation

8.40.2.6 nMyPageId

int16_t gslc_tsXTogglebtn::nMyPageId

We need to track our page in case of grouping elements on a non current layer, like base layer.

8.40.2.7 pfunctUser

GSLC_CB_TOUCH gslc_tsXTogglebtn::pfunctUser

User's Callback event to say element has changed.

The documentation for this struct was generated from the following file:

• src/elem/XTogglebtn.h

8.41 gslc_tsXToggleImgbtn Struct Reference

Extended data for ToggleImgbtn element.

#include <XToggleImgbtn.h>

Data Fields

• bool bOn
Indicates if button is ON or OFF.
• int16_t nMyPageId
We need to track our page in case of grouping elements on a non current layer, like base layer.
• GSLC_CB_TOUCH pfunctUser
User's Callback event to say element has changed.

8.41.1 Detailed Description

Extended data for ToggleImgbtn element.

8.41.2 Field Documentation

8.41.2.1 bOn

bool gslc_tsXToggleImgbtn::bOn

Indicates if button is ON or OFF.

Generated by Doxygen
8.42 THPoint Class Reference 243

8.41.2.2 nMyPageId

int16_t gslc_tsXToggleImgbtn::nMyPageId

We need to track our page in case of grouping elements on a non current layer, like base layer.

8.41.2.3 pfunctUser

GSLC_CB_TOUCH gslc_tsXToggleImgbtn::pfunctUser

User's Callback event to say element has changed.

The documentation for this struct was generated from the following file:

• src/elem/XToggleImgbtn.h

8.42 THPoint Class Reference

#include <GUIslice_th.h>

Public Member Functions

• THPoint (void)
• THPoint (uint16_t x, uint16_t y, uint16_t z)
• bool operator== (THPoint)
• bool operator!= (THPoint)

Data Fields

• uint16_t x
• uint16_t y
• uint16_t z

8.42.1 Constructor & Destructor Documentation

8.42.1.1 THPoint() [1/2]

THPoint::THPoint (
void )

Generated by Doxygen
244 Data Structure Documentation

8.42.1.2 THPoint() [2/2]

THPoint::THPoint (
uint16_t x,
uint16_t y,
uint16_t z )

8.42.2 Member Function Documentation

8.42.2.1 operator"!=()

bool THPoint::operator!= (
THPoint p1 )

8.42.2.2 operator==()

bool THPoint::operator== (
THPoint p1 )

8.42.3 Field Documentation

8.42.3.1 x

uint16_t THPoint::x

8.42.3.2 y

uint16_t THPoint::y

8.42.3.3 z

uint16_t THPoint::z

The documentation for this class was generated from the following files:

• src/GUIslice_th.h
• src/GUIslice_th.cpp

Generated by Doxygen
8.43 TouchHandler Class Reference 245

8.43 TouchHandler Class Reference

#include <GUIslice_th.h>

Inheritance diagram for TouchHandler:

TouchHandler

TouchHandler_XPT2046

Public Member Functions

• TouchHandler ()
• void setSize (uint16_t _disp_xSize, uint16_t _disp_ySize)
• void setCalibration (uint16_t ts_xMin, uint16_t ts_xMax, uint16_t ts_yMin, uint16_t ts_yMax)
• void setSwapFlip (bool _swapXY, bool _flipX, bool _flipY)
• THPoint scale (THPoint pIn)
• virtual void begin (void)
• virtual THPoint getPoint (void)

8.43.1 Constructor & Destructor Documentation

8.43.1.1 TouchHandler()

TouchHandler::TouchHandler ( ) [inline]

8.43.2 Member Function Documentation

8.43.2.1 begin()

void TouchHandler::begin (
void ) [virtual]

Reimplemented in TouchHandler_XPT2046.

Generated by Doxygen
246 Data Structure Documentation

8.43.2.2 getPoint()

THPoint TouchHandler::getPoint (
void ) [virtual]

Reimplemented in TouchHandler_XPT2046.

8.43.2.3 scale()

THPoint TouchHandler::scale (
THPoint pIn )

8.43.2.4 setCalibration()

void TouchHandler::setCalibration (
uint16_t ts_xMin,
uint16_t ts_xMax,
uint16_t ts_yMin,
uint16_t ts_yMax )

8.43.2.5 setSize()

void TouchHandler::setSize (
uint16_t _disp_xSize,
uint16_t _disp_ySize )

8.43.2.6 setSwapFlip()

void TouchHandler::setSwapFlip (
bool _swapXY,
bool _flipX,
bool _flipY )

The documentation for this class was generated from the following files:

• src/GUIslice_th.h
• src/GUIslice_th.cpp

Generated by Doxygen
8.44 TouchHandler_XPT2046 Class Reference 247

8.44 TouchHandler_XPT2046 Class Reference

#include <GUIslice_th_XPT2046.h>

Inheritance diagram for TouchHandler_XPT2046:

TouchHandler

TouchHandler_XPT2046

Collaboration diagram for TouchHandler_XPT2046:

TouchHandler

TouchHandler_XPT2046

Public Member Functions

• TouchHandler_XPT2046 (SPIClass &spi, uint8_t spi_cs_pin)


• void begin (void)
• THPoint getPoint (void)

Data Fields

• SPIClass spi
• XPT2046_touch touchDriver

8.44.1 Constructor & Destructor Documentation

Generated by Doxygen
248 Data Structure Documentation

8.44.1.1 TouchHandler_XPT2046()

TouchHandler_XPT2046::TouchHandler_XPT2046 (
SPIClass & spi,
uint8_t spi_cs_pin ) [inline]

8.44.2 Member Function Documentation

8.44.2.1 begin()

void TouchHandler_XPT2046::begin (
void ) [inline], [virtual]

Reimplemented from TouchHandler.

8.44.2.2 getPoint()

THPoint TouchHandler_XPT2046::getPoint (
void ) [inline], [virtual]

Reimplemented from TouchHandler.

8.44.3 Field Documentation

8.44.3.1 spi

SPIClass TouchHandler_XPT2046::spi

8.44.3.2 touchDriver

XPT2046_touch TouchHandler_XPT2046::touchDriver

The documentation for this class was generated from the following file:

• src/GUIslice_th_XPT2046.h

Generated by Doxygen
Chapter 9

File Documentation

9.1 README.md File Reference

9.2 src/elem/XCheckbox.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XCheckbox.h"
#include <stdio.h>
Include dependency graph for XCheckbox.c:

src/elem/XCheckbox.c

GUIslice_drv.h elem/XCheckbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXCheckboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_←-


tsXCheckbox ∗pXData, gslc_tsRect rElem, bool bRadio, gslc_teXCheckboxStyle nStyle, gslc_tsColor col←-
Check, bool bChecked)
Create a Checkbox or Radio button Element.
• bool gslc_ElemXCheckboxGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Checkbox element's current state.
• gslc_tsElemRef ∗ gslc_ElemXCheckboxFindChecked (gslc_tsGui ∗pGui, int16_t nGroupId)
250 File Documentation

Find the checkbox within a group that has been checked.


• void gslc_ElemXCheckboxSetStateFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XCH←-
ECKBOX pfuncCb)
Assign the state callback function for a checkbox/radio button.
• void gslc_ElemXCheckboxSetStateHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bChecked, bool
bDoCb)
• void gslc_ElemXCheckboxSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bChecked)
Set a Checkbox element's current state.
• void gslc_ElemXCheckboxToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a Checkbox element's current state.
• bool gslc_ElemXCheckboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Checkbox element on the screen.
• bool gslc_ElemXCheckboxTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to Checkbox element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.2.1 Function Documentation

9.2.1.1 gslc_ElemXCheckboxCreate()

gslc_tsElemRef∗ gslc_ElemXCheckboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXCheckbox ∗ pXData,
gslc_tsRect rElem,
bool bRadio,
gslc_teXCheckboxStyle nStyle,
gslc_tsColor colCheck,
bool bChecked )

Create a Checkbox or Radio 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 checkbox size
in bRadio Radio-button functionality if true
in nStyle Drawing style for checkbox / radio button
in colCheck Color for inner fill when checked
in bChecked Default state
Generated by Doxygen
9.2 src/elem/XCheckbox.c File Reference 251

Returns

Pointer to Element reference or NULL if failure

9.2.1.2 gslc_ElemXCheckboxDraw()

bool gslc_ElemXCheckboxDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Checkbox element on the screen.

• Called from gslc_ElemDraw()

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

9.2.1.3 gslc_ElemXCheckboxFindChecked()

gslc_tsElemRef∗ gslc_ElemXCheckboxFindChecked (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Find the checkbox within a group that has been checked.

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none checked

Generated by Doxygen
252 File Documentation

9.2.1.4 gslc_ElemXCheckboxGetState()

bool gslc_ElemXCheckboxGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Checkbox element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

9.2.1.5 gslc_ElemXCheckboxSetState()

void gslc_ElemXCheckboxSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bChecked )

Set a Checkbox element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bChecked New state

Returns

none

9.2.1.6 gslc_ElemXCheckboxSetStateFunc()

void gslc_ElemXCheckboxSetStateFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XCHECKBOX pfuncCb )

Assign the state callback function for a checkbox/radio button.

Generated by Doxygen
9.2 src/elem/XCheckbox.c File Reference 253

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in pfuncCb Function pointer to callback routine (or NULL for none)

Returns

none

9.2.1.7 gslc_ElemXCheckboxSetStateHelp()

void gslc_ElemXCheckboxSetStateHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bChecked,
bool bDoCb )

9.2.1.8 gslc_ElemXCheckboxToggleState()

void gslc_ElemXCheckboxToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a Checkbox element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.2.1.9 gslc_ElemXCheckboxTouch()

bool gslc_ElemXCheckboxTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Checkbox element.

Generated by Doxygen
254 File Documentation

• Called from gslc_ElemSendEventTouch()

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

9.2.2 Variable Documentation

9.2.2.1 ERRSTR_NULL

const char ERRSTR_NULL

9.2.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.3 src/elem/XCheckbox.h File Reference

#include "GUIslice.h"
Include dependency graph for XCheckbox.h:

src/elem/XCheckbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.3 src/elem/XCheckbox.h File Reference 255

This graph shows which files directly or indirectly include this file:

src/elem/XCheckbox.h

src/elem/XCheckbox.c src/GUIslice_ex.h

Data Structures

• struct gslc_tsXCheckbox
Extended data for Checkbox element.

Macros

• #define GSLC_TYPEX_CHECKBOX
• #define gslc_ElemXCheckboxCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, colFill, bFillEn, nGroup, b←-
Radio_, nStyle_, colCheck_, bChecked_)
Create a Checkbox or Radio button Element in Flash.

Typedefs

• typedef bool(∗ GSLC_CB_XCHECKBOX) (void ∗pvGui, void ∗pvElemRef, int16_t nSelId, bool bChecked)
Callback function for checkbox/radio element state change.

Enumerations

• enum gslc_teXCheckboxStyle { GSLCX_CHECKBOX_STYLE_BOX, GSLCX_CHECKBOX_STYLE_X, G←-


SLCX_CHECKBOX_STYLE_ROUND }
Checkbox drawing style.

Functions

• gslc_tsElemRef ∗ gslc_ElemXCheckboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_←-


tsXCheckbox ∗pXData, gslc_tsRect rElem, bool bRadio, gslc_teXCheckboxStyle nStyle, gslc_tsColor col←-
Check, bool bChecked)
Create a Checkbox or Radio button Element.
• bool gslc_ElemXCheckboxGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Checkbox element's current state.
• void gslc_ElemXCheckboxSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bChecked)
Set a Checkbox element's current state.

Generated by Doxygen
256 File Documentation

• gslc_tsElemRef ∗ gslc_ElemXCheckboxFindChecked (gslc_tsGui ∗pGui, int16_t nGroupId)


Find the checkbox within a group that has been checked.
• void gslc_ElemXCheckboxToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a Checkbox element's current state.
• void gslc_ElemXCheckboxSetStateFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XCH←-
ECKBOX pfuncCb)
Assign the state callback function for a checkbox/radio button.
• bool gslc_ElemXCheckboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Checkbox element on the screen.
• bool gslc_ElemXCheckboxTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to Checkbox element.

9.3.1 Macro Definition Documentation

9.3.1.1 gslc_ElemXCheckboxCreate_P

#define gslc_ElemXCheckboxCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
colFill,
bFillEn,
nGroup,
bRadio_,
nStyle_,
colCheck_,
bChecked_ )

Create a Checkbox or Radio button Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 colFill Color for the control background fill
in bFillEn True if background filled, false otherwise (recommend True)
in nGroup Group ID that radio buttons belong to (else GSLC_GROUP_NONE)
in bRadio_ Radio-button functionality if true
in nStyle_ Drawing style for checkbox / radio button

Generated by Doxygen
9.3 src/elem/XCheckbox.h File Reference 257

Parameters

in col←- Color for inner fill when checked


Check_
in b←- Default state
Checked←-
_

Returns

none

9.3.1.2 GSLC_TYPEX_CHECKBOX

#define GSLC_TYPEX_CHECKBOX

9.3.2 Typedef Documentation

9.3.2.1 GSLC_CB_XCHECKBOX

typedef bool(∗ GSLC_CB_XCHECKBOX) (void ∗pvGui, void ∗pvElemRef, int16_t nSelId, bool bChecked)

Callback function for checkbox/radio element state change.

• nSelId: Selected element's ID or GSLC_ID_NONE

• bChecked: Element was selected if true, false otherwise

9.3.3 Enumeration Type Documentation

9.3.3.1 gslc_teXCheckboxStyle

enum gslc_teXCheckboxStyle

Checkbox drawing style.

Enumerator

GSLCX_CHECKBOX_STYLE_BOX Inner box.


GSLCX_CHECKBOX_STYLE_X Crossed.
GSLCX_CHECKBOX_STYLE_ROUND Circular.
Generated by Doxygen
258 File Documentation

9.3.4 Function Documentation

9.3.4.1 gslc_ElemXCheckboxCreate()

gslc_tsElemRef∗ gslc_ElemXCheckboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXCheckbox ∗ pXData,
gslc_tsRect rElem,
bool bRadio,
gslc_teXCheckboxStyle nStyle,
gslc_tsColor colCheck,
bool bChecked )

Create a Checkbox or Radio 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 checkbox size
in bRadio Radio-button functionality if true
in nStyle Drawing style for checkbox / radio button
in colCheck Color for inner fill when checked
in bChecked Default state

Returns

Pointer to Element reference or NULL if failure

9.3.4.2 gslc_ElemXCheckboxDraw()

bool gslc_ElemXCheckboxDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Checkbox element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
9.3 src/elem/XCheckbox.h File Reference 259

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

9.3.4.3 gslc_ElemXCheckboxFindChecked()

gslc_tsElemRef∗ gslc_ElemXCheckboxFindChecked (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Find the checkbox within a group that has been checked.

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none checked

9.3.4.4 gslc_ElemXCheckboxGetState()

bool gslc_ElemXCheckboxGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Checkbox element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

Generated by Doxygen
260 File Documentation

9.3.4.5 gslc_ElemXCheckboxSetState()

void gslc_ElemXCheckboxSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bChecked )

Set a Checkbox element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bChecked New state

Returns

none

9.3.4.6 gslc_ElemXCheckboxSetStateFunc()

void gslc_ElemXCheckboxSetStateFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XCHECKBOX pfuncCb )

Assign the state callback function for a checkbox/radio button.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in pfuncCb Function pointer to callback routine (or NULL for none)

Returns

none

9.3.4.7 gslc_ElemXCheckboxToggleState()

void gslc_ElemXCheckboxToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a Checkbox element's current state.

Generated by Doxygen
9.4 src/elem/XGauge.c File Reference 261

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.3.4.8 gslc_ElemXCheckboxTouch()

bool gslc_ElemXCheckboxTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Checkbox element.

• Called from gslc_ElemSendEventTouch()

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

9.4 src/elem/XGauge.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XGauge.h"
#include <stdio.h>
#include <math.h>

Generated by Doxygen
262 File Documentation

Include dependency graph for XGauge.c:

src/elem/XGauge.c

GUIslice_drv.h elem/XGauge.h math.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXGaugeCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Gauge ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Gauge Element.
• void gslc_ElemXGaugeSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teXGaugeStyle nStyle)
Configure the style of a Gauge element.
• void gslc_ElemXGaugeSetIndicator (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colGauge,
uint16_t nIndicLen, uint16_t nIndicTip, bool bIndicFill)
Configure the appearance of the Gauge indicator.
• void gslc_ElemXGaugeSetTicks (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colTick,
uint16_t nTickCnt, uint16_t nTickLen)
Configure the appearance of the Gauge ticks.
• void gslc_ElemXGaugeUpdate (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• void gslc_ElemXGaugeSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)
Set a Gauge element's fill direction.
• bool gslc_ElemXGaugeDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXGaugeDrawProgressBar (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedraw←-
Type eRedraw)
Helper function to draw a gauge with style: progress bar.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.4.1 Function Documentation

Generated by Doxygen
9.4 src/elem/XGauge.c File Reference 263

9.4.1.1 gslc_ElemXGaugeCreate()

gslc_tsElemRef∗ gslc_ElemXGaugeCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGauge ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Gauge Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

• Support gauge sub-types:

– GSLC_TYPEX_GAUGE_PROG_BAR: Horizontal or vertical box with filled region


– GSLC_TYPEX_GAUGE_RADIAL: Radial / compass indicator

• Default appearance is a horizontal progress bar, but can be changed with gslc_ElemXGaugeSetStyle())

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

9.4.1.2 gslc_ElemXGaugeDraw()

bool gslc_ElemXGaugeDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
264 File Documentation

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

9.4.1.3 gslc_ElemXGaugeDrawProgressBar()

bool gslc_ElemXGaugeDrawProgressBar (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: progress bar.

• Called from gslc_ElemXGaugeDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.4.1.4 gslc_ElemXGaugeSetFlip()

void gslc_ElemXGaugeSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's fill direction.

• Setting bFlip reverses the default fill direction

• Default fill direction for horizontal gauges: left-to-right

• Default fill direction for vertical gauges: bottom-to-top

Generated by Doxygen
9.4 src/elem/XGauge.c File Reference 265

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of fill from default

Returns

none

9.4.1.5 gslc_ElemXGaugeSetIndicator()

void gslc_ElemXGaugeSetIndicator (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge,
uint16_t nIndicLen,
uint16_t nIndicTip,
bool bIndicFill )

Configure the appearance of the Gauge indicator.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colGauge Color of the indicator
in nIndicLen Length of the indicator
in nIndicTip Size of the indicator tip
in bIndicFill Fill in the indicator if true

Returns

none

9.4.1.6 gslc_ElemXGaugeSetStyle()

void gslc_ElemXGaugeSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teXGaugeStyle nType )

Configure the style of a Gauge element.

• This function is used to select between one of several gauge types (eg. progress bar, radial dial, etc.)

Generated by Doxygen
266 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nType Gauge style enumeration

Returns

none

9.4.1.7 gslc_ElemXGaugeSetTicks()

void gslc_ElemXGaugeSetTicks (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colTick,
uint16_t nTickCnt,
uint16_t nTickLen )

Configure the appearance of the Gauge ticks.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colTick Color of the gauge ticks
in nTickCnt Number of ticks to draw around / along gauge
in nTickLen Length of the tick marks to draw

Returns

none

9.4.1.8 gslc_ElemXGaugeUpdate()

void gslc_ElemXGaugeUpdate (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Generated by Doxygen
9.5 src/elem/XGauge.h File Reference 267

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.4.2 Variable Documentation

9.4.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.4.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.5 src/elem/XGauge.h File Reference

#include "GUIslice.h"
Include dependency graph for XGauge.h:

src/elem/XGauge.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
268 File Documentation

This graph shows which files directly or indirectly include this file:

src/elem/XGauge.h

src/elem/XGauge.c src/GUIslice_ex.h

Data Structures

• struct gslc_tsXGauge
Extended data for Gauge element.

Macros

• #define GSLC_TYPEX_GAUGE
• #define gslc_ElemXGaugeCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nMin_, nMax_, nVal_, col←-
Frame_, colFill_, colGauge_, bVert_)
Create a Gauge Element in Flash.

Enumerations

• enum gslc_teXGaugeStyle { GSLCX_GAUGE_STYLE_PROG_BAR, GSLCX_GAUGE_STYLE_RADIAL,


GSLCX_GAUGE_STYLE_RAMP }
Gauge drawing style.

Functions

• gslc_tsElemRef ∗ gslc_ElemXGaugeCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Gauge ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Gauge Element.
• void gslc_ElemXGaugeSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teXGaugeStyle nType)
Configure the style of a Gauge element.
• void gslc_ElemXGaugeSetIndicator (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colGauge,
uint16_t nIndicLen, uint16_t nIndicTip, bool bIndicFill)
Configure the appearance of the Gauge indicator.
• void gslc_ElemXGaugeSetTicks (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colTick,
uint16_t nTickCnt, uint16_t nTickLen)
Configure the appearance of the Gauge ticks.
• void gslc_ElemXGaugeUpdate (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.

Generated by Doxygen
9.5 src/elem/XGauge.h File Reference 269

• void gslc_ElemXGaugeSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)


Set a Gauge element's fill direction.
• bool gslc_ElemXGaugeDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXGaugeDrawProgressBar (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedraw←-
Type eRedraw)
Helper function to draw a gauge with style: progress bar.

9.5.1 Macro Definition Documentation

9.5.1.1 gslc_ElemXGaugeCreate_P

#define gslc_ElemXGaugeCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nMin_,
nMax_,
nVal_,
colFrame_,
colFill_,
colGauge_,
bVert_ )

Create a Gauge Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nMin_ Minimum value of gauge for nVal comparison
in nMax_ Maximum value of gauge for nVal comparison
in nVal_ Starting value of gauge
in col←- Color for the gauge frame
Frame_
in colFill_ Color for the gauge background fill
in col←- Color for the gauge indicator
Gauge_
in bVert_ Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Generated by Doxygen
270 File Documentation

Returns

none

9.5.1.2 GSLC_TYPEX_GAUGE

#define GSLC_TYPEX_GAUGE

9.5.2 Enumeration Type Documentation

9.5.2.1 gslc_teXGaugeStyle

enum gslc_teXGaugeStyle

Gauge drawing style.

Enumerator

GSLCX_GAUGE_STYLE_PROG_BAR Progress bar.


GSLCX_GAUGE_STYLE_RADIAL Radial indicator.
GSLCX_GAUGE_STYLE_RAMP Ramp indicator.

9.5.3 Function Documentation

9.5.3.1 gslc_ElemXGaugeCreate()

gslc_tsElemRef∗ gslc_ElemXGaugeCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGauge ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Gauge Element.

Generated by Doxygen
9.5 src/elem/XGauge.h File Reference 271

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

• Support gauge sub-types:

– GSLC_TYPEX_GAUGE_PROG_BAR: Horizontal or vertical box with filled region


– GSLC_TYPEX_GAUGE_RADIAL: Radial / compass indicator

• Default appearance is a horizontal progress bar, but can be changed with gslc_ElemXGaugeSetStyle())

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

9.5.3.2 gslc_ElemXGaugeDraw()

bool gslc_ElemXGaugeDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

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

Generated by Doxygen
272 File Documentation

9.5.3.3 gslc_ElemXGaugeDrawProgressBar()

bool gslc_ElemXGaugeDrawProgressBar (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: progress bar.

• Called from gslc_ElemXGaugeDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.5.3.4 gslc_ElemXGaugeSetFlip()

void gslc_ElemXGaugeSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's fill direction.

• Setting bFlip reverses the default fill direction

• Default fill direction for horizontal gauges: left-to-right

• Default fill direction for vertical gauges: bottom-to-top

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of fill from default

Returns

none

Generated by Doxygen
9.5 src/elem/XGauge.h File Reference 273

9.5.3.5 gslc_ElemXGaugeSetIndicator()

void gslc_ElemXGaugeSetIndicator (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge,
uint16_t nIndicLen,
uint16_t nIndicTip,
bool bIndicFill )

Configure the appearance of the Gauge indicator.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colGauge Color of the indicator
in nIndicLen Length of the indicator
in nIndicTip Size of the indicator tip
in bIndicFill Fill in the indicator if true

Returns

none

9.5.3.6 gslc_ElemXGaugeSetStyle()

void gslc_ElemXGaugeSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teXGaugeStyle nType )

Configure the style of a Gauge element.

• This function is used to select between one of several gauge types (eg. progress bar, radial dial, etc.)

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nType Gauge style enumeration

Returns

none

Generated by Doxygen
274 File Documentation

9.5.3.7 gslc_ElemXGaugeSetTicks()

void gslc_ElemXGaugeSetTicks (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colTick,
uint16_t nTickCnt,
uint16_t nTickLen )

Configure the appearance of the Gauge ticks.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colTick Color of the gauge ticks
in nTickCnt Number of ticks to draw around / along gauge
in nTickLen Length of the tick marks to draw

Returns

none

9.5.3.8 gslc_ElemXGaugeUpdate()

void gslc_ElemXGaugeUpdate (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.6 src/elem/XGlowball.c File Reference

#include "GUIslice.h"

Generated by Doxygen
9.6 src/elem/XGlowball.c File Reference 275

#include "GUIslice_drv.h"
#include "elem/XGlowball.h"
#include <stdio.h>
Include dependency graph for XGlowball.c:

src/elem/XGlowball.c

GUIslice_drv.h elem/XGlowball.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXGlowballCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Glowball ∗pXData, int16_t nMidX, int16_t nMidY, gslc_tsXGlowballRing ∗pRings, uint8_t nNumRings)
Create a XGlowball element.
• void drawXGlowballArc (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY,
int16_t nRad1, int16_t nRad2, gslc_tsColor cArc, uint16_t nAngStart, uint16_t nAngEnd)
• void drawXGlowballRing (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY,
int16_t nVal, uint16_t nAngStart, uint16_t nAngEnd, bool bErase)
• void drawXGlowball (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY, int16_t
nVal, uint16_t nAngStart, uint16_t nAngEnd)
• void gslc_ElemXGlowballSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
• void gslc_ElemXGlowballSetAngles (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nAngStart,
int16_t nAngEnd)
• void gslc_ElemXGlowballSetQuality (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nQuality)
• void gslc_ElemXGlowballSetColorBack (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colBg)
• bool gslc_ElemXGlowballDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw the XGlowball element on the screen.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.6.1 Function Documentation

Generated by Doxygen
276 File Documentation

9.6.1.1 drawXGlowball()

void drawXGlowball (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nVal,
uint16_t nAngStart,
uint16_t nAngEnd )

9.6.1.2 drawXGlowballArc()

void drawXGlowballArc (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nRad1,
int16_t nRad2,
gslc_tsColor cArc,
uint16_t nAngStart,
uint16_t nAngEnd )

9.6.1.3 drawXGlowballRing()

void drawXGlowballRing (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nVal,
uint16_t nAngStart,
uint16_t nAngEnd,
bool bErase )

9.6.1.4 gslc_ElemXGlowballCreate()

gslc_tsElemRef∗ gslc_ElemXGlowballCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGlowball ∗ pXData,
int16_t nMidX,
int16_t nMidY,
gslc_tsXGlowballRing ∗ pRings,
uint8_t nNumRings )

Create a XGlowball element.

Generated by Doxygen
9.6 src/elem/XGlowball.c File Reference 277

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 nMidX Center X coordinate
in nMidY Center Y coordinate
in pRings Pointer to tsXGlowballRing structure array defining appearance
in nNumRings Number of rings in pRings array

Returns

Pointer to Element reference or NULL if failure

9.6.1.5 gslc_ElemXGlowballDraw()

bool gslc_ElemXGlowballDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the XGlowball element on the screen.

• Called from gslc_ElemDraw()

Parameters

in pvGui Void ptr to GUI (typecast to gslc_tsGui∗)


in pvElemRef Void ptr to Element (typecast to gslc_tsElemRef∗)
in eRedraw Redraw mode

Returns

true if success, false otherwise

9.6.1.6 gslc_ElemXGlowballSetAngles()

void gslc_ElemXGlowballSetAngles (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nAngStart,
int16_t nAngEnd )

Generated by Doxygen
278 File Documentation

9.6.1.7 gslc_ElemXGlowballSetColorBack()

void gslc_ElemXGlowballSetColorBack (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colBg )

9.6.1.8 gslc_ElemXGlowballSetQuality()

void gslc_ElemXGlowballSetQuality (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nQuality )

9.6.1.9 gslc_ElemXGlowballSetVal()

void gslc_ElemXGlowballSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

9.6.2 Variable Documentation

9.6.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.6.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

Generated by Doxygen
9.7 src/elem/XGlowball.h File Reference 279

9.7 src/elem/XGlowball.h File Reference

#include "GUIslice.h"
Include dependency graph for XGlowball.h:

src/elem/XGlowball.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XGlowball.h

src/elem/XGlowball.c

Data Structures

• struct gslc_tsXGlowballRing
• struct gslc_tsXGlowball
Extended data for Slider element.

Macros

• #define GSLC_TYPEX_GLOW

Functions

• gslc_tsElemRef ∗ gslc_ElemXGlowballCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Glowball ∗pXData, int16_t nMidX, int16_t nMidY, gslc_tsXGlowballRing ∗pRings, uint8_t nNumRings)
Create a XGlowball element.
• bool gslc_ElemXGlowballDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)

Generated by Doxygen
280 File Documentation

Draw the XGlowball element on the screen.


• void drawXGlowballArc (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY,
int16_t nRad1, int16_t nRad2, gslc_tsColor cArc, uint16_t nAngStart, uint16_t nAngEnd)
• void drawXGlowballRing (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY,
int16_t nVal, uint16_t nAngStart, uint16_t nAngEnd, bool bErase)
• void drawXGlowball (gslc_tsGui ∗pGui, gslc_tsXGlowball ∗pGlowball, int16_t nMidX, int16_t nMidY, int16_t
nVal, uint16_t nAngStart, uint16_t nAngEnd)
• void gslc_ElemXGlowballSetAngles (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nAngStart,
int16_t nAngEnd)
• void gslc_ElemXGlowballSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
• void gslc_ElemXGlowballSetQuality (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nQuality)
• void gslc_ElemXGlowballSetColorBack (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colBg)

9.7.1 Macro Definition Documentation

9.7.1.1 GSLC_TYPEX_GLOW

#define GSLC_TYPEX_GLOW

9.7.2 Function Documentation

9.7.2.1 drawXGlowball()

void drawXGlowball (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nVal,
uint16_t nAngStart,
uint16_t nAngEnd )

9.7.2.2 drawXGlowballArc()

void drawXGlowballArc (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nRad1,
int16_t nRad2,
gslc_tsColor cArc,
uint16_t nAngStart,
uint16_t nAngEnd )

Generated by Doxygen
9.7 src/elem/XGlowball.h File Reference 281

9.7.2.3 drawXGlowballRing()

void drawXGlowballRing (
gslc_tsGui ∗ pGui,
gslc_tsXGlowball ∗ pGlowball,
int16_t nMidX,
int16_t nMidY,
int16_t nVal,
uint16_t nAngStart,
uint16_t nAngEnd,
bool bErase )

9.7.2.4 gslc_ElemXGlowballCreate()

gslc_tsElemRef∗ gslc_ElemXGlowballCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGlowball ∗ pXData,
int16_t nMidX,
int16_t nMidY,
gslc_tsXGlowballRing ∗ pRings,
uint8_t nNumRings )

Create a XGlowball 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 nMidX Center X coordinate
in nMidY Center Y coordinate
in pRings Pointer to tsXGlowballRing structure array defining appearance
in nNumRings Number of rings in pRings array

Returns

Pointer to Element reference or NULL if failure

9.7.2.5 gslc_ElemXGlowballDraw()

bool gslc_ElemXGlowballDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the XGlowball element on the screen.

Generated by Doxygen
282 File Documentation

• Called from gslc_ElemDraw()

Parameters

in pvGui Void ptr to GUI (typecast to gslc_tsGui∗)


in pvElemRef Void ptr to Element (typecast to gslc_tsElemRef∗)
in eRedraw Redraw mode

Returns

true if success, false otherwise

9.7.2.6 gslc_ElemXGlowballSetAngles()

void gslc_ElemXGlowballSetAngles (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nAngStart,
int16_t nAngEnd )

9.7.2.7 gslc_ElemXGlowballSetColorBack()

void gslc_ElemXGlowballSetColorBack (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colBg )

9.7.2.8 gslc_ElemXGlowballSetQuality()

void gslc_ElemXGlowballSetQuality (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nQuality )

9.7.2.9 gslc_ElemXGlowballSetVal()

void gslc_ElemXGlowballSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Generated by Doxygen
9.8 src/elem/XGraph.c File Reference 283

9.8 src/elem/XGraph.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XGraph.h"
#include <stdio.h>
Include dependency graph for XGraph.c:

src/elem/XGraph.c

GUIslice_drv.h elem/XGraph.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXGraphCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Graph ∗pXData, gslc_tsRect rElem, int16_t nFontId, int16_t ∗pBuf, uint16_t nBufMax, gslc_tsColor colGraph)
Create a Graph Element.
• void gslc_ElemXGraphSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teXGraphStyle eStyle,
uint8_t nMargin)
Set the graph's additional drawing characteristics.
• void gslc_ElemXGraphSetRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nYMin, int16_t n←-
YMax)
Set the graph's drawing range.
• void gslc_ElemXGraphScrollSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nScrollPos, uint8_t
nScrollMax)
Set the graph scroll position (nScrollPos) as a fraction of nScrollMax.
• void gslc_ElemXGraphAdd (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Add a value to the graph at the latest position.
• bool gslc_ElemXGraphDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Graph element on the screen.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.8.1 Function Documentation

Generated by Doxygen
284 File Documentation

9.8.1.1 gslc_ElemXGraphAdd()

void gslc_ElemXGraphAdd (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Add a value to the graph at the latest position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal Data value to add

Returns

none

9.8.1.2 gslc_ElemXGraphCreate()

gslc_tsElemRef∗ gslc_ElemXGraphCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGraph ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
int16_t ∗ pBuf,
uint16_t nBufRows,
gslc_tsColor colGraph )

Create a Graph 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 checkbox size
in nFontId Font ID to use for graph area
in pBuf Ptr to data buffer (already allocated) with size (nBufMax)
int16_t
in nBufRows Maximum number of points in buffer
in colGraph Color of the graph

Generated by Doxygen
9.8 src/elem/XGraph.c File Reference 285

Returns

Pointer to Element reference or NULL if failure

9.8.1.3 gslc_ElemXGraphDraw()

bool gslc_ElemXGraphDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Graph element on the screen.

• Called from gslc_ElemDraw()

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

9.8.1.4 gslc_ElemXGraphScrollSet()

void gslc_ElemXGraphScrollSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nScrollPos,
uint8_t nScrollMax )

Set the graph scroll position (nScrollPos) as a fraction of nScrollMax.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos New scroll position
in nScrollMax Maximum scroll position

Generated by Doxygen
286 File Documentation

Returns

none

9.8.1.5 gslc_ElemXGraphSetRange()

void gslc_ElemXGraphSetRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nYMin,
int16_t nYMax )

Set the graph's drawing range.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nYMin Minimum Y value to draw
in nYMax Maximum Y value to draw

Returns

none

9.8.1.6 gslc_ElemXGraphSetStyle()

void gslc_ElemXGraphSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teXGraphStyle eStyle,
uint8_t nMargin )

Set the graph's additional drawing characteristics.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in eStyle Drawing style for the graph
in nMargin Margin to provide around graph area inside frame

Returns

none

Generated by Doxygen
9.9 src/elem/XGraph.h File Reference 287

9.8.2 Variable Documentation

9.8.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.8.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.9 src/elem/XGraph.h File Reference

#include "GUIslice.h"
Include dependency graph for XGraph.h:

src/elem/XGraph.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XGraph.h

src/elem/XGraph.c src/GUIslice_ex.h

Generated by Doxygen
288 File Documentation

Data Structures
• struct gslc_tsXGraph
Extended data for Graph element.

Macros
• #define GSLC_TYPEX_GRAPH

Enumerations
• enum gslc_teXGraphStyle { GSLCX_GRAPH_STYLE_DOT, GSLCX_GRAPH_STYLE_LINE, GSLCX_GR←-
APH_STYLE_FILL }
Gauge drawing style.

Functions
• gslc_tsElemRef ∗ gslc_ElemXGraphCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-
Graph ∗pXData, gslc_tsRect rElem, int16_t nFontId, int16_t ∗pBuf, uint16_t nBufRows, gslc_tsColor col←-
Graph)
Create a Graph Element.
• void gslc_ElemXGraphSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teXGraphStyle eStyle,
uint8_t nMargin)
Set the graph's additional drawing characteristics.
• void gslc_ElemXGraphSetRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nYMin, int16_t n←-
YMax)
Set the graph's drawing range.
• bool gslc_ElemXGraphDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Graph element on the screen.
• void gslc_ElemXGraphAdd (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Add a value to the graph at the latest position.
• void gslc_ElemXGraphScrollSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nScrollPos, uint8_t
nScrollMax)
Set the graph scroll position (nScrollPos) as a fraction of nScrollMax.

9.9.1 Macro Definition Documentation

9.9.1.1 GSLC_TYPEX_GRAPH

#define GSLC_TYPEX_GRAPH

9.9.2 Enumeration Type Documentation

9.9.2.1 gslc_teXGraphStyle

enum gslc_teXGraphStyle

Gauge drawing style.

Generated by Doxygen
9.9 src/elem/XGraph.h File Reference 289

Enumerator

GSLCX_GRAPH_STYLE_DOT Dot.
GSLCX_GRAPH_STYLE_LINE Line.
GSLCX_GRAPH_STYLE_FILL Filled.

9.9.3 Function Documentation

9.9.3.1 gslc_ElemXGraphAdd()

void gslc_ElemXGraphAdd (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Add a value to the graph at the latest position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal Data value to add

Returns

none

9.9.3.2 gslc_ElemXGraphCreate()

gslc_tsElemRef∗ gslc_ElemXGraphCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXGraph ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
int16_t ∗ pBuf,
uint16_t nBufRows,
gslc_tsColor colGraph )

Create a Graph Element.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
290 File Documentation

Parameters

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 checkbox size
in nFontId Font ID to use for graph area
in pBuf Ptr to data buffer (already allocated) with size (nBufMax)
int16_t
in nBufRows Maximum number of points in buffer
in colGraph Color of the graph

Returns

Pointer to Element reference or NULL if failure

9.9.3.3 gslc_ElemXGraphDraw()

bool gslc_ElemXGraphDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Graph element on the screen.

• Called from gslc_ElemDraw()

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

9.9.3.4 gslc_ElemXGraphScrollSet()

void gslc_ElemXGraphScrollSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nScrollPos,
uint8_t nScrollMax )

Set the graph scroll position (nScrollPos) as a fraction of nScrollMax.

Generated by Doxygen
9.9 src/elem/XGraph.h File Reference 291

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos New scroll position
in nScrollMax Maximum scroll position

Returns

none

9.9.3.5 gslc_ElemXGraphSetRange()

void gslc_ElemXGraphSetRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nYMin,
int16_t nYMax )

Set the graph's drawing range.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nYMin Minimum Y value to draw
in nYMax Maximum Y value to draw

Returns

none

9.9.3.6 gslc_ElemXGraphSetStyle()

void gslc_ElemXGraphSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teXGraphStyle eStyle,
uint8_t nMargin )

Set the graph's additional drawing characteristics.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in eStyle
Generated by Doxygen Drawing style for the graph
in nMargin Margin to provide around graph area inside frame
292 File Documentation

Returns

none

9.10 src/elem/XKeyPad.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XKeyPad.h"
#include <stdio.h>
Include dependency graph for XKeyPad.c:

src/elem/XKeyPad.c

GUIslice_drv.h elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• void gslc_ElemXKeyPadReset (gslc_tsXKeyPad ∗pKeyPad)


• void gslc_ElemXKeyPadCfgInit (gslc_tsXKeyPadCfg ∗pConfig)
Provide default initialization for the base XKeyPad.
• int16_t gslc_XKeyPadLookupId (gslc_tsKey ∗pKeys, uint8_t nKeyId)
Find a key ID within a KeyPad label array and return it's index into the array.
• int16_t gslc_XKeyPadLookupSpecialId (gslc_tsLabelSpecial ∗pLabels, uint8_t nKeyId)
Find a key ID within a KeyPad special label array and return it's index into the array.
• void gslc_XKeyPadDrawLayout (gslc_tsGui ∗pGui, void ∗pXData)
• void gslc_XKeyPadDrawKey (gslc_tsGui ∗pGui, gslc_tsXKeyPad ∗pXData, gslc_tsKey ∗pKey, bool bGlow,
bool bFocus)
Draw a key to the screen.
• gslc_tsElemRef ∗ gslc_XKeyPadCreateBase (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-
KeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg ∗pConfig)
Create a KeyPad Element.
• void gslc_XKeyPadAdjustScroll (gslc_tsXKeyPad ∗pKeyPad)
• bool gslc_XKeyPadLayoutSet (gslc_tsXKeyPadCfg ∗pConfig, int8_t eLayoutSel)
Select a new KeyPad layout.
• void gslc_ElemXKeyPadValSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStrBuf)
Set the current value for the editable text field.
• void gslc_ElemXKeyPadTargetRefSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsElemRef ∗p←-
TxtRef)

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 293

Set target element reference for KeyPad return value.


• int16_t gslc_ElemXKeyPadDataTargetIdGet (gslc_tsGui ∗pGui, void ∗pvData)
Fetch the element target ID associated with this KeyPad.
• char ∗ gslc_ElemXKeyPadDataValGet (gslc_tsGui ∗pGui, void ∗pvData)
Fetch the final value string of the KeyPad from a callback.
• bool gslc_ElemXKeyPadValGet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, char ∗pStrBuf, uint8_t nStr←-
BufLen)
Fetch the current value string associated with KeyPad element.
• bool gslc_XKeyPadDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a KeyPad element on the screen.
• void gslc_ElemXKeyPadValSetCb (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_INPUT
pfuncCb)
Set the callback function associated with the KeyPad.
• void gslc_XKeyPadSizeAllGet (gslc_tsKey ∗∗pLayouts, uint8_t nNumLayouts, uint8_t ∗pnRows, uint8_t ∗pn←-
Cols)
Calculate the overall dimensions of the KeyPad control encompassing all available layouts for the KeyPad, leveraging
the computation in gslc_XKeyPadSizeGet().
• void gslc_XKeyPadSizeGet (gslc_tsKey ∗pLayout, uint8_t ∗pnRows, uint8_t ∗pnCols, int8_t ∗pnIndFirst,
int8_t ∗pnIndLast)
Calculate the overall dimensions of the KeyPad control encompassing the text field and key buttons.
• int16_t gslc_XKeyPadMapEvent (gslc_tsGui ∗pGui, void ∗pXData, int16_t nRelX, int16_t nRelY, int16_t ∗pn←-
Ind)
• void gslc_XKeyPadPendRedrawReset (gslc_tsXKeyPadResult ∗pResult)
• void gslc_XKeyPadPendRedrawAddTxt (gslc_tsXKeyPadResult ∗pResult)
• void gslc_XKeyPadPendRedrawAddKey (gslc_tsXKeyPadResult ∗pResult, int16_t nId)
• void gslc_XKeyPadRedrawUpdate (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• void gslc_XKeyPadTrackSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nInd, gslc_tsXKeyPad←-
Attrib eAttrib)
• void gslc_XKeyPadFocusSetDefault (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• bool gslc_XKeyPadTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Handle touch (up,down,move) events to KeyPad element.
• bool gslc_XKeyPadTxtDelCh (gslc_tsXKeyPad ∗pKeyPad, uint8_t nPos)
Remove a character from the KeyPad text field at the specified offset (nPos).
• bool gslc_XKeyPadTxtAddCh (gslc_tsXKeyPad ∗pKeyPad, char ch, uint8_t nPos)
Add a character to the KeyPad text field at the specified offset (nPos).
• bool gslc_XKeyPadTxtAddStr (gslc_tsXKeyPad ∗pKeyPad, const char ∗pStr, uint8_t nPos)
Add a string to the KeyPad text field at the specified offset (nPos).
• void gslc_ElemXKeyPadCfgSetButtonSz (gslc_tsXKeyPadCfg ∗pConfig, int8_t nButtonSzW, int8_t nButton←-
SzH)
Update the KeyPad configuration to define the KeyPad button sizing.
• void gslc_ElemXKeyPadCfgSetButtonSpace (gslc_tsXKeyPadCfg ∗pConfig, int8_t nSpaceX, int8_t nSpaceY)
Update the KeyPad configuration to define the KeyPad button spacing.
• void gslc_ElemXKeyPadCfgSetRoundEn (gslc_tsXKeyPadCfg ∗pConfig, bool bEn)
Update the KeyPad configuration to enable rounded button corners.
• void gslc_XKeyPadDrawVirtualTxt (gslc_tsGui ∗pGui, gslc_tsRect rElem, gslc_tsXKeyPad ∗pKeyPad, gslc←-
_tsColor cColFrame, gslc_tsColor cColFill, gslc_tsColor cColTxt)
Draw a virtual Text Element.
• void gslc_XKeyPadDrawVirtualBtn (gslc_tsGui ∗pGui, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBuf←-
Max, int16_t nFontId, gslc_tsColor cColFrame, gslc_tsColor cColFill, gslc_tsColor cColFillGlow, gslc_tsColor
cColText, bool bRoundedEn, bool bGlow, bool bFocus)
Draw a virtual textual Button Element.
• void gslc_ElemXKeyPadInputAsk (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pKeyPadRef, int16_t nPgPopup,
gslc_tsElemRef ∗pTxtRef)

Generated by Doxygen
294 File Documentation

Trigger a KeyPad popup and associate it with a text element.


• char ∗ gslc_ElemXKeyPadInputGet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pTxtRef, void ∗pvCbData)
Complete a KeyPad popup by retrieving the input data and storing it in the text element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.10.1 Function Documentation

9.10.1.1 gslc_ElemXKeyPadCfgInit()

void gslc_ElemXKeyPadCfgInit (
gslc_tsXKeyPadCfg ∗ pConfig )

Provide default initialization for the base XKeyPad.

• These defaults will be overwritten by variant-specific initialization or through user configuration APIs.

Parameters

in pConfig Ptr to the KeyPad base config structure

Returns

none

9.10.1.2 gslc_ElemXKeyPadCfgSetButtonSpace()

void gslc_ElemXKeyPadCfgSetButtonSpace (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t nSpaceX,
int8_t nSpaceY )

Update the KeyPad configuration to define the KeyPad button spacing.

• This defines the inset amount (X and Y) from the Button Size

• A spacing of (1,1) will mean that the button is drawn with a 1 pixel margin around the grid defined by the
Button Size

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 295

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in nSpaceX Amount to inset button in horizontal direction (pixels)
in nSpaceY Amount to inset button in vertical direction (pixels)

Returns

none

9.10.1.3 gslc_ElemXKeyPadCfgSetButtonSz()

void gslc_ElemXKeyPadCfgSetButtonSz (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t nButtonSzW,
int8_t nButtonSzH )

Update the KeyPad configuration to define the KeyPad button sizing.

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in nButtonSzW Width of buttons in pixels
in nButtonSzH Height of buttons in pixels

Returns

none

9.10.1.4 gslc_ElemXKeyPadCfgSetRoundEn()

void gslc_ElemXKeyPadCfgSetRoundEn (
gslc_tsXKeyPadCfg ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable rounded button corners.

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in bEn Enable rounded corners

Generated by Doxygen
296 File Documentation

Returns

none

9.10.1.5 gslc_ElemXKeyPadDataTargetIdGet()

int16_t gslc_ElemXKeyPadDataTargetIdGet (
gslc_tsGui ∗ pGui,
void ∗ pvData )

Fetch the element target ID associated with this KeyPad.

Parameters

in pGui Pointer to GUI


in pvData : Void ptr to callback data structure

Returns

Target Element ID or GSLC_ID_NONE if unspecified

9.10.1.6 gslc_ElemXKeyPadDataValGet()

char∗ gslc_ElemXKeyPadDataValGet (
gslc_tsGui ∗ pGui,
void ∗ pvData )

Fetch the final value string of the KeyPad from a callback.

Parameters

in pGui Pointer to GUI


out pvData : Void ptr to callback data structure

Returns

Pointer to edited character string

9.10.1.7 gslc_ElemXKeyPadInputAsk()

void gslc_ElemXKeyPadInputAsk (
gslc_tsGui ∗ pGui,

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 297

gslc_tsElemRef ∗ pKeyPadRef,
int16_t nPgPopup,
gslc_tsElemRef ∗ pTxtRef )

Trigger a KeyPad popup and associate it with a text element.

• This function also updates the maximum KeyPad buffer length to match that of the target text element, up to
the maximum XKEYPAD_BUF_MAX.

Parameters

in pGui Pointer to GUI


in pKeyPadRef Pointer to KeyPad element reference
in nPgPopup Page enum that contains the popup to show
in pTxtRef Pointer to associated text field element reference

Returns

none

9.10.1.8 gslc_ElemXKeyPadInputGet()

char∗ gslc_ElemXKeyPadInputGet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pTxtRef,
void ∗ pvCbData )

Complete a KeyPad popup by retrieving the input data and storing it in the text element.

Parameters

in pGui Pointer to GUI


in pTxtRef Pointer to associated text field element reference
in pvCbData Void pointer to callback function's pvData

Returns

The text string that was fetched from the KeyPad (NULL terminated)

9.10.1.9 gslc_ElemXKeyPadReset()

void gslc_ElemXKeyPadReset (
gslc_tsXKeyPad ∗ pKeyPad )

Generated by Doxygen
298 File Documentation

9.10.1.10 gslc_ElemXKeyPadTargetRefSet()

void gslc_ElemXKeyPadTargetRefSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsElemRef ∗ pTargetRef )

Set target element reference for KeyPad return value.

• The Target Reference is used in the GSLC_CB_INPUT callback so that the user has the context needed to
determine which field should be edited with the contents of the KeyPad edit field

• It is expected that the user will call this function when showing the KeyPad popup dialog

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
in pTargetRef Element reference for target of KeyPad value

Returns

none

9.10.1.11 gslc_ElemXKeyPadValGet()

bool gslc_ElemXKeyPadValGet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
char ∗ pStrBuf,
uint8_t nStrBufMax )

Fetch the current value string associated with KeyPad element.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
out pStrBuf String buffer
in nStrBufMax Maximum length of string buffer (pStrBuf) including terminator

Returns

true if success, false otherwise

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 299

9.10.1.12 gslc_ElemXKeyPadValSet()

void gslc_ElemXKeyPadValSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
const char ∗ pStrBuf )

Set the current value for the editable text field.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
in pStrBuf String to copy into keypad

Returns

none

9.10.1.13 gslc_ElemXKeyPadValSetCb()

void gslc_ElemXKeyPadValSetCb (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_INPUT pfuncCb )

Set the callback function associated with the KeyPad.

• This function will be called during updates and OK / Cancel

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element Reference for KeyPad
in pfuncCb Callback function pointer

Returns

none

9.10.1.14 gslc_XKeyPadAdjustScroll()

void gslc_XKeyPadAdjustScroll (
gslc_tsXKeyPad ∗ pKeyPad )

Generated by Doxygen
300 File Documentation

9.10.1.15 gslc_XKeyPadCreateBase()

gslc_tsElemRef∗ gslc_XKeyPadCreateBase (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg ∗ pConfig )

Create a KeyPad Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Pointer to base Config options

Returns

Pointer to Element or NULL if failure

9.10.1.16 gslc_XKeyPadDraw()

bool gslc_XKeyPadDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a KeyPad element on the screen.

• Called during redraw

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

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 301

Returns

true if success, false otherwise

9.10.1.17 gslc_XKeyPadDrawKey()

void gslc_XKeyPadDrawKey (
gslc_tsGui ∗ pGui,
gslc_tsXKeyPad ∗ pXData,
gslc_tsKey ∗ pKey,
bool bGlow,
bool bFocus )

Draw a key to the screen.

Parameters

in pGui Pointer to GUI


in pXData Ptr to extended element data structure
in pKey Ptr to key being drawn
in bGlow Indicate if key is in glow state
in bFocus Indicate if key is in focus state

Returns

none

9.10.1.18 gslc_XKeyPadDrawLayout()

void gslc_XKeyPadDrawLayout (
gslc_tsGui ∗ pGui,
void ∗ pXData )

9.10.1.19 gslc_XKeyPadDrawVirtualBtn()

void gslc_XKeyPadDrawVirtualBtn (
gslc_tsGui ∗ pGui,
gslc_tsRect rElem,
char ∗ pStrBuf,
uint8_t nStrBufMax,
int16_t nFontId,
gslc_tsColor cColFrame,
gslc_tsColor cColFill,
gslc_tsColor cColFillGlow,

Generated by Doxygen
302 File Documentation

gslc_tsColor cColTxt,
bool bRoundedEn,
bool bGlow,
bool bFocus )

Draw a virtual textual Button Element.

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 303

Parameters

in pGui Pointer to GUI


in rElem Rectangle coordinates defining element size
in pStrBuf String to copy into element
in nStrBufMax Maximum length of string buffer (pStrBuf).
in nFontId Font ID to use for text display
in cColFrame Frame color for element
in cColFill Fill color for element
in cColFillGlow Fill color for element when glowing/focused
in cColTxt Text color for element
in bRoundedEn Use Rounded Corners?
in bGlow Indicate btn is in glow state
in bFocus Indicate btn is in focus state

Returns

none

9.10.1.20 gslc_XKeyPadDrawVirtualTxt()

void gslc_XKeyPadDrawVirtualTxt (
gslc_tsGui ∗ pGui,
gslc_tsRect rElem,
gslc_tsXKeyPad ∗ pKeyPad,
gslc_tsColor cColFrame,
gslc_tsColor cColFill,
gslc_tsColor cColTxt )

Draw a virtual Text Element.

• Creates a text string with filled background

Parameters

in pGui Pointer to GUI


in rElem Rectangle coordinates defining element size
in pKeyPad Pointer to KeyPad struct
in cColFrame Frame color for element
in cColFill Fill color for element
in cColTxt Text color for element

Returns

none

Generated by Doxygen
304 File Documentation

9.10.1.21 gslc_XKeyPadFocusSetDefault()

void gslc_XKeyPadFocusSetDefault (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Todo Doc

9.10.1.22 gslc_XKeyPadLayoutSet()

bool gslc_XKeyPadLayoutSet (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t eLayoutSel )

Select a new KeyPad layout.

• Multiple KeyPad layouts can share the same key key definition array (eg. KEYPAD_LAYOUT)

• This function returns an indication of whether a full KeyPad control redraw is required, ie. the KeyPad layout
definition has changed. With changes in the KeyPad definition, there may be a different number of visible
keys or arrangements, necessitating a background redraw.

Parameters

in pConfig Ptr to the KeyPad configuration


in eLayoutSel Layout index to select

Returns

true if a full redraw should be performed

9.10.1.23 gslc_XKeyPadLookupId()

int16_t gslc_XKeyPadLookupId (
gslc_tsKey ∗ pKeys,
uint8_t nKeyId )

Find a key ID within a KeyPad label array and return it's index into the array.

• It is expected that the KeyPad label array is terminated with KEYPAD_ID__END

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 305

Parameters
in pKeys Ptr to the Keypad label array
in n←- Key ID to look for
KeyId

Returns

the index into the array if the ID was found or -1 if the key ID was not found

9.10.1.24 gslc_XKeyPadLookupSpecialId()

int16_t gslc_XKeyPadLookupSpecialId (
gslc_tsLabelSpecial ∗ pLabels,
uint8_t nKeyId )

Find a key ID within a KeyPad special label array and return it's index into the array.

• It is expected that the KeyPad label array is terminated with KEYPAD_ID__END

Parameters
in pLabels Ptr to the Keypad special label array
in nKeyId Key ID to look for

Returns

the index into the array if the ID was found or -1 if the key ID was not found

9.10.1.25 gslc_XKeyPadMapEvent()

int16_t gslc_XKeyPadMapEvent (
gslc_tsGui ∗ pGui,
void ∗ pXData,
int16_t nRelX,
int16_t nRelY,
int16_t ∗ pnInd )

Generated by Doxygen
306 File Documentation

9.10.1.26 gslc_XKeyPadPendRedrawAddKey()

void gslc_XKeyPadPendRedrawAddKey (
gslc_tsXKeyPadResult ∗ pResult,
int16_t nId )

Todo Doc

9.10.1.27 gslc_XKeyPadPendRedrawAddTxt()

void gslc_XKeyPadPendRedrawAddTxt (
gslc_tsXKeyPadResult ∗ pResult )

Todo Doc

9.10.1.28 gslc_XKeyPadPendRedrawReset()

void gslc_XKeyPadPendRedrawReset (
gslc_tsXKeyPadResult ∗ pResult )

Todo Doc

9.10.1.29 gslc_XKeyPadRedrawUpdate()

void gslc_XKeyPadRedrawUpdate (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Todo Doc

9.10.1.30 gslc_XKeyPadSizeAllGet()

void gslc_XKeyPadSizeAllGet (
gslc_tsKey ∗∗ pLayouts,
uint8_t nNumLayouts,
uint8_t ∗ pnRows,
uint8_t ∗ pnCols )

Calculate the overall dimensions of the KeyPad control encompassing all available layouts for the KeyPad, leveraging
the computation in gslc_XKeyPadSizeGet().

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 307

Parameters

in pLayouts Ptr to the array of KeyPad layouts


in nNumLayouts Number of layouts in pLayouts
out pnRows Ptr for the number of rows
out pnCols Ptr for the number of columns

Returns

none

9.10.1.31 gslc_XKeyPadSizeGet()

void gslc_XKeyPadSizeGet (
gslc_tsKey ∗ pLayout,
uint8_t ∗ pnRows,
uint8_t ∗ pnCols,
int8_t ∗ pnIndFirst,
int8_t ∗ pnIndLast )

Calculate the overall dimensions of the KeyPad control encompassing the text field and key buttons.

The dimension is calculated in units of the configured key size (width and height), and accounts for any column
spans. It also returns the index of the first and last keys on the keypad.

Parameters
in pLayout Ptr to the KeyPad layout
out pnRows Ptr for the number of rows
out pnCols Ptr for the number of columns
out pnIndFirst Ptr for the index of first key
out pnIndLast Ptr for the index of last key

Returns

none

9.10.1.32 gslc_XKeyPadTouch()

bool gslc_XKeyPadTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch (up,down,move) events to KeyPad element.

Generated by Doxygen
308 File Documentation

• Called from gslc_ElemSendEventTouch()

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

9.10.1.33 gslc_XKeyPadTrackSet()

void gslc_XKeyPadTrackSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nInd,
gslc_tsXKeyPadAttrib eAttrib )

Todo Doc

9.10.1.34 gslc_XKeyPadTxtAddCh()

bool gslc_XKeyPadTxtAddCh (
gslc_tsXKeyPad ∗ pKeyPad,
char ch,
uint8_t nPos )

Add a character to the KeyPad text field at the specified offset (nPos).

Providing an offset equal to the end of the existing buffer length will cause the addition to the end, whereas an offset
within the buffer will cause an insert.

• An addition that causes the buffer length to exceed the maximum allowed will result in the end of the resulting
buffer to be truncated.

• Typically the addition will be done at the current cursor position.

• If the insertion is ahead of the cursor, then the cursor position may be increased.

Generated by Doxygen
9.10 src/elem/XKeyPad.c File Reference 309

Parameters
in pKeyPad Ptr to the KeyPad
in ch Character to add
in nPos Buffer position for the insertion

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

9.10.1.35 gslc_XKeyPadTxtAddStr()

bool gslc_XKeyPadTxtAddStr (
gslc_tsXKeyPad ∗ pKeyPad,
const char ∗ pStr,
uint8_t nPos )

Add a string to the KeyPad text field at the specified offset (nPos).

Providing an offset equal to the end of the existing buffer length will cause the addition to the end, whereas an offset
within the buffer will cause an insert.

• An addition that causes the buffer length to exceed the maximum allowed will result in the end of the resulting
buffer to be truncated.

• Typically the addition will be done at the current cursor position.

• If the insertion is ahead of the cursor, then the cursor position may be increased.

• This routine may be useful when adding multi-byte characters for future support of foreign characters.

Parameters
in pKeyPad Ptr to the KeyPad
in pStr String to add
in nPos Buffer position for the insertion

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

9.10.1.36 gslc_XKeyPadTxtDelCh()

bool gslc_XKeyPadTxtDelCh (
gslc_tsXKeyPad ∗ pKeyPad,
uint8_t nPos )

Remove a character from the KeyPad text field at the specified offset (nPos).

Generated by Doxygen
310 File Documentation

• Typically the addition will be done at the current cursor position.

• If the removal is ahead of the cursor, then the cursor position may be decreased.

Parameters
in pKeyPad Ptr to the KeyPad
in nPos Buffer position for the removal

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

9.10.2 Variable Documentation

9.10.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.10.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.11 src/elem/XKeyPad.h File Reference

#include "GUIslice.h"
Include dependency graph for XKeyPad.h:

src/elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 311

This graph shows which files directly or indirectly include this file:

src/elem/XKeyPad.h

src/elem/XKeyPad.c src/elem/XKeyPad_Alpha.h src/elem/XKeyPad_Num.h

src/elem/XKeyPad_Alpha src/elem/XKeyPad_Num
-setup.h -setup.h

src/elem/XKeyPad_Alpha.c src/elem/XKeyPad_Num.c

Data Structures

• struct gslc_tsXKeyPadResult
Return status for XKeyPad.
• struct gslc_tsKey
Key information. Defines everything we need to know about a particular key.
• struct gslc_tsLabelSpecial
Key Label strings for special buttons.
• struct gslc_tsXKeyPadCfg
Configuration for the KeyPad.
• struct gslc_tsXKeyPadData
Input callback data structure.
• struct gslc_tsXKeyPad
Extended data for KeyPad element.

Macros

• #define XKEYPAD_BUF_MAX
• #define XKEYPAD_KEY_LEN
• #define XKEYPAD_CURSOR_ENHANCED
• #define XKEYPAD_CURSOR_CH
• #define GSLC_TYPEX_KEYPAD
• #define XKEYPAD_CB_STATE_DONE
• #define XKEYPAD_CB_STATE_CANCEL
• #define XKEYPAD_CB_STATE_UPDATE
• #define XKEYPAD_REDRAW_NONE
• #define XKEYPAD_REDRAW_TXT
• #define XKEYPAD_REDRAW_KEY
• #define XKEYPAD_REDRAW_ALL
• #define XKEYPAD_REDRAW_FULL
• #define DEBUG_XKEYPAD
Debug message for XKeyPad (1=enabled, 0=disabled)

Generated by Doxygen
312 File Documentation

Typedefs

• typedef struct gslc_tsKey gslc_tsKey


Key information. Defines everything we need to know about a particular key.
• typedef void(∗ GSLC_CB_XKEYPAD_RESET) (void ∗pvKeyPadConfig)
• typedef void(∗ GSLC_CB_XKEYPAD_TXT_INIT) (void ∗pvKeyPad)
• typedef void(∗ GSLC_CB_XKEYPAD_LABEL_GET) (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char
∗pStr)
• typedef void(∗ GSLC_CB_XKEYPAD_SYTLE_GET) (void ∗pvKeyPad, uint8_t nId, bool ∗bVisible, gslc_ts←-
Color ∗pcolTxt, gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)
• typedef void(∗ GSLC_CB_XKEYPAD_BTN_EVT) (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult ∗ps←-
Result)

Enumerations

• enum {
KEYPAD_ID_BACKSPACE, KEYPAD_ID_SPACE, KEYPAD_ID_ESC, KEYPAD_ID_ENTER,
KEYPAD_ID_SWAP_PAD, KEYPAD_ID_SCROLL_LEFT, KEYPAD_ID_SCROLL_RIGHT, KEYPAD_ID_←-
BASIC_START,
KEYPAD_ID_TXT, KEYPAD_ID__END }
• enum {
E_XKEYPAD_TYPE_BASIC, E_XKEYPAD_TYPE_SPECIAL, E_XKEYPAD_TYPE_TXT, E_XKEYPAD_T←-
YPE_UNUSED,
E_XKEYPAD_TYPE_END }
• enum gslc_tsXKeyPadAttrib { E_XKEYPAD_ATTRIB_FOCUS, E_XKEYPAD_ATTRIB_GLOW }

Functions

• void gslc_ElemXKeyPadCfgInit (gslc_tsXKeyPadCfg ∗pConfig)


Provide default initialization for the base XKeyPad.
• int16_t gslc_XKeyPadLookupId (gslc_tsKey ∗pKeys, uint8_t nKeyId)
Find a key ID within a KeyPad label array and return it's index into the array.
• int16_t gslc_XKeyPadLookupSpecialId (gslc_tsLabelSpecial ∗pLabels, uint8_t nKeyId)
Find a key ID within a KeyPad special label array and return it's index into the array.
• bool gslc_XKeyPadTxtAddCh (gslc_tsXKeyPad ∗pKeyPad, char ch, uint8_t nPos)
Add a character to the KeyPad text field at the specified offset (nPos).
• bool gslc_XKeyPadTxtAddStr (gslc_tsXKeyPad ∗pKeyPad, const char ∗pStr, uint8_t nPos)
Add a string to the KeyPad text field at the specified offset (nPos).
• bool gslc_XKeyPadTxtDelCh (gslc_tsXKeyPad ∗pKeyPad, uint8_t nPos)
Remove a character from the KeyPad text field at the specified offset (nPos).
• bool gslc_XKeyPadLayoutSet (gslc_tsXKeyPadCfg ∗pConfig, int8_t eLayoutSel)
Select a new KeyPad layout.
• void gslc_XKeyPadSizeAllGet (gslc_tsKey ∗∗pLayouts, uint8_t nNumLayouts, uint8_t ∗pnRows, uint8_t ∗pn←-
Cols)
Calculate the overall dimensions of the KeyPad control encompassing all available layouts for the KeyPad, leveraging
the computation in gslc_XKeyPadSizeGet().
• void gslc_XKeyPadSizeGet (gslc_tsKey ∗pLayout, uint8_t ∗pnRows, uint8_t ∗pnCols, int8_t ∗pnIndFirst,
int8_t ∗pnIndLast)
Calculate the overall dimensions of the KeyPad control encompassing the text field and key buttons.
• void gslc_XKeyPadDrawKey (gslc_tsGui ∗pGui, gslc_tsXKeyPad ∗pXData, gslc_tsKey ∗pKey, bool bGlow,
bool bFocus)
Draw a key to the screen.

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 313

• gslc_tsElemRef ∗ gslc_XKeyPadCreateBase (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


KeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg ∗pConfig)
Create a KeyPad Element.
• void gslc_ElemXKeyPadValSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStrBuf)
Set the current value for the editable text field.
• void gslc_ElemXKeyPadTargetRefSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsElemRef ∗p←-
TargetRef)
Set target element reference for KeyPad return value.
• bool gslc_ElemXKeyPadValGet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, char ∗pStrBuf, uint8_t nStr←-
BufMax)
Fetch the current value string associated with KeyPad element.
• char ∗ gslc_ElemXKeyPadDataValGet (gslc_tsGui ∗pGui, void ∗pvData)
Fetch the final value string of the KeyPad from a callback.
• int16_t gslc_ElemXKeyPadDataTargetIdGet (gslc_tsGui ∗pGui, void ∗pvData)
Fetch the element target ID associated with this KeyPad.
• void gslc_XKeyPadPendRedrawReset (gslc_tsXKeyPadResult ∗pResult)
• void gslc_XKeyPadPendRedrawAddKey (gslc_tsXKeyPadResult ∗pResult, int16_t nId)
• void gslc_XKeyPadPendRedrawAddTxt (gslc_tsXKeyPadResult ∗pResult)
• void gslc_XKeyPadTrackSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nInd, gslc_tsXKeyPad←-
Attrib eAttrib)
• void gslc_XKeyPadFocusSetDefault (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• void gslc_XKeyPadRedrawUpdate (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• bool gslc_XKeyPadDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a KeyPad element on the screen.
• bool gslc_XKeyPadTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t n←-
RelY)
Handle touch (up,down,move) events to KeyPad element.
• void gslc_ElemXKeyPadValSetCb (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_INPUT
pfuncCb)
Set the callback function associated with the KeyPad.
• void gslc_ElemXKeyPadCfgSetRoundEn (gslc_tsXKeyPadCfg ∗pConfig, bool bEn)
Update the KeyPad configuration to enable rounded button corners.
• void gslc_ElemXKeyPadCfgSetButtonSz (gslc_tsXKeyPadCfg ∗pConfig, int8_t nButtonSzW, int8_t nButton←-
SzH)
Update the KeyPad configuration to define the KeyPad button sizing.
• void gslc_ElemXKeyPadCfgSetButtonSpace (gslc_tsXKeyPadCfg ∗pConfig, int8_t nSpaceX, int8_t nSpaceY)
Update the KeyPad configuration to define the KeyPad button spacing.
• void gslc_XKeyPadDrawVirtualTxt (gslc_tsGui ∗pGui, gslc_tsRect rElem, gslc_tsXKeyPad ∗pKeyPad, gslc←-
_tsColor cColFrame, gslc_tsColor cColFill, gslc_tsColor cColTxt)
Draw a virtual Text Element.
• void gslc_XKeyPadDrawVirtualBtn (gslc_tsGui ∗pGui, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBuf←-
Max, int16_t nFontId, gslc_tsColor cColFrame, gslc_tsColor cColFill, gslc_tsColor cColFillGlow, gslc_tsColor
cColTxt, bool bRoundedEn, bool bGlow, bool bFocus)
Draw a virtual textual Button Element.
• void gslc_ElemXKeyPadInputAsk (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pKeyPadRef, int16_t nPgPopup,
gslc_tsElemRef ∗pTxtRef)
Trigger a KeyPad popup and associate it with a text element.
• char ∗ gslc_ElemXKeyPadInputGet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pTxtRef, void ∗pvCbData)
Complete a KeyPad popup by retrieving the input data and storing it in the text element.

Generated by Doxygen
314 File Documentation

Variables

• static const int RBIT_TXT


• static const int RBIT_KEYONE
• static const int RBIT_KEYALL
• static const int RBIT_CTRL

9.11.1 Macro Definition Documentation

9.11.1.1 DEBUG_XKEYPAD

#define DEBUG_XKEYPAD

Debug message for XKeyPad (1=enabled, 0=disabled)

9.11.1.2 GSLC_TYPEX_KEYPAD

#define GSLC_TYPEX_KEYPAD

9.11.1.3 XKEYPAD_BUF_MAX

#define XKEYPAD_BUF_MAX

9.11.1.4 XKEYPAD_CB_STATE_CANCEL

#define XKEYPAD_CB_STATE_CANCEL

9.11.1.5 XKEYPAD_CB_STATE_DONE

#define XKEYPAD_CB_STATE_DONE

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 315

9.11.1.6 XKEYPAD_CB_STATE_UPDATE

#define XKEYPAD_CB_STATE_UPDATE

9.11.1.7 XKEYPAD_CURSOR_CH

#define XKEYPAD_CURSOR_CH

9.11.1.8 XKEYPAD_CURSOR_ENHANCED

#define XKEYPAD_CURSOR_ENHANCED

9.11.1.9 XKEYPAD_KEY_LEN

#define XKEYPAD_KEY_LEN

9.11.1.10 XKEYPAD_REDRAW_ALL

#define XKEYPAD_REDRAW_ALL

9.11.1.11 XKEYPAD_REDRAW_FULL

#define XKEYPAD_REDRAW_FULL

9.11.1.12 XKEYPAD_REDRAW_KEY

#define XKEYPAD_REDRAW_KEY

9.11.1.13 XKEYPAD_REDRAW_NONE

#define XKEYPAD_REDRAW_NONE

Generated by Doxygen
316 File Documentation

9.11.1.14 XKEYPAD_REDRAW_TXT

#define XKEYPAD_REDRAW_TXT

9.11.2 Typedef Documentation

9.11.2.1 GSLC_CB_XKEYPAD_BTN_EVT

typedef void(∗ GSLC_CB_XKEYPAD_BTN_EVT) (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult


∗psResult)

9.11.2.2 GSLC_CB_XKEYPAD_LABEL_GET

typedef void(∗ GSLC_CB_XKEYPAD_LABEL_GET) (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char
∗pStr)

9.11.2.3 GSLC_CB_XKEYPAD_RESET

typedef void(∗ GSLC_CB_XKEYPAD_RESET) (void ∗pvKeyPadConfig)

9.11.2.4 GSLC_CB_XKEYPAD_SYTLE_GET

typedef void(∗ GSLC_CB_XKEYPAD_SYTLE_GET) (void ∗pvKeyPad, uint8_t nId, bool ∗bVisible, gslc_←-
tsColor ∗pcolTxt, gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)

9.11.2.5 GSLC_CB_XKEYPAD_TXT_INIT

typedef void(∗ GSLC_CB_XKEYPAD_TXT_INIT) (void ∗pvKeyPad)

9.11.2.6 gslc_tsKey

typedef struct gslc_tsKey gslc_tsKey

Key information. Defines everything we need to know about a particular key.

9.11.3 Enumeration Type Documentation

9.11.3.1 anonymous enum

anonymous enum

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 317

Enumerator

KEYPAD_ID_BACKSPACE
KEYPAD_ID_SPACE
KEYPAD_ID_ESC
KEYPAD_ID_ENTER
KEYPAD_ID_SWAP_PAD
KEYPAD_ID_SCROLL_LEFT
KEYPAD_ID_SCROLL_RIGHT
KEYPAD_ID_BASIC_START
KEYPAD_ID_TXT
KEYPAD_ID__END

9.11.3.2 anonymous enum

anonymous enum

Enumerator

E_XKEYPAD_TYPE_BASIC
E_XKEYPAD_TYPE_SPECIAL
E_XKEYPAD_TYPE_TXT
E_XKEYPAD_TYPE_UNUSED
E_XKEYPAD_TYPE_END

9.11.3.3 gslc_tsXKeyPadAttrib

enum gslc_tsXKeyPadAttrib

Enumerator

E_XKEYPAD_ATTRIB_FOCUS
E_XKEYPAD_ATTRIB_GLOW

9.11.4 Function Documentation

9.11.4.1 gslc_ElemXKeyPadCfgInit()

void gslc_ElemXKeyPadCfgInit (
gslc_tsXKeyPadCfg ∗ pConfig )

Generated by Doxygen
318 File Documentation

Provide default initialization for the base XKeyPad.

• These defaults will be overwritten by variant-specific initialization or through user configuration APIs.

Parameters

in pConfig Ptr to the KeyPad base config structure

Returns

none

9.11.4.2 gslc_ElemXKeyPadCfgSetButtonSpace()

void gslc_ElemXKeyPadCfgSetButtonSpace (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t nSpaceX,
int8_t nSpaceY )

Update the KeyPad configuration to define the KeyPad button spacing.

• This defines the inset amount (X and Y) from the Button Size

• A spacing of (1,1) will mean that the button is drawn with a 1 pixel margin around the grid defined by the
Button Size

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in nSpaceX Amount to inset button in horizontal direction (pixels)
in nSpaceY Amount to inset button in vertical direction (pixels)

Returns

none

9.11.4.3 gslc_ElemXKeyPadCfgSetButtonSz()

void gslc_ElemXKeyPadCfgSetButtonSz (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t nButtonSzW,
int8_t nButtonSzH )

Update the KeyPad configuration to define the KeyPad button sizing.

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 319

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in nButtonSzW Width of buttons in pixels
in nButtonSzH Height of buttons in pixels

Returns

none

9.11.4.4 gslc_ElemXKeyPadCfgSetRoundEn()

void gslc_ElemXKeyPadCfgSetRoundEn (
gslc_tsXKeyPadCfg ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable rounded button corners.

Parameters

in,out pConfig Pointer to the XKeyPad base config structure


in bEn Enable rounded corners

Returns

none

9.11.4.5 gslc_ElemXKeyPadDataTargetIdGet()

int16_t gslc_ElemXKeyPadDataTargetIdGet (
gslc_tsGui ∗ pGui,
void ∗ pvData )

Fetch the element target ID associated with this KeyPad.

Parameters

in pGui Pointer to GUI


in pvData : Void ptr to callback data structure

Returns

Target Element ID or GSLC_ID_NONE if unspecified

Generated by Doxygen
320 File Documentation

9.11.4.6 gslc_ElemXKeyPadDataValGet()

char∗ gslc_ElemXKeyPadDataValGet (
gslc_tsGui ∗ pGui,
void ∗ pvData )

Fetch the final value string of the KeyPad from a callback.

Parameters

in pGui Pointer to GUI


out pvData : Void ptr to callback data structure

Returns

Pointer to edited character string

9.11.4.7 gslc_ElemXKeyPadInputAsk()

void gslc_ElemXKeyPadInputAsk (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pKeyPadRef,
int16_t nPgPopup,
gslc_tsElemRef ∗ pTxtRef )

Trigger a KeyPad popup and associate it with a text element.

• This function also updates the maximum KeyPad buffer length to match that of the target text element, up to
the maximum XKEYPAD_BUF_MAX.

Parameters

in pGui Pointer to GUI


in pKeyPadRef Pointer to KeyPad element reference
in nPgPopup Page enum that contains the popup to show
in pTxtRef Pointer to associated text field element reference

Returns

none

9.11.4.8 gslc_ElemXKeyPadInputGet()

char∗ gslc_ElemXKeyPadInputGet (
gslc_tsGui ∗ pGui,

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 321

gslc_tsElemRef ∗ pTxtRef,
void ∗ pvCbData )

Complete a KeyPad popup by retrieving the input data and storing it in the text element.

Parameters

in pGui Pointer to GUI


in pTxtRef Pointer to associated text field element reference
in pvCbData Void pointer to callback function's pvData

Returns

The text string that was fetched from the KeyPad (NULL terminated)

9.11.4.9 gslc_ElemXKeyPadTargetRefSet()

void gslc_ElemXKeyPadTargetRefSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsElemRef ∗ pTargetRef )

Set target element reference for KeyPad return value.

• The Target Reference is used in the GSLC_CB_INPUT callback so that the user has the context needed to
determine which field should be edited with the contents of the KeyPad edit field

• It is expected that the user will call this function when showing the KeyPad popup dialog

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
in pTargetRef Element reference for target of KeyPad value

Returns

none

9.11.4.10 gslc_ElemXKeyPadValGet()

bool gslc_ElemXKeyPadValGet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,

Generated by Doxygen
322 File Documentation

char ∗ pStrBuf,
uint8_t nStrBufMax )

Fetch the current value string associated with KeyPad element.

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 323

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
out pStrBuf String buffer
in nStrBufMax Maximum length of string buffer (pStrBuf) including terminator

Returns

true if success, false otherwise

9.11.4.11 gslc_ElemXKeyPadValSet()

void gslc_ElemXKeyPadValSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
const char ∗ pStrBuf )

Set the current value for the editable text field.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to KeyPad Element reference
in pStrBuf String to copy into keypad

Returns

none

9.11.4.12 gslc_ElemXKeyPadValSetCb()

void gslc_ElemXKeyPadValSetCb (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_INPUT pfuncCb )

Set the callback function associated with the KeyPad.

• This function will be called during updates and OK / Cancel

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element Reference for KeyPad
Generated by Doxygen
in pfuncCb Callback function pointer
324 File Documentation

Returns

none

9.11.4.13 gslc_XKeyPadCreateBase()

gslc_tsElemRef∗ gslc_XKeyPadCreateBase (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg ∗ pConfig )

Create a KeyPad Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Pointer to base Config options

Returns

Pointer to Element or NULL if failure

9.11.4.14 gslc_XKeyPadDraw()

bool gslc_XKeyPadDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a KeyPad element on the screen.

• Called during redraw

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 325

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

9.11.4.15 gslc_XKeyPadDrawKey()

void gslc_XKeyPadDrawKey (
gslc_tsGui ∗ pGui,
gslc_tsXKeyPad ∗ pXData,
gslc_tsKey ∗ pKey,
bool bGlow,
bool bFocus )

Draw a key to the screen.

Parameters

in pGui Pointer to GUI


in pXData Ptr to extended element data structure
in pKey Ptr to key being drawn
in bGlow Indicate if key is in glow state
in bFocus Indicate if key is in focus state

Returns

none

9.11.4.16 gslc_XKeyPadDrawVirtualBtn()

void gslc_XKeyPadDrawVirtualBtn (
gslc_tsGui ∗ pGui,
gslc_tsRect rElem,
char ∗ pStrBuf,
uint8_t nStrBufMax,
int16_t nFontId,
gslc_tsColor cColFrame,
gslc_tsColor cColFill,
gslc_tsColor cColFillGlow,
gslc_tsColor cColTxt,

Generated by Doxygen
326 File Documentation

bool bRoundedEn,
bool bGlow,
bool bFocus )

Draw a virtual textual Button Element.

Parameters

in pGui Pointer to GUI


in rElem Rectangle coordinates defining element size
in pStrBuf String to copy into element
in nStrBufMax Maximum length of string buffer (pStrBuf).
in nFontId Font ID to use for text display
in cColFrame Frame color for element
in cColFill Fill color for element
in cColFillGlow Fill color for element when glowing/focused
in cColTxt Text color for element
in bRoundedEn Use Rounded Corners?
in bGlow Indicate btn is in glow state
in bFocus Indicate btn is in focus state

Returns

none

9.11.4.17 gslc_XKeyPadDrawVirtualTxt()

void gslc_XKeyPadDrawVirtualTxt (
gslc_tsGui ∗ pGui,
gslc_tsRect rElem,
gslc_tsXKeyPad ∗ pKeyPad,
gslc_tsColor cColFrame,
gslc_tsColor cColFill,
gslc_tsColor cColTxt )

Draw a virtual Text Element.

• Creates a text string with filled background

Parameters

in pGui Pointer to GUI


in rElem Rectangle coordinates defining element size
in pKeyPad Pointer to KeyPad struct
in cColFrame Frame color for element
in cColFill Fill color for element
in cColTxt Text color for element

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 327

Returns

none

9.11.4.18 gslc_XKeyPadFocusSetDefault()

void gslc_XKeyPadFocusSetDefault (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Todo Doc

9.11.4.19 gslc_XKeyPadLayoutSet()

bool gslc_XKeyPadLayoutSet (
gslc_tsXKeyPadCfg ∗ pConfig,
int8_t eLayoutSel )

Select a new KeyPad layout.

• Multiple KeyPad layouts can share the same key key definition array (eg. KEYPAD_LAYOUT)

• This function returns an indication of whether a full KeyPad control redraw is required, ie. the KeyPad layout
definition has changed. With changes in the KeyPad definition, there may be a different number of visible
keys or arrangements, necessitating a background redraw.

Parameters

in pConfig Ptr to the KeyPad configuration


in eLayoutSel Layout index to select

Returns

true if a full redraw should be performed

9.11.4.20 gslc_XKeyPadLookupId()

int16_t gslc_XKeyPadLookupId (
gslc_tsKey ∗ pKeys,
uint8_t nKeyId )

Find a key ID within a KeyPad label array and return it's index into the array.

• It is expected that the KeyPad label array is terminated with KEYPAD_ID__END

Generated by Doxygen
328 File Documentation

Parameters
in pKeys Ptr to the Keypad label array
in n←- Key ID to look for
KeyId

Returns

the index into the array if the ID was found or -1 if the key ID was not found

9.11.4.21 gslc_XKeyPadLookupSpecialId()

int16_t gslc_XKeyPadLookupSpecialId (
gslc_tsLabelSpecial ∗ pLabels,
uint8_t nKeyId )

Find a key ID within a KeyPad special label array and return it's index into the array.

• It is expected that the KeyPad label array is terminated with KEYPAD_ID__END

Parameters
in pLabels Ptr to the Keypad special label array
in nKeyId Key ID to look for

Returns

the index into the array if the ID was found or -1 if the key ID was not found

9.11.4.22 gslc_XKeyPadPendRedrawAddKey()

void gslc_XKeyPadPendRedrawAddKey (
gslc_tsXKeyPadResult ∗ pResult,
int16_t nId )

Todo Doc

Generated by Doxygen
9.11 src/elem/XKeyPad.h File Reference 329

9.11.4.23 gslc_XKeyPadPendRedrawAddTxt()

void gslc_XKeyPadPendRedrawAddTxt (
gslc_tsXKeyPadResult ∗ pResult )

Todo Doc

9.11.4.24 gslc_XKeyPadPendRedrawReset()

void gslc_XKeyPadPendRedrawReset (
gslc_tsXKeyPadResult ∗ pResult )

Todo Doc

9.11.4.25 gslc_XKeyPadRedrawUpdate()

void gslc_XKeyPadRedrawUpdate (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Todo Doc

9.11.4.26 gslc_XKeyPadSizeAllGet()

void gslc_XKeyPadSizeAllGet (
gslc_tsKey ∗∗ pLayouts,
uint8_t nNumLayouts,
uint8_t ∗ pnRows,
uint8_t ∗ pnCols )

Calculate the overall dimensions of the KeyPad control encompassing all available layouts for the KeyPad, leveraging
the computation in gslc_XKeyPadSizeGet().

Parameters

in pLayouts Ptr to the array of KeyPad layouts


in nNumLayouts Number of layouts in pLayouts
out pnRows Ptr for the number of rows
out pnCols Ptr for the number of columns

Generated by Doxygen
330 File Documentation

Returns

none

9.11.4.27 gslc_XKeyPadSizeGet()

void gslc_XKeyPadSizeGet (
gslc_tsKey ∗ pLayout,
uint8_t ∗ pnRows,
uint8_t ∗ pnCols,
int8_t ∗ pnIndFirst,
int8_t ∗ pnIndLast )

Calculate the overall dimensions of the KeyPad control encompassing the text field and key buttons.

The dimension is calculated in units of the configured key size (width and height), and accounts for any column
spans. It also returns the index of the first and last keys on the keypad.

Parameters
in pLayout Ptr to the KeyPad layout
out pnRows Ptr for the number of rows
out pnCols Ptr for the number of columns
out pnIndFirst Ptr for the index of first key
out pnIndLast Ptr for the index of last key

Returns

none

9.11.4.28 gslc_XKeyPadTouch()

bool gslc_XKeyPadTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch (up,down,move) events to KeyPad element.

• Called from gslc_ElemSendEventTouch()

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 Generated by Doxygen

in nRelX Touch X coord relative to element


in nRelY Touch Y coord relative to element
9.11 src/elem/XKeyPad.h File Reference 331

Returns

true if success, false otherwise

9.11.4.29 gslc_XKeyPadTrackSet()

void gslc_XKeyPadTrackSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nInd,
gslc_tsXKeyPadAttrib eAttrib )

Todo Doc

9.11.4.30 gslc_XKeyPadTxtAddCh()

bool gslc_XKeyPadTxtAddCh (
gslc_tsXKeyPad ∗ pKeyPad,
char ch,
uint8_t nPos )

Add a character to the KeyPad text field at the specified offset (nPos).

Providing an offset equal to the end of the existing buffer length will cause the addition to the end, whereas an offset
within the buffer will cause an insert.

• An addition that causes the buffer length to exceed the maximum allowed will result in the end of the resulting
buffer to be truncated.

• Typically the addition will be done at the current cursor position.

• If the insertion is ahead of the cursor, then the cursor position may be increased.

Parameters
in pKeyPad Ptr to the KeyPad
in ch Character to add
in nPos Buffer position for the insertion

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

Generated by Doxygen
332 File Documentation

9.11.4.31 gslc_XKeyPadTxtAddStr()

bool gslc_XKeyPadTxtAddStr (
gslc_tsXKeyPad ∗ pKeyPad,
const char ∗ pStr,
uint8_t nPos )

Add a string to the KeyPad text field at the specified offset (nPos).

Providing an offset equal to the end of the existing buffer length will cause the addition to the end, whereas an offset
within the buffer will cause an insert.

• An addition that causes the buffer length to exceed the maximum allowed will result in the end of the resulting
buffer to be truncated.

• Typically the addition will be done at the current cursor position.

• If the insertion is ahead of the cursor, then the cursor position may be increased.

• This routine may be useful when adding multi-byte characters for future support of foreign characters.

Parameters
in pKeyPad Ptr to the KeyPad
in pStr String to add
in nPos Buffer position for the insertion

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

9.11.4.32 gslc_XKeyPadTxtDelCh()

bool gslc_XKeyPadTxtDelCh (
gslc_tsXKeyPad ∗ pKeyPad,
uint8_t nPos )

Remove a character from the KeyPad text field at the specified offset (nPos).

• Typically the addition will be done at the current cursor position.

• If the removal is ahead of the cursor, then the cursor position may be decreased.

Parameters
in pKeyPad Ptr to the KeyPad
in nPos Buffer position for the removal

Generated by Doxygen
9.12 src/elem/XKeyPad_Alpha-setup.h File Reference 333

Returns

true if the text field should be redrawn, false if no redraw is needed (ie. no change)

9.11.5 Variable Documentation

9.11.5.1 RBIT_CTRL

const int RBIT_CTRL [static]

9.11.5.2 RBIT_KEYALL

const int RBIT_KEYALL [static]

9.11.5.3 RBIT_KEYONE

const int RBIT_KEYONE [static]

9.11.5.4 RBIT_TXT

const int RBIT_TXT [static]

9.12 src/elem/XKeyPad_Alpha-setup.h File Reference

#include "elem/XKeyPad.h"
#include "elem/XKeyPad_Alpha.h"
Include dependency graph for XKeyPad_Alpha-setup.h:

src/elem/XKeyPad_Alpha
-setup.h

elem/XKeyPad_Alpha.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
334 File Documentation

This graph shows which files directly or indirectly include this file:

src/elem/XKeyPad_Alpha
-setup.h

src/elem/XKeyPad_Alpha.c

Macros

• #define XKEYPAD_EXTEND_CHAR
• #define XKEYPAD_LABEL_MAX
• #define XKEYPAD_DISP_MAX
• #define XKEYPAD_KEY_W
• #define XKEYPAD_KEY_H
• #define XKEYPAD_SPACING_X
• #define XKEYPAD_SPACING_Y
• #define XKEYPAD_COL_DISABLE_TXT
• #define XKEYPAD_COL_DISABLE_FILL
• #define XKEYPAD_COL_DEF_TXT
• #define XKEYPAD_COL_DEF_FRAME
• #define XKEYPAD_COL_DEF_FILL
• #define XKEYPAD_COL_DEF_GLOW
• #define XKEYPAD_COL_BASIC_FILL
• #define XKEYPAD_COL_BASIC_GLOW
• #define XKEYPAD_COL_TEXT_TXT
• #define XKEYPAD_COL_TEXT_FILL
• #define XKEYPAD_COL_TEXT_GLOW
• #define XKEYPAD_COL_SPACE_FILL
• #define XKEYPAD_COL_SPACE_GLOW
• #define XKEYPAD_COL_ESC_FILL
• #define XKEYPAD_COL_ESC_GLOW
• #define XKEYPAD_COL_ENTER_FILL
• #define XKEYPAD_COL_ENTER_GLOW
• #define XKEYPAD_COL_SCROLL_L_FILL
• #define XKEYPAD_COL_SCROLL_L_GLOW
• #define XKEYPAD_COL_SCROLL_R_FILL
• #define XKEYPAD_COL_SCROLL_R_GLOW

Enumerations

• enum gslc_teXKeyPadSel {
E_XKEYPAD_SET_UPPER, E_XKEYPAD_SET_LOWER, E_XKEYPAD_SET_NUM, E_XKEYPAD_SET←-
__MAX,
E_XKEYPAD_SET_NUM, E_XKEYPAD_SET__MAX }

Generated by Doxygen
9.12 src/elem/XKeyPad_Alpha-setup.h File Reference 335

Variables

• static const char ∗ XKEYPAD_LABEL_SPACE


• static const int8_t XKEYPAD_LAYOUT_DEFAULT
• static gslc_tsLabelSpecial KEYPAD_SPECIAL_LABEL [ ]
• static const char ∗ KEYPAD_SET_LABEL [ ]
• static const char ∗ KEYPAD_SPECIAL_SELECT [ ]
• static gslc_tsKey KEYPAD_LAYOUT [ ]
• static gslc_tsKey ∗ KEYPAD_LAYOUTS [E_XKEYPAD_SET__MAX]

9.12.1 Macro Definition Documentation

9.12.1.1 XKEYPAD_COL_BASIC_FILL

#define XKEYPAD_COL_BASIC_FILL

9.12.1.2 XKEYPAD_COL_BASIC_GLOW

#define XKEYPAD_COL_BASIC_GLOW

9.12.1.3 XKEYPAD_COL_DEF_FILL

#define XKEYPAD_COL_DEF_FILL

9.12.1.4 XKEYPAD_COL_DEF_FRAME

#define XKEYPAD_COL_DEF_FRAME

9.12.1.5 XKEYPAD_COL_DEF_GLOW

#define XKEYPAD_COL_DEF_GLOW

Generated by Doxygen
336 File Documentation

9.12.1.6 XKEYPAD_COL_DEF_TXT

#define XKEYPAD_COL_DEF_TXT

9.12.1.7 XKEYPAD_COL_DISABLE_FILL

#define XKEYPAD_COL_DISABLE_FILL

9.12.1.8 XKEYPAD_COL_DISABLE_TXT

#define XKEYPAD_COL_DISABLE_TXT

9.12.1.9 XKEYPAD_COL_ENTER_FILL

#define XKEYPAD_COL_ENTER_FILL

9.12.1.10 XKEYPAD_COL_ENTER_GLOW

#define XKEYPAD_COL_ENTER_GLOW

9.12.1.11 XKEYPAD_COL_ESC_FILL

#define XKEYPAD_COL_ESC_FILL

9.12.1.12 XKEYPAD_COL_ESC_GLOW

#define XKEYPAD_COL_ESC_GLOW

9.12.1.13 XKEYPAD_COL_SCROLL_L_FILL

#define XKEYPAD_COL_SCROLL_L_FILL

Generated by Doxygen
9.12 src/elem/XKeyPad_Alpha-setup.h File Reference 337

9.12.1.14 XKEYPAD_COL_SCROLL_L_GLOW

#define XKEYPAD_COL_SCROLL_L_GLOW

9.12.1.15 XKEYPAD_COL_SCROLL_R_FILL

#define XKEYPAD_COL_SCROLL_R_FILL

9.12.1.16 XKEYPAD_COL_SCROLL_R_GLOW

#define XKEYPAD_COL_SCROLL_R_GLOW

9.12.1.17 XKEYPAD_COL_SPACE_FILL

#define XKEYPAD_COL_SPACE_FILL

9.12.1.18 XKEYPAD_COL_SPACE_GLOW

#define XKEYPAD_COL_SPACE_GLOW

9.12.1.19 XKEYPAD_COL_TEXT_FILL

#define XKEYPAD_COL_TEXT_FILL

9.12.1.20 XKEYPAD_COL_TEXT_GLOW

#define XKEYPAD_COL_TEXT_GLOW

9.12.1.21 XKEYPAD_COL_TEXT_TXT

#define XKEYPAD_COL_TEXT_TXT

Generated by Doxygen
338 File Documentation

9.12.1.22 XKEYPAD_DISP_MAX

#define XKEYPAD_DISP_MAX

9.12.1.23 XKEYPAD_EXTEND_CHAR

#define XKEYPAD_EXTEND_CHAR

9.12.1.24 XKEYPAD_KEY_H

#define XKEYPAD_KEY_H

9.12.1.25 XKEYPAD_KEY_W

#define XKEYPAD_KEY_W

9.12.1.26 XKEYPAD_LABEL_MAX

#define XKEYPAD_LABEL_MAX

9.12.1.27 XKEYPAD_SPACING_X

#define XKEYPAD_SPACING_X

9.12.1.28 XKEYPAD_SPACING_Y

#define XKEYPAD_SPACING_Y

9.12.2 Enumeration Type Documentation

9.12.2.1 gslc_teXKeyPadSel

enum gslc_teXKeyPadSel

Generated by Doxygen
9.12 src/elem/XKeyPad_Alpha-setup.h File Reference 339

Enumerator

E_XKEYPAD_SET_UPPER
E_XKEYPAD_SET_LOWER
E_XKEYPAD_SET_NUM
E_XKEYPAD_SET__MAX
E_XKEYPAD_SET_NUM
E_XKEYPAD_SET__MAX

9.12.3 Variable Documentation

9.12.3.1 KEYPAD_LAYOUT

gslc_tsKey KEYPAD_LAYOUT[ ] [static]

9.12.3.2 KEYPAD_LAYOUTS

gslc_tsKey∗ KEYPAD_LAYOUTS[E_XKEYPAD_SET__MAX] [static]

9.12.3.3 KEYPAD_SET_LABEL

const char∗ KEYPAD_SET_LABEL[ ] [static]

9.12.3.4 KEYPAD_SPECIAL_LABEL

gslc_tsLabelSpecial KEYPAD_SPECIAL_LABEL[ ] [static]

9.12.3.5 KEYPAD_SPECIAL_SELECT

const char∗ KEYPAD_SPECIAL_SELECT[ ] [static]

Generated by Doxygen
340 File Documentation

9.12.3.6 XKEYPAD_LABEL_SPACE

const char∗ XKEYPAD_LABEL_SPACE [static]

9.12.3.7 XKEYPAD_LAYOUT_DEFAULT

const int8_t XKEYPAD_LAYOUT_DEFAULT [static]

9.13 src/elem/XKeyPad_Alpha.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XKeyPad.h"
#include "elem/XKeyPad_Alpha.h"
#include <stdio.h>
#include "elem/XKeyPad_Alpha-setup.h"
Include dependency graph for XKeyPad_Alpha.c:

src/elem/XKeyPad_Alpha.c

elem/XKeyPad_Alpha
GUIslice_drv.h
-setup.h

elem/XKeyPad_Alpha.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdbool.h string.h inttypes.h GUIslice_config.h stdlib.h

Functions

• void gslc_ElemXKeyPadReset_Alpha (void ∗pvConfig)


Callback function to reset internal state.
• void gslc_ElemXKeyPadTxtInit_Alpha (void ∗pvKeyPad)
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
• void gslc_ElemXKeyPadLabelGet_Alpha (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char ∗pStr)
Callback function to retrieve the label associated with a KeyPad button.

Generated by Doxygen
9.13 src/elem/XKeyPad_Alpha.c File Reference 341

• void gslc_ElemXKeyPadStyleGet_Alpha (void ∗pvKeyPad, uint8_t nId, bool ∗pbVisible, gslc_tsColor ∗pcol←-
Txt, gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)
Callback function to retrieve the style associated with a KeyPad button.
• void gslc_ElemXKeyPadBtnEvt_Alpha (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult ∗psResult)
Callback function activated when a key has been pressed.
• gslc_tsXKeyPadCfg_Alpha gslc_ElemXKeyPadCfgInit_Alpha ()
Initialize the KeyPad config structure.
• gslc_tsElemRef ∗ gslc_ElemXKeyPadCreate_Alpha (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage,
gslc_tsXKeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Alpha ∗pConfig)
Create a KeyPad Element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.13.1 Function Documentation

9.13.1.1 gslc_ElemXKeyPadBtnEvt_Alpha()

void gslc_ElemXKeyPadBtnEvt_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
gslc_tsXKeyPadResult ∗ psResult )

Callback function activated when a key has been pressed.

This callback is used to enable the KeyPad variant to handle any events associated with the key press and update
any internal state.

• The callback is also used to determine whether any redraw actions need to be taken.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out psResult The returned state vector (including redraw)

Returns

none

Generated by Doxygen
342 File Documentation

9.13.1.2 gslc_ElemXKeyPadCfgInit_Alpha()

gslc_tsXKeyPadCfg_Alpha gslc_ElemXKeyPadCfgInit_Alpha ( )

Initialize the KeyPad config structure.

• This routine should be called to initialize the configuration data structure before calling any of the KeyPad
config APIs

Returns

Initialized KeyPad config structure

9.13.1.3 gslc_ElemXKeyPadCreate_Alpha()

gslc_tsElemRef∗ gslc_ElemXKeyPadCreate_Alpha (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg_Alpha ∗ pConfig )

Create a KeyPad Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Ptr to config options

Returns

Pointer to Element or NULL if failure

Generated by Doxygen
9.13 src/elem/XKeyPad_Alpha.c File Reference 343

9.13.1.4 gslc_ElemXKeyPadLabelGet_Alpha()

void gslc_ElemXKeyPadLabelGet_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
uint8_t nStrMax,
char ∗ pStr )

Callback function to retrieve the label associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
in nStrMax Maximum length of return string (including NULL)
out pStr Buffer for the returned label

Returns

none

9.13.1.5 gslc_ElemXKeyPadReset_Alpha()

void gslc_ElemXKeyPadReset_Alpha (
void ∗ pvConfig )

Callback function to reset internal state.

Parameters

in pvConfig Void ptr to the KeyPad config

Returns

none

9.13.1.6 gslc_ElemXKeyPadStyleGet_Alpha()

void gslc_ElemXKeyPadStyleGet_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
bool ∗ pbVisible,
gslc_tsColor ∗ pcolTxt,

Generated by Doxygen
344 File Documentation

gslc_tsColor ∗ pcolFrame,
gslc_tsColor ∗ pcolFill,
gslc_tsColor ∗ pcolGlow )

Callback function to retrieve the style associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

• This function is used to assign the color and visibility state of the keys at runtime.

• This function can also be used to change the appearance dynamically, according to internal state (eg. dimmed
buttons).

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out pbVisible The returned visibility state
out pcolTxt The returned text color
out pcolFrame The returned key's frame color
out pcolFill The returned key's fill color
out pcolGlow The returned key's fill color when highlighted

Returns

none

9.13.1.7 gslc_ElemXKeyPadTxtInit_Alpha()

void gslc_ElemXKeyPadTxtInit_Alpha (
void ∗ pvKeyPad )

Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().

• This is used to ensure any KeyPad variant state can be kept in sync with the text string.

• For example, if a numeric KeyPad is initiaized with a string that contains a minus sign, an internal negation
flag might be set.

Parameters
in pvKeyPad Void ptr to the KeyPad

Returns

none

Generated by Doxygen
9.14 src/elem/XKeyPad_Alpha.h File Reference 345

9.13.2 Variable Documentation

9.13.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.13.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.14 src/elem/XKeyPad_Alpha.h File Reference

#include "GUIslice.h"
#include "elem/XKeyPad.h"
Include dependency graph for XKeyPad_Alpha.h:

src/elem/XKeyPad_Alpha.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
346 File Documentation

This graph shows which files directly or indirectly include this file:

src/elem/XKeyPad_Alpha.h

src/elem/XKeyPad_Alpha
-setup.h

src/elem/XKeyPad_Alpha.c

Data Structures

• struct gslc_tsXKeyPadCfg_Alpha

Functions

• gslc_tsElemRef ∗ gslc_ElemXKeyPadCreate_Alpha (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage,


gslc_tsXKeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Alpha ∗pConfig)
Create a KeyPad Element.
• gslc_tsXKeyPadCfg_Alpha gslc_ElemXKeyPadCfgInit_Alpha ()
Initialize the KeyPad config structure.
• void gslc_ElemXKeyPadReset_Alpha (void ∗pvConfig)
Callback function to reset internal state.
• void gslc_ElemXKeyPadTxtInit_Alpha (void ∗pvKeyPad)
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
• void gslc_ElemXKeyPadLabelGet_Alpha (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char ∗pStr)
Callback function to retrieve the label associated with a KeyPad button.
• void gslc_ElemXKeyPadStyleGet_Alpha (void ∗pvKeyPad, uint8_t nId, bool ∗pbVisible, gslc_tsColor ∗pcol←-
Txt, gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)
Callback function to retrieve the style associated with a KeyPad button.
• void gslc_ElemXKeyPadBtnEvt_Alpha (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult ∗psResult)
Callback function activated when a key has been pressed.

9.14.1 Function Documentation

Generated by Doxygen
9.14 src/elem/XKeyPad_Alpha.h File Reference 347

9.14.1.1 gslc_ElemXKeyPadBtnEvt_Alpha()

void gslc_ElemXKeyPadBtnEvt_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
gslc_tsXKeyPadResult ∗ psResult )

Callback function activated when a key has been pressed.

This callback is used to enable the KeyPad variant to handle any events associated with the key press and update
any internal state.

• The callback is also used to determine whether any redraw actions need to be taken.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out psResult The returned state vector (including redraw)

Returns

none

9.14.1.2 gslc_ElemXKeyPadCfgInit_Alpha()

gslc_tsXKeyPadCfg_Alpha gslc_ElemXKeyPadCfgInit_Alpha ( )

Initialize the KeyPad config structure.

• This routine should be called to initialize the configuration data structure before calling any of the KeyPad
config APIs

Returns

Initialized KeyPad config structure

9.14.1.3 gslc_ElemXKeyPadCreate_Alpha()

gslc_tsElemRef∗ gslc_ElemXKeyPadCreate_Alpha (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg_Alpha ∗ pConfig )

Create a KeyPad Element.

Generated by Doxygen
348 File Documentation

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Ptr to config options

Returns

Pointer to Element or NULL if failure

9.14.1.4 gslc_ElemXKeyPadLabelGet_Alpha()

void gslc_ElemXKeyPadLabelGet_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
uint8_t nStrMax,
char ∗ pStr )

Callback function to retrieve the label associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
in nStrMax Maximum length of return string (including NULL)
out pStr Buffer for the returned label

Returns

none

9.14.1.5 gslc_ElemXKeyPadReset_Alpha()

void gslc_ElemXKeyPadReset_Alpha (
void ∗ pvConfig )

Callback function to reset internal state.

Generated by Doxygen
9.14 src/elem/XKeyPad_Alpha.h File Reference 349

Parameters

in pvConfig Void ptr to the KeyPad config

Returns

none

9.14.1.6 gslc_ElemXKeyPadStyleGet_Alpha()

void gslc_ElemXKeyPadStyleGet_Alpha (
void ∗ pvKeyPad,
uint8_t nId,
bool ∗ pbVisible,
gslc_tsColor ∗ pcolTxt,
gslc_tsColor ∗ pcolFrame,
gslc_tsColor ∗ pcolFill,
gslc_tsColor ∗ pcolGlow )

Callback function to retrieve the style associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

• This function is used to assign the color and visibility state of the keys at runtime.

• This function can also be used to change the appearance dynamically, according to internal state (eg. dimmed
buttons).

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out pbVisible The returned visibility state
out pcolTxt The returned text color
out pcolFrame The returned key's frame color
out pcolFill The returned key's fill color
out pcolGlow The returned key's fill color when highlighted

Returns

none

9.14.1.7 gslc_ElemXKeyPadTxtInit_Alpha()

void gslc_ElemXKeyPadTxtInit_Alpha (
void ∗ pvKeyPad )

Generated by Doxygen
350 File Documentation

Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().

• This is used to ensure any KeyPad variant state can be kept in sync with the text string.

• For example, if a numeric KeyPad is initiaized with a string that contains a minus sign, an internal negation
flag might be set.

Parameters
in pvKeyPad Void ptr to the KeyPad

Returns

none

9.15 src/elem/XKeyPad_Num-setup.h File Reference

#include "elem/XKeyPad.h"
#include "elem/XKeyPad_Num.h"
Include dependency graph for XKeyPad_Num-setup.h:

src/elem/XKeyPad_Num
-setup.h

elem/XKeyPad_Num.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.15 src/elem/XKeyPad_Num-setup.h File Reference 351

This graph shows which files directly or indirectly include this file:

src/elem/XKeyPad_Num
-setup.h

src/elem/XKeyPad_Num.c

Macros

• #define XKEYPAD_EXTEND_CHAR
• #define XKEYPAD_LABEL_MAX
• #define XKEYPAD_DISP_MAX
• #define XKEYPAD_KEY_W
• #define XKEYPAD_KEY_H
• #define XKEYPAD_SPACING_X
• #define XKEYPAD_SPACING_Y
• #define XKEYPAD_COL_DISABLE_TXT
• #define XKEYPAD_COL_DISABLE_FILL
• #define XKEYPAD_COL_DEF_TXT
• #define XKEYPAD_COL_DEF_FRAME
• #define XKEYPAD_COL_DEF_FILL
• #define XKEYPAD_COL_DEF_GLOW
• #define XKEYPAD_COL_BASIC_FILL
• #define XKEYPAD_COL_BASIC_GLOW
• #define XKEYPAD_COL_TEXT_TXT
• #define XKEYPAD_COL_TEXT_FILL
• #define XKEYPAD_COL_TEXT_GLOW
• #define XKEYPAD_COL_SPACE_FILL
• #define XKEYPAD_COL_SPACE_GLOW
• #define XKEYPAD_COL_ESC_FILL
• #define XKEYPAD_COL_ESC_GLOW
• #define XKEYPAD_COL_ENTER_FILL
• #define XKEYPAD_COL_ENTER_GLOW
• #define XKEYPAD_COL_SCROLL_L_FILL
• #define XKEYPAD_COL_SCROLL_L_GLOW
• #define XKEYPAD_COL_SCROLL_R_FILL
• #define XKEYPAD_COL_SCROLL_R_GLOW
• #define XKEYPAD_COL_DECIMAL_FILL
• #define XKEYPAD_COL_DECIMAL_GLOW
• #define XKEYPAD_COL_MINUS_FILL
• #define XKEYPAD_COL_MINUS_GLOW

Generated by Doxygen
352 File Documentation

Enumerations

• enum gslc_teXKeyPadSel {
E_XKEYPAD_SET_UPPER, E_XKEYPAD_SET_LOWER, E_XKEYPAD_SET_NUM, E_XKEYPAD_SET←-
__MAX,
E_XKEYPAD_SET_NUM, E_XKEYPAD_SET__MAX }
• enum { KEYPAD_IDV_DECIMAL, KEYPAD_IDV_MINUS }

Variables

• static const char ∗ KEYPAD_LABEL_NEGATIVE


• static const char ∗ KEYPAD_LABEL_DECIMAL_PT
• static const int8_t XKEYPAD_LAYOUT_DEFAULT
• static gslc_tsLabelSpecial KEYPAD_SPECIAL_LABEL [ ]
• static const char ∗ KEYPAD_SET_LABEL [ ]
• static gslc_tsKey KEYPAD_LAYOUT [ ]
• static gslc_tsKey ∗ KEYPAD_LAYOUTS [E_XKEYPAD_SET__MAX]

9.15.1 Macro Definition Documentation

9.15.1.1 XKEYPAD_COL_BASIC_FILL

#define XKEYPAD_COL_BASIC_FILL

9.15.1.2 XKEYPAD_COL_BASIC_GLOW

#define XKEYPAD_COL_BASIC_GLOW

9.15.1.3 XKEYPAD_COL_DECIMAL_FILL

#define XKEYPAD_COL_DECIMAL_FILL

9.15.1.4 XKEYPAD_COL_DECIMAL_GLOW

#define XKEYPAD_COL_DECIMAL_GLOW

Generated by Doxygen
9.15 src/elem/XKeyPad_Num-setup.h File Reference 353

9.15.1.5 XKEYPAD_COL_DEF_FILL

#define XKEYPAD_COL_DEF_FILL

9.15.1.6 XKEYPAD_COL_DEF_FRAME

#define XKEYPAD_COL_DEF_FRAME

9.15.1.7 XKEYPAD_COL_DEF_GLOW

#define XKEYPAD_COL_DEF_GLOW

9.15.1.8 XKEYPAD_COL_DEF_TXT

#define XKEYPAD_COL_DEF_TXT

9.15.1.9 XKEYPAD_COL_DISABLE_FILL

#define XKEYPAD_COL_DISABLE_FILL

9.15.1.10 XKEYPAD_COL_DISABLE_TXT

#define XKEYPAD_COL_DISABLE_TXT

9.15.1.11 XKEYPAD_COL_ENTER_FILL

#define XKEYPAD_COL_ENTER_FILL

9.15.1.12 XKEYPAD_COL_ENTER_GLOW

#define XKEYPAD_COL_ENTER_GLOW

Generated by Doxygen
354 File Documentation

9.15.1.13 XKEYPAD_COL_ESC_FILL

#define XKEYPAD_COL_ESC_FILL

9.15.1.14 XKEYPAD_COL_ESC_GLOW

#define XKEYPAD_COL_ESC_GLOW

9.15.1.15 XKEYPAD_COL_MINUS_FILL

#define XKEYPAD_COL_MINUS_FILL

9.15.1.16 XKEYPAD_COL_MINUS_GLOW

#define XKEYPAD_COL_MINUS_GLOW

9.15.1.17 XKEYPAD_COL_SCROLL_L_FILL

#define XKEYPAD_COL_SCROLL_L_FILL

9.15.1.18 XKEYPAD_COL_SCROLL_L_GLOW

#define XKEYPAD_COL_SCROLL_L_GLOW

9.15.1.19 XKEYPAD_COL_SCROLL_R_FILL

#define XKEYPAD_COL_SCROLL_R_FILL

9.15.1.20 XKEYPAD_COL_SCROLL_R_GLOW

#define XKEYPAD_COL_SCROLL_R_GLOW

Generated by Doxygen
9.15 src/elem/XKeyPad_Num-setup.h File Reference 355

9.15.1.21 XKEYPAD_COL_SPACE_FILL

#define XKEYPAD_COL_SPACE_FILL

9.15.1.22 XKEYPAD_COL_SPACE_GLOW

#define XKEYPAD_COL_SPACE_GLOW

9.15.1.23 XKEYPAD_COL_TEXT_FILL

#define XKEYPAD_COL_TEXT_FILL

9.15.1.24 XKEYPAD_COL_TEXT_GLOW

#define XKEYPAD_COL_TEXT_GLOW

9.15.1.25 XKEYPAD_COL_TEXT_TXT

#define XKEYPAD_COL_TEXT_TXT

9.15.1.26 XKEYPAD_DISP_MAX

#define XKEYPAD_DISP_MAX

9.15.1.27 XKEYPAD_EXTEND_CHAR

#define XKEYPAD_EXTEND_CHAR

9.15.1.28 XKEYPAD_KEY_H

#define XKEYPAD_KEY_H

Generated by Doxygen
356 File Documentation

9.15.1.29 XKEYPAD_KEY_W

#define XKEYPAD_KEY_W

9.15.1.30 XKEYPAD_LABEL_MAX

#define XKEYPAD_LABEL_MAX

9.15.1.31 XKEYPAD_SPACING_X

#define XKEYPAD_SPACING_X

9.15.1.32 XKEYPAD_SPACING_Y

#define XKEYPAD_SPACING_Y

9.15.2 Enumeration Type Documentation

9.15.2.1 anonymous enum

anonymous enum

Enumerator

KEYPAD_IDV_DECIMAL
KEYPAD_IDV_MINUS

9.15.2.2 gslc_teXKeyPadSel

enum gslc_teXKeyPadSel

Enumerator

E_XKEYPAD_SET_UPPER

Generated by Doxygen
9.15 src/elem/XKeyPad_Num-setup.h File Reference 357

Enumerator

E_XKEYPAD_SET_LOWER
E_XKEYPAD_SET_NUM
E_XKEYPAD_SET__MAX
E_XKEYPAD_SET_NUM
E_XKEYPAD_SET__MAX

9.15.3 Variable Documentation

9.15.3.1 KEYPAD_LABEL_DECIMAL_PT

const char∗ KEYPAD_LABEL_DECIMAL_PT [static]

9.15.3.2 KEYPAD_LABEL_NEGATIVE

const char∗ KEYPAD_LABEL_NEGATIVE [static]

9.15.3.3 KEYPAD_LAYOUT

gslc_tsKey KEYPAD_LAYOUT[ ] [static]

9.15.3.4 KEYPAD_LAYOUTS

gslc_tsKey∗ KEYPAD_LAYOUTS[E_XKEYPAD_SET__MAX] [static]

9.15.3.5 KEYPAD_SET_LABEL

const char∗ KEYPAD_SET_LABEL[ ] [static]

Generated by Doxygen
358 File Documentation

9.15.3.6 KEYPAD_SPECIAL_LABEL

gslc_tsLabelSpecial KEYPAD_SPECIAL_LABEL[ ] [static]

9.15.3.7 XKEYPAD_LAYOUT_DEFAULT

const int8_t XKEYPAD_LAYOUT_DEFAULT [static]

9.16 src/elem/XKeyPad_Num.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XKeyPad.h"
#include "elem/XKeyPad_Num.h"
#include <stdio.h>
#include "elem/XKeyPad_Num-setup.h"
Include dependency graph for XKeyPad_Num.c:

src/elem/XKeyPad_Num.c

GUIslice_drv.h elem/XKeyPad_Num-setup.h

elem/XKeyPad_Num.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdbool.h string.h inttypes.h GUIslice_config.h stdlib.h

Functions

• void gslc_XKeyPadValSetSign_Num (gslc_tsXKeyPad ∗pXKeyPad, bool bPositive)


• void gslc_ElemXKeyPadReset_Num (void ∗pvConfig)
Callback function to reset internal state.
• void gslc_ElemXKeyPadTxtInit_Num (void ∗pvKeyPad)
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
• void gslc_ElemXKeyPadLabelGet_Num (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char ∗pStr)
Callback function to retrieve the label associated with a KeyPad button.

Generated by Doxygen
9.16 src/elem/XKeyPad_Num.c File Reference 359

• void gslc_ElemXKeyPadStyleGet_Num (void ∗pvKeyPad, uint8_t nId, bool ∗pbVisible, gslc_tsColor ∗pcolTxt,
gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)
Callback function to retrieve the style associated with a KeyPad button.
• void gslc_ElemXKeyPadBtnEvt_Num (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult ∗psResult)
Callback function activated when a key has been pressed.
• gslc_tsXKeyPadCfg_Num gslc_ElemXKeyPadCfgInit_Num ()
Initialize the KeyPad config structure.
• gslc_tsElemRef ∗ gslc_ElemXKeyPadCreate_Num (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc←-
_tsXKeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Num ∗pConfig)
Create a KeyPad Element.
• void gslc_ElemXKeyPadCfgSetFloatEn_Num (gslc_tsXKeyPadCfg_Num ∗pConfig, bool bEn)
Update the KeyPad configuration to enable floating point numbers.
• void gslc_ElemXKeyPadCfgSetSignEn_Num (gslc_tsXKeyPadCfg_Num ∗pConfig, bool bEn)
Update the KeyPad configuration to enable negative numbers.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.16.1 Function Documentation

9.16.1.1 gslc_ElemXKeyPadBtnEvt_Num()

void gslc_ElemXKeyPadBtnEvt_Num (
void ∗ pvKeyPad,
uint8_t nId,
gslc_tsXKeyPadResult ∗ psResult )

Callback function activated when a key has been pressed.

This callback is used to enable the KeyPad variant to handle any events associated with the key press and update
any internal state.

• The callback is also used to determine whether any redraw actions need to be taken.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out psResult The returned state vector (including redraw)

Returns

none

Generated by Doxygen
360 File Documentation

9.16.1.2 gslc_ElemXKeyPadCfgInit_Num()

gslc_tsXKeyPadCfg_Num gslc_ElemXKeyPadCfgInit_Num ( )

Initialize the KeyPad config structure.

• This routine should be called to initialize the configuration data structure before calling any of the KeyPad
config APIs

Returns

Initialized KeyPad config structure

9.16.1.3 gslc_ElemXKeyPadCfgSetFloatEn_Num()

void gslc_ElemXKeyPadCfgSetFloatEn_Num (
gslc_tsXKeyPadCfg_Num ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable floating point numbers.

• Effectively disables/enables the decimal point button & handling

Parameters

in pConfig Pointer to the XKeyPad variant config structure


in bEn Enable flag (true if floating point enabled)

Returns

none

9.16.1.4 gslc_ElemXKeyPadCfgSetSignEn_Num()

void gslc_ElemXKeyPadCfgSetSignEn_Num (
gslc_tsXKeyPadCfg_Num ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable negative numbers.

• Effectively disables/enables the sign button & handling

Generated by Doxygen
9.16 src/elem/XKeyPad_Num.c File Reference 361

Parameters

in pConfig Pointer to the XKeyPad variant config structure


in bEn Enable flag (true if negative numbers enabled)

Returns

none

9.16.1.5 gslc_ElemXKeyPadCreate_Num()

gslc_tsElemRef∗ gslc_ElemXKeyPadCreate_Num (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg_Num ∗ pConfig )

Create a KeyPad Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Ptr to config options

Returns

Pointer to Element or NULL if failure

9.16.1.6 gslc_ElemXKeyPadLabelGet_Num()

void gslc_ElemXKeyPadLabelGet_Num (
void ∗ pvKeyPad,
uint8_t nId,

Generated by Doxygen
362 File Documentation

uint8_t nStrMax,
char ∗ pStr )

Callback function to retrieve the label associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
in nStrMax Maximum length of return string (including NULL)
out pStr Buffer for the returned label

Returns

none

9.16.1.7 gslc_ElemXKeyPadReset_Num()

void gslc_ElemXKeyPadReset_Num (
void ∗ pvConfig )

Callback function to reset internal state.

Parameters

in pvConfig Void ptr to the KeyPad config

Returns

none

9.16.1.8 gslc_ElemXKeyPadStyleGet_Num()

void gslc_ElemXKeyPadStyleGet_Num (
void ∗ pvKeyPad,
uint8_t nId,
bool ∗ pbVisible,
gslc_tsColor ∗ pcolTxt,
gslc_tsColor ∗ pcolFrame,
gslc_tsColor ∗ pcolFill,
gslc_tsColor ∗ pcolGlow )

Callback function to retrieve the style associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

Generated by Doxygen
9.16 src/elem/XKeyPad_Num.c File Reference 363

• This function is used to assign the color and visibility state of the keys at runtime.

• This function can also be used to change the appearance dynamically, according to internal state (eg. dimmed
buttons).

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out pbVisible The returned visibility state
out pcolTxt The returned text color
out pcolFrame The returned key's frame color
out pcolFill The returned key's fill color
out pcolGlow The returned key's fill color when highlighted

Returns

none

9.16.1.9 gslc_ElemXKeyPadTxtInit_Num()

void gslc_ElemXKeyPadTxtInit_Num (
void ∗ pvKeyPad )

Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().

• This is used to ensure any KeyPad variant state can be kept in sync with the text string.

• For example, if a numeric KeyPad is initiaized with a string that contains a minus sign, an internal negation
flag might be set.

Parameters
in pvKeyPad Void ptr to the KeyPad

Returns

none

9.16.1.10 gslc_XKeyPadValSetSign_Num()

void gslc_XKeyPadValSetSign_Num (
gslc_tsXKeyPad ∗ pXKeyPad,
bool bPositive )

Generated by Doxygen
364 File Documentation

9.16.2 Variable Documentation

9.16.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.16.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.17 src/elem/XKeyPad_Num.h File Reference

#include "GUIslice.h"
#include "elem/XKeyPad.h"
Include dependency graph for XKeyPad_Num.h:

src/elem/XKeyPad_Num.h

elem/XKeyPad.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.17 src/elem/XKeyPad_Num.h File Reference 365

This graph shows which files directly or indirectly include this file:

src/elem/XKeyPad_Num.h

src/elem/XKeyPad_Num
-setup.h

src/elem/XKeyPad_Num.c

Data Structures

• struct gslc_tsXKeyPadCfg_Num

Functions

• gslc_tsElemRef ∗ gslc_ElemXKeyPadCreate_Num (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc←-


_tsXKeyPad ∗pXData, int16_t nX0, int16_t nY0, int8_t nFontId, gslc_tsXKeyPadCfg_Num ∗pConfig)
Create a KeyPad Element.
• gslc_tsXKeyPadCfg_Num gslc_ElemXKeyPadCfgInit_Num ()
Initialize the KeyPad config structure.
• void gslc_ElemXKeyPadReset_Num (void ∗pvConfig)
Callback function to reset internal state.
• void gslc_ElemXKeyPadTxtInit_Num (void ∗pvKeyPad)
Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().
• void gslc_ElemXKeyPadLabelGet_Num (void ∗pvKeyPad, uint8_t nId, uint8_t nStrMax, char ∗pStr)
Callback function to retrieve the label associated with a KeyPad button.
• void gslc_ElemXKeyPadStyleGet_Num (void ∗pvKeyPad, uint8_t nId, bool ∗pbVisible, gslc_tsColor ∗pcolTxt,
gslc_tsColor ∗pcolFrame, gslc_tsColor ∗pcolFill, gslc_tsColor ∗pcolGlow)
Callback function to retrieve the style associated with a KeyPad button.
• void gslc_ElemXKeyPadBtnEvt_Num (void ∗pvKeyPad, uint8_t nId, gslc_tsXKeyPadResult ∗psResult)
Callback function activated when a key has been pressed.
• void gslc_ElemXKeyPadCfgSetFloatEn_Num (gslc_tsXKeyPadCfg_Num ∗pConfig, bool bEn)
Update the KeyPad configuration to enable floating point numbers.
• void gslc_ElemXKeyPadCfgSetSignEn_Num (gslc_tsXKeyPadCfg_Num ∗pConfig, bool bEn)
Update the KeyPad configuration to enable negative numbers.

9.17.1 Function Documentation

Generated by Doxygen
366 File Documentation

9.17.1.1 gslc_ElemXKeyPadBtnEvt_Num()

void gslc_ElemXKeyPadBtnEvt_Num (
void ∗ pvKeyPad,
uint8_t nId,
gslc_tsXKeyPadResult ∗ psResult )

Callback function activated when a key has been pressed.

This callback is used to enable the KeyPad variant to handle any events associated with the key press and update
any internal state.

• The callback is also used to determine whether any redraw actions need to be taken.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out psResult The returned state vector (including redraw)

Returns

none

9.17.1.2 gslc_ElemXKeyPadCfgInit_Num()

gslc_tsXKeyPadCfg_Num gslc_ElemXKeyPadCfgInit_Num ( )

Initialize the KeyPad config structure.

• This routine should be called to initialize the configuration data structure before calling any of the KeyPad
config APIs

Returns

Initialized KeyPad config structure

9.17.1.3 gslc_ElemXKeyPadCfgSetFloatEn_Num()

void gslc_ElemXKeyPadCfgSetFloatEn_Num (
gslc_tsXKeyPadCfg_Num ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable floating point numbers.

• Effectively disables/enables the decimal point button & handling

Generated by Doxygen
9.17 src/elem/XKeyPad_Num.h File Reference 367

Parameters

in pConfig Pointer to the XKeyPad variant config structure


in bEn Enable flag (true if floating point enabled)

Returns

none

9.17.1.4 gslc_ElemXKeyPadCfgSetSignEn_Num()

void gslc_ElemXKeyPadCfgSetSignEn_Num (
gslc_tsXKeyPadCfg_Num ∗ pConfig,
bool bEn )

Update the KeyPad configuration to enable negative numbers.

• Effectively disables/enables the sign button & handling

Parameters

in pConfig Pointer to the XKeyPad variant config structure


in bEn Enable flag (true if negative numbers enabled)

Returns

none

9.17.1.5 gslc_ElemXKeyPadCreate_Num()

gslc_tsElemRef∗ gslc_ElemXKeyPadCreate_Num (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXKeyPad ∗ pXData,
int16_t nX0,
int16_t nY0,
int8_t nFontId,
gslc_tsXKeyPadCfg_Num ∗ pConfig )

Create a KeyPad Element.

Generated by Doxygen
368 File Documentation

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in nX0 X KeyPad Starting Coordinate
in nY0 Y KeyPad Starting Coordinate
in nFontId Font ID to use for drawing the element
in pConfig Ptr to config options

Returns

Pointer to Element or NULL if failure

9.17.1.6 gslc_ElemXKeyPadLabelGet_Num()

void gslc_ElemXKeyPadLabelGet_Num (
void ∗ pvKeyPad,
uint8_t nId,
uint8_t nStrMax,
char ∗ pStr )

Callback function to retrieve the label associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
in nStrMax Maximum length of return string (including NULL)
out pStr Buffer for the returned label

Returns

none

9.17.1.7 gslc_ElemXKeyPadReset_Num()

void gslc_ElemXKeyPadReset_Num (
void ∗ pvConfig )

Callback function to reset internal state.

Generated by Doxygen
9.17 src/elem/XKeyPad_Num.h File Reference 369

Parameters

in pvConfig Void ptr to the KeyPad config

Returns

none

9.17.1.8 gslc_ElemXKeyPadStyleGet_Num()

void gslc_ElemXKeyPadStyleGet_Num (
void ∗ pvKeyPad,
uint8_t nId,
bool ∗ pbVisible,
gslc_tsColor ∗ pcolTxt,
gslc_tsColor ∗ pcolFrame,
gslc_tsColor ∗ pcolFill,
gslc_tsColor ∗ pcolGlow )

Callback function to retrieve the style associated with a KeyPad button.

This is called during the drawing of the KeyPad layout.

• This function is used to assign the color and visibility state of the keys at runtime.

• This function can also be used to change the appearance dynamically, according to internal state (eg. dimmed
buttons).

Parameters
in pvKeyPad Void ptr to the KeyPad
in nId KeyPad key ID
out pbVisible The returned visibility state
out pcolTxt The returned text color
out pcolFrame The returned key's frame color
out pcolFill The returned key's fill color
out pcolGlow The returned key's fill color when highlighted

Returns

none

9.17.1.9 gslc_ElemXKeyPadTxtInit_Num()

void gslc_ElemXKeyPadTxtInit_Num (
void ∗ pvKeyPad )

Generated by Doxygen
370 File Documentation

Callback function to update internal state whenever the text field is manually set via gslc_ElemXKeyPadValSet().

• This is used to ensure any KeyPad variant state can be kept in sync with the text string.

• For example, if a numeric KeyPad is initiaized with a string that contains a minus sign, an internal negation
flag might be set.

Parameters
in pvKeyPad Void ptr to the KeyPad

Returns

none

9.18 src/elem/XListbox.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XListbox.h"
#include <stdio.h>
Include dependency graph for XListbox.c:

src/elem/XListbox.c

GUIslice_drv.h elem/XListbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Macros

• #define XLISTBOX_MAX_STR

Functions

• char ∗ gslc_ElemXListboxGetItemAddr (gslc_tsXListbox ∗pListbox, int16_t nItemCurSel)


• bool gslc_ElemXListboxRecalcSize (gslc_tsXListbox ∗pListbox, gslc_tsRect rElem)
• void gslc_ElemXListboxSetSize (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nRows, int8_t nCols)
Configure the number of rows & columns to display in the listbox.

Generated by Doxygen
9.18 src/elem/XListbox.c File Reference 371

• void gslc_ElemXListboxSetMargin (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nMarginW, int8_t


nMarginH)
Configure the margin inside the listbox.
• void gslc_ElemXListboxItemsSetSize (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemW, int16←-
_t nItemH)
Configure the size of the listbox items.
• void gslc_ElemXListboxItemsSetGap (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nGap, gslc_ts←-
Color colGap)
Configure the gap between listbox items.
• void gslc_ElemXListboxReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Empty the listbox of all items.
• bool gslc_ElemXListboxAddItem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStrItem)
Add an item to the listbox.
• bool gslc_ElemXListboxInsertItemAt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nInsertPos,
const char ∗pStrItem)
Insert an item in the listbox at a specific position.
• bool gslc_ElemXListboxDeleteItemAt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nDeletePos)
Insert an item in the listbox at a specific position.
• bool gslc_ElemXListboxGetItem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemCurSel, char
∗pStrItem, uint8_t nStrItemLen)
Get the indexed listbox item.
• int16_t gslc_ElemXListboxGetItemCnt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the number of items in the listbox.
• gslc_tsElemRef ∗ gslc_ElemXListboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_ts←-
XListbox ∗pXData, gslc_tsRect rElem, int16_t nFontId, uint8_t ∗pBufItems, uint16_t nBufItemsMax, int16_t
nItemDefault)
Create a Listbox Element.
• bool gslc_ElemXListboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Listbox element on the screen.
• bool gslc_ElemXListboxTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch events to Listbox element.
• int16_t gslc_ElemXListboxGetSel (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Listbox element's current selection.
• bool gslc_ElemXListboxSetSel (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemCurSel)
Set a Listbox element's current selection.
• bool gslc_ElemXListboxSetScrollPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nScrollPos)
Set the Listbox scroll position.
• void gslc_ElemXListboxSetSelFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XLISTBO←-
X_SEL funcCb)
Assign the selection callback function for a Listbox.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.18.1 Macro Definition Documentation

Generated by Doxygen
372 File Documentation

9.18.1.1 XLISTBOX_MAX_STR

#define XLISTBOX_MAX_STR

9.18.2 Function Documentation

9.18.2.1 gslc_ElemXListboxAddItem()

bool gslc_ElemXListboxAddItem (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
const char ∗ pStrItem )

Add an item to the listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in pStrItem String to use when creating the listbox item

Returns

true if OK, false if fail (eg. insufficient buffer storage)

9.18.2.2 gslc_ElemXListboxCreate()

gslc_tsElemRef∗ gslc_ElemXListboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXListbox ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
uint8_t ∗ pBufItems,
uint16_t nBufItemsMax,
int16_t nSelDefault )

Create a Listbox 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

Generated by Doxygen
9.18 src/elem/XListbox.c File Reference 373

Parameters
in pXData Ptr to extended element data structure
in rElem Rectangle coordinates defining checkbox size
in nFontId Font ID for item display
in pBufItems Pointer to buffer that will contain list of items
in nBufItemsMax Max size of buffer for list of items (pBufItems)
in nSelDefault Default item to select

Returns

Pointer to Element reference or NULL if failure

9.18.2.3 gslc_ElemXListboxDeleteItemAt()

bool gslc_ElemXListboxDeleteItemAt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nDeletePos )

Insert an item in the listbox at a specific position.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nDeletePos Position to delete

Returns

true if OK, false if fail

9.18.2.4 gslc_ElemXListboxDraw()

bool gslc_ElemXListboxDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Listbox element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
374 File Documentation

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

9.18.2.5 gslc_ElemXListboxGetItem()

bool gslc_ElemXListboxGetItem (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemCurSel,
char ∗ pStrItem,
uint8_t nStrItemLen )

Get the indexed listbox item.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nItemCurSel Item index to fetch
out pStrItem Ptr to the string buffer to receive the item
in nStrItemLen Maximum buffer length of pStrItem

Returns

true if success, false if fail (eg. can't locate item)

9.18.2.6 gslc_ElemXListboxGetItemAddr()

char∗ gslc_ElemXListboxGetItemAddr (
gslc_tsXListbox ∗ pListbox,
int16_t nItemCurSel )

9.18.2.7 gslc_ElemXListboxGetItemCnt()

int16_t gslc_ElemXListboxGetItemCnt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the number of items in the listbox.

Generated by Doxygen
9.18 src/elem/XListbox.c File Reference 375

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update

Returns

Number of items

9.18.2.8 gslc_ElemXListboxGetSel()

int16_t gslc_ElemXListboxGetSel (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Listbox element's current selection.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current Listbox selection (or -1 if none)

9.18.2.9 gslc_ElemXListboxInsertItemAt()

bool gslc_ElemXListboxInsertItemAt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nInsertPos,
const char ∗ pStrItem )

Insert an item in the listbox at a specific position.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nInsertPos Insertion position
in pStrItem String to use when creating the listbox item

Generated by Doxygen
376 File Documentation

Returns

true if OK, false if fail (eg. insufficient buffer storage)

9.18.2.10 gslc_ElemXListboxItemsSetGap()

void gslc_ElemXListboxItemsSetGap (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nGap,
gslc_tsColor colGap )

Configure the gap between listbox items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nGap Set the gap between listbox items (0 for none)
in colGap Set the color of the gap between listbox items

Returns

none

9.18.2.11 gslc_ElemXListboxItemsSetSize()

void gslc_ElemXListboxItemsSetSize (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemW,
int16_t nItemH )

Configure the size of the listbox items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nItemW Set the width of a listbox item (or -1 to auto-size)
in nItemH Set the height of a listbox item

Returns

none

Generated by Doxygen
9.18 src/elem/XListbox.c File Reference 377

9.18.2.12 gslc_ElemXListboxRecalcSize()

bool gslc_ElemXListboxRecalcSize (
gslc_tsXListbox ∗ pListbox,
gslc_tsRect rElem )

9.18.2.13 gslc_ElemXListboxReset()

void gslc_ElemXListboxReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Empty the listbox of all items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update

Returns

none

9.18.2.14 gslc_ElemXListboxSetMargin()

void gslc_ElemXListboxSetMargin (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nMarginW,
int8_t nMarginH )

Configure the margin inside the listbox.

• Defines the region bewteen the element rect and the inner listbox items

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nMarginW Set the margin (horizontal) inside the listbox (0 for none)
in nMarginH Set the margin (horizontal) inside the listbox (0 for none)

Generated by Doxygen
378 File Documentation

Returns

none

9.18.2.15 gslc_ElemXListboxSetScrollPos()

bool gslc_ElemXListboxSetScrollPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nScrollPos )

Set the Listbox scroll position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos Scroll the listbox so that the nScrollPos item is at the top (0 default)

Returns

true if success, false if fail

9.18.2.16 gslc_ElemXListboxSetSel()

bool gslc_ElemXListboxSetSel (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemCurSel )

Set a Listbox element's current selection.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nItemCurSel Listbox item to select (or -1 for none)

Returns

true if success, false if fail

Generated by Doxygen
9.18 src/elem/XListbox.c File Reference 379

9.18.2.17 gslc_ElemXListboxSetSelFunc()

void gslc_ElemXListboxSetSelFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XLISTBOX_SEL funcCb )

Assign the selection callback function for a Listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to selection routine (or NULL for none)

Returns

none

9.18.2.18 gslc_ElemXListboxSetSize()

void gslc_ElemXListboxSetSize (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nRows,
int8_t nCols )

Configure the number of rows & columns to display in the listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nRows Number of rows (>= 1, or XLISTBOX_SIZE_AUTO to base on content)
in nCols Number of columns (>= 1)

Returns

none

9.18.2.19 gslc_ElemXListboxTouch()

bool gslc_ElemXListboxTouch (
void ∗ pvGui,

Generated by Doxygen
380 File Documentation

void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Listbox element.

• Called from gslc_ElemSendEventTouch()

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

9.18.3 Variable Documentation

9.18.3.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.18.3.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.19 src/elem/XListbox.h File Reference

#include "GUIslice.h"
Include dependency graph for XListbox.h:

src/elem/XListbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.19 src/elem/XListbox.h File Reference 381

This graph shows which files directly or indirectly include this file:

src/elem/XListbox.h

src/elem/XListbox.c

Data Structures

• struct gslc_tsXListbox
Extended data for Listbox element.

Macros

• #define GSLC_TYPEX_LISTBOX
• #define XLISTBOX_SEL_NONE
• #define XLISTBOX_SIZE_AUTO
• #define XLISTBOX_BUF_OH_R

Typedefs

• typedef bool(∗ GSLC_CB_XLISTBOX_SEL) (void ∗pvGui, void ∗pvElem, int16_t nSel)


Callback function for Listbox feedback.

Functions

• gslc_tsElemRef ∗ gslc_ElemXListboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_ts←-


XListbox ∗pXData, gslc_tsRect rElem, int16_t nFontId, uint8_t ∗pBufItems, uint16_t nBufItemsMax, int16_t
nSelDefault)
Create a Listbox Element.
• void gslc_ElemXListboxSetSize (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nRows, int8_t nCols)
Configure the number of rows & columns to display in the listbox.
• void gslc_ElemXListboxSetMargin (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nMarginW, int8_t
nMarginH)
Configure the margin inside the listbox.
• void gslc_ElemXListboxItemsSetSize (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemW, int16←-
_t nItemH)
Configure the size of the listbox items.
• void gslc_ElemXListboxItemsSetGap (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nGap, gslc_ts←-
Color colGap)
Configure the gap between listbox items.

Generated by Doxygen
382 File Documentation

• void gslc_ElemXListboxReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)


Empty the listbox of all items.
• bool gslc_ElemXListboxAddItem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStrItem)
Add an item to the listbox.
• bool gslc_ElemXListboxInsertItemAt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nInsertPos,
const char ∗pStrItem)
Insert an item in the listbox at a specific position.
• bool gslc_ElemXListboxDeleteItemAt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nDeletePos)
Insert an item in the listbox at a specific position.
• bool gslc_ElemXListboxGetItem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemCurSel, char
∗pStrItem, uint8_t nStrItemLen)
Get the indexed listbox item.
• int16_t gslc_ElemXListboxGetItemCnt (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the number of items in the listbox.
• bool gslc_ElemXListboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Listbox element on the screen.
• bool gslc_ElemXListboxTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch events to Listbox element.
• int16_t gslc_ElemXListboxGetSel (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Listbox element's current selection.
• bool gslc_ElemXListboxSetSel (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nItemCurSel)
Set a Listbox element's current selection.
• bool gslc_ElemXListboxSetScrollPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nScrollPos)
Set the Listbox scroll position.
• void gslc_ElemXListboxSetSelFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XLISTBO←-
X_SEL funcCb)
Assign the selection callback function for a Listbox.

9.19.1 Macro Definition Documentation

9.19.1.1 GSLC_TYPEX_LISTBOX

#define GSLC_TYPEX_LISTBOX

9.19.1.2 XLISTBOX_BUF_OH_R

#define XLISTBOX_BUF_OH_R

9.19.1.3 XLISTBOX_SEL_NONE

#define XLISTBOX_SEL_NONE

Generated by Doxygen
9.19 src/elem/XListbox.h File Reference 383

9.19.1.4 XLISTBOX_SIZE_AUTO

#define XLISTBOX_SIZE_AUTO

9.19.2 Typedef Documentation

9.19.2.1 GSLC_CB_XLISTBOX_SEL

typedef bool(∗ GSLC_CB_XLISTBOX_SEL) (void ∗pvGui, void ∗pvElem, int16_t nSel)

Callback function for Listbox feedback.

9.19.3 Function Documentation

9.19.3.1 gslc_ElemXListboxAddItem()

bool gslc_ElemXListboxAddItem (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
const char ∗ pStrItem )

Add an item to the listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in pStrItem String to use when creating the listbox item

Returns

true if OK, false if fail (eg. insufficient buffer storage)

9.19.3.2 gslc_ElemXListboxCreate()

gslc_tsElemRef∗ gslc_ElemXListboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,

Generated by Doxygen
384 File Documentation

gslc_tsXListbox ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
uint8_t ∗ pBufItems,
uint16_t nBufItemsMax,
int16_t nSelDefault )

Create a Listbox 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 checkbox size
in nFontId Font ID for item display
in pBufItems Pointer to buffer that will contain list of items
in nBufItemsMax Max size of buffer for list of items (pBufItems)
in nSelDefault Default item to select

Returns

Pointer to Element reference or NULL if failure

9.19.3.3 gslc_ElemXListboxDeleteItemAt()

bool gslc_ElemXListboxDeleteItemAt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nDeletePos )

Insert an item in the listbox at a specific position.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nDeletePos Position to delete

Returns

true if OK, false if fail

Generated by Doxygen
9.19 src/elem/XListbox.h File Reference 385

9.19.3.4 gslc_ElemXListboxDraw()

bool gslc_ElemXListboxDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Listbox element on the screen.

• Called from gslc_ElemDraw()

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

9.19.3.5 gslc_ElemXListboxGetItem()

bool gslc_ElemXListboxGetItem (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemCurSel,
char ∗ pStrItem,
uint8_t nStrItemLen )

Get the indexed listbox item.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nItemCurSel Item index to fetch
out pStrItem Ptr to the string buffer to receive the item
in nStrItemLen Maximum buffer length of pStrItem

Returns

true if success, false if fail (eg. can't locate item)

Generated by Doxygen
386 File Documentation

9.19.3.6 gslc_ElemXListboxGetItemCnt()

int16_t gslc_ElemXListboxGetItemCnt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get the number of items in the listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update

Returns

Number of items

9.19.3.7 gslc_ElemXListboxGetSel()

int16_t gslc_ElemXListboxGetSel (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Listbox element's current selection.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current Listbox selection (or -1 if none)

9.19.3.8 gslc_ElemXListboxInsertItemAt()

bool gslc_ElemXListboxInsertItemAt (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nInsertPos,
const char ∗ pStrItem )

Insert an item in the listbox at a specific position.

Generated by Doxygen
9.19 src/elem/XListbox.h File Reference 387

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nInsertPos Insertion position
in pStrItem String to use when creating the listbox item

Returns

true if OK, false if fail (eg. insufficient buffer storage)

9.19.3.9 gslc_ElemXListboxItemsSetGap()

void gslc_ElemXListboxItemsSetGap (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nGap,
gslc_tsColor colGap )

Configure the gap between listbox items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nGap Set the gap between listbox items (0 for none)
in colGap Set the color of the gap between listbox items

Returns

none

9.19.3.10 gslc_ElemXListboxItemsSetSize()

void gslc_ElemXListboxItemsSetSize (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemW,
int16_t nItemH )

Configure the size of the listbox items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
Generated
in nItemWby Doxygen Set the width of a listbox item (or -1 to auto-size)
in nItemH Set the height of a listbox item
388 File Documentation

Returns

none

9.19.3.11 gslc_ElemXListboxReset()

void gslc_ElemXListboxReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Empty the listbox of all items.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update

Returns

none

9.19.3.12 gslc_ElemXListboxSetMargin()

void gslc_ElemXListboxSetMargin (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nMarginW,
int8_t nMarginH )

Configure the margin inside the listbox.

• Defines the region bewteen the element rect and the inner listbox items

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nMarginW Set the margin (horizontal) inside the listbox (0 for none)
in nMarginH Set the margin (horizontal) inside the listbox (0 for none)

Returns

none

Generated by Doxygen
9.19 src/elem/XListbox.h File Reference 389

9.19.3.13 gslc_ElemXListboxSetScrollPos()

bool gslc_ElemXListboxSetScrollPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nScrollPos )

Set the Listbox scroll position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos Scroll the listbox so that the nScrollPos item is at the top (0 default)

Returns

true if success, false if fail

9.19.3.14 gslc_ElemXListboxSetSel()

bool gslc_ElemXListboxSetSel (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nItemCurSel )

Set a Listbox element's current selection.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nItemCurSel Listbox item to select (or -1 for none)

Returns

true if success, false if fail

9.19.3.15 gslc_ElemXListboxSetSelFunc()

void gslc_ElemXListboxSetSelFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XLISTBOX_SEL funcCb )

Assign the selection callback function for a Listbox.

Generated by Doxygen
390 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to selection routine (or NULL for none)

Returns

none

9.19.3.16 gslc_ElemXListboxSetSize()

void gslc_ElemXListboxSetSize (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nRows,
int8_t nCols )

Configure the number of rows & columns to display in the listbox.

Parameters

in pGui Pointer to GUI


in pElemRef Ptr to Element Reference to update
in nRows Number of rows (>= 1, or XLISTBOX_SIZE_AUTO to base on content)
in nCols Number of columns (>= 1)

Returns

none

9.19.3.17 gslc_ElemXListboxTouch()

bool gslc_ElemXListboxTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Listbox element.

• Called from gslc_ElemSendEventTouch()

Generated by Doxygen
9.20 src/elem/XProgress.c File Reference 391

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

9.20 src/elem/XProgress.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XProgress.h"
#include <stdio.h>
Include dependency graph for XProgress.c:

src/elem/XProgress.c

GUIslice_drv.h elem/XProgress.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions
• gslc_tsElemRef ∗ gslc_ElemXProgressCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-
Progress ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Progress Bar Element.
• void gslc_ElemXProgressSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• void gslc_ElemXProgressSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)
Set a Gauge element's fill direction.
• void gslc_ElemXProgressSetGaugeCol (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor col←-
Gauge)
Set the gauge color.
• bool gslc_ElemXProgressDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXProgressDrawHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: progress bar.

Generated by Doxygen
392 File Documentation

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.20.1 Function Documentation

9.20.1.1 gslc_ElemXProgressCreate()

gslc_tsElemRef∗ gslc_ElemXProgressCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXProgress ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Progress Bar Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

Generated by Doxygen
9.20 src/elem/XProgress.c File Reference 393

9.20.1.2 gslc_ElemXProgressDraw()

bool gslc_ElemXProgressDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

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

9.20.1.3 gslc_ElemXProgressDrawHelp()

bool gslc_ElemXProgressDrawHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: progress bar.

• Called from gslc_ElemXProgressDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

Generated by Doxygen
394 File Documentation

9.20.1.4 gslc_ElemXProgressSetFlip()

void gslc_ElemXProgressSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's fill direction.

• Setting bFlip reverses the default fill direction

• Default fill direction for horizontal gauges: left-to-right

• Default fill direction for vertical gauges: bottom-to-top

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of fill from default

Returns

none

9.20.1.5 gslc_ElemXProgressSetGaugeCol()

void gslc_ElemXProgressSetGaugeCol (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge )

Set the gauge color.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colGauge Color for the gauge's fill

Returns

none

Generated by Doxygen
9.21 src/elem/XProgress.h File Reference 395

9.20.1.6 gslc_ElemXProgressSetVal()

void gslc_ElemXProgressSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.20.2 Variable Documentation

9.20.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.20.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.21 src/elem/XProgress.h File Reference

#include "GUIslice.h"
Include dependency graph for XProgress.h:

src/elem/XProgress.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
396 File Documentation

This graph shows which files directly or indirectly include this file:

src/elem/XProgress.h

src/elem/XProgress.c

Data Structures

• struct gslc_tsXProgress
Extended data for Gauge element.

Macros

• #define GSLC_TYPEX_PROGRESS
• #define gslc_ElemXProgressCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nMin_, nMax_, nVal_, col←-
Frame_, colFill_, colGauge_, bVert_)
Create a Gauge Element in Flash.

Functions

• gslc_tsElemRef ∗ gslc_ElemXProgressCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Progress ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Progress Bar Element.
• void gslc_ElemXProgressSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• void gslc_ElemXProgressSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)
Set a Gauge element's fill direction.
• void gslc_ElemXProgressSetGaugeCol (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor col←-
Gauge)
Set the gauge color.
• bool gslc_ElemXProgressDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXProgressDrawHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: progress bar.

9.21.1 Macro Definition Documentation

Generated by Doxygen
9.21 src/elem/XProgress.h File Reference 397

9.21.1.1 gslc_ElemXProgressCreate_P

#define gslc_ElemXProgressCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nMin_,
nMax_,
nVal_,
colFrame_,
colFill_,
colGauge_,
bVert_ )

Create a Gauge Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nMin_ Minimum value of gauge for nVal comparison
in nMax_ Maximum value of gauge for nVal comparison
in nVal_ Starting value of gauge
in col←- Color for the gauge frame
Frame_
in colFill_ Color for the gauge background fill
in col←- Color for the gauge indicator
Gauge_
in bVert_ Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

none

9.21.1.2 GSLC_TYPEX_PROGRESS

#define GSLC_TYPEX_PROGRESS

9.21.2 Function Documentation

Generated by Doxygen
398 File Documentation

9.21.2.1 gslc_ElemXProgressCreate()

gslc_tsElemRef∗ gslc_ElemXProgressCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXProgress ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Progress Bar Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

9.21.2.2 gslc_ElemXProgressDraw()

bool gslc_ElemXProgressDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
9.21 src/elem/XProgress.h File Reference 399

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

9.21.2.3 gslc_ElemXProgressDrawHelp()

bool gslc_ElemXProgressDrawHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: progress bar.

• Called from gslc_ElemXProgressDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.21.2.4 gslc_ElemXProgressSetFlip()

void gslc_ElemXProgressSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's fill direction.

• Setting bFlip reverses the default fill direction

• Default fill direction for horizontal gauges: left-to-right

• Default fill direction for vertical gauges: bottom-to-top

Generated by Doxygen
400 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of fill from default

Returns

none

9.21.2.5 gslc_ElemXProgressSetGaugeCol()

void gslc_ElemXProgressSetGaugeCol (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge )

Set the gauge color.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colGauge Color for the gauge's fill

Returns

none

9.21.2.6 gslc_ElemXProgressSetVal()

void gslc_ElemXProgressSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge
Generated by Doxygen
9.22 src/elem/XRadial.c File Reference 401

Returns

none

9.22 src/elem/XRadial.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XRadial.h"
#include <stdio.h>
#include <math.h>
Include dependency graph for XRadial.c:

src/elem/XRadial.c

GUIslice_drv.h elem/XRadial.h math.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXRadialCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Radial ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge)
Create a Radial Gauge Element.
• void gslc_ElemXRadialSetIndicator (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colGauge,
uint16_t nIndicLen, uint16_t nIndicTip, bool bIndicFill)
Configure the appearance of the Gauge indicator.
• void gslc_ElemXRadialSetTicks (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colTick,
uint16_t nTickCnt, uint16_t nTickLen)
Configure the appearance of the Gauge ticks.
• void gslc_ElemXRadialSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• void gslc_ElemXRadialSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)
Set a Gauge element's rotation direction.
• bool gslc_ElemXRadialDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• void gslc_ElemXRadialDrawRadialHelp (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nArrowLen,
uint16_t nArrowSz, int16_t n64Ang, bool bFill, gslc_tsColor colFrame)
• bool gslc_ElemXRadialDrawRadial (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: radial.

Generated by Doxygen
402 File Documentation

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.22.1 Function Documentation

9.22.1.1 gslc_ElemXRadialCreate()

gslc_tsElemRef∗ gslc_ElemXRadialCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRadial ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge )

Create a Radial Gauge Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator

Returns

Pointer to Element reference or NULL if failure

9.22.1.2 gslc_ElemXRadialDraw()

bool gslc_ElemXRadialDraw (
void ∗ pvGui,

Generated by Doxygen
9.22 src/elem/XRadial.c File Reference 403

void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

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

9.22.1.3 gslc_ElemXRadialDrawRadial()

bool gslc_ElemXRadialDrawRadial (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: radial.

• Called from gslc_ElemXRadialDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.22.1.4 gslc_ElemXRadialDrawRadialHelp()

void gslc_ElemXRadialDrawRadialHelp (
gslc_tsGui ∗ pGui,

Generated by Doxygen
404 File Documentation

int16_t nX,
int16_t nY,
uint16_t nArrowLen,
uint16_t nArrowSz,
int16_t n64Ang,
bool bFill,
gslc_tsColor colFrame )

9.22.1.5 gslc_ElemXRadialSetFlip()

void gslc_ElemXRadialSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's rotation direction.

• Setting bFlip reverses the rotation direction

• Default rotation is clockwise. When bFlip is set, uses counter-clockwise

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of rotation from default

Returns

none

9.22.1.6 gslc_ElemXRadialSetIndicator()

void gslc_ElemXRadialSetIndicator (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge,
uint16_t nIndicLen,
uint16_t nIndicTip,
bool bIndicFill )

Configure the appearance of the Gauge indicator.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Generated by Doxygen
9.22 src/elem/XRadial.c File Reference 405

Parameters

in colGauge Color of the indicator


in nIndicLen Length of the indicator
in nIndicTip Size of the indicator tip
in bIndicFill Fill in the indicator if true

Returns

none

9.22.1.7 gslc_ElemXRadialSetTicks()

void gslc_ElemXRadialSetTicks (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colTick,
uint16_t nTickCnt,
uint16_t nTickLen )

Configure the appearance of the Gauge ticks.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colTick Color of the gauge ticks
in nTickCnt Number of ticks to draw around / along gauge
in nTickLen Length of the tick marks to draw

Returns

none

9.22.1.8 gslc_ElemXRadialSetVal()

void gslc_ElemXRadialSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Generated by Doxygen
406 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.22.2 Variable Documentation

9.22.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.22.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.23 src/elem/XRadial.h File Reference

#include "GUIslice.h"
Include dependency graph for XRadial.h:

src/elem/XRadial.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.23 src/elem/XRadial.h File Reference 407

This graph shows which files directly or indirectly include this file:

src/elem/XRadial.h

src/elem/XRadial.c

Data Structures

• struct gslc_tsXRadial
Extended data for Gauge element.

Macros

• #define GSLC_TYPEX_RADIAL
• #define gslc_ElemXRadialCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nMin_, nMax_, nVal_, col←-
Frame_, colFill_, colGauge_)
Create a Gauge Element in Flash.

Functions

• gslc_tsElemRef ∗ gslc_ElemXRadialCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Radial ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge)
Create a Radial Gauge Element.
• void gslc_ElemXRadialSetIndicator (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colGauge,
uint16_t nIndicLen, uint16_t nIndicTip, bool bIndicFill)
Configure the appearance of the Gauge indicator.
• void gslc_ElemXRadialSetTicks (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colTick,
uint16_t nTickCnt, uint16_t nTickLen)
Configure the appearance of the Gauge ticks.
• void gslc_ElemXRadialSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• void gslc_ElemXRadialSetFlip (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFlip)
Set a Gauge element's rotation direction.
• bool gslc_ElemXRadialDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXRadialDrawRadial (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: radial.

Generated by Doxygen
408 File Documentation

9.23.1 Macro Definition Documentation

9.23.1.1 gslc_ElemXRadialCreate_P

#define gslc_ElemXRadialCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nMin_,
nMax_,
nVal_,
colFrame_,
colFill_,
colGauge_ )

Create a Gauge Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nMin_ Minimum value of gauge for nVal comparison
in nMax_ Maximum value of gauge for nVal comparison
in nVal_ Starting value of gauge
in col←- Color for the gauge frame
Frame_
in colFill_ Color for the gauge background fill
in col←- Color for the gauge indicator
Gauge_

Returns

none

9.23.1.2 GSLC_TYPEX_RADIAL

#define GSLC_TYPEX_RADIAL

Generated by Doxygen
9.23 src/elem/XRadial.h File Reference 409

9.23.2 Function Documentation

9.23.2.1 gslc_ElemXRadialCreate()

gslc_tsElemRef∗ gslc_ElemXRadialCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRadial ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge )

Create a Radial Gauge Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator

Returns

Pointer to Element reference or NULL if failure

9.23.2.2 gslc_ElemXRadialDraw()

bool gslc_ElemXRadialDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
410 File Documentation

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

9.23.2.3 gslc_ElemXRadialDrawRadial()

bool gslc_ElemXRadialDrawRadial (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: radial.

• Called from gslc_ElemXRadialDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.23.2.4 gslc_ElemXRadialSetFlip()

void gslc_ElemXRadialSetFlip (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bFlip )

Set a Gauge element's rotation direction.

• Setting bFlip reverses the rotation direction

• Default rotation is clockwise. When bFlip is set, uses counter-clockwise

Generated by Doxygen
9.23 src/elem/XRadial.h File Reference 411

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bFlip If set, reverse direction of rotation from default

Returns

none

9.23.2.5 gslc_ElemXRadialSetIndicator()

void gslc_ElemXRadialSetIndicator (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colGauge,
uint16_t nIndicLen,
uint16_t nIndicTip,
bool bIndicFill )

Configure the appearance of the Gauge indicator.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colGauge Color of the indicator
in nIndicLen Length of the indicator
in nIndicTip Size of the indicator tip
in bIndicFill Fill in the indicator if true

Returns

none

9.23.2.6 gslc_ElemXRadialSetTicks()

void gslc_ElemXRadialSetTicks (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colTick,
uint16_t nTickCnt,
uint16_t nTickLen )

Configure the appearance of the Gauge ticks.

Generated by Doxygen
412 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colTick Color of the gauge ticks
in nTickCnt Number of ticks to draw around / along gauge
in nTickLen Length of the tick marks to draw

Returns

none

9.23.2.7 gslc_ElemXRadialSetVal()

void gslc_ElemXRadialSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.24 src/elem/XRamp.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XRamp.h"
#include <stdio.h>

Generated by Doxygen
9.24 src/elem/XRamp.c File Reference 413

Include dependency graph for XRamp.c:

src/elem/XRamp.c

GUIslice_drv.h elem/XRamp.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXRampCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Ramp ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Ramp Gauge Element.
• void gslc_ElemXRampSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• bool gslc_ElemXRampDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXRampDrawHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: ramp.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.24.1 Function Documentation

9.24.1.1 gslc_ElemXRampCreate()

gslc_tsElemRef∗ gslc_ElemXRampCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRamp ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,

Generated by Doxygen
414 File Documentation

int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Ramp Gauge Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

9.24.1.2 gslc_ElemXRampDraw()

bool gslc_ElemXRampDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

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

Generated by Doxygen
9.24 src/elem/XRamp.c File Reference 415

Returns

true if success, false otherwise

9.24.1.3 gslc_ElemXRampDrawHelp()

bool gslc_ElemXRampDrawHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: ramp.

• Called from gslc_ElemXRampDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.24.1.4 gslc_ElemXRampSetVal()

void gslc_ElemXRampSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Generated by Doxygen
416 File Documentation

Returns

none

9.24.2 Variable Documentation

9.24.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.24.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.25 src/elem/XRamp.h File Reference

#include "GUIslice.h"
Include dependency graph for XRamp.h:

src/elem/XRamp.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XRamp.h

src/elem/XRamp.c

Generated by Doxygen
9.25 src/elem/XRamp.h File Reference 417

Data Structures

• struct gslc_tsXRamp
Extended data for Gauge element.

Macros

• #define GSLC_TYPEX_RAMP
• #define gslc_ElemXRampCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nMin_, nMax_, nVal_, col←-
Frame_, colFill_)
Create a Gauge Element in Flash.

Functions

• gslc_tsElemRef ∗ gslc_ElemXRampCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Ramp ∗pXData, gslc_tsRect rElem, int16_t nMin, int16_t nMax, int16_t nVal, gslc_tsColor colGauge, bool
bVert)
Create a Ramp Gauge Element.
• void gslc_ElemXRampSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Update a Gauge element's current value.
• bool gslc_ElemXRampDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a gauge element on the screen.
• bool gslc_ElemXRampDrawHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType e←-
Redraw)
Helper function to draw a gauge with style: ramp.

9.25.1 Macro Definition Documentation

9.25.1.1 gslc_ElemXRampCreate_P

#define gslc_ElemXRampCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nMin_,
nMax_,
nVal_,
colFrame_,
colFill_ )

Create a Gauge Element in Flash.

Generated by Doxygen
418 File Documentation

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nMin_ Minimum value of gauge for nVal comparison
in nMax_ Maximum value of gauge for nVal comparison
in nVal_ Starting value of gauge
in col←- Color for the gauge frame
Frame_
in colFill_ Color for the gauge background fill

Returns

none

9.25.1.2 GSLC_TYPEX_RAMP

#define GSLC_TYPEX_RAMP

9.25.2 Function Documentation

9.25.2.1 gslc_ElemXRampCreate()

gslc_tsElemRef∗ gslc_ElemXRampCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRamp ∗ pXData,
gslc_tsRect rElem,
int16_t nMin,
int16_t nMax,
int16_t nVal,
gslc_tsColor colGauge,
bool bVert )

Create a Ramp Gauge Element.

• Draws a gauge element that represents a proportion (nVal) between nMin and nMax.

Generated by Doxygen
9.25 src/elem/XRamp.h File Reference 419

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 gauge size
in nMin Minimum value of gauge for nVal comparison
in nMax Maximum value of gauge for nVal comparison
in nVal Starting value of gauge
in colGauge Color for the gauge indicator
in bVert Flag to indicate vertical vs horizontal action (true = vertical, false = horizontal)

Returns

Pointer to Element reference or NULL if failure

9.25.2.2 gslc_ElemXRampDraw()

bool gslc_ElemXRampDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a gauge element on the screen.

• Called from gslc_ElemDraw()

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

9.25.2.3 gslc_ElemXRampDrawHelp()

bool gslc_ElemXRampDrawHelp (
gslc_tsGui ∗ pGui,

Generated by Doxygen
420 File Documentation

gslc_tsElemRef ∗ pElemRef,
gslc_teRedrawType eRedraw )

Helper function to draw a gauge with style: ramp.

• Called from gslc_ElemXRampDraw()

Parameters

in pGui Ptr to GUI


in pElemRef Ptr to Element reference
in eRedraw Redraw status

Returns

true if success, false otherwise

9.25.2.4 gslc_ElemXRampSetVal()

void gslc_ElemXRampSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Update a Gauge element's current value.

• Note that min & max values are assigned in create()

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New value to show in gauge

Returns

none

9.26 src/elem/XRingGauge.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XRingGauge.h"

Generated by Doxygen
9.26 src/elem/XRingGauge.c File Reference 421

#include <stdio.h>
Include dependency graph for XRingGauge.c:

src/elem/XRingGauge.c

GUIslice_drv.h elem/XRingGauge.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXRingGaugeCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_←-


tsXRingGauge ∗pXData, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create an XRingGauge element.
• bool gslc_ElemXRingGaugeDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw the template element on the screen.
• void gslc_ElemXRingGaugeSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Set an Ring Gauge current indicator value.
• void gslc_ElemXRingGaugeSetValRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nValMin,
int16_t nValMax)
Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal().
• void gslc_ElemXRingGaugeSetAngleRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nStart,
int16_t nRange, bool bClockwise)
Defines the angular range of the gauge, including both the active and inactive regions.
• void gslc_ElemXRingGaugeSetThickness (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nThickness)
Defines the thickness of the ring arcs.
• void gslc_ElemXRingGaugeSetColorActiveFlat (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor
colActive)
Defines the color of the active region to be a flat (constant) color.
• void gslc_ElemXRingGaugeSetColorActiveGradient (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_←-
tsColor colStart, gslc_tsColor colEnd)
Defines the color of the active region to be a gradient using two color stops.
• void gslc_ElemXRingGaugeSetColorInactive (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor
colInactive)
Defines the color of the inactive region to be a flat (constant) color.
• void gslc_ElemXRingGaugeSetQuality (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nSegments)
Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree
gauge.The larger the number, the more segments are used and the smoother the curve.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

Generated by Doxygen
422 File Documentation

9.26.1 Function Documentation

9.26.1.1 gslc_ElemXRingGaugeCreate()

gslc_tsElemRef∗ gslc_ElemXRingGaugeCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRingGauge ∗ pXData,
gslc_tsRect rElem,
char ∗ pStrBuf,
uint8_t nStrBufMax,
int16_t nFontId )

Create an XRingGauge 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 The square box that bounds the ring element. If a rectangular region is provided, then the
ring control will be centered in the long axis.
in pStrBuf String buffer to use for gauge inner text
in nStrBufMax Maximum length of string buffer (pStrBuf)
in nFontId Font ID to use for text display

Returns

Pointer to Element reference or NULL if failure

9.26.1.2 gslc_ElemXRingGaugeDraw()

bool gslc_ElemXRingGaugeDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the template element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
9.26 src/elem/XRingGauge.c File Reference 423

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

9.26.1.3 gslc_ElemXRingGaugeSetAngleRange()

void gslc_ElemXRingGaugeSetAngleRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nStart,
int16_t nRange,
bool bClockwise )

Defines the angular range of the gauge, including both the active and inactive regions.

• nStart defines the angle at the beginning of the active region.

• The current position marks the end of the active region and the beginning of the inactive region.

• nRange defines the angular range from the start of the active region to the end of the inactive region. In most
cases, a range of 360 degrees is used.

• All angles are measured in units of degrees.

• Angles are measured with 0 at the top, 90 towards the right, 180 towards the bottom, 270 towards the left,
etc.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nStart Define angle of start of active region (measured in degrees)
in nRange Define angular range from strt of active region to end of the inactive region (measured in
degrees)
in bClockwise Defines the direction in which the active region grows (true for clockwise) [FORCED
TRUE, FOR FUTURE IMPLEMENTATION]

Returns

none

Generated by Doxygen
424 File Documentation

9.26.1.4 gslc_ElemXRingGaugeSetColorActiveFlat()

void gslc_ElemXRingGaugeSetColorActiveFlat (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colActive )

Defines the color of the active region to be a flat (constant) color.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colActive Color of active region

Returns

none

9.26.1.5 gslc_ElemXRingGaugeSetColorActiveGradient()

void gslc_ElemXRingGaugeSetColorActiveGradient (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colStart,
gslc_tsColor colEnd )

Defines the color of the active region to be a gradient using two color stops.

The active region will be filled according to the proportion between nMin and nMax. The gradient is defined by a
linear RGB blend between the two color stops(colStart and colEnd)

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colStart Starting color of gradient fill
in colEnd Ending color of gradient fill

Returns

none

9.26.1.6 gslc_ElemXRingGaugeSetColorInactive()

void gslc_ElemXRingGaugeSetColorInactive (
gslc_tsGui ∗ pGui,

Generated by Doxygen
9.26 src/elem/XRingGauge.c File Reference 425

gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colInactive )

Defines the color of the inactive region to be a flat (constant) color.

The inactive color is often set to be the same as the background but it can be set to a different color to indicate the
remainder of the value range that is yet to be filled.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colInactive Color of inactive region

Returns

none

9.26.1.7 gslc_ElemXRingGaugeSetQuality()

void gslc_ElemXRingGaugeSetQuality (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nSegments )

Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree
gauge.The larger the number, the more segments are used and the smoother the curve.

A larger ring gauge may need a higher quality number to maintain a smoothed curve appearance.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nSegments Number of arc segments to render a complete circle. The higher the value, the smoother
the ring. Note that 360/nSegments should be an integer result, thus the allowable quality
settings are: 360 (max quality), 180, 120, 90, 72, 60, 45, 40, 36 (low quality), etc.

Returns

none

9.26.1.8 gslc_ElemXRingGaugeSetThickness()

void gslc_ElemXRingGaugeSetThickness (
gslc_tsGui ∗ pGui,

Generated by Doxygen
426 File Documentation

gslc_tsElemRef ∗ pElemRef,
int8_t nThickness )

Defines the thickness of the ring arcs.

More specifically, it defines the reduction in radius from the outer radius to the inner radius in pixels.

• Default thickness is 10 pixels

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nThickness Thickness of ring

Returns

none

9.26.1.9 gslc_ElemXRingGaugeSetVal()

void gslc_ElemXRingGaugeSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Set an Ring Gauge current indicator value.

Updates the current value of the ring gauge. The active region will be drawn up to the position defined by nVal within
the value range defined by SetValRange(nMin,nMax). A SetVal() close to nMin will cause a very small active region
to be drawn and a large remainder drawn in the inactive color, whereas a SetVal() close to nMax will cause a more
complete active region to be drawn.When SetVal() equals nMax, the entire angular range will be drawn in the active
color (and no inactive region).

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New position value

Returns

none

Generated by Doxygen
9.26 src/elem/XRingGauge.c File Reference 427

9.26.1.10 gslc_ElemXRingGaugeSetValRange()

void gslc_ElemXRingGaugeSetValRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nValMin,
int16_t nValMax )

Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal().

• Default is 0..100.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nValMin Minimum value
in nValMax Maximum value

Returns

none

9.26.2 Variable Documentation

9.26.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.26.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

Generated by Doxygen
428 File Documentation

9.27 src/elem/XRingGauge.h File Reference

#include "GUIslice.h"
Include dependency graph for XRingGauge.h:

src/elem/XRingGauge.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XRingGauge.h

src/elem/XRingGauge.c

Data Structures

• struct gslc_tsXRingGauge
Extended data for XRingGauge element.

Macros

• #define GSLC_TYPEX_RING
• #define XRING_STR_MAX

Functions

• gslc_tsElemRef ∗ gslc_ElemXRingGaugeCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_←-


tsXRingGauge ∗pXData, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create an XRingGauge element.
• bool gslc_ElemXRingGaugeDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)

Generated by Doxygen
9.27 src/elem/XRingGauge.h File Reference 429

Draw the template element on the screen.


• void gslc_ElemXRingGaugeSetVal (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nVal)
Set an Ring Gauge current indicator value.
• void gslc_ElemXRingGaugeSetAngleRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nStart,
int16_t nRange, bool bClockwise)
Defines the angular range of the gauge, including both the active and inactive regions.
• void gslc_ElemXRingGaugeSetValRange (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nValMin,
int16_t nValMax)
Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal().
• void gslc_ElemXRingGaugeSetThickness (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nThickness)
Defines the thickness of the ring arcs.
• void gslc_ElemXRingGaugeSetQuality (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint16_t nSegments)
Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree
gauge.The larger the number, the more segments are used and the smoother the curve.
• void gslc_ElemXRingGaugeSetColorInactive (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor
colInactive)
Defines the color of the inactive region to be a flat (constant) color.
• void gslc_ElemXRingGaugeSetColorActiveFlat (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor
colActive)
Defines the color of the active region to be a flat (constant) color.
• void gslc_ElemXRingGaugeSetColorActiveGradient (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_←-
tsColor colStart, gslc_tsColor colEnd)
Defines the color of the active region to be a gradient using two color stops.

9.27.1 Macro Definition Documentation

9.27.1.1 GSLC_TYPEX_RING

#define GSLC_TYPEX_RING

9.27.1.2 XRING_STR_MAX

#define XRING_STR_MAX

9.27.2 Function Documentation

9.27.2.1 gslc_ElemXRingGaugeCreate()

gslc_tsElemRef∗ gslc_ElemXRingGaugeCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXRingGauge ∗ pXData,
gslc_tsRect rElem,
char ∗ pStrBuf,
uint8_t nStrBufMax,
int16_t nFontId )

Create an XRingGauge element.

Generated by Doxygen
430 File Documentation

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 The square box that bounds the ring element. If a rectangular region is provided, then the
ring control will be centered in the long axis.
in pStrBuf String buffer to use for gauge inner text
in nStrBufMax Maximum length of string buffer (pStrBuf)
in nFontId Font ID to use for text display

Returns

Pointer to Element reference or NULL if failure

9.27.2.2 gslc_ElemXRingGaugeDraw()

bool gslc_ElemXRingGaugeDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the template element on the screen.

• Called from gslc_ElemDraw()

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

9.27.2.3 gslc_ElemXRingGaugeSetAngleRange()

void gslc_ElemXRingGaugeSetAngleRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nStart,

Generated by Doxygen
9.27 src/elem/XRingGauge.h File Reference 431

int16_t nRange,
bool bClockwise )

Defines the angular range of the gauge, including both the active and inactive regions.

• nStart defines the angle at the beginning of the active region.

• The current position marks the end of the active region and the beginning of the inactive region.

• nRange defines the angular range from the start of the active region to the end of the inactive region. In most
cases, a range of 360 degrees is used.

• All angles are measured in units of degrees.

• Angles are measured with 0 at the top, 90 towards the right, 180 towards the bottom, 270 towards the left,
etc.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nStart Define angle of start of active region (measured in degrees)
in nRange Define angular range from strt of active region to end of the inactive region (measured in
degrees)
in bClockwise Defines the direction in which the active region grows (true for clockwise) [FORCED
TRUE, FOR FUTURE IMPLEMENTATION]

Returns

none

9.27.2.4 gslc_ElemXRingGaugeSetColorActiveFlat()

void gslc_ElemXRingGaugeSetColorActiveFlat (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colActive )

Defines the color of the active region to be a flat (constant) color.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colActive Color of active region

Returns

none

Generated by Doxygen
432 File Documentation

9.27.2.5 gslc_ElemXRingGaugeSetColorActiveGradient()

void gslc_ElemXRingGaugeSetColorActiveGradient (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colStart,
gslc_tsColor colEnd )

Defines the color of the active region to be a gradient using two color stops.

The active region will be filled according to the proportion between nMin and nMax. The gradient is defined by a
linear RGB blend between the two color stops(colStart and colEnd)

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colStart Starting color of gradient fill
in colEnd Ending color of gradient fill

Returns

none

9.27.2.6 gslc_ElemXRingGaugeSetColorInactive()

void gslc_ElemXRingGaugeSetColorInactive (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor colInactive )

Defines the color of the inactive region to be a flat (constant) color.

The inactive color is often set to be the same as the background but it can be set to a different color to indicate the
remainder of the value range that is yet to be filled.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in colInactive Color of inactive region

Returns

none

Generated by Doxygen
9.27 src/elem/XRingGauge.h File Reference 433

9.27.2.7 gslc_ElemXRingGaugeSetQuality()

void gslc_ElemXRingGaugeSetQuality (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint16_t nSegments )

Sets the quality of the ring drawing by defining the number of segments that are used when rendering a 360 degree
gauge.The larger the number, the more segments are used and the smoother the curve.

A larger ring gauge may need a higher quality number to maintain a smoothed curve appearance.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nSegments Number of arc segments to render a complete circle. The higher the value, the smoother
the ring. Note that 360/nSegments should be an integer result, thus the allowable quality
settings are: 360 (max quality), 180, 120, 90, 72, 60, 45, 40, 36 (low quality), etc.

Returns

none

9.27.2.8 gslc_ElemXRingGaugeSetThickness()

void gslc_ElemXRingGaugeSetThickness (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int8_t nThickness )

Defines the thickness of the ring arcs.

More specifically, it defines the reduction in radius from the outer radius to the inner radius in pixels.

• Default thickness is 10 pixels

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nThickness Thickness of ring

Returns

none

Generated by Doxygen
434 File Documentation

9.27.2.9 gslc_ElemXRingGaugeSetVal()

void gslc_ElemXRingGaugeSetVal (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nVal )

Set an Ring Gauge current indicator value.

Updates the current value of the ring gauge. The active region will be drawn up to the position defined by nVal within
the value range defined by SetValRange(nMin,nMax). A SetVal() close to nMin will cause a very small active region
to be drawn and a large remainder drawn in the inactive color, whereas a SetVal() close to nMax will cause a more
complete active region to be drawn.When SetVal() equals nMax, the entire angular range will be drawn in the active
color (and no inactive region).

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nVal New position value

Returns

none

9.27.2.10 gslc_ElemXRingGaugeSetValRange()

void gslc_ElemXRingGaugeSetValRange (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nValMin,
int16_t nValMax )

Defines the range of values that may be passed into SetVal(), used to scale the input to SetVal().

• Default is 0..100.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nValMin Minimum value
in nValMax Maximum value

Returns

none

Generated by Doxygen
9.28 src/elem/XSeekbar.c File Reference 435

9.28 src/elem/XSeekbar.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XSeekbar.h"
#include <stdio.h>
Include dependency graph for XSeekbar.c:

src/elem/XSeekbar.c

GUIslice_drv.h elem/XSeekbar.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXSeekbarCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Seekbar ∗pXData, gslc_tsRect rElem, int16_t nPosMin, int16_t nPosMax, int16_t nPos, uint8_t nProgressW,
uint8_t nRemainW, uint8_t nThumbSz, gslc_tsColor colProgress, gslc_tsColor colRemain, gslc_tsColor col←-
Thumb, bool bVert)
Create a Seekbar Element.
• void gslc_ElemXSeekbarSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bTrimThumb, gslc_←-
tsColor colTrim, bool bFrameThumb, gslc_tsColor colFrame, uint16_t nTickDiv, int16_t nTickLen, gslc_tsColor
colTick)
Set a Seekbar element's style, this includes thumb customizations and tick marks.
• int gslc_ElemXSeekbarGetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Seekbar element's current position.
• void gslc_ElemXSeekbarSetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nPos)
Set a Seekbar element's current position.
• void gslc_ElemXSeekbarSetPosFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XSEEK←-
BAR_POS funcCb)
Assign the position callback function for a slider.
• bool gslc_ElemXSeekbarDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Seekbar element on the screen.
• bool gslc_ElemXSeekbarTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16←-
_t nRelY)
Handle touch events to Seekbar element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

Generated by Doxygen
436 File Documentation

9.28.1 Function Documentation

9.28.1.1 gslc_ElemXSeekbarCreate()

gslc_tsElemRef∗ gslc_ElemXSeekbarCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSeekbar ∗ pXData,
gslc_tsRect rElem,
int16_t nPosMin,
int16_t nPosMax,
int16_t nPos,
uint8_t nProgressW,
uint8_t nRemainW,
uint8_t nThumbSz,
gslc_tsColor colProgress,
gslc_tsColor colRemain,
gslc_tsColor colThumb,
bool bVert )

Create a Seekbar 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 checkbox size
in nPosMin Minimum position value
in nPosMax Maximum position value
in nPos Starting position value
in nProgressW Width of progress track
in nRemainW Width of remaining track
in nThumbSz Size of the thumb control
in colProgress Color of progress fill bar
in colRemain Color remaining fill bar
in colThumb Color for the thumb indicator
in bVert Orientation (true for vertical)

Returns

Pointer to Element reference or NULL if failure

Generated by Doxygen
9.28 src/elem/XSeekbar.c File Reference 437

9.28.1.2 gslc_ElemXSeekbarDraw()

bool gslc_ElemXSeekbarDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Seekbar element on the screen.

• Called from gslc_ElemDraw()

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

9.28.1.3 gslc_ElemXSeekbarGetPos()

int gslc_ElemXSeekbarGetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Seekbar element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current slider position

9.28.1.4 gslc_ElemXSeekbarSetPos()

void gslc_ElemXSeekbarSetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nPos )

Set a Seekbar element's current position.

Generated by Doxygen
438 File Documentation

Parameters

in pGui Pointer to GUI


in pGui Pointer to GUI
in pElemRef Pointer to Element reference
in nPos New position value

Returns

none

9.28.1.5 gslc_ElemXSeekbarSetPosFunc()

void gslc_ElemXSeekbarSetPosFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XSEEKBAR_POS funcCb )

Assign the position callback function for a slider.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to position routine (or NULL for none)

Returns

none

9.28.1.6 gslc_ElemXSeekbarSetStyle()

void gslc_ElemXSeekbarSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bTrimThumb,
gslc_tsColor colTrim,
bool bFrameThumb,
gslc_tsColor colFrame,
uint16_t nTickDiv,
int16_t nTickLen,
gslc_tsColor colTick )

Set a Seekbar element's style, this includes thumb customizations and tick marks.

Generated by Doxygen
9.28 src/elem/XSeekbar.c File Reference 439

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bTrimThumb Show a colored trim for thumb?
in colTrim Color of thumb trim
in bFrameThumb Show a frame around thumb?
in colFrame Color of thumb frame
in nTickDiv Number of tick divisions to show (0 for none)
in nTickLen Length of tick marks
in colTick Color of ticks

Returns

none

9.28.1.7 gslc_ElemXSeekbarTouch()

bool gslc_ElemXSeekbarTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Seekbar element.

• Called from gslc_ElemSendEventTouch()

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

9.28.2 Variable Documentation

Generated by Doxygen
440 File Documentation

9.28.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.28.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.29 src/elem/XSeekbar.h File Reference

#include "GUIslice.h"
Include dependency graph for XSeekbar.h:

src/elem/XSeekbar.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XSeekbar.h

src/elem/XSeekbar.c

Data Structures

• struct gslc_tsXSeekbar
Extended data for Seekbar element.

Generated by Doxygen
9.29 src/elem/XSeekbar.h File Reference 441

Macros

• #define GSLC_TYPEX_SEEKBAR
• #define gslc_ElemXSeekbarCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nPosMin_, nPosMax_, nPos←-
_, nProgressW_, nRemainW_, nThumbSz_, colProgress_, colRemain_, colThumb_, bVert_, colFrame_←-
, colFill_)
Create a Seekbar Element in Flash.

Typedefs

• typedef bool(∗ GSLC_CB_XSEEKBAR_POS) (void ∗pvGui, void ∗pvElem, int16_t nPos)


Callback function for slider feedback.

Functions

• gslc_tsElemRef ∗ gslc_ElemXSeekbarCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Seekbar ∗pXData, gslc_tsRect rElem, int16_t nPosMin, int16_t nPosMax, int16_t nPos, uint8_t nProgressW,
uint8_t nRemainW, uint8_t nThumbSz, gslc_tsColor colProgress, gslc_tsColor colRemain, gslc_tsColor col←-
Thumb, bool bVert)
Create a Seekbar Element.
• void gslc_ElemXSeekbarSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bTrimThumb, gslc_←-
tsColor colTrim, bool bFrameThumb, gslc_tsColor colFrame, uint16_t nTickDiv, int16_t nTickLen, gslc_tsColor
colTick)
Set a Seekbar element's style, this includes thumb customizations and tick marks.
• int gslc_ElemXSeekbarGetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Seekbar element's current position.
• void gslc_ElemXSeekbarSetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nPos)
Set a Seekbar element's current position.
• void gslc_ElemXSeekbarSetPosFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XSEEK←-
BAR_POS funcCb)
Assign the position callback function for a slider.
• bool gslc_ElemXSeekbarDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Seekbar element on the screen.
• bool gslc_ElemXSeekbarTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16←-
_t nRelY)
Handle touch events to Seekbar element.

9.29.1 Macro Definition Documentation

Generated by Doxygen
442 File Documentation

9.29.1.1 gslc_ElemXSeekbarCreate_P

#define gslc_ElemXSeekbarCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nPosMin_,
nPosMax_,
nPos_,
nProgressW_,
nRemainW_,
nThumbSz_,
colProgress_,
colRemain_,
colThumb_,
bVert_,
colFrame_,
colFill_ )

Create a Seekbar Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nPosMin_ Minimum position value
in nPosMax_ Maximum position value
in nPos_ Starting position value
in nProgress←- Width of progress track
W_
in nRemainW←- Width of remaining track
_
in nThumbSz←- Size of the thumb control
_
in col←- Color of progress fill bar
Progress_
in colRemain←- Color remaining fill bar
_
in colThumb_ Color for the thumb indicator
in bVert_ Orientation (true for vertical)
in colFrame_ Color of the element frame
in colFill_ Color of the element fill

Generated by Doxygen
9.29 src/elem/XSeekbar.h File Reference 443

Returns

none

9.29.1.2 GSLC_TYPEX_SEEKBAR

#define GSLC_TYPEX_SEEKBAR

9.29.2 Typedef Documentation

9.29.2.1 GSLC_CB_XSEEKBAR_POS

typedef bool(∗ GSLC_CB_XSEEKBAR_POS) (void ∗pvGui, void ∗pvElem, int16_t nPos)

Callback function for slider feedback.

9.29.3 Function Documentation

9.29.3.1 gslc_ElemXSeekbarCreate()

gslc_tsElemRef∗ gslc_ElemXSeekbarCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSeekbar ∗ pXData,
gslc_tsRect rElem,
int16_t nPosMin,
int16_t nPosMax,
int16_t nPos,
uint8_t nProgressW,
uint8_t nRemainW,
uint8_t nThumbSz,
gslc_tsColor colProgress,
gslc_tsColor colRemain,
gslc_tsColor colThumb,
bool bVert )

Create a Seekbar Element.

Parameters

in pGui Pointer to GUI


in nElemId Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)

Generated by Doxygen
444 File Documentation

Parameters
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in rElem Rectangle coordinates defining checkbox size
in nPosMin Minimum position value
in nPosMax Maximum position value
in nPos Starting position value
in nProgressW Width of progress track
in nRemainW Width of remaining track
in nThumbSz Size of the thumb control
in colProgress Color of progress fill bar
in colRemain Color remaining fill bar
in colThumb Color for the thumb indicator
in bVert Orientation (true for vertical)

Returns

Pointer to Element reference or NULL if failure

9.29.3.2 gslc_ElemXSeekbarDraw()

bool gslc_ElemXSeekbarDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Seekbar element on the screen.

• Called from gslc_ElemDraw()

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

Generated by Doxygen
9.29 src/elem/XSeekbar.h File Reference 445

9.29.3.3 gslc_ElemXSeekbarGetPos()

int gslc_ElemXSeekbarGetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Seekbar element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current slider position

9.29.3.4 gslc_ElemXSeekbarSetPos()

void gslc_ElemXSeekbarSetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nPos )

Set a Seekbar element's current position.

Parameters

in pGui Pointer to GUI


in pGui Pointer to GUI
in pElemRef Pointer to Element reference
in nPos New position value

Returns

none

9.29.3.5 gslc_ElemXSeekbarSetPosFunc()

void gslc_ElemXSeekbarSetPosFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XSEEKBAR_POS funcCb )

Assign the position callback function for a slider.

Generated by Doxygen
446 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to position routine (or NULL for none)

Returns

none

9.29.3.6 gslc_ElemXSeekbarSetStyle()

void gslc_ElemXSeekbarSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bTrimThumb,
gslc_tsColor colTrim,
bool bFrameThumb,
gslc_tsColor colFrame,
uint16_t nTickDiv,
int16_t nTickLen,
gslc_tsColor colTick )

Set a Seekbar element's style, this includes thumb customizations and tick marks.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bTrimThumb Show a colored trim for thumb?
in colTrim Color of thumb trim
in bFrameThumb Show a frame around thumb?
in colFrame Color of thumb frame
in nTickDiv Number of tick divisions to show (0 for none)
in nTickLen Length of tick marks
in colTick Color of ticks

Returns

none

9.29.3.7 gslc_ElemXSeekbarTouch()

bool gslc_ElemXSeekbarTouch (
void ∗ pvGui,

Generated by Doxygen
9.30 src/elem/XSelNum.c File Reference 447

void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Seekbar element.

• Called from gslc_ElemSendEventTouch()

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

9.30 src/elem/XSelNum.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XSelNum.h"
#include <stdio.h>
Include dependency graph for XSelNum.c:

src/elem/XSelNum.c

GUIslice_drv.h elem/XSelNum.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXSelNumCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


SelNum ∗pXData, gslc_tsRect rElem, int8_t nFontId)

Generated by Doxygen
448 File Documentation

Create a SelNum Element.


• bool gslc_ElemXSelNumDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a SelNum element on the screen.
• int gslc_ElemXSelNumGetCounter (gslc_tsGui ∗pGui, gslc_tsXSelNum ∗pSelNum)
Get the current counter associated with SelNum.
• void gslc_ElemXSelNumSetCounter (gslc_tsGui ∗pGui, gslc_tsXSelNum ∗pSelNum, int16_t nCount)
Set the current counter associated with SelNum.
• bool gslc_ElemXSelNumClick (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Handle a click event within the SelNum.
• bool gslc_ElemXSelNumTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch (up,down,move) events to SelNum element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]
• static const int16_t SELNUM_ID_BTN_INC
• static const int16_t SELNUM_ID_BTN_DEC
• static const int16_t SELNUM_ID_TXT

9.30.1 Function Documentation

9.30.1.1 gslc_ElemXSelNumClick()

bool gslc_ElemXSelNumClick (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nX,
int16_t nY )

Handle a click event within the SelNum.

• This is called internally by the SelNum 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

Generated by Doxygen
9.30 src/elem/XSelNum.c File Reference 449

Returns

none

9.30.1.2 gslc_ElemXSelNumCreate()

gslc_tsElemRef∗ gslc_ElemXSelNumCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSelNum ∗ pXData,
gslc_tsRect rElem,
int8_t nFontId )

Create a SelNum Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in rElem Rectangle coordinates defining element size
in nFontId Font ID to use for drawing the element

Returns

Pointer to Element or NULL if failure

9.30.1.3 gslc_ElemXSelNumDraw()

bool gslc_ElemXSelNumDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a SelNum element on the screen.

• Called during redraw

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

Generated by Doxygen
450 File Documentation

Returns

true if success, false otherwise

9.30.1.4 gslc_ElemXSelNumGetCounter()

int gslc_ElemXSelNumGetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSelNum ∗ pSelNum )

Get the current counter associated with SelNum.

Parameters

in pGui Ptr to GUI


in pSelNum Ptr to Element

Returns

Current counter value

9.30.1.5 gslc_ElemXSelNumSetCounter()

void gslc_ElemXSelNumSetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSelNum ∗ pSelNum,
int16_t nCount )

Set the current counter associated with SelNum.

Parameters

in pGui Pointer to GUI


in pSelNum Ptr to Element
in nCount New counter value

Returns

none

9.30.1.6 gslc_ElemXSelNumTouch()

bool gslc_ElemXSelNumTouch (
void ∗ pvGui,

Generated by Doxygen
9.30 src/elem/XSelNum.c File Reference 451

void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch (up,down,move) events to SelNum element.

• Called from gslc_ElemSendEventTouch()

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

9.30.2 Variable Documentation

9.30.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.30.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.30.2.3 SELNUM_ID_BTN_DEC

const int16_t SELNUM_ID_BTN_DEC [static]

9.30.2.4 SELNUM_ID_BTN_INC

const int16_t SELNUM_ID_BTN_INC [static]

Generated by Doxygen
452 File Documentation

9.30.2.5 SELNUM_ID_TXT

const int16_t SELNUM_ID_TXT [static]

9.31 src/elem/XSelNum.h File Reference

#include "GUIslice.h"
Include dependency graph for XSelNum.h:

src/elem/XSelNum.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XSelNum.h

src/elem/XSelNum.c src/GUIslice_ex.h

Data Structures

• struct gslc_tsXSelNum
Extended data for SelNum element.

Macros

• #define GSLC_TYPEX_SELNUM
• #define SELNUM_STR_LEN

Generated by Doxygen
9.31 src/elem/XSelNum.h File Reference 453

Functions

• gslc_tsElemRef ∗ gslc_ElemXSelNumCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


SelNum ∗pXData, gslc_tsRect rElem, int8_t nFontId)
Create a SelNum Element.
• bool gslc_ElemXSelNumDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a SelNum element on the screen.
• int gslc_ElemXSelNumGetCounter (gslc_tsGui ∗pGui, gslc_tsXSelNum ∗pSelNum)
Get the current counter associated with SelNum.
• void gslc_ElemXSelNumSetCounter (gslc_tsGui ∗pGui, gslc_tsXSelNum ∗pSelNum, int16_t nCount)
Set the current counter associated with SelNum.
• bool gslc_ElemXSelNumClick (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Handle a click event within the SelNum.
• bool gslc_ElemXSelNumTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch (up,down,move) events to SelNum element.

9.31.1 Macro Definition Documentation

9.31.1.1 GSLC_TYPEX_SELNUM

#define GSLC_TYPEX_SELNUM

9.31.1.2 SELNUM_STR_LEN

#define SELNUM_STR_LEN

9.31.2 Function Documentation

9.31.2.1 gslc_ElemXSelNumClick()

bool gslc_ElemXSelNumClick (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nX,
int16_t nY )

Handle a click event within the SelNum.

• This is called internally by the SelNum touch handler

Generated by Doxygen
454 File Documentation

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

9.31.2.2 gslc_ElemXSelNumCreate()

gslc_tsElemRef∗ gslc_ElemXSelNumCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSelNum ∗ pXData,
gslc_tsRect rElem,
int8_t nFontId )

Create a SelNum Element.

Parameters

in pGui Pointer to GUI


in n←- Element ID to assign (0..16383 or GSLC_ID_AUTO to autogen)
ElemId
in nPage Page ID to attach element to
in pXData Ptr to extended element data structure
in rElem Rectangle coordinates defining element size
in nFontId Font ID to use for drawing the element

Returns

Pointer to Element or NULL if failure

9.31.2.3 gslc_ElemXSelNumDraw()

bool gslc_ElemXSelNumDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a SelNum element on the screen.

• Called during redraw

Generated by Doxygen
9.31 src/elem/XSelNum.h File Reference 455

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

9.31.2.4 gslc_ElemXSelNumGetCounter()

int gslc_ElemXSelNumGetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSelNum ∗ pSelNum )

Get the current counter associated with SelNum.

Parameters

in pGui Ptr to GUI


in pSelNum Ptr to Element

Returns

Current counter value

9.31.2.5 gslc_ElemXSelNumSetCounter()

void gslc_ElemXSelNumSetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSelNum ∗ pSelNum,
int16_t nCount )

Set the current counter associated with SelNum.

Parameters

in pGui Pointer to GUI


in pSelNum Ptr to Element
in nCount New counter value

Generated by Doxygen
456 File Documentation

Returns

none

9.31.2.6 gslc_ElemXSelNumTouch()

bool gslc_ElemXSelNumTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch (up,down,move) events to SelNum element.

• Called from gslc_ElemSendEventTouch()

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

9.32 src/elem/XSlider.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XSlider.h"
#include <stdio.h>

Generated by Doxygen
9.32 src/elem/XSlider.c File Reference 457

Include dependency graph for XSlider.c:

src/elem/XSlider.c

GUIslice_drv.h elem/XSlider.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXSliderCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Slider ∗pXData, gslc_tsRect rElem, int16_t nPosMin, int16_t nPosMax, int16_t nPos, uint16_t nThumbSz,
bool bVert)
Create a Slider Element.
• void gslc_ElemXSliderSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bTrim, gslc_tsColor col←-
Trim, uint16_t nTickDiv, int16_t nTickLen, gslc_tsColor colTick)
Set a Slider element's current position.
• void gslc_ElemXSliderSetSnapEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bSnapEn)
Enable touch to snap to the nearest tick mark.
• int gslc_ElemXSliderGetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Slider element's current position.
• void gslc_ElemXSliderSetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nPos)
Set a Slider element's current position.
• void gslc_ElemXSliderSetPosFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XSLIDER_←-
POS funcCb)
Assign the position callback function for a slider.
• bool gslc_ElemXSliderDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Slider element on the screen.
• bool gslc_ElemXSliderTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch events to Slider element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.32.1 Function Documentation

Generated by Doxygen
458 File Documentation

9.32.1.1 gslc_ElemXSliderCreate()

gslc_tsElemRef∗ gslc_ElemXSliderCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSlider ∗ pXData,
gslc_tsRect rElem,
int16_t nPosMin,
int16_t nPosMax,
int16_t nPos,
uint16_t nThumbSz,
bool bVert )

Create a Slider 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 checkbox size
in nPosMin Minimum position value
in nPosMax Maximum position value
in nPos Starting position value
in nThumbSz Size of the thumb control
in bVert Orientation (true for vertical)

Returns

Pointer to Element reference or NULL if failure

9.32.1.2 gslc_ElemXSliderDraw()

bool gslc_ElemXSliderDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Slider element on the screen.

• Called from gslc_ElemDraw()

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
Generated by Doxygen
9.32 src/elem/XSlider.c File Reference 459

Returns

true if success, false otherwise

9.32.1.3 gslc_ElemXSliderGetPos()

int gslc_ElemXSliderGetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Slider element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current slider position

9.32.1.4 gslc_ElemXSliderSetPos()

void gslc_ElemXSliderSetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nPos )

Set a Slider element's current position.

Parameters

in pGui Pointer to GUI


in pGui Pointer to GUI
in pElemRef Pointer to Element reference
in nPos New position value

Returns

none

Generated by Doxygen
460 File Documentation

9.32.1.5 gslc_ElemXSliderSetPosFunc()

void gslc_ElemXSliderSetPosFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XSLIDER_POS funcCb )

Assign the position callback function for a slider.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to position routine (or NULL for none)

Returns

none

9.32.1.6 gslc_ElemXSliderSetSnapEn()

void gslc_ElemXSliderSetSnapEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bSnapEn )

Enable touch to snap to the nearest tick mark.

• nTickDiv (in SetStyle) must be non-zero for snap to be active

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bSnapEn Enable snap function if true

Returns

none

9.32.1.7 gslc_ElemXSliderSetStyle()

void gslc_ElemXSliderSetStyle (
gslc_tsGui ∗ pGui,

Generated by Doxygen
9.32 src/elem/XSlider.c File Reference 461

gslc_tsElemRef ∗ pElemRef,
bool bTrim,
gslc_tsColor colTrim,
uint16_t nTickDiv,
int16_t nTickLen,
gslc_tsColor colTick )

Set a Slider element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bTrim Show a colored trim?
in colTrim Color of trim
in nTickDiv Number of tick divisions to show (0 for none)
in nTickLen Length of tickmarks
in colTick Color of ticks

Returns

none

9.32.1.8 gslc_ElemXSliderTouch()

bool gslc_ElemXSliderTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Slider element.

• Called from gslc_ElemSendEventTouch()

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

Generated by Doxygen
462 File Documentation

9.32.2 Variable Documentation

9.32.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.32.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.33 src/elem/XSlider.h File Reference

#include "GUIslice.h"
Include dependency graph for XSlider.h:

src/elem/XSlider.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XSlider.h

src/elem/XSlider.c src/GUIslice_ex.h

Generated by Doxygen
9.33 src/elem/XSlider.h File Reference 463

Data Structures

• struct gslc_tsXSlider
Extended data for Slider element.

Macros

• #define GSLC_TYPEX_SLIDER
• #define gslc_ElemXSliderCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, nPosMin_, nPosMax_, nPos_,
nThumbSz_, bVert_, colFrame_, colFill_)
Create a Slider Element in Flash.

Typedefs

• typedef bool(∗ GSLC_CB_XSLIDER_POS) (void ∗pvGui, void ∗pvElem, int16_t nPos)


Callback function for slider feedback.

Functions

• gslc_tsElemRef ∗ gslc_ElemXSliderCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Slider ∗pXData, gslc_tsRect rElem, int16_t nPosMin, int16_t nPosMax, int16_t nPos, uint16_t nThumbSz,
bool bVert)
Create a Slider Element.
• void gslc_ElemXSliderSetStyle (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bTrim, gslc_tsColor col←-
Trim, uint16_t nTickDiv, int16_t nTickLen, gslc_tsColor colTick)
Set a Slider element's current position.
• void gslc_ElemXSliderSetSnapEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bSnapEn)
Enable touch to snap to the nearest tick mark.
• int gslc_ElemXSliderGetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Slider element's current position.
• void gslc_ElemXSliderSetPos (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nPos)
Set a Slider element's current position.
• void gslc_ElemXSliderSetPosFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_XSLIDER_←-
POS funcCb)
Assign the position callback function for a slider.
• bool gslc_ElemXSliderDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Slider element on the screen.
• bool gslc_ElemXSliderTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16_t
nRelY)
Handle touch events to Slider element.

9.33.1 Macro Definition Documentation

Generated by Doxygen
464 File Documentation

9.33.1.1 gslc_ElemXSliderCreate_P

#define gslc_ElemXSliderCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
nPosMin_,
nPosMax_,
nPos_,
nThumbSz_,
bVert_,
colFrame_,
colFill_ )

Create a Slider Element in Flash.

Parameters

in pGui Pointer to GUI


in nElemId Unique element ID to assign
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 nPosMin←- Minimum position value
_
in nPosMax←- Maximum position value
_
in nPos_ Starting position value
in nThumb←- Size of the thumb control
Sz_
in bVert_ Orientation (true for vertical)
in colFrame←- Color of the element frame
_
in colFill_ Color of the element fill

Returns

none

9.33.1.2 GSLC_TYPEX_SLIDER

#define GSLC_TYPEX_SLIDER

Generated by Doxygen
9.33 src/elem/XSlider.h File Reference 465

9.33.2 Typedef Documentation

9.33.2.1 GSLC_CB_XSLIDER_POS

typedef bool(∗ GSLC_CB_XSLIDER_POS) (void ∗pvGui, void ∗pvElem, int16_t nPos)

Callback function for slider feedback.

9.33.3 Function Documentation

9.33.3.1 gslc_ElemXSliderCreate()

gslc_tsElemRef∗ gslc_ElemXSliderCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXSlider ∗ pXData,
gslc_tsRect rElem,
int16_t nPosMin,
int16_t nPosMax,
int16_t nPos,
uint16_t nThumbSz,
bool bVert )

Create a Slider 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 checkbox size
in nPosMin Minimum position value
in nPosMax Maximum position value
in nPos Starting position value
in nThumbSz Size of the thumb control
in bVert Orientation (true for vertical)

Returns

Pointer to Element reference or NULL if failure

Generated by Doxygen
466 File Documentation

9.33.3.2 gslc_ElemXSliderDraw()

bool gslc_ElemXSliderDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Slider element on the screen.

• Called from gslc_ElemDraw()

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

9.33.3.3 gslc_ElemXSliderGetPos()

int gslc_ElemXSliderGetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Slider element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current slider position

9.33.3.4 gslc_ElemXSliderSetPos()

void gslc_ElemXSliderSetPos (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
int16_t nPos )

Set a Slider element's current position.

Generated by Doxygen
9.33 src/elem/XSlider.h File Reference 467

Parameters

in pGui Pointer to GUI


in pGui Pointer to GUI
in pElemRef Pointer to Element reference
in nPos New position value

Returns

none

9.33.3.5 gslc_ElemXSliderSetPosFunc()

void gslc_ElemXSliderSetPosFunc (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
GSLC_CB_XSLIDER_POS funcCb )

Assign the position callback function for a slider.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in funcCb Function pointer to position routine (or NULL for none)

Returns

none

9.33.3.6 gslc_ElemXSliderSetSnapEn()

void gslc_ElemXSliderSetSnapEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bSnapEn )

Enable touch to snap to the nearest tick mark.

• nTickDiv (in SetStyle) must be non-zero for snap to be active

Generated by Doxygen
468 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bSnapEn Enable snap function if true

Returns

none

9.33.3.7 gslc_ElemXSliderSetStyle()

void gslc_ElemXSliderSetStyle (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bTrim,
gslc_tsColor colTrim,
uint16_t nTickDiv,
int16_t nTickLen,
gslc_tsColor colTick )

Set a Slider element's current position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bTrim Show a colored trim?
in colTrim Color of trim
in nTickDiv Number of tick divisions to show (0 for none)
in nTickLen Length of tickmarks
in colTick Color of ticks

Returns

none

9.33.3.8 gslc_ElemXSliderTouch()

bool gslc_ElemXSliderTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Slider element.

Generated by Doxygen
9.34 src/elem/XSpinner.c File Reference 469

• Called from gslc_ElemSendEventTouch()

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

9.34 src/elem/XSpinner.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XSpinner.h"
#include <stdio.h>
Include dependency graph for XSpinner.c:

src/elem/XSpinner.c

GUIslice_drv.h elem/XSpinner.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXSpinnerCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Spinner ∗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.
• bool gslc_ElemXSpinnerSetChars (void ∗pvGui, gslc_tsElemRef ∗pElemRef, uint8_t cIncr, uint8_t cDecr)
Set Up and Down characters for the Spinner element.
• bool gslc_ElemXSpinnerDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Spinner element on the screen.
• int gslc_ElemXSpinnerGetCounter (gslc_tsGui ∗pGui, gslc_tsXSpinner ∗pSpinner)

Generated by Doxygen
470 File Documentation

Get the current counter associated with Spinner.


• void gslc_ElemXSpinnerSetCounter (gslc_tsGui ∗pGui, gslc_tsXSpinner ∗pSpinner, int16_t nCount)
Set the current counter associated with Spinner.
• bool gslc_ElemXSpinnerClick (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Handle a click event within the Spinner.
• 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.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]
• static const int16_t SPINNER_ID_BTN_INC
• static const int16_t SPINNER_ID_BTN_DEC
• static const int16_t SPINNER_ID_TXT

9.34.1 Function Documentation

9.34.1.1 gslc_ElemXSpinnerClick()

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

Generated by Doxygen
9.34 src/elem/XSpinner.c File Reference 471

9.34.1.2 gslc_ElemXSpinnerCreate()

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

9.34.1.3 gslc_ElemXSpinnerDraw()

bool gslc_ElemXSpinnerDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Spinner element on the screen.

• Called during redraw

Generated by Doxygen
472 File Documentation

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

9.34.1.4 gslc_ElemXSpinnerGetCounter()

int gslc_ElemXSpinnerGetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSpinner ∗ pSpinner )

Get the current counter associated with Spinner.

Parameters

in pGui Ptr to GUI


in pSpinner Ptr to Element

Returns

Current counter value

9.34.1.5 gslc_ElemXSpinnerSetChars()

bool gslc_ElemXSpinnerSetChars (
void ∗ pvGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t cIncr,
uint8_t cDecr )

Set Up and Down characters for the Spinner element.

• Called during redraw

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
Generated by Doxygen
9.34 src/elem/XSpinner.c File Reference 473

Returns

true if success, false otherwise

9.34.1.6 gslc_ElemXSpinnerSetCounter()

void gslc_ElemXSpinnerSetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSpinner ∗ pSpinner,
int16_t nCount )

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

9.34.1.7 gslc_ElemXSpinnerTouch()

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.

• Called from gslc_ElemSendEventTouch()

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

Generated by Doxygen
474 File Documentation

Returns

true if success, false otherwise

9.34.2 Variable Documentation

9.34.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.34.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.34.2.3 SPINNER_ID_BTN_DEC

const int16_t SPINNER_ID_BTN_DEC [static]

9.34.2.4 SPINNER_ID_BTN_INC

const int16_t SPINNER_ID_BTN_INC [static]

9.34.2.5 SPINNER_ID_TXT

const int16_t SPINNER_ID_TXT [static]

Generated by Doxygen
9.35 src/elem/XSpinner.h File Reference 475

9.35 src/elem/XSpinner.h File Reference

#include "GUIslice.h"
Include dependency graph for XSpinner.h:

src/elem/XSpinner.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XSpinner.h

src/elem/XSpinner.c

Data Structures

• struct gslc_tsXSpinner
Extended data for Spinner element.

Macros

• #define GSLC_TYPEX_SPINNER
• #define XSPINNER_COMP_CNT
• #define XSPINNER_STR_LEN
• #define XSPINNER_CB_STATE_UPDATE

Generated by Doxygen
476 File Documentation

Functions

• gslc_tsElemRef ∗ gslc_ElemXSpinnerCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Spinner ∗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.
• bool gslc_ElemXSpinnerSetChars (void ∗pvGui, gslc_tsElemRef ∗pElemRef, uint8_t cIncr, uint8_t cDecr)
Set Up and Down characters for the Spinner element.
• bool gslc_ElemXSpinnerDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Spinner element on the screen.
• int gslc_ElemXSpinnerGetCounter (gslc_tsGui ∗pGui, gslc_tsXSpinner ∗pSpinner)
Get the current counter associated with Spinner.
• void gslc_ElemXSpinnerSetCounter (gslc_tsGui ∗pGui, gslc_tsXSpinner ∗pSpinner, int16_t nCount)
Set the current counter associated with Spinner.
• bool gslc_ElemXSpinnerClick (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Handle a click event within the Spinner.
• 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.

9.35.1 Macro Definition Documentation

9.35.1.1 GSLC_TYPEX_SPINNER

#define GSLC_TYPEX_SPINNER

9.35.1.2 XSPINNER_CB_STATE_UPDATE

#define XSPINNER_CB_STATE_UPDATE

9.35.1.3 XSPINNER_COMP_CNT

#define XSPINNER_COMP_CNT

9.35.1.4 XSPINNER_STR_LEN

#define XSPINNER_STR_LEN

Generated by Doxygen
9.35 src/elem/XSpinner.h File Reference 477

9.35.2 Function Documentation

9.35.2.1 gslc_ElemXSpinnerClick()

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

9.35.2.2 gslc_ElemXSpinnerCreate()

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.

Generated by Doxygen
478 File Documentation

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

9.35.2.3 gslc_ElemXSpinnerDraw()

bool gslc_ElemXSpinnerDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Spinner element on the screen.

• Called during redraw

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

9.35.2.4 gslc_ElemXSpinnerGetCounter()

int gslc_ElemXSpinnerGetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSpinner ∗ pSpinner )

Generated by Doxygen
9.35 src/elem/XSpinner.h File Reference 479

Get the current counter associated with Spinner.

Parameters

in pGui Ptr to GUI


in pSpinner Ptr to Element

Returns

Current counter value

9.35.2.5 gslc_ElemXSpinnerSetChars()

bool gslc_ElemXSpinnerSetChars (
void ∗ pvGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t cIncr,
uint8_t cDecr )

Set Up and Down characters for the Spinner element.

• Called during redraw

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

9.35.2.6 gslc_ElemXSpinnerSetCounter()

void gslc_ElemXSpinnerSetCounter (
gslc_tsGui ∗ pGui,
gslc_tsXSpinner ∗ pSpinner,
int16_t nCount )

Set the current counter associated with Spinner.

Generated by Doxygen
480 File Documentation

Parameters

in pGui Pointer to GUI


in pSpinner Ptr to Element
in nCount New counter value

Returns

none

9.35.2.7 gslc_ElemXSpinnerTouch()

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.

• Called from gslc_ElemSendEventTouch()

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

9.36 src/elem/XTemplate.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XTemplate.h"
#include <stdio.h>

Generated by Doxygen
9.36 src/elem/XTemplate.c File Reference 481

Include dependency graph for XTemplate.c:

src/elem/XTemplate.c

GUIslice_drv.h elem/XTemplate.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXTemplateCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_ts←-


XTemplate ∗pXData, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create an Extended Text Field Element.
• bool gslc_ElemXTemplateDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw the template element on the screen.
• bool gslc_ElemXTemplateTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16←-
_t nRelY)
Handle touch events to template element.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.36.1 Function Documentation

9.36.1.1 gslc_ElemXTemplateCreate()

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.

Generated by Doxygen
482 File Documentation

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 element size
in pStrBuf Ptr to string buffer
in nStrBufMax Maximum buffer alength allocated to pStrBuf
in nFontId ID of font to use for text output

Returns

Pointer to Element reference or NULL if failure

9.36.1.2 gslc_ElemXTemplateDraw()

bool gslc_ElemXTemplateDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the template element on the screen.

• Called from gslc_ElemDraw()

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

9.36.1.3 gslc_ElemXTemplateTouch()

bool gslc_ElemXTemplateTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to template element.

Generated by Doxygen
9.37 src/elem/XTemplate.h File Reference 483

• Called from gslc_ElemSendEventTouch()

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

9.36.2 Variable Documentation

9.36.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.36.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.37 src/elem/XTemplate.h File Reference

#include "GUIslice.h"
Include dependency graph for XTemplate.h:

src/elem/XTemplate.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
484 File Documentation

This graph shows which files directly or indirectly include this file:

src/elem/XTemplate.h

src/elem/XTemplate.c

Data Structures

• struct gslc_tsXTemplate
Callback function for slider feedback.

Macros

• #define GSLC_TYPEX_TEMPLATE

Functions

• gslc_tsElemRef ∗ gslc_ElemXTemplateCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_ts←-


XTemplate ∗pXData, gslc_tsRect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create an Extended Text Field Element.
• bool gslc_ElemXTemplateDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw the template element on the screen.
• bool gslc_ElemXTemplateTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX, int16←-
_t nRelY)
Handle touch events to template element.

9.37.1 Macro Definition Documentation

9.37.1.1 GSLC_TYPEX_TEMPLATE

#define GSLC_TYPEX_TEMPLATE

9.37.2 Function Documentation

Generated by Doxygen
9.37 src/elem/XTemplate.h File Reference 485

9.37.2.1 gslc_ElemXTemplateCreate()

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 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 element size
in pStrBuf Ptr to string buffer
in nStrBufMax Maximum buffer alength allocated to pStrBuf
in nFontId ID of font to use for text output

Returns

Pointer to Element reference or NULL if failure

9.37.2.2 gslc_ElemXTemplateDraw()

bool gslc_ElemXTemplateDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw the template element on the screen.

• Called from gslc_ElemDraw()

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

Generated by Doxygen
486 File Documentation

Returns

true if success, false otherwise

9.37.2.3 gslc_ElemXTemplateTouch()

bool gslc_ElemXTemplateTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to template element.

• Called from gslc_ElemSendEventTouch()

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

9.38 src/elem/XTextbox.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XTextbox.h"
#include <stdio.h>

Generated by Doxygen
9.38 src/elem/XTextbox.c File Reference 487

Include dependency graph for XTextbox.c:

src/elem/XTextbox.c

GUIslice_drv.h elem/XTextbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• gslc_tsElemRef ∗ gslc_ElemXTextboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Textbox ∗pXData, gslc_tsRect rElem, int16_t nFontId, char ∗pBuf, uint16_t nBufRows, uint16_t nBufCols)
Create a Textbox Element.
• void gslc_ElemXTextboxReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Reset the contents of the textbox.
• void gslc_ElemXTextboxLineWrAdv (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• void gslc_ElemXTextboxScrollSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nScrollPos, uint8←-
_t nScrollMax)
Set the textbox scroll position (nScrollPos) as a fraction of nScrollMax.
• void gslc_ElemXTextboxBufAdd (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned char chNew, bool
bAdvance)
• void gslc_ElemXTextboxColSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor nCol)
Insert a color set code into the current buffer position.
• void gslc_ElemXTextboxColReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Insert a color reset code into the current buffer position.
• void gslc_ElemXTextboxWrapSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bWrapEn)
Enable or disable line wrap within textbox.
• void gslc_ElemXTextboxAdd (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, char ∗pTxt)
Add a text string to the textbox.
• bool gslc_ElemXTextboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Textbox element on the screen.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.38.1 Function Documentation

Generated by Doxygen
488 File Documentation

9.38.1.1 gslc_ElemXTextboxAdd()

void gslc_ElemXTextboxAdd (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
char ∗ pTxt )

Add a text string to the textbox.

• If it includes a newline then the buffer will advance to the next row

• If wrap has been enabled, then a newline will be forced

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in pTxt Pointer to text string (null-terminated)

Returns

none

9.38.1.2 gslc_ElemXTextboxBufAdd()

void gslc_ElemXTextboxBufAdd (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
unsigned char chNew,
bool bAdvance )

9.38.1.3 gslc_ElemXTextboxColReset()

void gslc_ElemXTextboxColReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Insert a color reset code into the current buffer position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Generated by Doxygen
9.38 src/elem/XTextbox.c File Reference 489

Returns

none

9.38.1.4 gslc_ElemXTextboxColSet()

void gslc_ElemXTextboxColSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor nCol )

Insert a color set code into the current buffer position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nCol Color to assign for next text written to textbox

Returns

none

9.38.1.5 gslc_ElemXTextboxCreate()

gslc_tsElemRef∗ gslc_ElemXTextboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXTextbox ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
char ∗ pBuf,
uint16_t nBufRows,
uint16_t nBufCols )

Create a Textbox Element.

• The textbox is a scrolling window designed for displaying multi-line text using a monospaced font. A character
buffer is defined by nBufRows∗nBufCols to capture the added text. If the allocation buffer is larger than the
display size (defined by rElem), then a scrollbar will be shown.

• Support for changing color within a row can be enabled with GSLC_FEATURE_XTEXTBOX_EMBED 1

• Note that each color change command will consume 4 of the available "column" bytes.

Generated by Doxygen
490 File Documentation

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 textbox size
in nFontId Font ID to use for text area
in pBuf Ptr to text buffer (already allocated) with size (nBufRows∗nBufCols) chars
in nBufRows Number of rows in buffer
in nBufCols Number of columns in buffer (incl special codes)

Returns

Pointer to Element reference or NULL if failure

9.38.1.6 gslc_ElemXTextboxDraw()

bool gslc_ElemXTextboxDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Textbox element on the screen.

• Called from gslc_ElemDraw()

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

9.38.1.7 gslc_ElemXTextboxLineWrAdv()

void gslc_ElemXTextboxLineWrAdv (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Generated by Doxygen
9.38 src/elem/XTextbox.c File Reference 491

9.38.1.8 gslc_ElemXTextboxReset()

void gslc_ElemXTextboxReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Reset the contents of the textbox.

• Clears the buffer and resets the position

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.38.1.9 gslc_ElemXTextboxScrollSet()

void gslc_ElemXTextboxScrollSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nScrollPos,
uint8_t nScrollMax )

Set the textbox scroll position (nScrollPos) as a fraction of nScrollMax.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos New scroll position
in nScrollMax Maximum scroll position

Returns

none

9.38.1.10 gslc_ElemXTextboxWrapSet()

void gslc_ElemXTextboxWrapSet (
gslc_tsGui ∗ pGui,

Generated by Doxygen
492 File Documentation

gslc_tsElemRef ∗ pElemRef,
bool bWrapEn )

Enable or disable line wrap within textbox.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bWrapEn Enable line wrap if true

Returns

none

9.38.2 Variable Documentation

9.38.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.38.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.39 src/elem/XTextbox.h File Reference

#include "GUIslice.h"
Include dependency graph for XTextbox.h:

src/elem/XTextbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Generated by Doxygen
9.39 src/elem/XTextbox.h File Reference 493

This graph shows which files directly or indirectly include this file:

src/elem/XTextbox.h

src/elem/XTextbox.c src/GUIslice_ex.h

Data Structures

• struct gslc_tsXTextbox
Extended data for Textbox element.

Macros

• #define GSLC_TYPEX_TEXTBOX
• #define GSLC_XTEXTBOX_CODE_COL_SET
Definitions for textbox special inline codes.
• #define GSLC_XTEXTBOX_CODE_COL_RESET
• #define XTEXTBOX_REDRAW_NONE
• #define XTEXTBOX_REDRAW_ALL

Functions

• gslc_tsElemRef ∗ gslc_ElemXTextboxCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsX←-


Textbox ∗pXData, gslc_tsRect rElem, int16_t nFontId, char ∗pBuf, uint16_t nBufRows, uint16_t nBufCols)
Create a Textbox Element.
• void gslc_ElemXTextboxReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Reset the contents of the textbox.
• bool gslc_ElemXTextboxDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Textbox element on the screen.
• void gslc_ElemXTextboxAdd (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, char ∗pTxt)
Add a text string to the textbox.
• void gslc_ElemXTextboxColSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor nCol)
Insert a color set code into the current buffer position.
• void gslc_ElemXTextboxColReset (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Insert a color reset code into the current buffer position.
• void gslc_ElemXTextboxWrapSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bWrapEn)
Enable or disable line wrap within textbox.
• void gslc_ElemXTextboxScrollSet (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nScrollPos, uint8←-
_t nScrollMax)
Set the textbox scroll position (nScrollPos) as a fraction of nScrollMax.

Generated by Doxygen
494 File Documentation

9.39.1 Macro Definition Documentation

9.39.1.1 GSLC_TYPEX_TEXTBOX

#define GSLC_TYPEX_TEXTBOX

9.39.1.2 GSLC_XTEXTBOX_CODE_COL_RESET

#define GSLC_XTEXTBOX_CODE_COL_RESET

9.39.1.3 GSLC_XTEXTBOX_CODE_COL_SET

#define GSLC_XTEXTBOX_CODE_COL_SET

Definitions for textbox special inline codes.

9.39.1.4 XTEXTBOX_REDRAW_ALL

#define XTEXTBOX_REDRAW_ALL

9.39.1.5 XTEXTBOX_REDRAW_NONE

#define XTEXTBOX_REDRAW_NONE

9.39.2 Function Documentation

9.39.2.1 gslc_ElemXTextboxAdd()

void gslc_ElemXTextboxAdd (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
char ∗ pTxt )

Add a text string to the textbox.

• If it includes a newline then the buffer will advance to the next row

• If wrap has been enabled, then a newline will be forced

Generated by Doxygen
9.39 src/elem/XTextbox.h File Reference 495

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in pTxt Pointer to text string (null-terminated)

Returns

none

9.39.2.2 gslc_ElemXTextboxColReset()

void gslc_ElemXTextboxColReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Insert a color reset code into the current buffer position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.39.2.3 gslc_ElemXTextboxColSet()

void gslc_ElemXTextboxColSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsColor nCol )

Insert a color set code into the current buffer position.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nCol Color to assign for next text written to textbox

Generated by Doxygen
496 File Documentation

Returns

none

9.39.2.4 gslc_ElemXTextboxCreate()

gslc_tsElemRef∗ gslc_ElemXTextboxCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXTextbox ∗ pXData,
gslc_tsRect rElem,
int16_t nFontId,
char ∗ pBuf,
uint16_t nBufRows,
uint16_t nBufCols )

Create a Textbox Element.

• The textbox is a scrolling window designed for displaying multi-line text using a monospaced font. A character
buffer is defined by nBufRows∗nBufCols to capture the added text. If the allocation buffer is larger than the
display size (defined by rElem), then a scrollbar will be shown.

• Support for changing color within a row can be enabled with GSLC_FEATURE_XTEXTBOX_EMBED 1

• Note that each color change command will consume 4 of the available "column" bytes.

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 textbox size
in nFontId Font ID to use for text area
in pBuf Ptr to text buffer (already allocated) with size (nBufRows∗nBufCols) chars
in nBufRows Number of rows in buffer
in nBufCols Number of columns in buffer (incl special codes)

Returns

Pointer to Element reference or NULL if failure

9.39.2.5 gslc_ElemXTextboxDraw()

bool gslc_ElemXTextboxDraw (
void ∗ pvGui,

Generated by Doxygen
9.39 src/elem/XTextbox.h File Reference 497

void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Textbox element on the screen.

• Called from gslc_ElemDraw()

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

9.39.2.6 gslc_ElemXTextboxReset()

void gslc_ElemXTextboxReset (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Reset the contents of the textbox.

• Clears the buffer and resets the position

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.39.2.7 gslc_ElemXTextboxScrollSet()

void gslc_ElemXTextboxScrollSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
uint8_t nScrollPos,
uint8_t nScrollMax )

Set the textbox scroll position (nScrollPos) as a fraction of nScrollMax.

Generated by Doxygen
498 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in nScrollPos New scroll position
in nScrollMax Maximum scroll position

Returns

none

9.39.2.8 gslc_ElemXTextboxWrapSet()

void gslc_ElemXTextboxWrapSet (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bWrapEn )

Enable or disable line wrap within textbox.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bWrapEn Enable line wrap if true

Returns

none

9.40 src/elem/XTogglebtn.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "XTogglebtn.h"
#include <stdio.h>

Generated by Doxygen
9.40 src/elem/XTogglebtn.c File Reference 499

Include dependency graph for XTogglebtn.c:

src/elem/XTogglebtn.c

GUIslice_drv.h XTogglebtn.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions

• 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.
• bool gslc_ElemXTogglebtnGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Togglebtn element's current state.
• void gslc_ElemXTogglebtnSetStateHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
• void gslc_ElemXTogglebtnSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
Set a Togglebtn element's current state.
• void gslc_ElemXTogglebtnToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a Togglebtn element's current state.
• void gslc_ElemXTogglebtnDrawCircularHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsX←-
Togglebtn ∗pTogglebtn)
• void gslc_ElemXTogglebtnDrawRectangularHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsX←-
Togglebtn ∗pTogglebtn)
• bool gslc_ElemXTogglebtnDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Togglebtn element on the screen.
• bool gslc_ElemXTogglebtnTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to Togglebtn element.
• gslc_tsElemRef ∗ gslc_ElemXTogglebtnFindSelected (gslc_tsGui ∗pGui, int16_t nGroupId)
Find the togglebtn within a group that has been selected.

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.40.1 Function Documentation

Generated by Doxygen
500 File Documentation

9.40.1.1 gslc_ElemXTogglebtnCreate()

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

9.40.1.2 gslc_ElemXTogglebtnDraw()

bool gslc_ElemXTogglebtnDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Togglebtn element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
9.40 src/elem/XTogglebtn.c File Reference 501

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

9.40.1.3 gslc_ElemXTogglebtnDrawCircularHelp()

void gslc_ElemXTogglebtnDrawCircularHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsXTogglebtn ∗ pTogglebtn )

9.40.1.4 gslc_ElemXTogglebtnDrawRectangularHelp()

void gslc_ElemXTogglebtnDrawRectangularHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
gslc_tsXTogglebtn ∗ pTogglebtn )

9.40.1.5 gslc_ElemXTogglebtnFindSelected()

gslc_tsElemRef∗ gslc_ElemXTogglebtnFindSelected (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Find the togglebtn within a group that has been selected.

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none selected

Generated by Doxygen
502 File Documentation

9.40.1.6 gslc_ElemXTogglebtnGetState()

bool gslc_ElemXTogglebtnGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Togglebtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

9.40.1.7 gslc_ElemXTogglebtnSetState()

void gslc_ElemXTogglebtnSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

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

9.40.1.8 gslc_ElemXTogglebtnSetStateHelp()

void gslc_ElemXTogglebtnSetStateHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

Generated by Doxygen
9.40 src/elem/XTogglebtn.c File Reference 503

9.40.1.9 gslc_ElemXTogglebtnToggleState()

void gslc_ElemXTogglebtnToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a Togglebtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.40.1.10 gslc_ElemXTogglebtnTouch()

bool gslc_ElemXTogglebtnTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Togglebtn element.

• Called from gslc_ElemSendEventTouch()

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

9.40.2 Variable Documentation

Generated by Doxygen
504 File Documentation

9.40.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.40.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.41 src/elem/XTogglebtn.h File Reference

#include "GUIslice.h"
Include dependency graph for XTogglebtn.h:

src/elem/XTogglebtn.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XTogglebtn.h

src/elem/XTogglebtn.c

Data Structures

• struct gslc_tsXTogglebtn
Extended data for Togglebtn element.

Generated by Doxygen
9.41 src/elem/XTogglebtn.h File Reference 505

Macros

• #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.

Functions

• 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.
• bool gslc_ElemXTogglebtnGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a Togglebtn element's current state.
• void gslc_ElemXTogglebtnSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
Set a Togglebtn element's current state.
• void gslc_ElemXTogglebtnToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a Togglebtn element's current state.
• bool gslc_ElemXTogglebtnDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a Togglebtn element on the screen.
• bool gslc_ElemXTogglebtnTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to Togglebtn element.
• gslc_tsElemRef ∗ gslc_ElemXTogglebtnFindSelected (gslc_tsGui ∗pGui, int16_t nGroupId)
Find the togglebtn within a group that has been selected.

9.41.1 Macro Definition Documentation

9.41.1.1 gslc_ElemXTogglebtnCreate_P

#define gslc_ElemXTogglebtnCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
colThumb_,
colOnState_,
colOffState_,
bCircular_,
bChecked_,
cbTouch )

Create a Togglebtn button Element.

Generated by Doxygen
506 File Documentation

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 colOn←- Color to indicate on position
State_
in colOff←- Color to indicate off position
State_
in bCircular←- Style of the toggle button circular or rectangular
_
in bChecked←- Default state
_
in cbTouch Callback for touch events

Returns

none

9.41.1.2 GSLC_TYPEX_TOGGLEBTN

#define GSLC_TYPEX_TOGGLEBTN

9.41.2 Function Documentation

9.41.2.1 gslc_ElemXTogglebtnCreate()

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.

Generated by Doxygen
9.41 src/elem/XTogglebtn.h File Reference 507

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

9.41.2.2 gslc_ElemXTogglebtnDraw()

bool gslc_ElemXTogglebtnDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a Togglebtn element on the screen.

• Called from gslc_ElemDraw()

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

9.41.2.3 gslc_ElemXTogglebtnFindSelected()

gslc_tsElemRef∗ gslc_ElemXTogglebtnFindSelected (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Generated by Doxygen
508 File Documentation

Find the togglebtn within a group that has been selected.

Generated by Doxygen
9.41 src/elem/XTogglebtn.h File Reference 509

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none selected

9.41.2.4 gslc_ElemXTogglebtnGetState()

bool gslc_ElemXTogglebtnGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a Togglebtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

9.41.2.5 gslc_ElemXTogglebtnSetState()

void gslc_ElemXTogglebtnSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

Set a Togglebtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bOn New state

Generated by Doxygen
510 File Documentation

Returns

none

9.41.2.6 gslc_ElemXTogglebtnToggleState()

void gslc_ElemXTogglebtnToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a Togglebtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

9.41.2.7 gslc_ElemXTogglebtnTouch()

bool gslc_ElemXTogglebtnTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to Togglebtn element.

• Called from gslc_ElemSendEventTouch()

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

Generated by Doxygen
9.42 src/elem/XToggleImgbtn.c File Reference 511

Returns

true if success, false otherwise

9.42 src/elem/XToggleImgbtn.c File Reference

#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "elem/XToggleImgbtn.h"
#include <stdio.h>
Include dependency graph for XToggleImgbtn.c:

src/elem/XToggleImgbtn.c

GUIslice_drv.h elem/XToggleImgbtn.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Functions
• gslc_tsElemRef ∗ gslc_ElemXToggleImgbtnCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc←-
_tsXToggleImgbtn ∗pXData, gslc_tsRect rElem, gslc_tsImgRef sImgRef, gslc_tsImgRef sImgRefSel, bool
bOn, GSLC_CB_TOUCH cbTouch)
Create a ToggleImgbtn button Element.
• bool gslc_ElemXToggleImgbtnGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a ToggleImgbtn element's current state.
• void gslc_ElemXToggleImgbtnSetStateHelp (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
• void gslc_ElemXToggleImgbtnSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
Set a ToggleImgbtn element's current state.
• void gslc_ElemXToggleImgbtnToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a ToggleImgbtn element's current state.
• bool gslc_ElemXToggleImgbtnDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a ToggleImgbtn element on the screen.
• bool gslc_ElemXToggleImgbtnTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to ToggleImgbtn element.
• gslc_tsElemRef ∗ gslc_ElemXToggleImgbtnFindSelected (gslc_tsGui ∗pGui, int16_t nGroupId)
Find the togglebtn within a group that has been selected.

Variables
• const char GSLC_PMEM ERRSTR_NULL [ ]
• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

Generated by Doxygen
512 File Documentation

9.42.1 Function Documentation

9.42.1.1 gslc_ElemXToggleImgbtnCreate()

gslc_tsElemRef∗ gslc_ElemXToggleImgbtnCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXToggleImgbtn ∗ pXData,
gslc_tsRect rElem,
gslc_tsImgRef sImgRef,
gslc_tsImgRef sImgRefSel,
bool bOn,
GSLC_CB_TOUCH cbTouch )

Create a ToggleImgbtn 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 sImgRef Image reference to load (unselected state)
in sImgRefSel Image reference to load (selected state)
in bOn Default state, On or Off
in cbTouch Callback for touch events

Returns

Pointer to Element reference or NULL if failure

9.42.1.2 gslc_ElemXToggleImgbtnDraw()

bool gslc_ElemXToggleImgbtnDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a ToggleImgbtn element on the screen.

• Called from gslc_ElemDraw()

Generated by Doxygen
9.42 src/elem/XToggleImgbtn.c File Reference 513

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

9.42.1.3 gslc_ElemXToggleImgbtnFindSelected()

gslc_tsElemRef∗ gslc_ElemXToggleImgbtnFindSelected (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Find the togglebtn within a group that has been selected.

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none selected

9.42.1.4 gslc_ElemXToggleImgbtnGetState()

bool gslc_ElemXToggleImgbtnGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a ToggleImgbtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

Generated by Doxygen
514 File Documentation

9.42.1.5 gslc_ElemXToggleImgbtnSetState()

void gslc_ElemXToggleImgbtnSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

Set a ToggleImgbtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bOn New state

Returns

none

9.42.1.6 gslc_ElemXToggleImgbtnSetStateHelp()

void gslc_ElemXToggleImgbtnSetStateHelp (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

9.42.1.7 gslc_ElemXToggleImgbtnToggleState()

void gslc_ElemXToggleImgbtnToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a ToggleImgbtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

Generated by Doxygen
9.42 src/elem/XToggleImgbtn.c File Reference 515

9.42.1.8 gslc_ElemXToggleImgbtnTouch()

bool gslc_ElemXToggleImgbtnTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to ToggleImgbtn element.

• Called from gslc_ElemSendEventTouch()

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

9.42.2 Variable Documentation

9.42.2.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.42.2.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

Generated by Doxygen
516 File Documentation

9.43 src/elem/XToggleImgbtn.h File Reference

#include "GUIslice.h"
Include dependency graph for XToggleImgbtn.h:

src/elem/XToggleImgbtn.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/elem/XToggleImgbtn.h

src/elem/XToggleImgbtn.c

Data Structures

• struct gslc_tsXToggleImgbtn
Extended data for ToggleImgbtn element.

Macros

• #define GSLC_TYPEX_TOGGLEIMGBTN
• #define gslc_ElemXToggleImgbtnCreate_P(pGui, nElemId, nPage, nX, nY, nW, nH, sImgRef_, sImgRefSel←-
_, bOn_, cbTouch)
Create a ToggleImgbtn button Element.

Generated by Doxygen
9.43 src/elem/XToggleImgbtn.h File Reference 517

Functions

• gslc_tsElemRef ∗ gslc_ElemXToggleImgbtnCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc←-


_tsXToggleImgbtn ∗pXData, gslc_tsRect rElem, gslc_tsImgRef sImgRef, gslc_tsImgRef sImgRefSel, bool
bOn, GSLC_CB_TOUCH cbTouch)
Create a ToggleImgbtn button Element.
• bool gslc_ElemXToggleImgbtnGetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get a ToggleImgbtn element's current state.
• void gslc_ElemXToggleImgbtnSetState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bOn)
Set a ToggleImgbtn element's current state.
• void gslc_ElemXToggleImgbtnToggleState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Toggle a ToggleImgbtn element's current state.
• bool gslc_ElemXToggleImgbtnDraw (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Draw a ToggleImgbtn element on the screen.
• bool gslc_ElemXToggleImgbtnTouch (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY)
Handle touch events to ToggleImgbtn element.
• gslc_tsElemRef ∗ gslc_ElemXToggleImgbtnFindSelected (gslc_tsGui ∗pGui, int16_t nGroupId)
Find the togglebtn within a group that has been selected.

9.43.1 Macro Definition Documentation

9.43.1.1 gslc_ElemXToggleImgbtnCreate_P

#define gslc_ElemXToggleImgbtnCreate_P(
pGui,
nElemId,
nPage,
nX,
nY,
nW,
nH,
sImgRef_,
sImgRefSel_,
bOn_,
cbTouch )

Create a ToggleImgbtn 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 sImgRef_ Image reference to load (unselected state)
in sImgRef←- Image reference to load (selected state)
Sel_
Generated by Doxygen
in bOn_ Default state, On or Off
in cbTouch Callback for touch events
518 File Documentation

Returns

none

9.43.1.2 GSLC_TYPEX_TOGGLEIMGBTN

#define GSLC_TYPEX_TOGGLEIMGBTN

9.43.2 Function Documentation

9.43.2.1 gslc_ElemXToggleImgbtnCreate()

gslc_tsElemRef∗ gslc_ElemXToggleImgbtnCreate (
gslc_tsGui ∗ pGui,
int16_t nElemId,
int16_t nPage,
gslc_tsXToggleImgbtn ∗ pXData,
gslc_tsRect rElem,
gslc_tsImgRef sImgRef,
gslc_tsImgRef sImgRefSel,
bool bOn,
GSLC_CB_TOUCH cbTouch )

Create a ToggleImgbtn 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 sImgRef Image reference to load (unselected state)
in sImgRefSel Image reference to load (selected state)
in bOn Default state, On or Off
in cbTouch Callback for touch events

Returns

Pointer to Element reference or NULL if failure

Generated by Doxygen
9.43 src/elem/XToggleImgbtn.h File Reference 519

9.43.2.2 gslc_ElemXToggleImgbtnDraw()

bool gslc_ElemXToggleImgbtnDraw (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teRedrawType eRedraw )

Draw a ToggleImgbtn element on the screen.

• Called from gslc_ElemDraw()

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

9.43.2.3 gslc_ElemXToggleImgbtnFindSelected()

gslc_tsElemRef∗ gslc_ElemXToggleImgbtnFindSelected (
gslc_tsGui ∗ pGui,
int16_t nGroupId )

Find the togglebtn within a group that has been selected.

Parameters

in pGui Pointer to GUI


in n←- Group ID to search
GroupId

Returns

Element Ptr or NULL if none selected

9.43.2.4 gslc_ElemXToggleImgbtnGetState()

bool gslc_ElemXToggleImgbtnGetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Get a ToggleImgbtn element's current state.

Generated by Doxygen
520 File Documentation

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

Current state

9.43.2.5 gslc_ElemXToggleImgbtnSetState()

void gslc_ElemXToggleImgbtnSetState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef,
bool bOn )

Set a ToggleImgbtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference
in bOn New state

Returns

none

9.43.2.6 gslc_ElemXToggleImgbtnToggleState()

void gslc_ElemXToggleImgbtnToggleState (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Toggle a ToggleImgbtn element's current state.

Parameters

in pGui Pointer to GUI


in pElemRef Pointer to Element reference

Returns

none

Generated by Doxygen
9.44 src/GUIslice.c File Reference 521

9.43.2.7 gslc_ElemXToggleImgbtnTouch()

bool gslc_ElemXToggleImgbtnTouch (
void ∗ pvGui,
void ∗ pvElemRef,
gslc_teTouch eTouch,
int16_t nRelX,
int16_t nRelY )

Handle touch events to ToggleImgbtn element.

• Called from gslc_ElemSendEventTouch()

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

9.44 src/GUIslice.c File Reference

#include "GUIslice_config.h"
#include "GUIslice.h"
#include "GUIslice_drv.h"
#include <stdio.h>
#include <stdarg.h>
#include "GUIslice_version.h"
Include dependency graph for GUIslice.c:

src/GUIslice.c

GUIslice.h GUIslice_drv.h stdarg.h GUIslice_version.h

GUIslice_config.h stdio.h string.h inttypes.h stdlib.h stdbool.h

Generated by Doxygen
522 File Documentation

Enumerations

• enum gslc_teDebugPrintState {
GSLC_S_DEBUG_PRINT_NORM, GSLC_S_DEBUG_PRINT_TOKEN, GSLC_S_DEBUG_PRINT_UINT16,
GSLC_S_DEBUG_PRINT_CHAR,
GSLC_S_DEBUG_PRINT_STR, GSLC_S_DEBUG_PRINT_STR_P }

Functions

• char ∗ gslc_GetVer (gslc_tsGui ∗pGui)


Get the GUIslice version number.
• const char ∗ gslc_GetNameDisp (gslc_tsGui ∗pGui)
Get the GUIslice display driver name.
• const char ∗ gslc_GetNameTouch (gslc_tsGui ∗pGui)
Get the GUIslice touch driver name.
• void ∗ gslc_GetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_GetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• bool gslc_Init (gslc_tsGui ∗pGui, void ∗pvDriver, gslc_tsPage ∗asPage, uint8_t nMaxPage, gslc_tsFont ∗as←-
Font, uint8_t nMaxFont)
Initialize the GUIslice library.
• void gslc_SetPinPollFunc (gslc_tsGui ∗pGui, GSLC_CB_PIN_POLL pfunc)
Specify the callback function that is used to collect the state of any external inputs (eg.
• void gslc_InitInputMap (gslc_tsGui ∗pGui, gslc_tsInputMap ∗asInputMap, uint8_t nInputMapMax)
Specify the mapping between external pin inputs (fetched by the SetPinPollFunc() callback and the GUI actions.
• void gslc_InputMapAdd (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc_te←-
Action eAction, int16_t nActionVal)
Add an entry into the external input mapping table.
• bool gslc_InputMapLookup (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc←-
_teAction ∗peAction, int16_t ∗pnActionVal)
• void gslc_InitDebug (GSLC_CB_DEBUG_OUT pfunc)
Initialize debug output.
• void gslc_DebugPrintf (const char ∗pFmt,...)
Optimized printf routine for GUIslice debug/error output.
• void gslc_Quit (gslc_tsGui ∗pGui)
Exit the GUIslice environment.
• void gslc_Update (gslc_tsGui ∗pGui)
Perform main GUIslice handling functions.
• gslc_tsEvent gslc_EventCreate (gslc_tsGui ∗pGui, gslc_teEventType eType, uint8_t nSubType, void ∗pv←-
Scope, void ∗pvData)
Create an event structure.
• bool gslc_IsInRect (int16_t nSelX, int16_t nSelY, gslc_tsRect rRect)
Determine if a coordinate is inside of a rectangular region.
• bool gslc_IsInWH (int16_t nSelX, int16_t nSelY, uint16_t nWidth, uint16_t nHeight)
Determine if a coordinate is inside of a width x height region.
• void gslc_OrderCoord (int16_t ∗pnX0, int16_t ∗pnY0, int16_t ∗pnX1, int16_t ∗pnY1)
• bool gslc_ClipPt (gslc_tsRect ∗pClipRect, int16_t nX, int16_t nY)
Perform basic clipping of a single point to a clipping region.
• bool gslc_ClipLine (gslc_tsRect ∗pClipRect, int16_t ∗pnX0, int16_t ∗pnY0, int16_t ∗pnX1, int16_t ∗pnY1)
Perform basic clipping of a line to a clipping region.

Generated by Doxygen
9.44 src/GUIslice.c File Reference 523

• bool gslc_ClipRect (gslc_tsRect ∗pClipRect, gslc_tsRect ∗pRect)


Perform basic clipping of a rectangle to a clipping region.
• gslc_tsImgRef gslc_ResetImage ()
Create a blank image reference structure.
• gslc_tsImgRef gslc_GetImageFromFile (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in LINUX filesystem.
• gslc_tsImgRef gslc_GetImageFromSD (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in SD card.
• gslc_tsImgRef gslc_GetImageFromRam (unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in SRAM.
• gslc_tsImgRef gslc_GetImageFromProg (const unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in program memory (PROGMEM)
• int16_t gslc_sinFX (int16_t n64Ang)
Calculate fixed-point sine function from fractional degrees.
• int16_t gslc_cosFX (int16_t n64Ang)
Calculate fixed-point cosine function from fractional degrees.
• void gslc_PolarToXY (uint16_t nRad, int16_t n64Ang, int16_t ∗nDX, int16_t ∗nDY)
Convert polar coordinate to cartesian.
• gslc_tsColor gslc_ColorBlend2 (gslc_tsColor colStart, gslc_tsColor colEnd, uint16_t nMidAmt, uint16_t n←-
BlendAmt)
Create a color based on a blend between two colors.
• gslc_tsColor gslc_ColorBlend3 (gslc_tsColor colStart, gslc_tsColor colMid, gslc_tsColor colEnd, uint16_t n←-
MidAmt, uint16_t nBlendAmt)
Create a color based on a blend between three colors.
• bool gslc_ColorEqual (gslc_tsColor a, gslc_tsColor b)
Check whether two colors are equal.
• void gslc_DrawSetPixel (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Set a pixel on the active screen to the given color with lock.
• void gslc_DrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor nCol)
Draw an arbitrary line using Bresenham's algorithm.
• void gslc_DrawLineH (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nW, gslc_tsColor nCol)
Draw a horizontal line.
• void gslc_DrawLineV (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nH, gslc_tsColor nCol)
Draw a vertical line.
• void gslc_DrawLinePolar (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nRadStart, uint16_t nRadEnd,
int16_t n64Ang, gslc_tsColor nCol)
Draw a polar ray segment.
• void gslc_DrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• void gslc_DrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a framed rounded rectangle.
• void gslc_DrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• void gslc_DrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• gslc_tsRect gslc_ExpandRect (gslc_tsRect rRect, int16_t nExpandW, int16_t nExpandH)
Expand or contract a rectangle in width and/or height (equal amounts on both side), based on the centerpoint of the
rectangle.
• void gslc_UnionRect (gslc_tsRect ∗pRect, gslc_tsRect rAddRect)
Expand a rect to include another rect.
• void gslc_InvalidateRgnReset (gslc_tsGui ∗pGui)

Generated by Doxygen
524 File Documentation

Reset the invalidation region.


• void gslc_InvalidateRgnScreen (gslc_tsGui ∗pGui)
Mark the entire screen as invalidated.
• void gslc_InvalidateRgnPage (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Include an entire page (eg.
• void gslc_InvalidateRgnAdd (gslc_tsGui ∗pGui, gslc_tsRect rAddRect)
Add a rectangular region to the invalidation region.
• void gslc_DrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a framed circle.
• void gslc_DrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor n←-
Col)
Draw a filled circle.
• void gslc_DrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• void gslc_SwapCoords (int16_t ∗pnXa, int16_t ∗pnYa, int16_t ∗pnXb, int16_t ∗pnYb)
• void gslc_DrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t nX2,
int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• void gslc_DrawFrameQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a framed quadrilateral.
• void gslc_DrawFillQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a filled quadrilateral.
• void gslc_DrawFillSectorBase (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t n←-
Rad1, int16_t nRad2, gslc_tsColor cArcStart, gslc_tsColor cArcEnd, bool bGradient, int16_t nAngGradStart,
int16_t nAngGradRange, int16_t nAngSecStart, int16_t nAngSecEnd)
• void gslc_DrawFillGradSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t n←-
Rad1, int16_t nRad2, gslc_tsColor cArcStart, gslc_tsColor cArcEnd, int16_t nAngSecStart, int16_t nAng←-
SecEnd, int16_t nAngGradStart, int16_t nAngGradRange)
Draw a gradient filled sector of a circle with support for inner and outer radius.
• void gslc_DrawFillSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t nRad1,
int16_t nRad2, gslc_tsColor cArc, int16_t nAngSecStart, int16_t nAngSecEnd)
Draw a flat filled sector of a circle with support for inner and outer radius.
• bool gslc_FontSetBase (gslc_tsGui ∗pGui, uint8_t nFontInd, int16_t nFontId, gslc_teFontRefType eFontRef←-
Type, const void ∗pvFontRef, uint16_t nFontSz)
• bool gslc_FontSet (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and store as font ID (nFontId)
• bool gslc_FontAdd (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and assign font ID (nFontId).
• gslc_tsFont ∗ gslc_FontGet (gslc_tsGui ∗pGui, int16_t nFontId)
Fetch a font from its ID value.
• bool gslc_FontSetMode (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefMode eFontMode)
Set the font operating mode.
• bool gslc_PageEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for a page.
• void gslc_PageAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗psElem, uint16_t nMaxElem, gslc_←-
tsElemRef ∗psElemRef, uint16_t nMaxElemRef)
Add a page to the GUI.
• int gslc_GetPageCur (gslc_tsGui ∗pGui)
Fetch the current page ID.

Generated by Doxygen
9.44 src/GUIslice.c File Reference 525

• void gslc_SetStackPage (gslc_tsGui ∗pGui, uint8_t nStackPos, int16_t nPageId)


Assign a page to the page stack.
• void gslc_SetStackState (gslc_tsGui ∗pGui, uint8_t nStackPos, bool bActive, bool bDoDraw)
Change the status of a page in a page stack.
• void gslc_SetPageBase (gslc_tsGui ∗pGui, int16_t nPageId)
Assigns a page for the base layer in the page stack.
• void gslc_SetPageCur (gslc_tsGui ∗pGui, int16_t nPageId)
Select a page for the current layer in the page stack.
• void gslc_SetPageOverlay (gslc_tsGui ∗pGui, int16_t nPageId)
Select a page for the overlay layer in the page stack.
• void gslc_PopupShow (gslc_tsGui ∗pGui, int16_t nPageId, bool bModal)
Show a popup dialog.
• void gslc_PopupHide (gslc_tsGui ∗pGui)
Hides the currently active popup dialog.
• void gslc_PageRedrawSet (gslc_tsGui ∗pGui, bool bRedraw)
Update the need-redraw status for the current page.
• bool gslc_PageRedrawGet (gslc_tsGui ∗pGui)
Get the need-redraw status for the current page.
• void gslc_PageRedrawCalc (gslc_tsGui ∗pGui)
Perform a redraw calculation on the page to determine if additional elements should also be redrawn.
• void gslc_PageRedrawGo (gslc_tsGui ∗pGui)
Redraw all elements on the active page.
• void gslc_PageFlipSet (gslc_tsGui ∗pGui, bool bNeeded)
Indicate whether the screen requires page flip.
• bool gslc_PageFlipGet (gslc_tsGui ∗pGui)
Get state of pending page flip state.
• void gslc_PageFlipGo (gslc_tsGui ∗pGui)
Update the visible screen if page has been marked for flipping.
• gslc_tsPage ∗ gslc_PageFindById (gslc_tsGui ∗pGui, int16_t nPageId)
Find a page in the GUI by its ID.
• gslc_tsElemRef ∗ gslc_PageFindElemById (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Find an element in the GUI by its Page ID and Element ID.
• int gslc_ElemGetId (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get an Element ID from an element structure.
• uint8_t gslc_GetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask)
Get the flags associated with an element reference.
• void gslc_SetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask, uint8_t n←-
FlagVal)
Set the flags associated with an element reference.
• gslc_tsElem ∗ gslc_GetElemFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Returns a pointer to an element from an element reference, copying from FLASH to RAM if element is stored in
PROGMEM.
• gslc_tsElem ∗ gslc_GetElemFromRefD (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nLineNum)
Returns a pointer to an element from an element reference.
• void ∗ gslc_GetXDataFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nType, int16_t nLine←-
Num)
Returns a pointer to the data structure associated with an extended element.
• void gslc_SetRoundRadius (gslc_tsGui ∗pGui, uint8_t nRadius)
Set the global rounded radius.
• void gslc_SetFocusCol (gslc_tsGui ∗pGui, gslc_tsColor colFocusNone, gslc_tsColor colFocus, gslc_tsColor
colFocusEdit)

Generated by Doxygen
526 File Documentation

Set the global focus color choices.


• 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.
• 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.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateBox (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem)
Create a Box Element.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateImg (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem, gslc_tsImgRef sImgRef)
Create an image Element.
• bool gslc_ElemEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for an element.
• void gslc_ElemDraw (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Draw an element to the active display.
• void gslc_DrawTxtBase (gslc_tsGui ∗pGui, char ∗pStrBuf, gslc_tsRect rTxt, gslc_tsFont ∗pTxtFont, gslc←-
_teTxtFlags eTxtFlags, int8_t eTxtAlign, gslc_tsColor colTxt, gslc_tsColor colBg, int16_t nMarginW, int16_t
nMarginH)
Draw text with full text justification.
• bool gslc_ElemDrawByRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Draw an element to the active display.
• void gslc_ElemSetFillEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFillEn)
Set the fill state for an Element.
• void gslc_ElemSetFrameEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFrameEn)
Set the frame state for an Element.
• void gslc_ElemSetRoundEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bRoundEn)
Set the rounded frame/fill state for an Element.
• 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.
• 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.
• void gslc_ElemSetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nGroupId)
Set the group ID for an element.
• int gslc_ElemGetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the group ID for an element.
• void gslc_ElemSetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRect rElem)
Set the position and size for an element.
• gslc_tsRect gslc_ElemGetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the rectangular region for an element.
• void gslc_ElemSetTxtAlign (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nAlign)
Set the alignment of a textual element (horizontal and vertical)
• void gslc_ElemSetTxtMargin (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nMargin)

Generated by Doxygen
9.44 src/GUIslice.c File Reference 527

Set the margin around of a textual element.


• void gslc_ElemSetTxtMarginXY (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nMarginX, int8_t n←-
MarginY)
Set the margin around of a textual element (X & Y offsets can be different)
• void gslc_StrCopy (char ∗pDstStr, const char ∗pSrcStr, uint16_t nDstLen)
Helper routine to perform string deep copy.
• void gslc_ElemSetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStr)
Update the text string associated with an Element.
• char ∗ gslc_ElemGetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Fetch the current text string associated with an Element.
• void gslc_ElemSetTxtCol (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colVal)
Update the text string color associated with an Element ID.
• void gslc_ElemSetTxtMem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string location in memory.
• void gslc_ElemSetTxtEnc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string encoding mode.
• void gslc_ElemUpdateFont (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nFontId)
Update the Font selected for an Element's text.
• void gslc_ElemSetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Update the need-redraw status for an element.
• gslc_teRedrawType gslc_ElemGetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the need-redraw status for an element.
• void gslc_ElemSetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowing)
Update the glowing indicator for an element.
• bool gslc_ElemGetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the glowing indicator for an element.
• void gslc_ElemSetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocused)
Update the focused indicator for an element.
• bool gslc_ElemGetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focused indicator for an element.
• bool gslc_ElemGetEditEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
• void gslc_ElemSetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bEditing)
Update the editing indicator for an element.
• bool gslc_ElemGetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the editing indicator for an element.
• void gslc_ElemSetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bVisible)
Update the visibility status for an element.
• bool gslc_ElemGetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the visibility status for an element.
• bool gslc_ElemGetOnScreen (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Determine whether an element is visible on the screen.
• void gslc_ElemSetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowEn)
Update the glowing enable for an element.
• bool gslc_ElemGetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the glowing enable for an element.
• bool gslc_ElemGetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focus enable for an element.
• void gslc_ElemSetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocusEn)
Set the focus enable for an element.
• void gslc_ElemSetClickEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bClickEn)
Update the click enable for an element.

Generated by Doxygen
528 File Documentation

• void gslc_ElemSetTouchFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TOUCH funcCb)


Update the touch function callback for an element.
• void gslc_ElemSetStyleFrom (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefSrc, gslc_tsElemRef ∗pElem←-
RefDest)
Copy style settings from one element to another.
• int8_t gslc_ElemCalcResizeForFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Calculate the change in dimensions of an element to account for any change in focus and/or frame attributes.
• void gslc_ElemGrowRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nDelta)
Increase or decrease the size of an element's region.
• void gslc_ResetRectState (gslc_tsRectState ∗pState)
Reset the element region state struct.
• void gslc_ElemCalcRectState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRectState ∗pState)
Calculate the element region state struct.
• void gslc_ElemSetDrawFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_DRAW funcCb)
Assign the drawing callback function for an element.
• void gslc_ElemSetTickFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TICK funcCb)
Assign the tick callback function for an element.
• bool gslc_ElemOwnsCoord (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nX, int16_t nY, bool b←-
OnlyClickEn)
Determine if a coordinate is inside of an element.
• void gslc_CollectInput (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle direct input events within the element collection.
• void gslc_CollectTouch (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle touch events within the element collection.
• bool gslc_CollectTouchCompound (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY, gslc_tsCollect ∗pCollect)
Handle dispatch of touch (up,down,move) events to compound elements sub elements.
• bool gslc_ElemCanFocus (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nElemInd)
• gslc_tsElemRef ∗ gslc_FocusElemGet (gslc_tsGui ∗pGui)
Find the currently focused element.
• void gslc_FocusElemIndSet (gslc_tsGui ∗pGui, int16_t nPageInd, int16_t nElemInd, bool bFocus)
Change the focus to the indexed element on the specified page.
• void gslc_FocusSetToTrackedElem (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Change the focus to the currently-tracked element.
• void gslc_FocusPageStep (gslc_tsGui ∗pGui, bool bNext)
Advance the focus to the next page in the page stack.
• int16_t gslc_FocusElemStep (gslc_tsGui ∗pGui, bool bNext)
Advance the focus to the next element in the focused page.
• void gslc_TrackInput (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal)
Handles a direct input event and performs the necessary tracking, glowing and selection actions depending on the
state.
• void gslc_TrackTouch (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage, int16_t nX, int16_t nY, uint16_t nPress)
Handles a touch event and performs the necessary tracking, glowing and selection actions depending on the press
state.
• bool gslc_InitTouch (gslc_tsGui ∗pGui, const char ∗acDev)
Initialize the touchscreen device driver.
• bool gslc_GetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRawEvent
∗peInputEvent, int16_t ∗pnInputVal)
Initialize the touchscreen device driver.
• void gslc_SetTouchRemapEn (gslc_tsGui ∗pGui, bool bEn)
Configure touchscreen remapping.

Generated by Doxygen
9.44 src/GUIslice.c File Reference 529

• void gslc_SetTouchRemapCal (gslc_tsGui ∗pGui, uint16_t nXMin, uint16_t nXMax, uint16_t nYMin, uint16_t
nYMax)
Configure touchscreen calibration remapping values.
• void gslc_SetTouchPressCal (gslc_tsGui ∗pGui, uint16_t nPressMin, uint16_t nPressMax)
Configure touchscreen calibration pressure values.
• void gslc_SetTouchRemapYX (gslc_tsGui ∗pGui, bool bSwap)
Configure touchscreen XY swap.
• gslc_tsElem gslc_ElemCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPageId, int16_t nType, gslc_ts←-
Rect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create a new element with default styling.
• bool gslc_CollectEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for an element collection.
• gslc_tsElemRef ∗ gslc_CollectElemAdd (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, const gslc_tsElem ∗p←-
Elem, gslc_teElemRefFlags eFlags)
Add an element to a collection.
• bool gslc_CollectGetRedraw (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Determine if any elements in a collection need redraw.
• gslc_tsElemRef ∗ gslc_ElemAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗pElem, gslc_teElem←-
RefFlags eFlags)
Add the Element to the list of generated elements in the GUI environment.
• gslc_tsRect gslc_GetClipRect (gslc_tsGui ∗pGui)
Get the current the clipping rectangle.
• bool gslc_SetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for further drawing.
• bool gslc_ImgRefEqual (gslc_tsImgRef ∗pImgRef1, gslc_tsImgRef ∗pImgRef2)
• void gslc_ElemSetImage (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsImgRef sImgRef, gslc_ts←-
ImgRef sImgRefSel)
Set an element to use a bitmap image.
• bool gslc_SetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_SetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_SetTransparentColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the color to use for image transparency.
• bool gslc_GuiRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Dynamically change rotation, automatically adapt touchscreen axes swap/flip.
• bool gslc_ElemSendEventTouch (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefTracked, gslc_teTouch e←-
Touch, int16_t nX, int16_t nY)
Trigger an element's touch event.
• void gslc_ResetElem (gslc_tsElem ∗pElem)
Initialize an Element struct.
• void gslc_ResetFont (gslc_tsFont ∗pFont)
Initialize a Font struct.
• void gslc_ElemDestruct (gslc_tsElem ∗pElem)
Free up any members associated with an element.
• void gslc_CollectDestruct (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Free up any members associated with an element collection.
• void gslc_PageDestruct (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Free up any members associated with a page.
• void gslc_GuiDestruct (gslc_tsGui ∗pGui)
Free up any surfaces associated with the GUI, pages, collections and elements.

Generated by Doxygen
530 File Documentation

• void gslc_CollectReset (gslc_tsCollect ∗pCollect, gslc_tsElem ∗asElem, uint16_t nElemMax, gslc_tsElemRef


∗asElemRef, uint16_t nElemRefMax)
Reset the members of an element collection.
• gslc_tsElemRef ∗ gslc_CollectFindElemById (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nElemId)
Find an element in a collection by its Element ID.
• int gslc_CollectGetNextId (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Allocate the next available Element ID in a collection.
• gslc_tsElemRef ∗ gslc_CollectGetElemRefTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Get the element within a collection that is currently being tracked.
• void gslc_CollectSetElemTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRef,
int16_t nElemInd)
Set the element within a collection that is currently being tracked.
• gslc_tsElemRef ∗ gslc_CollectFindElemFromCoord (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nX,
int16_t nY, int16_t ∗pnElemInd)
Find an element in a collection by a coordinate coordinate.
• void gslc_CollectSetParent (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRefParent)
Assign the parent element reference to all elements within a collection.

Variables

• GSLC_CB_DEBUG_OUT g_pfDebugOut
Global debug output function.
• const uint16_t m_nLUTSinF0X16 [257]
• const char GSLC_PMEM ERRSTR_NULL [ ]
• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.44.1 Enumeration Type Documentation

9.44.1.1 gslc_teDebugPrintState

enum gslc_teDebugPrintState

Enumerator

GSLC_S_DEBUG_PRINT_NORM
GSLC_S_DEBUG_PRINT_TOKEN
GSLC_S_DEBUG_PRINT_UINT16
GSLC_S_DEBUG_PRINT_CHAR
GSLC_S_DEBUG_PRINT_STR

GSLC_S_DEBUG_PRINT_STR_P

9.44.2 Function Documentation

Generated by Doxygen
9.44 src/GUIslice.c File Reference 531

9.44.2.1 gslc_DrawFillSectorBase()

void gslc_DrawFillSectorBase (
gslc_tsGui ∗ pGui,
int16_t nQuality,
int16_t nMidX,
int16_t nMidY,
int16_t nRad1,
int16_t nRad2,
gslc_tsColor cArcStart,
gslc_tsColor cArcEnd,
bool bGradient,
int16_t nAngGradStart,
int16_t nAngGradRange,
int16_t nAngSecStart,
int16_t nAngSecEnd )

9.44.2.2 gslc_ElemCanFocus()

bool gslc_ElemCanFocus (
gslc_tsGui ∗ pGui,
gslc_tsCollect ∗ pCollect,
int16_t nElemInd )

9.44.2.3 gslc_ElemGetEditEn()

bool gslc_ElemGetEditEn (
gslc_tsGui ∗ pGui,
gslc_tsElemRef ∗ pElemRef )

Todo Doc

9.44.2.4 gslc_FontSetBase()

bool gslc_FontSetBase (
gslc_tsGui ∗ pGui,
uint8_t nFontInd,
int16_t nFontId,
gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Generated by Doxygen
532 File Documentation

9.44.2.5 gslc_ImgRefEqual()

bool gslc_ImgRefEqual (
gslc_tsImgRef ∗ pImgRef1,
gslc_tsImgRef ∗ pImgRef2 )

9.44.2.6 gslc_OrderCoord()

void gslc_OrderCoord (
int16_t ∗ pnX0,
int16_t ∗ pnY0,
int16_t ∗ pnX1,
int16_t ∗ pnY1 )

9.44.2.7 gslc_SwapCoords()

void gslc_SwapCoords (
int16_t ∗ pnXa,
int16_t ∗ pnYa,
int16_t ∗ pnXb,
int16_t ∗ pnYb )

9.44.3 Variable Documentation

9.44.3.1 ERRSTR_NULL

const char ERRSTR_NULL[ ]

9.44.3.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.44.3.3 g_pfDebugOut

GSLC_CB_DEBUG_OUT g_pfDebugOut

Global debug output function.

• The user assigns this function via gslc_InitDebug()

Generated by Doxygen
9.45 src/GUIslice.h File Reference 533

9.44.3.4 m_nLUTSinF0X16

const uint16_t m_nLUTSinF0X16

9.45 src/GUIslice.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <inttypes.h>
#include "GUIslice_config.h"
Include dependency graph for GUIslice.h:

src/GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

This graph shows which files directly or indirectly include this file:

src/GUIslice.h

src/GUIslice_drv_tft
src/elem/XCheckbox.h src/elem/XGauge.h src/elem/XGraph.h src/elem/XSelNum.h src/elem/XSlider.h src/elem/XTextbox.h src/elem/XGlowball.h src/elem/XKeyPad.h src/elem/XListbox.h src/elem/XProgress.h src/elem/XRadial.h src/elem/XRamp.h src/elem/XRingGauge.h src/elem/XSeekbar.h src/elem/XSpinner.h src/elem/XTemplate.h src/elem/XTogglebtn.h src/elem/XToggleImgbtn.h src/GUIslice.c src/GUIslice_drv_adagfx.h src/GUIslice_drv_m5stack.h src/GUIslice_drv_sdl.h src/GUIslice_drv_utft.h
_espi.h

src/elem/XCheckbox.c src/elem/XGauge.c src/GUIslice_ex.h src/elem/XGraph.c src/elem/XSelNum.c src/elem/XSlider.c src/elem/XTextbox.c src/elem/XGlowball.c src/elem/XKeyPad.c src/elem/XKeyPad_Alpha.h src/elem/XKeyPad_Num.h src/elem/XListbox.c src/elem/XProgress.c src/elem/XRadial.c src/elem/XRamp.c src/elem/XRingGauge.c src/elem/XSeekbar.c src/elem/XSpinner.c src/elem/XTemplate.c src/elem/XTogglebtn.c src/elem/XToggleImgbtn.c

src/elem/XKeyPad_Alpha src/elem/XKeyPad_Num
-setup.h -setup.h

src/elem/XKeyPad_Alpha.c src/elem/XKeyPad_Num.c

Data Structures

• struct gslc_tsRect
Rectangular region. Defines X,Y corner coordinates plus dimensions.
• struct gslc_tsPt
Define point coordinates.
• struct gslc_tsColor
Color structure. Defines RGB triplet.
• struct gslc_tsRectState
State associated with an element's region.
• struct gslc_tsEvent
Event structure.
• struct gslc_tsEventTouch
Structure used to pass touch data through event.
• struct gslc_tsFont
Font reference structure.
• struct gslc_tsImgRef
Image reference structure.
• struct gslc_tsElemRef

Generated by Doxygen
534 File Documentation

Element reference structure.


• struct gslc_tsElem
Element Struct.
• struct gslc_tsCollect
Element collection struct.
• struct gslc_tsPage
Page structure.
• struct gslc_tsInputMap
Input mapping.
• struct gslc_tsGui
GUI structure.

Macros

• #define GSLC_PMEM
• #define GSLC_FEATURE_FOCUS_ON_TOUCH
• #define GSLC_2PI
• #define GSLC_ELEM_FEA_NOSHRINK
Element features type.
• #define GSLC_ELEM_FEA_VALID
Element record is valid.
• #define GSLC_ELEM_FEA_FOCUS_EN
Element can accept focus.
• #define GSLC_ELEM_FEA_EDIT_EN
Element supports edit.
• #define GSLC_ELEM_FEA_ROUND_EN
Element is drawn with a rounded profile.
• #define GSLC_ELEM_FEA_CLICK_EN
Element accepts touch presses.
• #define GSLC_ELEM_FEA_GLOW_EN
Element supports glowing state.
• #define GSLC_ELEM_FEA_FRAME_EN
Element is drawn with a frame.
• #define GSLC_ELEM_FEA_FILL_EN
Element is drawn with a fill.
• #define GSLC_ELEM_FEA_NONE
Element default (no features set))
• #define GSLC_ALIGNV_TOP
Element text alignment.
• #define GSLC_ALIGNV_MID
Vertical align to middle.
• #define GSLC_ALIGNV_BOT
Vertical align to bottom.
• #define GSLC_ALIGNH_LEFT
Horizontal align to left.
• #define GSLC_ALIGNH_MID
Horizontal align to middle.
• #define GSLC_ALIGNH_RIGHT
Horizontal align to right.
• #define GSLC_ALIGN_TOP_LEFT

Generated by Doxygen
9.45 src/GUIslice.h File Reference 535

Align to top-left.
• #define GSLC_ALIGN_TOP_MID
Align to middle of top.
• #define GSLC_ALIGN_TOP_RIGHT
Align to top-right.
• #define GSLC_ALIGN_MID_LEFT
Align to middle of left side.
• #define GSLC_ALIGN_MID_MID
Align to center.
• #define GSLC_ALIGN_MID_RIGHT
Align to middle of right side.
• #define GSLC_ALIGN_BOT_LEFT
Align to bottom-left.
• #define GSLC_ALIGN_BOT_MID
Align to middle of bottom.
• #define GSLC_ALIGN_BOT_RIGHT
Align to bottom-right.
• #define GSLC_COL_RED_DK4
Basic color definition.
• #define GSLC_COL_RED_DK3
Red (dark3)
• #define GSLC_COL_RED_DK2
Red (dark2)
• #define GSLC_COL_RED_DK1
Red (dark1)
• #define GSLC_COL_RED
Red.
• #define GSLC_COL_RED_LT1
Red (light1)
• #define GSLC_COL_RED_LT2
Red (light2)
• #define GSLC_COL_RED_LT3
Red (light3)
• #define GSLC_COL_RED_LT4
Red (light4)
• #define GSLC_COL_GREEN_DK4
Green (dark4)
• #define GSLC_COL_GREEN_DK3
Green (dark3)
• #define GSLC_COL_GREEN_DK2
Green (dark2)
• #define GSLC_COL_GREEN_DK1
Green (dark1)
• #define GSLC_COL_GREEN
Green.
• #define GSLC_COL_GREEN_LT1
Green (light1)
• #define GSLC_COL_GREEN_LT2
Green (light2)
• #define GSLC_COL_GREEN_LT3
Green (light3)

Generated by Doxygen
536 File Documentation

• #define GSLC_COL_GREEN_LT4
Green (light4)
• #define GSLC_COL_BLUE_DK4
Blue (dark4)
• #define GSLC_COL_BLUE_DK3
Blue (dark3)
• #define GSLC_COL_BLUE_DK2
Blue (dark2)
• #define GSLC_COL_BLUE_DK1
Blue (dark1)
• #define GSLC_COL_BLUE
Blue.
• #define GSLC_COL_BLUE_LT1
Blue (light1)
• #define GSLC_COL_BLUE_LT2
Blue (light2)
• #define GSLC_COL_BLUE_LT3
Blue (light3)
• #define GSLC_COL_BLUE_LT4
Blue (light4)
• #define GSLC_COL_BLACK
Black.
• #define GSLC_COL_GRAY_DK4
Gray (dark4)
• #define GSLC_COL_GRAY_DK3
Gray (dark3)
• #define GSLC_COL_GRAY_DK2
Gray (dark2)
• #define GSLC_COL_GRAY_DK1
Gray (dark1)
• #define GSLC_COL_GRAY
Gray.
• #define GSLC_COL_GRAY_LT1
Gray (light1)
• #define GSLC_COL_GRAY_LT2
Gray (light2)
• #define GSLC_COL_GRAY_LT3
Gray (light3)
• #define GSLC_COL_GRAY_LT4
Gray (light4)
• #define GSLC_COL_WHITE
White.
• #define GSLC_COL_YELLOW
Yellow.
• #define GSLC_COL_YELLOW_DK
Yellow (dark)
• #define GSLC_COL_PURPLE
Purple.
• #define GSLC_COL_CYAN
Cyan.
• #define GSLC_COL_MAGENTA

Generated by Doxygen
9.45 src/GUIslice.h File Reference 537

Magenta.
• #define GSLC_COL_TEAL
Teal.
• #define GSLC_COL_ORANGE
Orange.
• #define GSLC_COL_BROWN
Brown.
• #define GSLC_COLMONO_BLACK
Black.
• #define GSLC_COLMONO_WHITE
White.
• #define TOUCH_ROTATION_DATA
Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.
• #define TOUCH_ROTATION_SWAPXY(rotation)
• #define TOUCH_ROTATION_FLIPX(rotation)
• #define TOUCH_ROTATION_FLIPY(rotation)
• #define GSLC_ELEMREF_DEFAULT
Define the default element reference flags for new elements.
• #define GSLC_MIN(a, b)
• #define GSLC_MAX(a, b)
• #define TOUCH_ROTATION_DATA
Additional definitions for Touch Handling These macros define the transforms used in remapping the touchscreen
inputs on the basis of the GUI nRotation setting.
• #define TOUCH_ROTATION_SWAPXY(rotation)
• #define TOUCH_ROTATION_FLIPX(rotation)
• #define TOUCH_ROTATION_FLIPY(rotation)
• #define GSLC_DEBUG_PRINT(sFmt, ...)
Macro to enable optional debug output.
• #define GSLC_DEBUG2_PRINT(sFmt, ...)
• #define GSLC_DEBUG_PRINT_CONST(sFmt, ...)
• #define GSLC_DEBUG2_PRINT_CONST(sFmt, ...)
• #define gslc_ElemCreateTxt_P(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, pFont, colTxt, colFrame, col←-
Fill, nAlignTxt, bFrameEn, bFillEn)
Create a read-only text element.
• #define gslc_ElemCreateTxt_P_R(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, strLength, pFont, colTxt,
colFrame, colFill, nAlignTxt, bFrameEn, bFillEn)
Create a read-write text element (element in Flash, string in RAM)
• #define gslc_ElemCreateTxt_P_R_ext(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, strLength, pFont, col←-
Txt, colTxtGlow, colFrame, colFill, nAlignTxt, nMarginX, nMarginY, bFrameEn, bFillEn, bClickEn, bGlowEn,
pfuncXEvent, pfuncXDraw, pfuncXTouch, pfuncXTick)
Create a read-write text element (element in Flash, string in RAM) with extended customization options.
• #define gslc_ElemCreateBox_P(pGui, nElemId, nPage, nX, nY, nW, nH, colFrame, colFill, bFrameEn, bFillEn,
pfuncXDraw, pfuncXTick)
Create a read-only box element.
• #define gslc_ElemCreateLine_P(pGui, nElemId, nPage, nX0, nY0, nX1, nY1, colFill)
Create a read-only line element.
• #define gslc_ElemCreateBtnTxt_P(pGui, nElemId, nPage, nX, nY, nW, nH, strTxt, pFont, colTxt, colFrame,
colFill, colFrameGlow, colFillGlow, nAlignTxt, bFrameEn, bFillEn, callFunc, extraData)
Create a text button element.

Generated by Doxygen
538 File Documentation

Typedefs

• typedef int16_t(∗ GSLC_CB_DEBUG_OUT) (char ch)


• typedef struct gslc_tsElem gslc_tsElem
Element Struct.
• typedef struct gslc_tsEvent gslc_tsEvent
Event structure.
• typedef bool(∗ GSLC_CB_EVENT) (void ∗pvGui, gslc_tsEvent sEvent)
Callback function for element drawing.
• typedef bool(∗ GSLC_CB_DRAW) (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)
Callback function for element drawing.
• typedef bool(∗ GSLC_CB_TOUCH) (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX, int16←-
_t nY)
Callback function for element touch tracking.
• typedef bool(∗ GSLC_CB_TICK) (void ∗pvGui, void ∗pvElemRef)
Callback function for element tick.
• typedef bool(∗ GSLC_CB_PIN_POLL) (void ∗pvGui, int16_t ∗pnPinInd, int16_t ∗pnPinVal)
Callback function for pin polling.
• typedef bool(∗ GSLC_CB_INPUT) (void ∗pvGui, void ∗pvElemRef, int16_t nStatus, void ∗pvData)
Callback function for element input ready.
• typedef struct gslc_tsRect gslc_tsRect
Rectangular region. Defines X,Y corner coordinates plus dimensions.
• typedef struct gslc_tsPt gslc_tsPt
Define point coordinates.
• typedef struct gslc_tsColor gslc_tsColor
Color structure. Defines RGB triplet.
• typedef struct gslc_tsRectState gslc_tsRectState
State associated with an element's region.
• typedef struct gslc_tsEventTouch gslc_tsEventTouch
Structure used to pass touch data through event.

Enumerations

• enum gslc_teElemId {
GSLC_ID_USER_BASE, GSLC_ID_NONE, GSLC_ID_AUTO, GSLC_ID_TEMP,
GSLC_ID_AUTO_BASE }
Element ID enumerations.
• enum gslc_tePageId { GSLC_PAGE_USER_BASE, GSLC_PAGE_NONE }
Page ID enumerations.
• enum gslc_teStackPage { GSLC_STACK_BASE, GSLC_STACK_CUR, GSLC_STACK_OVERLAY, GSLC←-
_STACK__MAX }
Define page stack.
• enum gslc_teGroupId { GSLC_GROUP_ID_USER_BASE, GSLC_GROUP_ID_NONE }
Group ID enumerations.
• enum gslc_teFontId { GSLC_FONT_USER_BASE, GSLC_FONT_NONE }
Font ID enumerations.
• enum gslc_teElemInd { GSLC_IND_NONE, GSLC_IND_FIRST }
Element Index enumerations.
• enum gslc_teTypeCore {
GSLC_TYPE_NONE, GSLC_TYPE_BKGND, GSLC_TYPE_BTN, GSLC_TYPE_TXT,
GSLC_TYPE_BOX, GSLC_TYPE_LINE, GSLC_TYPE_BASE_EXTEND }

Generated by Doxygen
9.45 src/GUIslice.h File Reference 539

Element type.
• enum gslc_teInputRawEvent {
GSLC_INPUT_NONE, GSLC_INPUT_TOUCH, GSLC_INPUT_KEY_DOWN, GSLC_INPUT_KEY_UP,
GSLC_INPUT_PIN_ASSERT, GSLC_INPUT_PIN_DEASSERT }
Raw input event types: touch, key, GPIOs.
• enum gslc_teInputMode { GSLC_INPUTMODE_NAV, GSLC_INPUTMODE_EDIT }
External input mode.
• enum gslc_teAction {
GSLC_ACTION_UNDEF, GSLC_ACTION_NONE, GSLC_ACTION_FOCUS_PREV, GSLC_ACTION_FO←-
CUS_NEXT,
GSLC_ACTION_PRESELECT, GSLC_ACTION_SELECT, GSLC_ACTION_SET_REL, GSLC_ACTION_←-
SET_ABS,
GSLC_ACTION_DEBUG }
GUI Action Requested These actions are usually the result of an InputMap lookup.
• enum gslc_tePin {
GSLC_PIN_BTN_A, GSLC_PIN_BTN_A_LONG, GSLC_PIN_BTN_B, GSLC_PIN_BTN_B_LONG,
GSLC_PIN_BTN_C, GSLC_PIN_BTN_C_LONG, GSLC_PIN_BTN_D, GSLC_PIN_BTN_D_LONG,
GSLC_PIN_BTN_E, GSLC_PIN_BTN_E_LONG, GSLC_PIN_BTN_UP, GSLC_PIN_BTN_DOWN,
GSLC_PIN_BTN_LEFT, GSLC_PIN_BTN_RIGHT, GSLC_PIN_BTN_SEL }
General purpose pin/button constants.
• enum gslc_teTouch {
GSLC_TOUCH_NONE, GSLC_TOUCH_TYPE_MASK, GSLC_TOUCH_COORD, GSLC_TOUCH_DIRECT,
GSLC_TOUCH_SUBTYPE_MASK, GSLC_TOUCH_DOWN, GSLC_TOUCH_DOWN_IN, GSLC_TOUCH←-
_DOWN_OUT,
GSLC_TOUCH_UP, GSLC_TOUCH_UP_IN, GSLC_TOUCH_UP_OUT, GSLC_TOUCH_MOVE,
GSLC_TOUCH_MOVE_IN, GSLC_TOUCH_MOVE_OUT, GSLC_TOUCH_FOCUS_ON, GSLC_TOUCH←-
_FOCUS_OFF,
GSLC_TOUCH_FOCUS_PRESELECT, GSLC_TOUCH_FOCUS_SELECT, GSLC_TOUCH_SET_REL,
GSLC_TOUCH_SET_ABS }
Processed event from input raw events and actions.
• enum gslc_teInitStat { GSLC_INITSTAT_UNDEF, GSLC_INITSTAT_INACTIVE, GSLC_INITSTAT_FAIL,
GSLC_INITSTAT_ACTIVE }
Status of a module's initialization.
• enum gslc_teEventType {
GSLC_EVT_NONE, GSLC_EVT_DRAW, GSLC_EVT_TOUCH, GSLC_EVT_TICK,
GSLV_EVT_CUSTOM }
Event types.
• enum gslc_teEventSubType { GSLC_EVTSUB_NONE, GSLC_EVTSUB_DRAW_NEEDED, GSLC_EVTS←-
UB_DRAW_FORCE }
Event sub-types.
• enum gslc_teRedrawType { GSLC_REDRAW_NONE, GSLC_REDRAW_FULL, GSLC_REDRAW_INC, G←-
SLC_REDRAW_FOCUS }
Redraw types.
• enum gslc_teFontRefType { GSLC_FONTREF_FNAME, GSLC_FONTREF_PTR }
Font Reference types.
• enum gslc_teFontRefMode { GSLC_FONTREF_MODE_DEFAULT, GSLC_FONTREF_MODE_1, GSLC_←-
FONTREF_MODE_2, GSLC_FONTREF_MODE_3 }
Font Reference modes.
• enum gslc_teElemRefFlags {
GSLC_ELEMREF_NONE, GSLC_ELEMREF_SRC_RAM, GSLC_ELEMREF_SRC_PROG, GSLC_ELEM←-
REF_SRC_CONST,
GSLC_ELEMREF_REDRAW_NONE, GSLC_ELEMREF_REDRAW_FULL, GSLC_ELEMREF_REDRAW←-
_INC, GSLC_ELEMREF_REDRAW_FOCUS,
GSLC_ELEMREF_EDITING, GSLC_ELEMREF_FOCUSED, GSLC_ELEMREF_GLOWING, GSLC_ELE←-
MREF_VISIBLE,
GSLC_ELEMREF_SRC, GSLC_ELEMREF_REDRAW_MASK }

Generated by Doxygen
540 File Documentation

Element reference flags: Describes characteristics of an element.


• enum gslc_teImgRefFlags {
GSLC_IMGREF_NONE, GSLC_IMGREF_SRC_FILE, GSLC_IMGREF_SRC_SD, GSLC_IMGREF_SRC_←-
RAM,
GSLC_IMGREF_SRC_PROG, GSLC_IMGREF_FMT_BMP24, GSLC_IMGREF_FMT_BMP16, GSLC_IM←-
GREF_FMT_RAW1,
GSLC_IMGREF_FMT_JPG, GSLC_IMGREF_SRC, GSLC_IMGREF_FMT }
Image reference flags: Describes characteristics of an image reference.
• enum gslc_teTxtFlags {
GSLC_TXT_MEM_RAM, GSLC_TXT_MEM_PROG, GSLC_TXT_ALLOC_NONE, GSLC_TXT_ALLOC_INT,
GSLC_TXT_ALLOC_EXT, GSLC_TXT_ENC_PLAIN, GSLC_TXT_ENC_UTF8, GSLC_TXT_MEM,
GSLC_TXT_ALLOC, GSLC_TXT_ENC, GSLC_TXT_DEFAULT }
Text reference flags: Describes the characteristics of a text string (ie.

Functions

• char ∗ gslc_GetVer (gslc_tsGui ∗pGui)


Get the GUIslice version number.
• const char ∗ gslc_GetNameDisp (gslc_tsGui ∗pGui)
Get the GUIslice display driver name.
• const char ∗ gslc_GetNameTouch (gslc_tsGui ∗pGui)
Get the GUIslice touch driver name.
• void ∗ gslc_GetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_GetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• bool gslc_Init (gslc_tsGui ∗pGui, void ∗pvDriver, gslc_tsPage ∗asPage, uint8_t nMaxPage, gslc_tsFont ∗as←-
Font, uint8_t nMaxFont)
Initialize the GUIslice library.
• void gslc_InitDebug (GSLC_CB_DEBUG_OUT pfunc)
Initialize debug output.
• void gslc_DebugPrintf (const char ∗pFmt,...)
Optimized printf routine for GUIslice debug/error output.
• bool gslc_GuiRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Dynamically change rotation, automatically adapt touchscreen axes swap/flip.
• void gslc_Quit (gslc_tsGui ∗pGui)
Exit the GUIslice environment.
• void gslc_Update (gslc_tsGui ∗pGui)
Perform main GUIslice handling functions.
• bool gslc_SetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_SetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_SetTransparentColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the color to use for image transparency.
• gslc_tsRect gslc_GetClipRect (gslc_tsGui ∗pGui)
Get the current the clipping rectangle.
• bool gslc_SetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for further drawing.
• bool gslc_IsInRect (int16_t nSelX, int16_t nSelY, gslc_tsRect rRect)
Determine if a coordinate is inside of a rectangular region.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 541

• gslc_tsRect gslc_ExpandRect (gslc_tsRect rRect, int16_t nExpandW, int16_t nExpandH)


Expand or contract a rectangle in width and/or height (equal amounts on both side), based on the centerpoint of the
rectangle.
• bool gslc_IsInWH (int16_t nSelX, int16_t nSelY, uint16_t nWidth, uint16_t nHeight)
Determine if a coordinate is inside of a width x height region.
• void gslc_UnionRect (gslc_tsRect ∗pRect, gslc_tsRect rAddRect)
Expand a rect to include another rect.
• void gslc_InvalidateRgnReset (gslc_tsGui ∗pGui)
Reset the invalidation region.
• void gslc_InvalidateRgnPage (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Include an entire page (eg.
• void gslc_InvalidateRgnScreen (gslc_tsGui ∗pGui)
Mark the entire screen as invalidated.
• void gslc_InvalidateRgnAdd (gslc_tsGui ∗pGui, gslc_tsRect rAddRect)
Add a rectangular region to the invalidation region.
• bool gslc_ClipPt (gslc_tsRect ∗pClipRect, int16_t nX, int16_t nY)
Perform basic clipping of a single point to a clipping region.
• bool gslc_ClipLine (gslc_tsRect ∗pClipRect, int16_t ∗pnX0, int16_t ∗pnY0, int16_t ∗pnX1, int16_t ∗pnY1)
Perform basic clipping of a line to a clipping region.
• bool gslc_ClipRect (gslc_tsRect ∗pClipRect, gslc_tsRect ∗pRect)
Perform basic clipping of a rectangle to a clipping region.
• gslc_tsImgRef gslc_GetImageFromFile (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in LINUX filesystem.
• gslc_tsImgRef gslc_GetImageFromSD (const char ∗pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in SD card.
• gslc_tsImgRef gslc_GetImageFromRam (unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in SRAM.
• gslc_tsImgRef gslc_GetImageFromProg (const unsigned char ∗pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in program memory (PROGMEM)
• void gslc_PolarToXY (uint16_t nRad, int16_t n64Ang, int16_t ∗nDX, int16_t ∗nDY)
Convert polar coordinate to cartesian.
• int16_t gslc_sinFX (int16_t n64Ang)
Calculate fixed-point sine function from fractional degrees.
• int16_t gslc_cosFX (int16_t n64Ang)
Calculate fixed-point cosine function from fractional degrees.
• gslc_tsColor gslc_ColorBlend2 (gslc_tsColor colStart, gslc_tsColor colEnd, uint16_t nMidAmt, uint16_t n←-
BlendAmt)
Create a color based on a blend between two colors.
• gslc_tsColor gslc_ColorBlend3 (gslc_tsColor colStart, gslc_tsColor colMid, gslc_tsColor colEnd, uint16_t n←-
MidAmt, uint16_t nBlendAmt)
Create a color based on a blend between three colors.
• bool gslc_ColorEqual (gslc_tsColor a, gslc_tsColor b)
Check whether two colors are equal.
• void gslc_DrawSetPixel (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Set a pixel on the active screen to the given color with lock.
• void gslc_DrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor nCol)
Draw an arbitrary line using Bresenham's algorithm.
• void gslc_DrawLineH (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nW, gslc_tsColor nCol)
Draw a horizontal line.
• void gslc_DrawLineV (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nH, gslc_tsColor nCol)
Draw a vertical line.

Generated by Doxygen
542 File Documentation

• void gslc_DrawLinePolar (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, uint16_t nRadStart, uint16_t nRadEnd,
int16_t n64Ang, gslc_tsColor nCol)
Draw a polar ray segment.
• void gslc_DrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• void gslc_DrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a framed rounded rectangle.
• void gslc_DrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• void gslc_DrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• void gslc_DrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a framed circle.
• void gslc_DrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor n←-
Col)
Draw a filled circle.
• void gslc_DrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• void gslc_DrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t nX2,
int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• void gslc_DrawFrameQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a framed quadrilateral.
• void gslc_DrawFillQuad (gslc_tsGui ∗pGui, gslc_tsPt ∗psPt, gslc_tsColor nCol)
Draw a filled quadrilateral.
• void gslc_DrawFillGradSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t n←-
Rad1, int16_t nRad2, gslc_tsColor cArcStart, gslc_tsColor cArcEnd, int16_t nAngSecStart, int16_t nAng←-
SecEnd, int16_t nAngGradStart, int16_t nAngGradRange)
Draw a gradient filled sector of a circle with support for inner and outer radius.
• void gslc_DrawFillSector (gslc_tsGui ∗pGui, int16_t nQuality, int16_t nMidX, int16_t nMidY, int16_t nRad1,
int16_t nRad2, gslc_tsColor cArc, int16_t nAngSecStart, int16_t nAngSecEnd)
Draw a flat filled sector of a circle with support for inner and outer radius.
• bool gslc_FontAdd (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and assign font ID (nFontId).
• bool gslc_FontSet (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefType eFontRefType, const void ∗pv←-
FontRef, uint16_t nFontSz)
Load a font into the local font cache and store as font ID (nFontId)
• gslc_tsFont ∗ gslc_FontGet (gslc_tsGui ∗pGui, int16_t nFontId)
Fetch a font from its ID value.
• bool gslc_FontSetMode (gslc_tsGui ∗pGui, int16_t nFontId, gslc_teFontRefMode eFontMode)
Set the font operating mode.
• int gslc_GetPageCur (gslc_tsGui ∗pGui)
Fetch the current page ID.
• void gslc_SetStackPage (gslc_tsGui ∗pGui, uint8_t nStackPos, int16_t nPageId)
Assign a page to the page stack.
• void gslc_SetStackState (gslc_tsGui ∗pGui, uint8_t nStackPos, bool bActive, bool bDoDraw)
Change the status of a page in a page stack.
• void gslc_SetPageBase (gslc_tsGui ∗pGui, int16_t nPageId)
Assigns a page for the base layer in the page stack.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 543

• void gslc_SetPageCur (gslc_tsGui ∗pGui, int16_t nPageId)


Select a page for the current layer in the page stack.
• void gslc_SetPageOverlay (gslc_tsGui ∗pGui, int16_t nPageId)
Select a page for the overlay layer in the page stack.
• void gslc_PopupShow (gslc_tsGui ∗pGui, int16_t nPageId, bool bModal)
Show a popup dialog.
• void gslc_PopupHide (gslc_tsGui ∗pGui)
Hides the currently active popup dialog.
• void gslc_PageRedrawSet (gslc_tsGui ∗pGui, bool bRedraw)
Update the need-redraw status for the current page.
• bool gslc_PageRedrawGet (gslc_tsGui ∗pGui)
Get the need-redraw status for the current page.
• void gslc_PageAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗psElem, uint16_t nMaxElem, gslc_←-
tsElemRef ∗psElemRef, uint16_t nMaxElemRef)
Add a page to the GUI.
• gslc_tsElemRef ∗ gslc_PageFindElemById (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Find an element in the GUI by its Page ID and Element ID.
• 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.
• 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.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateBox (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem)
Create a Box Element.
• 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.
• gslc_tsElemRef ∗ gslc_ElemCreateImg (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPage, gslc_tsRect r←-
Elem, gslc_tsImgRef sImgRef)
Create an image Element.
• int gslc_ElemGetId (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get an Element ID from an element structure.
• void gslc_ElemSetFillEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFillEn)
Set the fill state for an Element.
• void gslc_ElemSetFrameEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFrameEn)
Set the frame state for an Element.
• void gslc_ElemSetRoundEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bRoundEn)
Set the rounded frame/fill state for an Element.
• 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.
• 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.
• void gslc_ElemSetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nGroupId)
Set the group ID for an element.
• int gslc_ElemGetGroup (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)

Generated by Doxygen
544 File Documentation

Get the group ID for an element.


• void gslc_ElemSetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRect rElem)
Set the position and size for an element.
• gslc_tsRect gslc_ElemGetRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the rectangular region for an element.
• void gslc_ElemSetTxtAlign (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nAlign)
Set the alignment of a textual element (horizontal and vertical)
• void gslc_ElemSetTxtMargin (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, unsigned nMargin)
Set the margin around of a textual element.
• void gslc_ElemSetTxtMarginXY (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nMarginX, int8_t n←-
MarginY)
Set the margin around of a textual element (X & Y offsets can be different)
• void gslc_StrCopy (char ∗pDstStr, const char ∗pSrcStr, uint16_t nDstLen)
Helper routine to perform string deep copy.
• void gslc_ElemSetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, const char ∗pStr)
Update the text string associated with an Element.
• char ∗ gslc_ElemGetTxtStr (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Fetch the current text string associated with an Element.
• void gslc_ElemSetTxtCol (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsColor colVal)
Update the text string color associated with an Element ID.
• void gslc_ElemSetTxtMem (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string location in memory.
• void gslc_ElemSetTxtEnc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teTxtFlags eFlags)
Update the text string encoding mode.
• void gslc_ElemUpdateFont (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int nFontId)
Update the Font selected for an Element's text.
• void gslc_ElemSetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Update the need-redraw status for an element.
• gslc_teRedrawType gslc_ElemGetRedraw (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the need-redraw status for an element.
• void gslc_ElemSetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowEn)
Update the glowing enable for an element.
• void gslc_ElemSetClickEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bClickEn)
Update the click enable for an element.
• void gslc_ElemSetTouchFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TOUCH funcCb)
Update the touch function callback for an element.
• void gslc_ElemSetStyleFrom (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefSrc, gslc_tsElemRef ∗pElem←-
RefDest)
Copy style settings from one element to another.
• void gslc_ResetRectState (gslc_tsRectState ∗pState)
Reset the element region state struct.
• void gslc_ElemCalcRectState (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsRectState ∗pState)
Calculate the element region state struct.
• int8_t gslc_ElemCalcResizeForFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Calculate the change in dimensions of an element to account for any change in focus and/or frame attributes.
• void gslc_ElemGrowRect (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int8_t nDelta)
Increase or decrease the size of an element's region.
• bool gslc_ElemGetGlowEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the glowing enable for an element.
• void gslc_ElemSetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bGlowing)
Update the glowing indicator for an element.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 545

• bool gslc_ElemGetGlow (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)


Get the glowing indicator for an element.
• bool gslc_ElemGetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focus enable for an element.
• void gslc_ElemSetFocusEn (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocusEn)
Set the focus enable for an element.
• void gslc_ElemSetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bFocused)
Update the focused indicator for an element.
• bool gslc_ElemGetFocus (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the focused indicator for an element.
• void gslc_ElemSetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bEditing)
Update the editing indicator for an element.
• bool gslc_ElemGetEdit (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the editing indicator for an element.
• void gslc_ElemSetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, bool bVisible)
Update the visibility status for an element.
• bool gslc_ElemGetVisible (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Get the visibility status for an element.
• bool gslc_ElemGetOnScreen (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Determine whether an element is visible on the screen.
• void gslc_ElemSetDrawFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_DRAW funcCb)
Assign the drawing callback function for an element.
• void gslc_ElemSetTickFunc (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, GSLC_CB_TICK funcCb)
Assign the tick callback function for an element.
• bool gslc_ElemOwnsCoord (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nX, int16_t nY, bool b←-
OnlyClickEn)
Determine if a coordinate is inside of an element.
• bool gslc_InitTouch (gslc_tsGui ∗pGui, const char ∗acDev)
Initialize the touchscreen device driver.
• bool gslc_GetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRawEvent
∗peInputEvent, int16_t ∗pnInputVal)
Initialize the touchscreen device driver.
• void gslc_SetTouchRemapEn (gslc_tsGui ∗pGui, bool bEn)
Configure touchscreen remapping.
• void gslc_SetTouchRemapCal (gslc_tsGui ∗pGui, uint16_t nXMin, uint16_t nXMax, uint16_t nYMin, uint16_t
nYMax)
Configure touchscreen calibration remapping values.
• void gslc_SetTouchPressCal (gslc_tsGui ∗pGui, uint16_t nPressMin, uint16_t nPressMax)
Configure touchscreen calibration pressure values.
• void gslc_SetTouchRemapYX (gslc_tsGui ∗pGui, bool bSwap)
Configure touchscreen XY swap.
• void gslc_SetPinPollFunc (gslc_tsGui ∗pGui, GSLC_CB_PIN_POLL pfunc)
Specify the callback function that is used to collect the state of any external inputs (eg.
• void gslc_InitInputMap (gslc_tsGui ∗pGui, gslc_tsInputMap ∗asInputMap, uint8_t nInputMapMax)
Specify the mapping between external pin inputs (fetched by the SetPinPollFunc() callback and the GUI actions.
• void gslc_InputMapAdd (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc_te←-
Action eAction, int16_t nActionVal)
Add an entry into the external input mapping table.
• gslc_tsElemRef ∗ gslc_FocusElemGet (gslc_tsGui ∗pGui)
Find the currently focused element.
• void gslc_FocusPageStep (gslc_tsGui ∗pGui, bool bNext)

Generated by Doxygen
546 File Documentation

Advance the focus to the next page in the page stack.


• int16_t gslc_FocusElemStep (gslc_tsGui ∗pGui, bool bNext)
Advance the focus to the next element in the focused page.
• void gslc_FocusElemIndSet (gslc_tsGui ∗pGui, int16_t nPageInd, int16_t nElemInd, bool bFocus)
Change the focus to the indexed element on the specified page.
• void gslc_FocusSetToTrackedElem (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Change the focus to the currently-tracked element.
• gslc_tsImgRef gslc_ResetImage ()
Create a blank image reference structure.
• gslc_tsElem gslc_ElemCreate (gslc_tsGui ∗pGui, int16_t nElemId, int16_t nPageId, int16_t nType, gslc_ts←-
Rect rElem, char ∗pStrBuf, uint8_t nStrBufMax, int16_t nFontId)
Create a new element with default styling.
• gslc_tsElemRef ∗ gslc_ElemAdd (gslc_tsGui ∗pGui, int16_t nPageId, gslc_tsElem ∗pElem, gslc_teElem←-
RefFlags eFlags)
Add the Element to the list of generated elements in the GUI environment.
• uint8_t gslc_GetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask)
Get the flags associated with an element reference.
• void gslc_SetElemRefFlag (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, uint8_t nFlagMask, uint8_t n←-
FlagVal)
Set the flags associated with an element reference.
• gslc_tsElem ∗ gslc_GetElemFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef)
Returns a pointer to an element from an element reference, copying from FLASH to RAM if element is stored in
PROGMEM.
• gslc_tsElem ∗ gslc_GetElemFromRefD (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nLineNum)
Returns a pointer to an element from an element reference.
• void ∗ gslc_GetXDataFromRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, int16_t nType, int16_t nLine←-
Num)
Returns a pointer to the data structure associated with an extended element.
• void gslc_ElemSetImage (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_tsImgRef sImgRef, gslc_ts←-
ImgRef sImgRefSel)
Set an element to use a bitmap image.
• bool gslc_ElemDrawByRef (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRef, gslc_teRedrawType eRedraw)
Draw an element to the active display.
• void gslc_ElemDraw (gslc_tsGui ∗pGui, int16_t nPageId, int16_t nElemId)
Draw an element to the active display.
• void gslc_DrawTxtBase (gslc_tsGui ∗pGui, char ∗pStrBuf, gslc_tsRect rTxt, gslc_tsFont ∗pTxtFont, gslc←-
_teTxtFlags eTxtFlags, int8_t eTxtAlign, gslc_tsColor colTxt, gslc_tsColor colBg, int16_t nMarginW, int16_t
nMarginH)
Draw text with full text justification.
• void gslc_SetRoundRadius (gslc_tsGui ∗pGui, uint8_t nRadius)
Set the global rounded radius.
• void gslc_SetFocusCol (gslc_tsGui ∗pGui, gslc_tsColor colFocusNone, gslc_tsColor colFocus, gslc_tsColor
colFocusEdit)
Set the global focus color choices.
• bool gslc_PageEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for a page.
• void gslc_PageRedrawGo (gslc_tsGui ∗pGui)
Redraw all elements on the active page.
• void gslc_PageFlipSet (gslc_tsGui ∗pGui, bool bNeeded)
Indicate whether the screen requires page flip.
• bool gslc_PageFlipGet (gslc_tsGui ∗pGui)
Get state of pending page flip state.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 547

• void gslc_PageFlipGo (gslc_tsGui ∗pGui)


Update the visible screen if page has been marked for flipping.
• gslc_tsPage ∗ gslc_PageFindById (gslc_tsGui ∗pGui, int16_t nPageId)
Find a page in the GUI by its ID.
• void gslc_PageRedrawCalc (gslc_tsGui ∗pGui)
Perform a redraw calculation on the page to determine if additional elements should also be redrawn.
• gslc_tsEvent gslc_EventCreate (gslc_tsGui ∗pGui, gslc_teEventType eType, uint8_t nSubType, void ∗pv←-
Scope, void ∗pvData)
Create an event structure.
• bool gslc_ElemEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for an element.
• bool gslc_ElemSendEventTouch (gslc_tsGui ∗pGui, gslc_tsElemRef ∗pElemRefTracked, gslc_teTouch e←-
Touch, int16_t nX, int16_t nY)
Trigger an element's touch event.
• void gslc_CollectReset (gslc_tsCollect ∗pCollect, gslc_tsElem ∗asElem, uint16_t nElemMax, gslc_tsElemRef
∗asElemRef, uint16_t nElemRefMax)
Reset the members of an element collection.
• gslc_tsElemRef ∗ gslc_CollectElemAdd (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, const gslc_tsElem ∗p←-
Elem, gslc_teElemRefFlags eFlags)
Add an element to a collection.
• bool gslc_CollectGetRedraw (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Determine if any elements in a collection need redraw.
• gslc_tsElemRef ∗ gslc_CollectFindElemById (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nElemId)
Find an element in a collection by its Element ID.
• gslc_tsElemRef ∗ gslc_CollectFindElemFromCoord (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, int16_t nX,
int16_t nY, int16_t ∗pnElemInd)
Find an element in a collection by a coordinate coordinate.
• int gslc_CollectGetNextId (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Allocate the next available Element ID in a collection.
• gslc_tsElemRef ∗ gslc_CollectGetElemRefTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Get the element within a collection that is currently being tracked.
• void gslc_CollectSetElemTracked (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRef,
int16_t nElemInd)
Set the element within a collection that is currently being tracked.
• void gslc_CollectSetParent (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsElemRef ∗pElemRefParent)
Assign the parent element reference to all elements within a collection.
• bool gslc_CollectEvent (void ∗pvGui, gslc_tsEvent sEvent)
Common event handler function for an element collection.
• void gslc_CollectTouch (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle touch events within the element collection.
• bool gslc_CollectTouchCompound (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nRelX,
int16_t nRelY, gslc_tsCollect ∗pCollect)
Handle dispatch of touch (up,down,move) events to compound elements sub elements.
• void gslc_CollectInput (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect, gslc_tsEventTouch ∗pEventTouch)
Handle direct input events within the element collection.
• void gslc_TrackTouch (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage, int16_t nX, int16_t nY, uint16_t nPress)
Handles a touch event and performs the necessary tracking, glowing and selection actions depending on the press
state.
• void gslc_TrackInput (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal)
Handles a direct input event and performs the necessary tracking, glowing and selection actions depending on the
state.

Generated by Doxygen
548 File Documentation

• bool gslc_InputMapLookup (gslc_tsGui ∗pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc←-


_teAction ∗peAction, int16_t ∗pnActionVal)
• void gslc_GuiDestruct (gslc_tsGui ∗pGui)
Free up any surfaces associated with the GUI, pages, collections and elements.
• void gslc_PageDestruct (gslc_tsGui ∗pGui, gslc_tsPage ∗pPage)
Free up any members associated with a page.
• void gslc_CollectDestruct (gslc_tsGui ∗pGui, gslc_tsCollect ∗pCollect)
Free up any members associated with an element collection.
• void gslc_ElemDestruct (gslc_tsElem ∗pElem)
Free up any members associated with an element.
• void gslc_ResetFont (gslc_tsFont ∗pFont)
Initialize a Font struct.
• void gslc_ResetElem (gslc_tsElem ∗pElem)
Initialize an Element struct.

Variables

• GSLC_CB_DEBUG_OUT g_pfDebugOut
Global debug output function.

9.45.1 Macro Definition Documentation

9.45.1.1 GSLC_2PI

#define GSLC_2PI

9.45.1.2 GSLC_ALIGN_BOT_LEFT

#define GSLC_ALIGN_BOT_LEFT

Align to bottom-left.

9.45.1.3 GSLC_ALIGN_BOT_MID

#define GSLC_ALIGN_BOT_MID

Align to middle of bottom.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 549

9.45.1.4 GSLC_ALIGN_BOT_RIGHT

#define GSLC_ALIGN_BOT_RIGHT

Align to bottom-right.

9.45.1.5 GSLC_ALIGN_MID_LEFT

#define GSLC_ALIGN_MID_LEFT

Align to middle of left side.

9.45.1.6 GSLC_ALIGN_MID_MID

#define GSLC_ALIGN_MID_MID

Align to center.

9.45.1.7 GSLC_ALIGN_MID_RIGHT

#define GSLC_ALIGN_MID_RIGHT

Align to middle of right side.

9.45.1.8 GSLC_ALIGN_TOP_LEFT

#define GSLC_ALIGN_TOP_LEFT

Align to top-left.

9.45.1.9 GSLC_ALIGN_TOP_MID

#define GSLC_ALIGN_TOP_MID

Align to middle of top.

Generated by Doxygen
550 File Documentation

9.45.1.10 GSLC_ALIGN_TOP_RIGHT

#define GSLC_ALIGN_TOP_RIGHT

Align to top-right.

9.45.1.11 GSLC_ALIGNH_LEFT

#define GSLC_ALIGNH_LEFT

Horizontal align to left.

9.45.1.12 GSLC_ALIGNH_MID

#define GSLC_ALIGNH_MID

Horizontal align to middle.

9.45.1.13 GSLC_ALIGNH_RIGHT

#define GSLC_ALIGNH_RIGHT

Horizontal align to right.

9.45.1.14 GSLC_ALIGNV_BOT

#define GSLC_ALIGNV_BOT

Vertical align to bottom.

9.45.1.15 GSLC_ALIGNV_MID

#define GSLC_ALIGNV_MID

Vertical align to middle.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 551

9.45.1.16 GSLC_ALIGNV_TOP

#define GSLC_ALIGNV_TOP

Element text alignment.

Vertical align to top

9.45.1.17 GSLC_COL_BLACK

#define GSLC_COL_BLACK

Black.

9.45.1.18 GSLC_COL_BLUE

#define GSLC_COL_BLUE

Blue.

9.45.1.19 GSLC_COL_BLUE_DK1

#define GSLC_COL_BLUE_DK1

Blue (dark1)

9.45.1.20 GSLC_COL_BLUE_DK2

#define GSLC_COL_BLUE_DK2

Blue (dark2)

9.45.1.21 GSLC_COL_BLUE_DK3

#define GSLC_COL_BLUE_DK3

Blue (dark3)

Generated by Doxygen
552 File Documentation

9.45.1.22 GSLC_COL_BLUE_DK4

#define GSLC_COL_BLUE_DK4

Blue (dark4)

9.45.1.23 GSLC_COL_BLUE_LT1

#define GSLC_COL_BLUE_LT1

Blue (light1)

9.45.1.24 GSLC_COL_BLUE_LT2

#define GSLC_COL_BLUE_LT2

Blue (light2)

9.45.1.25 GSLC_COL_BLUE_LT3

#define GSLC_COL_BLUE_LT3

Blue (light3)

9.45.1.26 GSLC_COL_BLUE_LT4

#define GSLC_COL_BLUE_LT4

Blue (light4)

9.45.1.27 GSLC_COL_BROWN

#define GSLC_COL_BROWN

Brown.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 553

9.45.1.28 GSLC_COL_CYAN

#define GSLC_COL_CYAN

Cyan.

9.45.1.29 GSLC_COL_GRAY

#define GSLC_COL_GRAY

Gray.

9.45.1.30 GSLC_COL_GRAY_DK1

#define GSLC_COL_GRAY_DK1

Gray (dark1)

9.45.1.31 GSLC_COL_GRAY_DK2

#define GSLC_COL_GRAY_DK2

Gray (dark2)

9.45.1.32 GSLC_COL_GRAY_DK3

#define GSLC_COL_GRAY_DK3

Gray (dark3)

9.45.1.33 GSLC_COL_GRAY_DK4

#define GSLC_COL_GRAY_DK4

Gray (dark4)

Generated by Doxygen
554 File Documentation

9.45.1.34 GSLC_COL_GRAY_LT1

#define GSLC_COL_GRAY_LT1

Gray (light1)

9.45.1.35 GSLC_COL_GRAY_LT2

#define GSLC_COL_GRAY_LT2

Gray (light2)

9.45.1.36 GSLC_COL_GRAY_LT3

#define GSLC_COL_GRAY_LT3

Gray (light3)

9.45.1.37 GSLC_COL_GRAY_LT4

#define GSLC_COL_GRAY_LT4

Gray (light4)

9.45.1.38 GSLC_COL_GREEN

#define GSLC_COL_GREEN

Green.

9.45.1.39 GSLC_COL_GREEN_DK1

#define GSLC_COL_GREEN_DK1

Green (dark1)

Generated by Doxygen
9.45 src/GUIslice.h File Reference 555

9.45.1.40 GSLC_COL_GREEN_DK2

#define GSLC_COL_GREEN_DK2

Green (dark2)

9.45.1.41 GSLC_COL_GREEN_DK3

#define GSLC_COL_GREEN_DK3

Green (dark3)

9.45.1.42 GSLC_COL_GREEN_DK4

#define GSLC_COL_GREEN_DK4

Green (dark4)

9.45.1.43 GSLC_COL_GREEN_LT1

#define GSLC_COL_GREEN_LT1

Green (light1)

9.45.1.44 GSLC_COL_GREEN_LT2

#define GSLC_COL_GREEN_LT2

Green (light2)

9.45.1.45 GSLC_COL_GREEN_LT3

#define GSLC_COL_GREEN_LT3

Green (light3)

Generated by Doxygen
556 File Documentation

9.45.1.46 GSLC_COL_GREEN_LT4

#define GSLC_COL_GREEN_LT4

Green (light4)

9.45.1.47 GSLC_COL_MAGENTA

#define GSLC_COL_MAGENTA

Magenta.

9.45.1.48 GSLC_COL_ORANGE

#define GSLC_COL_ORANGE

Orange.

9.45.1.49 GSLC_COL_PURPLE

#define GSLC_COL_PURPLE

Purple.

9.45.1.50 GSLC_COL_RED

#define GSLC_COL_RED

Red.

9.45.1.51 GSLC_COL_RED_DK1

#define GSLC_COL_RED_DK1

Red (dark1)

Generated by Doxygen
9.45 src/GUIslice.h File Reference 557

9.45.1.52 GSLC_COL_RED_DK2

#define GSLC_COL_RED_DK2

Red (dark2)

9.45.1.53 GSLC_COL_RED_DK3

#define GSLC_COL_RED_DK3

Red (dark3)

9.45.1.54 GSLC_COL_RED_DK4

#define GSLC_COL_RED_DK4

Basic color definition.

Red (dark4)

9.45.1.55 GSLC_COL_RED_LT1

#define GSLC_COL_RED_LT1

Red (light1)

9.45.1.56 GSLC_COL_RED_LT2

#define GSLC_COL_RED_LT2

Red (light2)

9.45.1.57 GSLC_COL_RED_LT3

#define GSLC_COL_RED_LT3

Red (light3)

Generated by Doxygen
558 File Documentation

9.45.1.58 GSLC_COL_RED_LT4

#define GSLC_COL_RED_LT4

Red (light4)

9.45.1.59 GSLC_COL_TEAL

#define GSLC_COL_TEAL

Teal.

9.45.1.60 GSLC_COL_WHITE

#define GSLC_COL_WHITE

White.

9.45.1.61 GSLC_COL_YELLOW

#define GSLC_COL_YELLOW

Yellow.

9.45.1.62 GSLC_COL_YELLOW_DK

#define GSLC_COL_YELLOW_DK

Yellow (dark)

9.45.1.63 GSLC_COLMONO_BLACK

#define GSLC_COLMONO_BLACK

Black.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 559

9.45.1.64 GSLC_COLMONO_WHITE

#define GSLC_COLMONO_WHITE

White.

9.45.1.65 GSLC_ELEM_FEA_CLICK_EN

#define GSLC_ELEM_FEA_CLICK_EN

Element accepts touch presses.

9.45.1.66 GSLC_ELEM_FEA_EDIT_EN

#define GSLC_ELEM_FEA_EDIT_EN

Element supports edit.

9.45.1.67 GSLC_ELEM_FEA_FILL_EN

#define GSLC_ELEM_FEA_FILL_EN

Element is drawn with a fill.

9.45.1.68 GSLC_ELEM_FEA_FOCUS_EN

#define GSLC_ELEM_FEA_FOCUS_EN

Element can accept focus.

9.45.1.69 GSLC_ELEM_FEA_FRAME_EN

#define GSLC_ELEM_FEA_FRAME_EN

Element is drawn with a frame.

Generated by Doxygen
560 File Documentation

9.45.1.70 GSLC_ELEM_FEA_GLOW_EN

#define GSLC_ELEM_FEA_GLOW_EN

Element supports glowing state.

9.45.1.71 GSLC_ELEM_FEA_NONE

#define GSLC_ELEM_FEA_NONE

Element default (no features set))

9.45.1.72 GSLC_ELEM_FEA_NOSHRINK

#define GSLC_ELEM_FEA_NOSHRINK

Element features type.

Element can't be shrunk (eg. contains image)

9.45.1.73 GSLC_ELEM_FEA_ROUND_EN

#define GSLC_ELEM_FEA_ROUND_EN

Element is drawn with a rounded profile.

9.45.1.74 GSLC_ELEM_FEA_VALID

#define GSLC_ELEM_FEA_VALID

Element record is valid.

9.45.1.75 GSLC_ELEMREF_DEFAULT

#define GSLC_ELEMREF_DEFAULT

Define the default element reference flags for new elements.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 561

9.45.1.76 GSLC_FEATURE_FOCUS_ON_TOUCH

#define GSLC_FEATURE_FOCUS_ON_TOUCH

9.45.1.77 GSLC_MAX

#define GSLC_MAX(
a,
b )

9.45.1.78 GSLC_MIN

#define GSLC_MIN(
a,
b )

9.45.1.79 GSLC_PMEM

#define GSLC_PMEM

9.45.2 Typedef Documentation

9.45.2.1 GSLC_CB_DEBUG_OUT

typedef int16_t(∗ GSLC_CB_DEBUG_OUT) (char ch)

9.45.2.2 GSLC_CB_DRAW

typedef bool(∗ GSLC_CB_DRAW) (void ∗pvGui, void ∗pvElemRef, gslc_teRedrawType eRedraw)

Callback function for element drawing.

Generated by Doxygen
562 File Documentation

9.45.2.3 GSLC_CB_EVENT

typedef bool(∗ GSLC_CB_EVENT) (void ∗pvGui, gslc_tsEvent sEvent)

Callback function for element drawing.

9.45.2.4 GSLC_CB_INPUT

typedef bool(∗ GSLC_CB_INPUT) (void ∗pvGui, void ∗pvElemRef, int16_t nStatus, void ∗pvData)

Callback function for element input ready.

9.45.2.5 GSLC_CB_PIN_POLL

typedef bool(∗ GSLC_CB_PIN_POLL) (void ∗pvGui, int16_t ∗pnPinInd, int16_t ∗pnPinVal)

Callback function for pin polling.

9.45.2.6 GSLC_CB_TICK

typedef bool(∗ GSLC_CB_TICK) (void ∗pvGui, void ∗pvElemRef)

Callback function for element tick.

9.45.2.7 GSLC_CB_TOUCH

typedef bool(∗ GSLC_CB_TOUCH) (void ∗pvGui, void ∗pvElemRef, gslc_teTouch eTouch, int16_t nX,
int16_t nY)

Callback function for element touch tracking.

9.45.2.8 gslc_tsColor

typedef struct gslc_tsColor gslc_tsColor

Color structure. Defines RGB triplet.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 563

9.45.2.9 gslc_tsElem

typedef struct gslc_tsElem gslc_tsElem

Element Struct.

• Represents a single graphic element in the GUIslice environment

• A page is made up of a number of elements

• Each element is created with a user-specified ID for further accesses (or GSLC_ID_AUTO for it to be auto-
generated)

• Display order of elements in a page is based upon the creation order

• Extensions to the core element types is provided through the pXData reference and pfuncX∗ callback func-
tions.

9.45.2.10 gslc_tsEvent

typedef struct gslc_tsEvent gslc_tsEvent

Event structure.

9.45.2.11 gslc_tsEventTouch

typedef struct gslc_tsEventTouch gslc_tsEventTouch

Structure used to pass touch data through event.

9.45.2.12 gslc_tsPt

typedef struct gslc_tsPt gslc_tsPt

Define point coordinates.

9.45.2.13 gslc_tsRect

typedef struct gslc_tsRect gslc_tsRect

Rectangular region. Defines X,Y corner coordinates plus dimensions.

Generated by Doxygen
564 File Documentation

9.45.2.14 gslc_tsRectState

typedef struct gslc_tsRectState gslc_tsRectState

State associated with an element's region.

• This struct is used for gslc_ElemCalcRectState()

• Accounts for various rects including focus, frame and internal content

• Also contains the various colors associated with each region.

9.45.3 Enumeration Type Documentation

9.45.3.1 gslc_teAction

enum gslc_teAction

GUI Action Requested These actions are usually the result of an InputMap lookup.

Enumerator

GSLC_ACTION_UNDEF Invalid action.


GSLC_ACTION_NONE No action to perform.
GSLC_ACTION_FOCUS_PREV Advance focus to the previous GUI element.
GSLC_ACTION_FOCUS_NEXT Advance focus to the next GUI element.
GSLC_ACTION_PRESELECT Pre-Select the currently focused GUI element (glow)
GSLC_ACTION_SELECT Select the currently focused GUI element.
GSLC_ACTION_SET_REL Adjust value (relative) of focused element.
GSLC_ACTION_SET_ABS Adjust value (absolute) of focused element.
GSLC_ACTION_DEBUG Internal debug action.

9.45.3.2 gslc_teElemId

enum gslc_teElemId

Element ID enumerations.

• The Element ID is the primary means for user code to reference a graphic element.

• Application code can assign arbitrary Element ID values in the range of 0...16383

• Specifying GSLC_ID_AUTO to ElemCreate() requests that GUIslice auto-assign an ID value for the Element.
These auto-assigned values will begin at GSLC_ID_AUTO_BASE.

• Negative Element ID values are reserved

Generated by Doxygen
9.45 src/GUIslice.h File Reference 565

Enumerator

GSLC_ID_USER_BASE Starting Element ID for user assignments.


GSLC_ID_NONE No Element ID has been assigned.
GSLC_ID_AUTO Auto-assigned Element ID requested.
GSLC_ID_TEMP ID for Temporary Element.
GSLC_ID_AUTO_BASE Starting Element ID to start auto-assignment (when GSLC_ID_AUTO is specified)

9.45.3.3 gslc_teElemInd

enum gslc_teElemInd

Element Index enumerations.

• The Element Index is used for internal purposes as an offset

Enumerator

GSLC_IND_NONE No Element Index is available.


GSLC_IND_FIRST User elements start at index 0.

9.45.3.4 gslc_teElemRefFlags

enum gslc_teElemRefFlags

Element reference flags: Describes characteristics of an element.

• Primarily used to support relocation of elements to Flash memory (PROGMEM)

Enumerator

GSLC_ELEMREF_NONE No element defined.


GSLC_ELEMREF_SRC_RAM Element is read/write Stored in RAM (internal element array))
Access directly.
GSLC_ELEMREF_SRC_PROG Element is read-only / const Stored in FLASH (external to element
array) Access via PROGMEM.
GSLC_ELEMREF_SRC_CONST Element is read-only / const Stored in FLASH (external to element
array) Access directly.
GSLC_ELEMREF_REDRAW_NONE No redraw requested.
GSLC_ELEMREF_REDRAW_FULL Full redraw of element requested.
GSLC_ELEMREF_REDRAW_INC Incremental redraw of element requested.
GSLC_ELEMREF_REDRAW_FOCUS Focus-only redraw of element requested.

Generated by Doxygen
566 File Documentation

Enumerator

GSLC_ELEMREF_EDITING Element is in edit state (1=edit, 0=navigate)


GSLC_ELEMREF_FOCUSED Element state is focused.
GSLC_ELEMREF_GLOWING Element state is glowing.
GSLC_ELEMREF_VISIBLE Element is currently shown (ie. visible)
GSLC_ELEMREF_SRC Mask for Source flags [bits 1,0].
GSLC_ELEMREF_REDRAW_MASK Mask for Redraw flags [bits 5,4].

9.45.3.5 gslc_teEventSubType

enum gslc_teEventSubType

Event sub-types.

Enumerator

GSLC_EVTSUB_NONE
GSLC_EVTSUB_DRAW_NEEDED Incremental redraw (as needed)
GSLC_EVTSUB_DRAW_FORCE Force a full redraw.

9.45.3.6 gslc_teEventType

enum gslc_teEventType

Event types.

Enumerator

GSLC_EVT_NONE No event; ignore.


GSLC_EVT_DRAW Perform redraw.
GSLC_EVT_TOUCH Track touch event.
GSLC_EVT_TICK Perform background tick handling.
GSLV_EVT_CUSTOM Custom event.

9.45.3.7 gslc_teFontId

enum gslc_teFontId

Font ID enumerations.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 567

• The Font ID is the primary means for user code to reference a specific font.

• Application code can assign arbitrary Font ID values in the range of 0...16383

• Negative Font ID values are reserved

Enumerator

GSLC_FONT_USER_BASE Starting Font ID for user assignments.


GSLC_FONT_NONE No Font ID has been assigned.

9.45.3.8 gslc_teFontRefMode

enum gslc_teFontRefMode

Font Reference modes.

• The Font Reference mode defines the source for the selected font. For graphics libraries that offer multiple
types of fonts, this can be used to differentiate between a default font, hardware fonts, software fonts, etc.

• The encoding between the different modes is driver-specific.

Enumerator

GSLC_FONTREF_MODE_DEFAULT Default font mode.


GSLC_FONTREF_MODE_1 Font mode 1.
GSLC_FONTREF_MODE_2 Font mode 2.
GSLC_FONTREF_MODE_3 Font mode 3.

9.45.3.9 gslc_teFontRefType

enum gslc_teFontRefType

Font Reference types.

• The Font Reference type defines the way in which a font is selected. In some device targets (such as LINUX
SDL) a filename to a font file is provided. In others (such as Arduino, ESP8266), a pointer is given to a font
structure (or NULL for default).

Enumerator

GSLC_FONTREF_FNAME Font reference is a filename (full path)


GSLC_FONTREF_PTR Font reference is a pointer to a font structure.

Generated by Doxygen
568 File Documentation

9.45.3.10 gslc_teGroupId

enum gslc_teGroupId

Group ID enumerations.

Enumerator

GSLC_GROUP_ID_USER_BASE Starting Group ID for user assignments.


GSLC_GROUP_ID_NONE No Group ID has been assigned.

9.45.3.11 gslc_teImgRefFlags

enum gslc_teImgRefFlags

Image reference flags: Describes characteristics of an image reference.

Enumerator

GSLC_IMGREF_NONE No image defined.


GSLC_IMGREF_SRC_FILE Image is stored in file system.
GSLC_IMGREF_SRC_SD Image is stored on SD card.
GSLC_IMGREF_SRC_RAM Image is stored in RAM.
GSLC_IMGREF_SRC_PROG Image is stored in program memory (PROGMEM)
GSLC_IMGREF_FMT_BMP24 Image format is BMP (24-bit)
GSLC_IMGREF_FMT_BMP16 Image format is BMP (16-bit RGB565)
GSLC_IMGREF_FMT_RAW1 Image format is raw monochrome (1-bit)
GSLC_IMGREF_FMT_JPG Image format is JPG (ESP32/ESP8366)
GSLC_IMGREF_SRC Mask for Source flags.
GSLC_IMGREF_FMT Mask for Format flags.

9.45.3.12 gslc_teInitStat

enum gslc_teInitStat

Status of a module's initialization.

Enumerator

GSLC_INITSTAT_UNDEF Module status has not been defined yet.


GSLC_INITSTAT_INACTIVE Module is not enabled.
GSLC_INITSTAT_FAIL Module is enabled but failed to init.
GSLC_INITSTAT_ACTIVE Module is enabled and initalized OK. Generated by Doxygen
9.45 src/GUIslice.h File Reference 569

9.45.3.13 gslc_teInputMode

enum gslc_teInputMode

External input mode.

Dictates how directional controls affect the interaction with the GUI elements.

Enumerator

GSLC_INPUTMODE_NAV External input is in navigation mode.


External input is in element edit mode.
GSLC_INPUTMODE_EDIT

9.45.3.14 gslc_teInputRawEvent

enum gslc_teInputRawEvent

Raw input event types: touch, key, GPIOs.

Enumerator

GSLC_INPUT_NONE No input event.


GSLC_INPUT_TOUCH Touch / mouse event.
GSLC_INPUT_KEY_DOWN Key press down / pin input asserted.
GSLC_INPUT_KEY_UP Key press up (released)
GSLC_INPUT_PIN_ASSERT GPIO pin input asserted (eg. set to 1 / High)
GSLC_INPUT_PIN_DEASSERT GPIO pin input deasserted (eg. set to 0 / Low)

9.45.3.15 gslc_tePageId

enum gslc_tePageId

Page ID enumerations.

• The Page ID is the primary means for user code to reference a specific page of elements.

• Application code can assign arbitrary Page ID values in the range of 0...16383

• Negative Page ID values are reserved

Generated by Doxygen
570 File Documentation

Enumerator

GSLC_PAGE_USER_BASE Starting Page ID for user assignments.


GSLC_PAGE_NONE No Page ID has been assigned.

9.45.3.16 gslc_tePin

enum gslc_tePin

General purpose pin/button constants.

Enumerator

GSLC_PIN_BTN_A Button A (short press)


GSLC_PIN_BTN_A_LONG Button A (long press)
GSLC_PIN_BTN_B Button B (short press)
GSLC_PIN_BTN_B_LONG Button B (long press)
GSLC_PIN_BTN_C Button C (short press)
GSLC_PIN_BTN_C_LONG Button C (long press)
GSLC_PIN_BTN_D Button D (short press)
GSLC_PIN_BTN_D_LONG Button D (long press)
GSLC_PIN_BTN_E Button E (short press)
GSLC_PIN_BTN_E_LONG Button E (long press)
GSLC_PIN_BTN_UP Button Up (short press)
GSLC_PIN_BTN_DOWN Button Down (short press)
GSLC_PIN_BTN_LEFT Button Left (short press)
GSLC_PIN_BTN_RIGHT Button Right (short press)
GSLC_PIN_BTN_SEL Button Select (short press)

9.45.3.17 gslc_teRedrawType

enum gslc_teRedrawType

Redraw types.

Enumerator

GSLC_REDRAW_NONE No redraw requested.


GSLC_REDRAW_FULL Full redraw of element requested.
GSLC_REDRAW_INC Incremental redraw of element requested.
GSLC_REDRAW_FOCUS Only focus redraw requested.

Generated by Doxygen
9.45 src/GUIslice.h File Reference 571

9.45.3.18 gslc_teStackPage

enum gslc_teStackPage

Define page stack.

Enumerator

GSLC_STACK_BASE Base page.


GSLC_STACK_CUR Current page.
GSLC_STACK_OVERLAY Overlay page (eg. popups)
GSLC_STACK__MAX Defines maximum number of pages in stack.

9.45.3.19 gslc_teTouch

enum gslc_teTouch

Processed event from input raw events and actions.

Enumerator

GSLC_TOUCH_NONE No touch event active.


GSLC_TOUCH_TYPE_MASK Mask for type: coord/direct mode.
GSLC_TOUCH_COORD Event based on touch coordinate.
GSLC_TOUCH_DIRECT Event based on specific element index (keyboard/GPIO action)
GSLC_TOUCH_SUBTYPE_MASK Mask for subtype.
GSLC_TOUCH_DOWN Touch event (down)
GSLC_TOUCH_DOWN_IN Touch event (down inside tracked element)
GSLC_TOUCH_DOWN_OUT Touch event (down outside tracked element)
GSLC_TOUCH_UP Touch event (up)
GSLC_TOUCH_UP_IN Touch event (up inside tracked element)
GSLC_TOUCH_UP_OUT Touch event (up outside tracked element)
GSLC_TOUCH_MOVE Touch event (move)
GSLC_TOUCH_MOVE_IN Touch event (move inside tracked element)
GSLC_TOUCH_MOVE_OUT Touch event (move outside tracked element)
GSLC_TOUCH_FOCUS_ON Direct event focus on element.
GSLC_TOUCH_FOCUS_OFF Direct event focus away from focused element.
GSLC_TOUCH_FOCUS_PRESELECT Direct event select focus element (glow before select)
GSLC_TOUCH_FOCUS_SELECT Direct event select focus element.
GSLC_TOUCH_SET_REL Direct event set value (relative) on focus element.
GSLC_TOUCH_SET_ABS Direct event set value (absolute) on focus element.

9.45.3.20 gslc_teTxtFlags

enum gslc_teTxtFlags

Generated by Doxygen
572 File Documentation

Text reference flags: Describes the characteristics of a text string (ie.

whether internal to element or external and RAM vs Flash).)

Supported flag combinations are:

• ALLOC_NONE

• ALLOC_INT | MEM_RAM

• ALLOC_EXT | MEM_RAM

• ALLOC_EXT | MEM_PROG

Enumerator

GSLC_TXT_MEM_RAM Text string is in SRAM (read-write)


GSLC_TXT_MEM_PROG Text string is in PROGMEM (read-only)
GSLC_TXT_ALLOC_NONE No text string present.
GSLC_TXT_ALLOC_INT Text string allocated in internal element memory (GSLC_STR_LOCAL=1)
GSLC_TXT_ALLOC_EXT Text string allocated in external memory (GSLC_STR_LOCAL=0), ie. user code.
GSLC_TXT_ENC_PLAIN Encoding is plain text (LATIN1))
GSLC_TXT_ENC_UTF8 Encoding is UTF-8.
GSLC_TXT_MEM Mask for updating text memory type.
GSLC_TXT_ALLOC Mask for updating location of text string buffer allocation.
GSLC_TXT_ENC Mask for updating text encoding.
GSLC_TXT_DEFAULT

9.45.3.21 gslc_teTypeCore

enum gslc_teTypeCore

Element type.

Enumerator

GSLC_TYPE_NONE No element type specified.


GSLC_TYPE_BKGND Background element type.
GSLC_TYPE_BTN Button element type.
GSLC_TYPE_TXT Text label element type.
GSLC_TYPE_BOX Box / frame element type.
GSLC_TYPE_LINE Line element type.
GSLC_TYPE_BASE_EXTEND Base value for extended type enumerations.

9.45.4 Variable Documentation

Generated by Doxygen
9.46 src/GUIslice_config.h File Reference 573

9.45.4.1 g_pfDebugOut

GSLC_CB_DEBUG_OUT g_pfDebugOut

Global debug output function.

• The user assigns this function via gslc_InitDebug()

9.46 src/GUIslice_config.h File Reference

This graph shows which files directly or indirectly include this file:

src/GUIslice_config.h

src/GUIslice_drv_tft
src/GUIslice.h src/GUIslice_drv_adagfx.cpp src/GUIslice_drv_m5stack.cpp src/GUIslice_drv_sdl.c src/GUIslice_drv_utft.cpp
_espi.cpp

src/GUIslice.c src/elem/XGraph.h src/elem/XKeyPad.h src/elem/XListbox.h src/elem/XProgress.h src/elem/XRadial.h src/elem/XRamp.h src/elem/XCheckbox.h src/elem/XGauge.h src/elem/XGlowball.h src/elem/XRingGauge.h src/elem/XSeekbar.h src/elem/XSelNum.h src/elem/XSlider.h src/elem/XSpinner.h src/elem/XTemplate.h src/elem/XTextbox.h src/elem/XTogglebtn.h src/GUIslice_drv_adagfx.h src/GUIslice_drv_m5stack.h src/elem/XToggleImgbtn.h

src/elem/XGraph.c src/elem/XKeyPad.c src/elem/XKeyPad_Alpha.h src/elem/XKeyPad_Num.h src/elem/XListbox.c src/elem/XProgress.c src/elem/XRadial.c src/elem/XRamp.c src/elem/XCheckbox.c src/elem/XGauge.c src/elem/XGlowball.c src/elem/XRingGauge.c src/elem/XSeekbar.c src/elem/XSelNum.c src/elem/XSlider.c src/elem/XSpinner.c src/elem/XTemplate.c src/elem/XTextbox.c src/elem/XTogglebtn.c src/elem/XToggleImgbtn.c

src/elem/XKeyPad_Alpha.c src/elem/XKeyPad_Num.c

9.47 src/GUIslice_drv.h File Reference

This graph shows which files directly or indirectly include this file:

src/GUIslice_drv.h

src/elem/XCheckbox.c src/elem/XGauge.c src/elem/XGlowball.c src/elem/XGraph.c src/elem/XKeyPad.c src/elem/XKeyPad_Alpha.c src/elem/XKeyPad_Num.c src/elem/XListbox.c src/elem/XProgress.c src/elem/XRadial.c src/elem/XRamp.c src/elem/XRingGauge.c src/elem/XSeekbar.c src/elem/XSelNum.c src/elem/XSlider.c src/elem/XSpinner.c src/elem/XTemplate.c src/elem/XTextbox.c src/elem/XTogglebtn.c src/elem/XToggleImgbtn.c src/GUIslice.c

9.48 src/GUIslice_drv_adagfx.cpp File Reference

#include "GUIslice_config.h"
Include dependency graph for GUIslice_drv_adagfx.cpp:

src/GUIslice_drv_adagfx.cpp

GUIslice_config.h

Generated by Doxygen
574 File Documentation

9.49 src/GUIslice_drv_adagfx.h File Reference

GUIslice library (driver layer for Adafruit-GFX)


#include "GUIslice.h"
#include <stdio.h>
Include dependency graph for GUIslice_drv_adagfx.h:

src/GUIslice_drv_adagfx.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Data Structures
• struct gslc_tsDriver

Macros
• #define DRV_HAS_DRAW_POINT
Support gslc_DrvDrawPoint()
• #define DRV_HAS_DRAW_POINTS
Support gslc_DrvDrawPoints()
• #define DRV_HAS_DRAW_LINE
Support gslc_DrvDrawLine()
• #define DRV_HAS_DRAW_RECT_FRAME
Support gslc_DrvDrawFrameRect()
• #define DRV_HAS_DRAW_RECT_FILL
Support gslc_DrvDrawFillRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FRAME
Support gslc_DrvDrawFrameRoundRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FILL
Support gslc_DrvDrawFillRoundRect()
• #define DRV_HAS_DRAW_CIRCLE_FRAME
Support gslc_DrvDrawFrameCircle()
• #define DRV_HAS_DRAW_CIRCLE_FILL
Support gslc_DrvDrawFillCircle()
• #define DRV_HAS_DRAW_TRI_FRAME
Support gslc_DrvDrawFrameTriangle()
• #define DRV_HAS_DRAW_TRI_FILL
Support gslc_DrvDrawFillTriangle()
• #define DRV_HAS_DRAW_TEXT
Support gslc_DrvDrawTxt()
• #define DRV_HAS_DRAW_BMP_MEM
Support gslc_DrvDrawBmp24FromMem()
• #define DRV_OVERRIDE_TXT_ALIGN
Driver provides text alignment.

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 575

Functions

• bool gslc_DrvInit (gslc_tsGui ∗pGui)


Initialize the SDL library.
• bool gslc_DrvInitTs (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• void gslc_DrvDestruct (gslc_tsGui ∗pGui)
Free up any members associated with the driver.
• const char ∗ gslc_DrvGetNameDisp (gslc_tsGui ∗pGui)
Get the display driver name.
• const char ∗ gslc_DrvGetNameTouch (gslc_tsGui ∗pGui)
Get the touch driver name.
• void ∗ gslc_DrvGetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_DrvGetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• void ∗ gslc_DrvLoadImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Load a bitmap (∗.bmp) and create a new image resource.
• bool gslc_DrvSetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_DrvSetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_DrvSetElemImageNorm (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.
• bool gslc_DrvSetElemImageGlow (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's glow-state image.
• void gslc_DrvImageDestruct (void ∗pvImg)
Release an image surface.
• bool gslc_DrvSetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for future drawing updates.
• const void ∗ gslc_DrvFontAdd (gslc_teFontRefType eFontRefType, const void ∗pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
• void gslc_DrvFontsDestruct (gslc_tsGui ∗pGui)
Release all fonts defined in the GUI.
• bool gslc_DrvGetTxtSize (gslc_tsGui ∗pGui, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxt←-
Flags, int16_t ∗pnTxtX, int16_t ∗pnTxtY, uint16_t ∗pnTxtSzW, uint16_t ∗pnTxtSzH)
Get the extent (width and height) of a text string.
• bool gslc_DrvDrawTxt (gslc_tsGui ∗pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont ∗pFont, const char ∗pStr,
gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
• void gslc_DrvPageFlipNow (gslc_tsGui ∗pGui)
Force a page flip to occur.
• bool gslc_DrvDrawPoint (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawPoints (gslc_tsGui ∗pGui, gslc_tsPt ∗asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• bool gslc_DrvDrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.

Generated by Doxygen
576 File Documentation

• bool gslc_DrvDrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor n←-
Col)
Draw a framed rounded rectangle.
• bool gslc_DrvDrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• bool gslc_DrvDrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor
nCol)
Draw a line.
• bool gslc_DrvDrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_ts←-
Color nCol)
Draw a framed circle.
• bool gslc_DrvDrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a filled circle.
• bool gslc_DrvDrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1,
int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• bool gslc_DrvDrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• bool gslc_DrvDrawImage (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)
Copy all of source image to destination screen at specified coordinate.
• void gslc_DrvDrawMonoFromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char ∗p←-
Bitmap, bool bProgMem)
Draw a monochrome bitmap from a memory array.
• void gslc_DrvDrawBmp24FromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char
∗pBitmap, bool bProgMem)
Draw a color 24-bit depth bitmap from a memory array.
• void gslc_DrvDrawBmp24FromSD (gslc_tsGui ∗pGui, const char ∗filename, uint16_t x, uint16_t y)
Draw a color 24-bit depth bitmap from SD card.
• void gslc_DrvDrawBkgnd (gslc_tsGui ∗pGui)
Copy the background image to destination screen.
• bool gslc_DrvInitTouch (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• bool gslc_DrvGetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRaw←-
Event ∗peInputEvent, int16_t ∗pnInputVal)
Get the last touch event from the internal touch handler.
• bool gslc_DrvRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
• uint16_t gslc_DrvAdaptColorToRaw (gslc_tsColor nCol)

9.49.1 Detailed Description

GUIslice library (driver layer for Adafruit-GFX)

9.49.2 Macro Definition Documentation

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 577

9.49.2.1 DRV_HAS_DRAW_BMP_MEM

#define DRV_HAS_DRAW_BMP_MEM

Support gslc_DrvDrawBmp24FromMem()

9.49.2.2 DRV_HAS_DRAW_CIRCLE_FILL

#define DRV_HAS_DRAW_CIRCLE_FILL

Support gslc_DrvDrawFillCircle()

9.49.2.3 DRV_HAS_DRAW_CIRCLE_FRAME

#define DRV_HAS_DRAW_CIRCLE_FRAME

Support gslc_DrvDrawFrameCircle()

9.49.2.4 DRV_HAS_DRAW_LINE

#define DRV_HAS_DRAW_LINE

Support gslc_DrvDrawLine()

9.49.2.5 DRV_HAS_DRAW_POINT

#define DRV_HAS_DRAW_POINT

Support gslc_DrvDrawPoint()

9.49.2.6 DRV_HAS_DRAW_POINTS

#define DRV_HAS_DRAW_POINTS

Support gslc_DrvDrawPoints()

Generated by Doxygen
578 File Documentation

9.49.2.7 DRV_HAS_DRAW_RECT_FILL

#define DRV_HAS_DRAW_RECT_FILL

Support gslc_DrvDrawFillRect()

9.49.2.8 DRV_HAS_DRAW_RECT_FRAME

#define DRV_HAS_DRAW_RECT_FRAME

Support gslc_DrvDrawFrameRect()

9.49.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL

#define DRV_HAS_DRAW_RECT_ROUND_FILL

Support gslc_DrvDrawFillRoundRect()

9.49.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME

#define DRV_HAS_DRAW_RECT_ROUND_FRAME

Support gslc_DrvDrawFrameRoundRect()

9.49.2.11 DRV_HAS_DRAW_TEXT

#define DRV_HAS_DRAW_TEXT

Support gslc_DrvDrawTxt()

9.49.2.12 DRV_HAS_DRAW_TRI_FILL

#define DRV_HAS_DRAW_TRI_FILL

Support gslc_DrvDrawFillTriangle()

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 579

9.49.2.13 DRV_HAS_DRAW_TRI_FRAME

#define DRV_HAS_DRAW_TRI_FRAME

Support gslc_DrvDrawFrameTriangle()

9.49.2.14 DRV_OVERRIDE_TXT_ALIGN

#define DRV_OVERRIDE_TXT_ALIGN

Driver provides text alignment.

9.49.3 Function Documentation

9.49.3.1 gslc_DrvAdaptColorToRaw()

uint16_t gslc_DrvAdaptColorToRaw (
gslc_tsColor nCol )

9.49.3.2 gslc_DrvDestruct()

void gslc_DrvDestruct (
gslc_tsGui ∗ pGui )

Free up any members associated with the driver.

• Eg. renderers, windows, background surfaces, etc.

Parameters

in pGui Pointer to GUI

Returns

none

Generated by Doxygen
580 File Documentation

9.49.3.3 gslc_DrvDrawBkgnd()

void gslc_DrvDrawBkgnd (
gslc_tsGui ∗ pGui )

Copy the background image to destination screen.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.49.3.4 gslc_DrvDrawBmp24FromMem()

void gslc_DrvDrawBmp24FromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a color 24-bit depth bitmap from a memory array.

• Note that users must convert images from their native format (eg. BMP, PNG, etc.) into a C array.
Please refer to the following guide for details: https://github.com/ImpulseAdventure/GU←-
Islice/wiki/Display-Images-from-FLASH
• The converted file (c array) can then be included in the sketch.

Parameters

in pGui Pointer to GUI


in nDstX X coord for copy
in nDstY Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Returns

none

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 581

9.49.3.5 gslc_DrvDrawBmp24FromSD()

void gslc_DrvDrawBmp24FromSD (
gslc_tsGui ∗ pGui,
const char ∗ filename,
uint16_t x,
uint16_t y )

Draw a color 24-bit depth bitmap from SD card.

Parameters

in pGui Pointer to GUI


in filename Filename on SD card (usually in form "/pic.bmp")
in x X coordinate to draw bitmap
in y Y coordinate to draw bitmap

Returns

none

9.49.3.6 gslc_DrvDrawFillCircle()

bool gslc_DrvDrawFillCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a filled circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to fill

Returns

true if success, false if error

Generated by Doxygen
582 File Documentation

9.49.3.7 gslc_DrvDrawFillRect()

bool gslc_DrvDrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

true if success, false if error

9.49.3.8 gslc_DrvDrawFillRoundRect()

bool gslc_DrvDrawFillRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a filled rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nRadius Radius for rounded corners
in nCol Color RGB value to fill

Returns

true if success, false if error

9.49.3.9 gslc_DrvDrawFillTriangle()

bool gslc_DrvDrawFillTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 583

int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a filled triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to fill

Returns

true if success, false if error

9.49.3.10 gslc_DrvDrawFrameCircle()

bool gslc_DrvDrawFrameCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a framed circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to frame

Returns

true if success, false if error

Generated by Doxygen
584 File Documentation

9.49.3.11 gslc_DrvDrawFrameRect()

bool gslc_DrvDrawFrameRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value to frame

Returns

true if success, false if error

9.49.3.12 gslc_DrvDrawFrameRoundRect()

bool gslc_DrvDrawFrameRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a framed rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nRadius Radius for rounded corners
in nCol Color RGB value to frame

Returns

true if success, false if error

9.49.3.13 gslc_DrvDrawFrameTriangle()

bool gslc_DrvDrawFrameTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 585

int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a framed triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to frame

Returns

true if success, false if error

9.49.3.14 gslc_DrvDrawImage()

bool gslc_DrvDrawImage (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
gslc_tsImgRef sImgRef )

Copy all of source image to destination screen at specified coordinate.

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in sImgRef Image reference

Returns

true if success, false if fail

Generated by Doxygen
586 File Documentation

9.49.3.15 gslc_DrvDrawLine()

bool gslc_DrvDrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw a line.

Parameters

in pGui Pointer to GUI


in nX0 Line start (X coordinate)
in nY0 Line start (Y coordinate)
in nX1 Line finish (X coordinate)
in nY1 Line finish (Y coordinate)
in nCol Color RGB value to draw

Returns

true if success, false if error

9.49.3.16 gslc_DrvDrawMonoFromMem()

void gslc_DrvDrawMonoFromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a monochrome bitmap from a memory array.

• Draw from the bitmap buffer using the foreground color defined in the header (unset bits are transparent)

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 587

Returns

none

9.49.3.17 gslc_DrvDrawPoint()

bool gslc_DrvDrawPoint (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in nX X coordinate of point
in nY Y coordinate of point
in nCol Color RGB value to draw

Returns

true if success, false if error

9.49.3.18 gslc_DrvDrawPoints()

bool gslc_DrvDrawPoints (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ asPt,
uint16_t nNumPt,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in asPt Array of points to draw
in n←- Number of points in array
NumPt
in nCol Color RGB value to draw

Returns

true if success, false if error

Generated by Doxygen
588 File Documentation

9.49.3.19 gslc_DrvDrawTxt()

bool gslc_DrvDrawTxt (
gslc_tsGui ∗ pGui,
int16_t nTxtX,
int16_t nTxtY,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string at the given coordinate.

Parameters

in pGui Pointer to GUI


in nTxtX X coordinate of top-left text string
in nTxtY Y coordinate of top-left text string
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg unused in ADAGFX, defaults to black

Returns

true if success, false if failure

9.49.3.20 gslc_DrvFontAdd()

const void∗ gslc_DrvFontAdd (


gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font from a resource and return pointer to it.

Parameters

in eFontRefType Font reference type (GSLC_FONTREF_PTR for Arduino)


in pvFontRef Font reference pointer (Pointer to the GFXFont array)
in nFontSz Typeface size to use

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 589

Returns

Void ptr to driver-specific font if load was successful, NULL otherwise

9.49.3.21 gslc_DrvFontsDestruct()

void gslc_DrvFontsDestruct (
gslc_tsGui ∗ pGui )

Release all fonts defined in the GUI.

Parameters

in pGui Pointer to GUI

Returns

none

9.49.3.22 gslc_DrvGetDriverDisp()

void∗ gslc_DrvGetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

9.49.3.23 gslc_DrvGetDriverTouch()

void∗ gslc_DrvGetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

Generated by Doxygen
590 File Documentation

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

9.49.3.24 gslc_DrvGetNameDisp()

const char∗ gslc_DrvGetNameDisp (


gslc_tsGui ∗ pGui )

Get the display driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.49.3.25 gslc_DrvGetNameTouch()

const char∗ gslc_DrvGetNameTouch (


gslc_tsGui ∗ pGui )

Get the touch driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 591

9.49.3.26 gslc_DrvGetTouch()

bool gslc_DrvGetTouch (
gslc_tsGui ∗ pGui,
int16_t ∗ pnX,
int16_t ∗ pnY,
uint16_t ∗ pnPress,
gslc_teInputRawEvent ∗ peInputEvent,
int16_t ∗ pnInputVal )

Get the last touch event from the internal touch handler.

Parameters

in pGui Pointer to GUI


out pnX Ptr to X coordinate of last touch event
out pnY Ptr to Y coordinate of last touch event
out pnPress Ptr to Pressure level of last touch event (0 for none, 1 for touch)
out peInputEvent Indication of event type
out pnInputVal Additional data for event type

Returns

true if an event was detected or false otherwise

9.49.3.27 gslc_DrvGetTxtSize()

bool gslc_DrvGetTxtSize (
gslc_tsGui ∗ pGui,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
int16_t ∗ pnTxtX,
int16_t ∗ pnTxtY,
uint16_t ∗ pnTxtSzW,
uint16_t ∗ pnTxtSzH )

Get the extent (width and height) of a text string.

Parameters

in pGui Pointer to GUI


in pFont Ptr to Font structure
in pStr String to display
in eTxtFlags Flags associated with text string
out pnTxtX Ptr to offset X of text
out pnTxtY Ptr to offset Y of text
out pnTxtSzW Ptr to width of text
out pnTxtSzH Ptr to height of text

Generated by Doxygen
592 File Documentation

Returns

true if success, false if failure

9.49.3.28 gslc_DrvImageDestruct()

void gslc_DrvImageDestruct (
void ∗ pvImg )

Release an image surface.

Parameters
in pvImg Void ptr to image

Returns

none

9.49.3.29 gslc_DrvInit()

bool gslc_DrvInit (
gslc_tsGui ∗ pGui )

Initialize the SDL library.

• Performs clean startup workaround (if enabled)

• Configures video mode

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_DrvInit(). This can be done with gslc_←-
DrvInitEnv() or manually in user function.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 593

9.49.3.30 gslc_DrvInitTouch()

bool gslc_DrvInitTouch (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.49.3.31 gslc_DrvInitTs()

bool gslc_DrvInitTs (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.49.3.32 gslc_DrvLoadImage()

void∗ gslc_DrvLoadImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Load a bitmap (∗.bmp) and create a new image resource.

Transparency is enabled by GSLC_BMP_TRANS_EN through use of color (GSLC_BMP_TRANS_RGB).

Generated by Doxygen
594 File Documentation

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

Image pointer (surface/texture) or NULL if error

9.49.3.33 gslc_DrvPageFlipNow()

void gslc_DrvPageFlipNow (
gslc_tsGui ∗ pGui )

Force a page flip to occur.

This generally copies active screen surface to the display.

Parameters

in pGui Pointer to GUI

Returns

none

9.49.3.34 gslc_DrvRotate()

bool gslc_DrvRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Change rotation, automatically adapt touchscreen axes swap/flip.

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if successful

Generated by Doxygen
9.49 src/GUIslice_drv_adagfx.h File Reference 595

9.49.3.35 gslc_DrvSetBkgndColor()

bool gslc_DrvSetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

9.49.3.36 gslc_DrvSetBkgndImage()

bool gslc_DrvSetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

true if success, false if fail

9.49.3.37 gslc_DrvSetClipRect()

bool gslc_DrvSetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for future drawing updates.

Generated by Doxygen
596 File Documentation

Parameters

in pGui Pointer to GUI


in pRect Rectangular region to constrain edits

Returns

true if success, false if error

9.49.3.38 gslc_DrvSetElemImageGlow()

bool gslc_DrvSetElemImageGlow (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's glow-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.49.3.39 gslc_DrvSetElemImageNorm()

bool gslc_DrvSetElemImageNorm (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's normal-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Generated by Doxygen
9.50 src/GUIslice_drv_m5stack.cpp File Reference 597

Returns

true if success, false if error

9.50 src/GUIslice_drv_m5stack.cpp File Reference

#include "GUIslice_config.h"
Include dependency graph for GUIslice_drv_m5stack.cpp:

src/GUIslice_drv_m5stack.cpp

GUIslice_config.h

9.51 src/GUIslice_drv_m5stack.h File Reference

GUIslice library (driver layer for M5stack)

#include "GUIslice.h"
#include <stdio.h>
Include dependency graph for GUIslice_drv_m5stack.h:

src/GUIslice_drv_m5stack.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Data Structures

• struct gslc_tsDriver

Generated by Doxygen
598 File Documentation

Macros

• #define DRV_HAS_DRAW_POINT
Support gslc_DrvDrawPoint()
• #define DRV_HAS_DRAW_POINTS
Support gslc_DrvDrawPoints()
• #define DRV_HAS_DRAW_LINE
Support gslc_DrvDrawLine()
• #define DRV_HAS_DRAW_RECT_FRAME
Support gslc_DrvDrawFrameRect()
• #define DRV_HAS_DRAW_RECT_FILL
Support gslc_DrvDrawFillRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FRAME
Support gslc_DrvDrawFrameRoundRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FILL
Support gslc_DrvDrawFillRoundRect()
• #define DRV_HAS_DRAW_CIRCLE_FRAME
Support gslc_DrvDrawFrameCircle()
• #define DRV_HAS_DRAW_CIRCLE_FILL
Support gslc_DrvDrawFillCircle()
• #define DRV_HAS_DRAW_TRI_FRAME
Support gslc_DrvDrawFrameTriangle()
• #define DRV_HAS_DRAW_TRI_FILL
Support gslc_DrvDrawFillTriangle()
• #define DRV_HAS_DRAW_TEXT
Support gslc_DrvDrawTxt()
• #define DRV_HAS_DRAW_BMP_MEM
Support gslc_DrvDrawBmp24FromMem()
• #define DRV_OVERRIDE_TXT_ALIGN
Driver provides text alignment.

Functions

• bool gslc_DrvInit (gslc_tsGui ∗pGui)


Initialize the SDL library.
• bool gslc_DrvInitTs (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• void gslc_DrvDestruct (gslc_tsGui ∗pGui)
Free up any members associated with the driver.
• const char ∗ gslc_DrvGetNameDisp (gslc_tsGui ∗pGui)
Get the display driver name.
• const char ∗ gslc_DrvGetNameTouch (gslc_tsGui ∗pGui)
Get the touch driver name.
• void ∗ gslc_DrvGetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_DrvGetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• void ∗ gslc_DrvLoadImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Load a bitmap (∗.bmp) and create a new image resource.
• bool gslc_DrvSetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 599

Configure the background to use a bitmap image.


• bool gslc_DrvSetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_DrvSetElemImageNorm (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.
• bool gslc_DrvSetElemImageGlow (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's glow-state image.
• void gslc_DrvImageDestruct (void ∗pvImg)
Release an image surface.
• bool gslc_DrvSetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for future drawing updates.
• const void ∗ gslc_DrvFontAdd (gslc_teFontRefType eFontRefType, const void ∗pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
• void gslc_DrvFontsDestruct (gslc_tsGui ∗pGui)
Release all fonts defined in the GUI.
• bool gslc_DrvGetTxtSize (gslc_tsGui ∗pGui, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxt←-
Flags, int16_t ∗pnTxtX, int16_t ∗pnTxtY, uint16_t ∗pnTxtSzW, uint16_t ∗pnTxtSzH)
Get the extent (width and height) of a text string.
• bool gslc_DrvDrawTxt (gslc_tsGui ∗pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont ∗pFont, const char ∗pStr,
gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
• bool gslc_DrvDrawTxtAlign (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int8_t e←-
TxtAlign, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor
colBg)
Draw a text string in a bounding box using the specified alignment.
• void gslc_DrvPageFlipNow (gslc_tsGui ∗pGui)
Force a page flip to occur.
• bool gslc_DrvDrawPoint (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawPoints (gslc_tsGui ∗pGui, gslc_tsPt ∗asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• bool gslc_DrvDrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• bool gslc_DrvDrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor n←-
Col)
Draw a framed rounded rectangle.
• bool gslc_DrvDrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• bool gslc_DrvDrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor
nCol)
Draw a line.
• bool gslc_DrvDrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_ts←-
Color nCol)
Draw a framed circle.
• bool gslc_DrvDrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a filled circle.
• bool gslc_DrvDrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1,
int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.

Generated by Doxygen
600 File Documentation

• bool gslc_DrvDrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• bool gslc_DrvDrawImage (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)
Copy all of source image to destination screen at specified coordinate.
• void gslc_DrvDrawMonoFromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char ∗p←-
Bitmap, bool bProgMem)
Draw a monochrome bitmap from a memory array.
• void gslc_DrvDrawBmp24FromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char
∗pBitmap, bool bProgMem)
Draw a color 24-bit depth bitmap from a memory array.
• void gslc_DrvDrawBkgnd (gslc_tsGui ∗pGui)
Copy the background image to destination screen.
• bool gslc_DrvRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
• uint16_t gslc_DrvAdaptColorToRaw (gslc_tsColor nCol)

Variables

• const char GSLC_PMEM ERRSTR_NULL [ ]


• const char GSLC_PMEM ERRSTR_PXD_NULL [ ]

9.51.1 Detailed Description

GUIslice library (driver layer for M5stack)

9.51.2 Macro Definition Documentation

9.51.2.1 DRV_HAS_DRAW_BMP_MEM

#define DRV_HAS_DRAW_BMP_MEM

Support gslc_DrvDrawBmp24FromMem()

9.51.2.2 DRV_HAS_DRAW_CIRCLE_FILL

#define DRV_HAS_DRAW_CIRCLE_FILL

Support gslc_DrvDrawFillCircle()

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 601

9.51.2.3 DRV_HAS_DRAW_CIRCLE_FRAME

#define DRV_HAS_DRAW_CIRCLE_FRAME

Support gslc_DrvDrawFrameCircle()

9.51.2.4 DRV_HAS_DRAW_LINE

#define DRV_HAS_DRAW_LINE

Support gslc_DrvDrawLine()

9.51.2.5 DRV_HAS_DRAW_POINT

#define DRV_HAS_DRAW_POINT

Support gslc_DrvDrawPoint()

9.51.2.6 DRV_HAS_DRAW_POINTS

#define DRV_HAS_DRAW_POINTS

Support gslc_DrvDrawPoints()

9.51.2.7 DRV_HAS_DRAW_RECT_FILL

#define DRV_HAS_DRAW_RECT_FILL

Support gslc_DrvDrawFillRect()

9.51.2.8 DRV_HAS_DRAW_RECT_FRAME

#define DRV_HAS_DRAW_RECT_FRAME

Support gslc_DrvDrawFrameRect()

Generated by Doxygen
602 File Documentation

9.51.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL

#define DRV_HAS_DRAW_RECT_ROUND_FILL

Support gslc_DrvDrawFillRoundRect()

9.51.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME

#define DRV_HAS_DRAW_RECT_ROUND_FRAME

Support gslc_DrvDrawFrameRoundRect()

9.51.2.11 DRV_HAS_DRAW_TEXT

#define DRV_HAS_DRAW_TEXT

Support gslc_DrvDrawTxt()

9.51.2.12 DRV_HAS_DRAW_TRI_FILL

#define DRV_HAS_DRAW_TRI_FILL

Support gslc_DrvDrawFillTriangle()

9.51.2.13 DRV_HAS_DRAW_TRI_FRAME

#define DRV_HAS_DRAW_TRI_FRAME

Support gslc_DrvDrawFrameTriangle()

9.51.2.14 DRV_OVERRIDE_TXT_ALIGN

#define DRV_OVERRIDE_TXT_ALIGN

Driver provides text alignment.

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 603

9.51.3 Function Documentation

9.51.3.1 gslc_DrvAdaptColorToRaw()

uint16_t gslc_DrvAdaptColorToRaw (
gslc_tsColor nCol )

9.51.3.2 gslc_DrvDestruct()

void gslc_DrvDestruct (
gslc_tsGui ∗ pGui )

Free up any members associated with the driver.

• Eg. renderers, windows, background surfaces, etc.

Parameters

in pGui Pointer to GUI

Returns

none

9.51.3.3 gslc_DrvDrawBkgnd()

void gslc_DrvDrawBkgnd (
gslc_tsGui ∗ pGui )

Copy the background image to destination screen.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

Generated by Doxygen
604 File Documentation

9.51.3.4 gslc_DrvDrawBmp24FromMem()

void gslc_DrvDrawBmp24FromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a color 24-bit depth bitmap from a memory array.

• Note that users must convert images from their native format (eg. BMP, PNG, etc.) into a C array.
Please refer to the following guide for details: https://github.com/ImpulseAdventure/GU←-
Islice/wiki/Display-Images-from-FLASH
• The converted file (c array) can then be included in the sketch.

Parameters

in pGui Pointer to GUI


in nDstX X coord for copy
in nDstY Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Returns

none

9.51.3.5 gslc_DrvDrawFillCircle()

bool gslc_DrvDrawFillCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a filled circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to fill

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 605

Returns

true if success, false if error

9.51.3.6 gslc_DrvDrawFillRect()

bool gslc_DrvDrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

true if success, false if error

9.51.3.7 gslc_DrvDrawFillRoundRect()

bool gslc_DrvDrawFillRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a filled rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nRadius Radius for rounded corners
in nCol Color RGB value to fill

Returns

true if success, false if error

Generated by Doxygen
606 File Documentation

9.51.3.8 gslc_DrvDrawFillTriangle()

bool gslc_DrvDrawFillTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a filled triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to fill

Returns

true if success, false if error

9.51.3.9 gslc_DrvDrawFrameCircle()

bool gslc_DrvDrawFrameCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a framed circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to frame

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 607

Returns

true if success, false if error

9.51.3.10 gslc_DrvDrawFrameRect()

bool gslc_DrvDrawFrameRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value to frame

Returns

true if success, false if error

9.51.3.11 gslc_DrvDrawFrameRoundRect()

bool gslc_DrvDrawFrameRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a framed rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nRadius Radius for rounded corners
in nCol Color RGB value to frame

Returns

true if success, false if error

Generated by Doxygen
608 File Documentation

9.51.3.12 gslc_DrvDrawFrameTriangle()

bool gslc_DrvDrawFrameTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a framed triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to frame

Returns

true if success, false if error

9.51.3.13 gslc_DrvDrawImage()

bool gslc_DrvDrawImage (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
gslc_tsImgRef sImgRef )

Copy all of source image to destination screen at specified coordinate.

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in sImgRef Image reference

Returns

true if success, false if fail

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 609

9.51.3.14 gslc_DrvDrawLine()

bool gslc_DrvDrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw a line.

Parameters

in pGui Pointer to GUI


in nX0 Line start (X coordinate)
in nY0 Line start (Y coordinate)
in nX1 Line finish (X coordinate)
in nY1 Line finish (Y coordinate)
in nCol Color RGB value to draw

Returns

true if success, false if error

9.51.3.15 gslc_DrvDrawMonoFromMem()

void gslc_DrvDrawMonoFromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a monochrome bitmap from a memory array.

• Draw from the bitmap buffer using the foreground color defined in the header (unset bits are transparent)

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Generated by Doxygen
610 File Documentation

Returns

none

9.51.3.16 gslc_DrvDrawPoint()

bool gslc_DrvDrawPoint (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in nX X coordinate of point
in nY Y coordinate of point
in nCol Color RGB value to draw

Returns

true if success, false if error

9.51.3.17 gslc_DrvDrawPoints()

bool gslc_DrvDrawPoints (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ asPt,
uint16_t nNumPt,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in asPt Array of points to draw
in n←- Number of points in array
NumPt
in nCol Color RGB value to draw

Returns

true if success, false if error

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 611

9.51.3.18 gslc_DrvDrawTxt()

bool gslc_DrvDrawTxt (
gslc_tsGui ∗ pGui,
int16_t nTxtX,
int16_t nTxtY,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string at the given coordinate.

Parameters

in pGui Pointer to GUI


in nTxtX X coordinate of top-left text string
in nTxtY Y coordinate of top-left text string
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg unused in m5stack, defaults to black

Returns

true if success, false if failure

9.51.3.19 gslc_DrvDrawTxtAlign()

bool gslc_DrvDrawTxtAlign (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int8_t eTxtAlign,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string in a bounding box using the specified alignment.

Generated by Doxygen
612 File Documentation

Parameters

in pGui Pointer to GUI


in nX0 X coordinate of top-left of bounding box
in nY0 Y coordinate of top-left of bounding box
in nX1 X coordinate of bot-right of bounding box
in nY1 Y coordinate of bot-right of bounding box
in eTxtAlign Alignment mode]
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg unused in m5stack, defaults to black

Returns

true if success, false if failure

9.51.3.20 gslc_DrvFontAdd()

const void∗ gslc_DrvFontAdd (


gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font from a resource and return pointer to it.

Parameters

in eFontRefType Font reference type (GSLC_FONTREF_PTR for Arduino)


in pvFontRef Font reference pointer (Pointer to the GFXFont array)
in nFontSz Typeface size to use

Returns

Void ptr to driver-specific font if load was successful, NULL otherwise

9.51.3.21 gslc_DrvFontsDestruct()

void gslc_DrvFontsDestruct (
gslc_tsGui ∗ pGui )

Release all fonts defined in the GUI.

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 613

Parameters

in pGui Pointer to GUI

Returns

none

9.51.3.22 gslc_DrvGetDriverDisp()

void∗ gslc_DrvGetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

9.51.3.23 gslc_DrvGetDriverTouch()

void∗ gslc_DrvGetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
614 File Documentation

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

9.51.3.24 gslc_DrvGetNameDisp()

const char∗ gslc_DrvGetNameDisp (


gslc_tsGui ∗ pGui )

Get the display driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.51.3.25 gslc_DrvGetNameTouch()

const char∗ gslc_DrvGetNameTouch (


gslc_tsGui ∗ pGui )

Get the touch driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.51.3.26 gslc_DrvGetTxtSize()

bool gslc_DrvGetTxtSize (
gslc_tsGui ∗ pGui,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 615

int16_t ∗ pnTxtX,
int16_t ∗ pnTxtY,
uint16_t ∗ pnTxtSzW,
uint16_t ∗ pnTxtSzH )

Get the extent (width and height) of a text string.

Parameters

in pGui Pointer to GUI


in pFont Ptr to Font structure
in pStr String to display
in eTxtFlags Flags associated with text string
out pnTxtX Ptr to offset X of text
out pnTxtY Ptr to offset Y of text
out pnTxtSzW Ptr to width of text
out pnTxtSzH Ptr to height of text

Returns

true if success, false if failure

9.51.3.27 gslc_DrvImageDestruct()

void gslc_DrvImageDestruct (
void ∗ pvImg )

Release an image surface.

Parameters
in pvImg Void ptr to image

Returns

none

9.51.3.28 gslc_DrvInit()

bool gslc_DrvInit (
gslc_tsGui ∗ pGui )

Initialize the SDL library.

• Performs clean startup workaround (if enabled)

Generated by Doxygen
616 File Documentation

• Configures video mode

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_DrvInit(). This can be done with gslc_←-
DrvInitEnv() or manually in user function.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.51.3.29 gslc_DrvInitTs()

bool gslc_DrvInitTs (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.51.3.30 gslc_DrvLoadImage()

void∗ gslc_DrvLoadImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Load a bitmap (∗.bmp) and create a new image resource.

Transparency is enabled by GSLC_BMP_TRANS_EN through use of color (GSLC_BMP_TRANS_RGB).

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 617

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

Image pointer (surface/texture) or NULL if error

9.51.3.31 gslc_DrvPageFlipNow()

void gslc_DrvPageFlipNow (
gslc_tsGui ∗ pGui )

Force a page flip to occur.

This generally copies active screen surface to the display.

Parameters

in pGui Pointer to GUI

Returns

none

9.51.3.32 gslc_DrvRotate()

bool gslc_DrvRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Change rotation, automatically adapt touchscreen axes swap/flip.

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if successful

Generated by Doxygen
618 File Documentation

9.51.3.33 gslc_DrvSetBkgndColor()

bool gslc_DrvSetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

9.51.3.34 gslc_DrvSetBkgndImage()

bool gslc_DrvSetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

true if success, false if fail

9.51.3.35 gslc_DrvSetClipRect()

bool gslc_DrvSetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for future drawing updates.

Generated by Doxygen
9.51 src/GUIslice_drv_m5stack.h File Reference 619

Parameters

in pGui Pointer to GUI


in pRect Rectangular region to constrain edits

Returns

true if success, false if error

9.51.3.36 gslc_DrvSetElemImageGlow()

bool gslc_DrvSetElemImageGlow (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's glow-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.51.3.37 gslc_DrvSetElemImageNorm()

bool gslc_DrvSetElemImageNorm (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's normal-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Generated by Doxygen
620 File Documentation

Returns

true if success, false if error

9.51.4 Variable Documentation

9.51.4.1 ERRSTR_NULL

const char GSLC_PMEM ERRSTR_NULL[ ]

9.51.4.2 ERRSTR_PXD_NULL

const char GSLC_PMEM ERRSTR_PXD_NULL[ ]

9.52 src/GUIslice_drv_sdl.c File Reference

#include "GUIslice_config.h"
Include dependency graph for GUIslice_drv_sdl.c:

src/GUIslice_drv_sdl.c

GUIslice_config.h

9.53 src/GUIslice_drv_sdl.h File Reference

GUIslice library (driver layer for LINUX / SDL)

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 621

#include "GUIslice.h"
#include <stdio.h>
Include dependency graph for GUIslice_drv_sdl.h:

src/GUIslice_drv_sdl.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Data Structures

• struct gslc_tsDriver

Macros

• #define DRV_HAS_DRAW_POINT
Support gslc_DrvDrawPoint()
• #define DRV_OVERRIDE_TXT_ALIGN
Driver provides text alignment.

Functions

• bool gslc_DrvInit (gslc_tsGui ∗pGui)


Initialize the SDL library.
• void gslc_DrvDestruct (gslc_tsGui ∗pGui)
Free up any members associated with the driver.
• const char ∗ gslc_DrvGetNameDisp (gslc_tsGui ∗pGui)
Get the display driver name.
• const char ∗ gslc_DrvGetNameTouch (gslc_tsGui ∗pGui)
Get the touch driver name.
• void ∗ gslc_DrvGetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_DrvGetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• void ∗ gslc_DrvLoadImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Load a bitmap (∗.bmp) and create a new image resource.
• bool gslc_DrvSetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_DrvSetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_DrvSetElemImageNorm (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.

Generated by Doxygen
622 File Documentation

• bool gslc_DrvSetElemImageGlow (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)


Set an element's glow-state image.
• void gslc_DrvImageDestruct (void ∗pvImg)
Release an image surface.
• bool gslc_DrvSetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for future drawing updates.
• const void ∗ gslc_DrvFontAdd (gslc_teFontRefType eFontRefType, const void ∗pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
• void gslc_DrvFontsDestruct (gslc_tsGui ∗pGui)
Release all fonts defined in the GUI.
• bool gslc_DrvGetTxtSize (gslc_tsGui ∗pGui, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxt←-
Flags, int16_t ∗pnTxtX, int16_t ∗pnTxtY, uint16_t ∗pnTxtSzW, uint16_t ∗pnTxtSzH)
Get the extent (width and height) of a text string.
• bool gslc_DrvDrawTxt (gslc_tsGui ∗pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont ∗pFont, const char ∗pStr,
gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
• void gslc_DrvPageFlipNow (gslc_tsGui ∗pGui)
Force a page flip to occur.
• bool gslc_DrvDrawPoint (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawPoints (gslc_tsGui ∗pGui, gslc_tsPt ∗asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• bool gslc_DrvDrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• bool gslc_DrvDrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor
nCol)
Draw a line.
• bool gslc_DrvDrawImage (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)
Copy all of source image to destination screen at specified coordinate.
• void gslc_DrvDrawBkgnd (gslc_tsGui ∗pGui)
Copy the background image to destination screen.
• bool gslc_DrvGetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRaw←-
Event ∗peInputEvent, int16_t ∗pnInputVal)
Get the last touch event from the SDL_Event handler.
• bool gslc_DrvRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
• bool gslc_DrvCleanStart (const char ∗sTTY)
Ensure SDL initializes cleanly to workaround possible issues if previous SDL application failed to close down grace-
fully.
• void gslc_DrvReportInfoPre ()
Report driver debug info (before initialization)
• void gslc_DrvReportInfoPost ()
Report driver debug info (after initialization)
• SDL_Rect gslc_DrvAdaptRect (gslc_tsRect rRect)
Translate a gslc_tsRect into an SDL_Rect.
• SDL_Color gslc_DrvAdaptColor (gslc_tsColor sCol)
Translate a gslc_tsColor into an SDL_Color.
• bool gslc_DrvInitTouch (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 623

9.53.1 Detailed Description

GUIslice library (driver layer for LINUX / SDL)

9.53.2 Macro Definition Documentation

9.53.2.1 DRV_HAS_DRAW_POINT

#define DRV_HAS_DRAW_POINT

Support gslc_DrvDrawPoint()

9.53.2.2 DRV_OVERRIDE_TXT_ALIGN

#define DRV_OVERRIDE_TXT_ALIGN

Driver provides text alignment.

9.53.3 Function Documentation

9.53.3.1 gslc_DrvAdaptColor()

SDL_Color gslc_DrvAdaptColor (
gslc_tsColor sCol )

Translate a gslc_tsColor into an SDL_Color.

Parameters

in sCol gslc_tsColor

Returns

Converted SDL_Color

Generated by Doxygen
624 File Documentation

9.53.3.2 gslc_DrvAdaptRect()

SDL_Rect gslc_DrvAdaptRect (
gslc_tsRect rRect )

Translate a gslc_tsRect into an SDL_Rect.

Parameters
in rRect gslc_tsRect

Returns

Converted SDL_Rect

9.53.3.3 gslc_DrvCleanStart()

bool gslc_DrvCleanStart (
const char ∗ sTTY )

Ensure SDL initializes cleanly to workaround possible issues if previous SDL application failed to close down grace-
fully.

Parameters

in sTTY Terminal device (eg. "/dev/tty0")

Returns

true if success

9.53.3.4 gslc_DrvDestruct()

void gslc_DrvDestruct (
gslc_tsGui ∗ pGui )

Free up any members associated with the driver.

• Eg. renderers, windows, background surfaces, etc.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 625

Returns

none

9.53.3.5 gslc_DrvDrawBkgnd()

void gslc_DrvDrawBkgnd (
gslc_tsGui ∗ pGui )

Copy the background image to destination screen.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.53.3.6 gslc_DrvDrawFillRect()

bool gslc_DrvDrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

true if success, false if error

9.53.3.7 gslc_DrvDrawFrameRect()

bool gslc_DrvDrawFrameRect (
gslc_tsGui ∗ pGui,

Generated by Doxygen
626 File Documentation

gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 627

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value to frame

Returns

true if success, false if error

9.53.3.8 gslc_DrvDrawImage()

bool gslc_DrvDrawImage (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
gslc_tsImgRef sImgRef )

Copy all of source image to destination screen at specified coordinate.

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in sImgRef Image reference

Returns

true if success, false if fail

9.53.3.9 gslc_DrvDrawLine()

bool gslc_DrvDrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw a line.

Generated by Doxygen
628 File Documentation

Parameters

in pGui Pointer to GUI


in nX0 Line start (X coordinate)
in nY0 Line start (Y coordinate)
in nX1 Line finish (X coordinate)
in nY1 Line finish (Y coordinate)
in nCol Color RGB value to draw

Returns

true if success, false if error

9.53.3.10 gslc_DrvDrawPoint()

bool gslc_DrvDrawPoint (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in nX X coordinate of point
in nY Y coordinate of point
in nCol Color RGB value to draw

Returns

true if success, false if error

9.53.3.11 gslc_DrvDrawPoints()

bool gslc_DrvDrawPoints (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ asPt,
uint16_t nNumPt,
gslc_tsColor nCol )

Draw a point.

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 629

Parameters

in pGui Pointer to GUI


in asPt Array of points to draw
in n←- Number of points in array
NumPt
in nCol Color RGB value to draw

Returns

true if success, false if error

9.53.3.12 gslc_DrvDrawTxt()

bool gslc_DrvDrawTxt (
gslc_tsGui ∗ pGui,
int16_t nTxtX,
int16_t nTxtY,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string at the given coordinate.

Parameters

in pGui Pointer to GUI


in nTxtX X coordinate of top-left text string
in nTxtY Y coordinate of top-left text string
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg unused in SDL, defaults to black

Returns

true if success, false if failure

9.53.3.13 gslc_DrvFontAdd()

const void∗ gslc_DrvFontAdd (


gslc_teFontRefType eFontRefType,

Generated by Doxygen
630 File Documentation

const void ∗ pvFontRef,


uint16_t nFontSz )

Load a font from a resource and return pointer to it.

Parameters

in eFontRefType Font reference type (GSLC_FONTREF_FNAME for SDL)


in pvFontRef Font reference pointer (Pointer to the font filename)
in nFontSz Typeface size to use

Returns

Void ptr to driver-specific font if load was successful, NULL otherwise

9.53.3.14 gslc_DrvFontsDestruct()

void gslc_DrvFontsDestruct (
gslc_tsGui ∗ pGui )

Release all fonts defined in the GUI.

Parameters

in pGui Pointer to GUI

Returns

none

9.53.3.15 gslc_DrvGetDriverDisp()

void∗ gslc_DrvGetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 631

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

9.53.3.16 gslc_DrvGetDriverTouch()

void∗ gslc_DrvGetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

9.53.3.17 gslc_DrvGetNameDisp()

const char∗ gslc_DrvGetNameDisp (


gslc_tsGui ∗ pGui )

Get the display driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.53.3.18 gslc_DrvGetNameTouch()

const char∗ gslc_DrvGetNameTouch (


gslc_tsGui ∗ pGui )

Get the touch driver name.

Generated by Doxygen
632 File Documentation

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.53.3.19 gslc_DrvGetTouch()

bool gslc_DrvGetTouch (
gslc_tsGui ∗ pGui,
int16_t ∗ pnX,
int16_t ∗ pnY,
uint16_t ∗ pnPress,
gslc_teInputRawEvent ∗ peInputEvent,
int16_t ∗ pnInputVal )

Get the last touch event from the SDL_Event handler.

Parameters

in pGui Pointer to GUI


out pnX Ptr to X coordinate of last touch event
out pnY Ptr to Y coordinate of last touch event
out pnPress Ptr to Pressure level of last touch event (0 for none, 1 for touch)
out peInputEvent Indication of event type
out pnInputVal Additional data for event type

Returns

true if an event was detected or false otherwise

9.53.3.20 gslc_DrvGetTxtSize()

bool gslc_DrvGetTxtSize (
gslc_tsGui ∗ pGui,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
int16_t ∗ pnTxtX,
int16_t ∗ pnTxtY,
uint16_t ∗ pnTxtSzW,
uint16_t ∗ pnTxtSzH )

Get the extent (width and height) of a text string.

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 633

Parameters

in pGui Pointer to GUI


in pFont Ptr to Font structure
in pStr String to display
in eTxtFlags Flags associated with text string
out pnTxtX Ptr to offset X of text
out pnTxtY Ptr to offset Y of text
out pnTxtSzW Ptr to width of text
out pnTxtSzH Ptr to height of text

Returns

true if success, false if failure

9.53.3.21 gslc_DrvImageDestruct()

void gslc_DrvImageDestruct (
void ∗ pvImg )

Release an image surface.

Parameters
in pvImg Void ptr to image

Returns

none

9.53.3.22 gslc_DrvInit()

bool gslc_DrvInit (
gslc_tsGui ∗ pGui )

Initialize the SDL library.

• Performs clean startup workaround (if enabled)

• Configures video mode

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_DrvInit().

Generated by Doxygen
634 File Documentation

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.53.3.23 gslc_DrvInitTouch()

bool gslc_DrvInitTouch (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.53.3.24 gslc_DrvLoadImage()

void∗ gslc_DrvLoadImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Load a bitmap (∗.bmp) and create a new image resource.

Transparency is enabled by GSLC_BMP_TRANS_EN through use of color (GSLC_BMP_TRANS_RGB).

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

Image pointer (surface/texture/path) or NULL if error

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 635

9.53.3.25 gslc_DrvPageFlipNow()

void gslc_DrvPageFlipNow (
gslc_tsGui ∗ pGui )

Force a page flip to occur.

This generally copies active screen surface to the display.

Parameters

in pGui Pointer to GUI

Returns

none

9.53.3.26 gslc_DrvReportInfoPost()

void gslc_DrvReportInfoPost ( )

Report driver debug info (after initialization)

Returns

none

9.53.3.27 gslc_DrvReportInfoPre()

void gslc_DrvReportInfoPre ( )

Report driver debug info (before initialization)

Returns

none

9.53.3.28 gslc_DrvRotate()

bool gslc_DrvRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Change rotation, automatically adapt touchscreen axes swap/flip.

Generated by Doxygen
636 File Documentation

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if successful

9.53.3.29 gslc_DrvSetBkgndColor()

bool gslc_DrvSetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

9.53.3.30 gslc_DrvSetBkgndImage()

bool gslc_DrvSetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Generated by Doxygen
9.53 src/GUIslice_drv_sdl.h File Reference 637

Returns

true if success, false if fail

9.53.3.31 gslc_DrvSetClipRect()

bool gslc_DrvSetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for future drawing updates.

Parameters

in pGui Pointer to GUI


in pRect Rectangular region to constrain edits

Returns

true if success, false if error

9.53.3.32 gslc_DrvSetElemImageGlow()

bool gslc_DrvSetElemImageGlow (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's glow-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.53.3.33 gslc_DrvSetElemImageNorm()

bool gslc_DrvSetElemImageNorm (
gslc_tsGui ∗ pGui,

Generated by Doxygen
638 File Documentation

gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's normal-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.54 src/GUIslice_drv_tft_espi.cpp File Reference

#include "GUIslice_config.h"
Include dependency graph for GUIslice_drv_tft_espi.cpp:

src/GUIslice_drv_tft
_espi.cpp

GUIslice_config.h

9.55 src/GUIslice_drv_tft_espi.h File Reference

GUIslice library (driver layer for TFT-eSPI)

#include "GUIslice.h"
#include <stdio.h>

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 639

Include dependency graph for GUIslice_drv_tft_espi.h:

src/GUIslice_drv_tft
_espi.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Data Structures

• struct gslc_tsDriver

Macros

• #define GSLC_SPIFFS_EN
• #define DRV_HAS_DRAW_POINT
Support gslc_DrvDrawPoint()
• #define DRV_HAS_DRAW_POINTS
Support gslc_DrvDrawPoints()
• #define DRV_HAS_DRAW_LINE
Support gslc_DrvDrawLine()
• #define DRV_HAS_DRAW_RECT_FRAME
Support gslc_DrvDrawFrameRect()
• #define DRV_HAS_DRAW_RECT_FILL
Support gslc_DrvDrawFillRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FRAME
Support gslc_DrvDrawFrameRoundRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FILL
Support gslc_DrvDrawFillRoundRect()
• #define DRV_HAS_DRAW_CIRCLE_FRAME
Support gslc_DrvDrawFrameCircle()
• #define DRV_HAS_DRAW_CIRCLE_FILL
Support gslc_DrvDrawFillCircle()
• #define DRV_HAS_DRAW_TRI_FRAME
Support gslc_DrvDrawFrameTriangle()
• #define DRV_HAS_DRAW_TRI_FILL
Support gslc_DrvDrawFillTriangle()
• #define DRV_HAS_DRAW_TEXT
Support gslc_DrvDrawTxt()
• #define DRV_HAS_DRAW_BMP_MEM
Support gslc_DrvDrawBmp24FromMem()
• #define DRV_OVERRIDE_TXT_ALIGN
Driver provides text alignment.

Generated by Doxygen
640 File Documentation

Functions

• bool gslc_DrvInit (gslc_tsGui ∗pGui)


Initialize the SDL library.
• bool gslc_DrvInitTs (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• void gslc_DrvDestruct (gslc_tsGui ∗pGui)
Free up any members associated with the driver.
• const char ∗ gslc_DrvGetNameDisp (gslc_tsGui ∗pGui)
Get the display driver name.
• const char ∗ gslc_DrvGetNameTouch (gslc_tsGui ∗pGui)
Get the touch driver name.
• void ∗ gslc_DrvGetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_DrvGetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• void ∗ gslc_DrvLoadImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Load a bitmap (∗.bmp) and create a new image resource.
• bool gslc_DrvSetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
• bool gslc_DrvSetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_DrvSetElemImageNorm (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.
• bool gslc_DrvSetElemImageGlow (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's glow-state image.
• void gslc_DrvImageDestruct (void ∗pvImg)
Release an image surface.
• bool gslc_DrvSetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for future drawing updates.
• const void ∗ gslc_DrvFontAdd (gslc_teFontRefType eFontRefType, const void ∗pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
• void gslc_DrvFontsDestruct (gslc_tsGui ∗pGui)
Release all fonts defined in the GUI.
• bool gslc_DrvGetTxtSize (gslc_tsGui ∗pGui, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxt←-
Flags, int16_t ∗pnTxtX, int16_t ∗pnTxtY, uint16_t ∗pnTxtSzW, uint16_t ∗pnTxtSzH)
Get the extent (width and height) of a text string.
• bool gslc_DrvDrawTxt (gslc_tsGui ∗pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont ∗pFont, const char ∗pStr,
gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
• bool gslc_DrvDrawTxtAlign (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int8_t e←-
TxtAlign, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor
colBg)
Draw a text string in a bounding box using the specified alignment.
• void gslc_DrvPageFlipNow (gslc_tsGui ∗pGui)
Force a page flip to occur.
• bool gslc_DrvDrawPoint (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawPoints (gslc_tsGui ∗pGui, gslc_tsPt ∗asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 641

Draw a framed rectangle.


• bool gslc_DrvDrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• bool gslc_DrvDrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor n←-
Col)
Draw a framed rounded rectangle.
• bool gslc_DrvDrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• bool gslc_DrvDrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor
nCol)
Draw a line.
• bool gslc_DrvDrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_ts←-
Color nCol)
Draw a framed circle.
• bool gslc_DrvDrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a filled circle.
• bool gslc_DrvDrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1,
int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• bool gslc_DrvDrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• bool gslc_DrvDrawImage (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)
Copy all of source image to destination screen at specified coordinate.
• void gslc_DrvDrawMonoFromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char ∗p←-
Bitmap, bool bProgMem)
Draw a monochrome bitmap from a memory array.
• void gslc_DrvDrawBmp24FromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char
∗pBitmap, bool bProgMem)
Draw a color 24-bit depth bitmap from a memory array.
• void gslc_DrvDrawBkgnd (gslc_tsGui ∗pGui)
Copy the background image to destination screen.
• bool gslc_DrvRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
• uint16_t gslc_DrvAdaptColorToRaw (gslc_tsColor nCol)

9.55.1 Detailed Description

GUIslice library (driver layer for TFT-eSPI)

9.55.2 Macro Definition Documentation

9.55.2.1 DRV_HAS_DRAW_BMP_MEM

#define DRV_HAS_DRAW_BMP_MEM

Support gslc_DrvDrawBmp24FromMem()

Generated by Doxygen
642 File Documentation

9.55.2.2 DRV_HAS_DRAW_CIRCLE_FILL

#define DRV_HAS_DRAW_CIRCLE_FILL

Support gslc_DrvDrawFillCircle()

9.55.2.3 DRV_HAS_DRAW_CIRCLE_FRAME

#define DRV_HAS_DRAW_CIRCLE_FRAME

Support gslc_DrvDrawFrameCircle()

9.55.2.4 DRV_HAS_DRAW_LINE

#define DRV_HAS_DRAW_LINE

Support gslc_DrvDrawLine()

9.55.2.5 DRV_HAS_DRAW_POINT

#define DRV_HAS_DRAW_POINT

Support gslc_DrvDrawPoint()

9.55.2.6 DRV_HAS_DRAW_POINTS

#define DRV_HAS_DRAW_POINTS

Support gslc_DrvDrawPoints()

9.55.2.7 DRV_HAS_DRAW_RECT_FILL

#define DRV_HAS_DRAW_RECT_FILL

Support gslc_DrvDrawFillRect()

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 643

9.55.2.8 DRV_HAS_DRAW_RECT_FRAME

#define DRV_HAS_DRAW_RECT_FRAME

Support gslc_DrvDrawFrameRect()

9.55.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL

#define DRV_HAS_DRAW_RECT_ROUND_FILL

Support gslc_DrvDrawFillRoundRect()

9.55.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME

#define DRV_HAS_DRAW_RECT_ROUND_FRAME

Support gslc_DrvDrawFrameRoundRect()

9.55.2.11 DRV_HAS_DRAW_TEXT

#define DRV_HAS_DRAW_TEXT

Support gslc_DrvDrawTxt()

9.55.2.12 DRV_HAS_DRAW_TRI_FILL

#define DRV_HAS_DRAW_TRI_FILL

Support gslc_DrvDrawFillTriangle()

9.55.2.13 DRV_HAS_DRAW_TRI_FRAME

#define DRV_HAS_DRAW_TRI_FRAME

Support gslc_DrvDrawFrameTriangle()

Generated by Doxygen
644 File Documentation

9.55.2.14 DRV_OVERRIDE_TXT_ALIGN

#define DRV_OVERRIDE_TXT_ALIGN

Driver provides text alignment.

9.55.2.15 GSLC_SPIFFS_EN

#define GSLC_SPIFFS_EN

9.55.3 Function Documentation

9.55.3.1 gslc_DrvAdaptColorToRaw()

uint16_t gslc_DrvAdaptColorToRaw (
gslc_tsColor nCol )

9.55.3.2 gslc_DrvDestruct()

void gslc_DrvDestruct (
gslc_tsGui ∗ pGui )

Free up any members associated with the driver.

• Eg. renderers, windows, background surfaces, etc.

Parameters

in pGui Pointer to GUI

Returns

none

9.55.3.3 gslc_DrvDrawBkgnd()

void gslc_DrvDrawBkgnd (
gslc_tsGui ∗ pGui )

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 645

Copy the background image to destination screen.

Generated by Doxygen
646 File Documentation

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.55.3.4 gslc_DrvDrawBmp24FromMem()

void gslc_DrvDrawBmp24FromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a color 24-bit depth bitmap from a memory array.

• Note that users must convert images from their native format (eg. BMP, PNG, etc.) into a C array.
Please refer to the following guide for details: https://github.com/ImpulseAdventure/GU←-
Islice/wiki/Display-Images-from-FLASH
• The converted file (c array) can then be included in the sketch.

Parameters

in pGui Pointer to GUI


in nDstX X coord for copy
in nDstY Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Returns

none

9.55.3.5 gslc_DrvDrawFillCircle()

bool gslc_DrvDrawFillCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a filled circle.

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 647

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to fill

Returns

true if success, false if error

9.55.3.6 gslc_DrvDrawFillRect()

bool gslc_DrvDrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

true if success, false if error

9.55.3.7 gslc_DrvDrawFillRoundRect()

bool gslc_DrvDrawFillRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a filled rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nRadius Radius for rounded corners
in nCol
Generated by Doxygen Color RGB value to fill
648 File Documentation

Returns

true if success, false if error

9.55.3.8 gslc_DrvDrawFillTriangle()

bool gslc_DrvDrawFillTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a filled triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to fill

Returns

true if success, false if error

9.55.3.9 gslc_DrvDrawFrameCircle()

bool gslc_DrvDrawFrameCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a framed circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
Generated by Doxygen
in nRadius Radius of circle
in nCol Color RGB value to frame
9.55 src/GUIslice_drv_tft_espi.h File Reference 649

Returns

true if success, false if error

9.55.3.10 gslc_DrvDrawFrameRect()

bool gslc_DrvDrawFrameRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value to frame

Returns

true if success, false if error

9.55.3.11 gslc_DrvDrawFrameRoundRect()

bool gslc_DrvDrawFrameRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a framed rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nRadius Radius for rounded corners
in nCol Color RGB value to frame

Returns

true if success, false if error

Generated by Doxygen
650 File Documentation

9.55.3.12 gslc_DrvDrawFrameTriangle()

bool gslc_DrvDrawFrameTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a framed triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to frame

Returns

true if success, false if error

9.55.3.13 gslc_DrvDrawImage()

bool gslc_DrvDrawImage (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
gslc_tsImgRef sImgRef )

Copy all of source image to destination screen at specified coordinate.

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in sImgRef Image reference

Returns

true if success, false if fail

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 651

9.55.3.14 gslc_DrvDrawLine()

bool gslc_DrvDrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw a line.

Parameters

in pGui Pointer to GUI


in nX0 Line start (X coordinate)
in nY0 Line start (Y coordinate)
in nX1 Line finish (X coordinate)
in nY1 Line finish (Y coordinate)
in nCol Color RGB value to draw

Returns

true if success, false if error

9.55.3.15 gslc_DrvDrawMonoFromMem()

void gslc_DrvDrawMonoFromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a monochrome bitmap from a memory array.

• Draw from the bitmap buffer using the foreground color defined in the header (unset bits are transparent)

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Generated by Doxygen
652 File Documentation

Returns

none

9.55.3.16 gslc_DrvDrawPoint()

bool gslc_DrvDrawPoint (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in nX X coordinate of point
in nY Y coordinate of point
in nCol Color RGB value to draw

Returns

true if success, false if error

9.55.3.17 gslc_DrvDrawPoints()

bool gslc_DrvDrawPoints (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ asPt,
uint16_t nNumPt,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in asPt Array of points to draw
in n←- Number of points in array
NumPt
in nCol Color RGB value to draw

Returns

true if success, false if error

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 653

9.55.3.18 gslc_DrvDrawTxt()

bool gslc_DrvDrawTxt (
gslc_tsGui ∗ pGui,
int16_t nTxtX,
int16_t nTxtY,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string at the given coordinate.

Parameters

in pGui Pointer to GUI


in nTxtX X coordinate of top-left text string
in nTxtY Y coordinate of top-left text string
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg Color of Background for antialias blending

Returns

true if success, false if failure

9.55.3.19 gslc_DrvDrawTxtAlign()

bool gslc_DrvDrawTxtAlign (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int8_t eTxtAlign,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string in a bounding box using the specified alignment.

Generated by Doxygen
654 File Documentation

Parameters

in pGui Pointer to GUI


in nX0 X coordinate of top-left of bounding box
in nY0 Y coordinate of top-left of bounding box
in nX1 X coordinate of bot-right of bounding box
in nY1 Y coordinate of bot-right of bounding box
in eTxtAlign Alignment mode]
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg Color of Background for antialias blending

Returns

true if success, false if failure

9.55.3.20 gslc_DrvFontAdd()

const void∗ gslc_DrvFontAdd (


gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font from a resource and return pointer to it.

Parameters

in eFontRefType Font reference type:

• GSLC_FONTREF_PTR for Standard TFT_eSPI Fonts

• GSLC_FONTREF_FNAME for antialiased Font in SPIFFS

in pvFontRef Font reference pointer / SPIFFS font filename without ext.


in nFontSz Typeface size to use, ignored for SPIFFS font

Returns

Void ptr to driver-specific font if load was successful, NULL otherwise

9.55.3.21 gslc_DrvFontsDestruct()

void gslc_DrvFontsDestruct (
gslc_tsGui ∗ pGui )

Release all fonts defined in the GUI.

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 655

Parameters

in pGui Pointer to GUI

Returns

none

9.55.3.22 gslc_DrvGetDriverDisp()

void∗ gslc_DrvGetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

9.55.3.23 gslc_DrvGetDriverTouch()

void∗ gslc_DrvGetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
656 File Documentation

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

9.55.3.24 gslc_DrvGetNameDisp()

const char∗ gslc_DrvGetNameDisp (


gslc_tsGui ∗ pGui )

Get the display driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.55.3.25 gslc_DrvGetNameTouch()

const char∗ gslc_DrvGetNameTouch (


gslc_tsGui ∗ pGui )

Get the touch driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.55.3.26 gslc_DrvGetTxtSize()

bool gslc_DrvGetTxtSize (
gslc_tsGui ∗ pGui,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 657

int16_t ∗ pnTxtX,
int16_t ∗ pnTxtY,
uint16_t ∗ pnTxtSzW,
uint16_t ∗ pnTxtSzH )

Get the extent (width and height) of a text string.

Parameters

in pGui Pointer to GUI


in pFont Ptr to Font structure
in pStr String to display
in eTxtFlags Flags associated with text string
out pnTxtX Ptr to offset X of text
out pnTxtY Ptr to offset Y of text
out pnTxtSzW Ptr to width of text
out pnTxtSzH Ptr to height of text

Returns

true if success, false if failure

9.55.3.27 gslc_DrvImageDestruct()

void gslc_DrvImageDestruct (
void ∗ pvImg )

Release an image surface.

Parameters
in pvImg Void ptr to image

Returns

none

9.55.3.28 gslc_DrvInit()

bool gslc_DrvInit (
gslc_tsGui ∗ pGui )

Initialize the SDL library.

• Performs clean startup workaround (if enabled)

Generated by Doxygen
658 File Documentation

• Configures video mode

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_DrvInit(). This can be done with gslc_←-
DrvInitEnv() or manually in user function.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.55.3.29 gslc_DrvInitTs()

bool gslc_DrvInitTs (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.55.3.30 gslc_DrvLoadImage()

void∗ gslc_DrvLoadImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Load a bitmap (∗.bmp) and create a new image resource.

Transparency is enabled by GSLC_BMP_TRANS_EN through use of color (GSLC_BMP_TRANS_RGB).

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 659

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

Image pointer (surface/texture) or NULL if error

9.55.3.31 gslc_DrvPageFlipNow()

void gslc_DrvPageFlipNow (
gslc_tsGui ∗ pGui )

Force a page flip to occur.

This generally copies active screen surface to the display.

Parameters

in pGui Pointer to GUI

Returns

none

9.55.3.32 gslc_DrvRotate()

bool gslc_DrvRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Change rotation, automatically adapt touchscreen axes swap/flip.

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if successful

Generated by Doxygen
660 File Documentation

9.55.3.33 gslc_DrvSetBkgndColor()

bool gslc_DrvSetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Returns

true if success, false if fail

9.55.3.34 gslc_DrvSetBkgndImage()

bool gslc_DrvSetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

true if success, false if fail

9.55.3.35 gslc_DrvSetClipRect()

bool gslc_DrvSetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for future drawing updates.

Generated by Doxygen
9.55 src/GUIslice_drv_tft_espi.h File Reference 661

Parameters

in pGui Pointer to GUI


in pRect Rectangular region to constrain edits

Returns

true if success, false if error

9.55.3.36 gslc_DrvSetElemImageGlow()

bool gslc_DrvSetElemImageGlow (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's glow-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.55.3.37 gslc_DrvSetElemImageNorm()

bool gslc_DrvSetElemImageNorm (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's normal-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Generated by Doxygen
662 File Documentation

Returns

true if success, false if error

9.56 src/GUIslice_drv_utft.cpp File Reference

#include "GUIslice_config.h"
Include dependency graph for GUIslice_drv_utft.cpp:

src/GUIslice_drv_utft.cpp

GUIslice_config.h

9.57 src/GUIslice_drv_utft.h File Reference

GUIslice library (driver layer for UTFT)

#include "GUIslice.h"
#include <stdio.h>
Include dependency graph for GUIslice_drv_utft.h:

src/GUIslice_drv_utft.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

Data Structures

• struct gslc_tsDriver

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 663

Macros

• #define DRV_HAS_DRAW_POINT
Support gslc_DrvDrawPoint()
• #define DRV_HAS_DRAW_POINTS
Support gslc_DrvDrawPoints()
• #define DRV_HAS_DRAW_LINE
Support gslc_DrvDrawLine()
• #define DRV_HAS_DRAW_RECT_FRAME
Support gslc_DrvDrawFrameRect()
• #define DRV_HAS_DRAW_RECT_FILL
Support gslc_DrvDrawFillRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FRAME
Support gslc_DrvDrawFrameRoundRect()
• #define DRV_HAS_DRAW_RECT_ROUND_FILL
Support gslc_DrvDrawFillRoundRect()
• #define DRV_HAS_DRAW_CIRCLE_FRAME
Support gslc_DrvDrawFrameCircle()
• #define DRV_HAS_DRAW_CIRCLE_FILL
Support gslc_DrvDrawFillCircle()
• #define DRV_HAS_DRAW_TRI_FRAME
Support gslc_DrvDrawFrameTriangle()
• #define DRV_HAS_DRAW_TRI_FILL
Support gslc_DrvDrawFillTriangle()
• #define DRV_HAS_DRAW_TEXT
Support gslc_DrvDrawTxt()
• #define DRV_HAS_DRAW_BMP_MEM
Support gslc_DrvDrawBmp24FromMem()
• #define DRV_OVERRIDE_TXT_ALIGN
Driver provides text alignment.

Functions

• bool gslc_DrvInit (gslc_tsGui ∗pGui)


Initialize the SDL library.
• bool gslc_DrvInitTs (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• void gslc_DrvDestruct (gslc_tsGui ∗pGui)
Free up any members associated with the driver.
• const char ∗ gslc_DrvGetNameDisp (gslc_tsGui ∗pGui)
Get the display driver name.
• const char ∗ gslc_DrvGetNameTouch (gslc_tsGui ∗pGui)
Get the touch driver name.
• void ∗ gslc_DrvGetDriverDisp (gslc_tsGui ∗pGui)
Get the native display driver instance.
• void ∗ gslc_DrvGetDriverTouch (gslc_tsGui ∗pGui)
Get the native touch driver instance.
• void ∗ gslc_DrvLoadImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)
Load a bitmap (∗.bmp) and create a new image resource.
• bool gslc_DrvSetBkgndImage (gslc_tsGui ∗pGui, gslc_tsImgRef sImgRef)

Generated by Doxygen
664 File Documentation

Configure the background to use a bitmap image.


• bool gslc_DrvSetBkgndColor (gslc_tsGui ∗pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
• bool gslc_DrvSetElemImageNorm (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.
• bool gslc_DrvSetElemImageGlow (gslc_tsGui ∗pGui, gslc_tsElem ∗pElem, gslc_tsImgRef sImgRef)
Set an element's glow-state image.
• void gslc_DrvImageDestruct (void ∗pvImg)
Release an image surface.
• bool gslc_DrvSetClipRect (gslc_tsGui ∗pGui, gslc_tsRect ∗pRect)
Set the clipping rectangle for future drawing updates.
• const void ∗ gslc_DrvFontAdd (gslc_teFontRefType eFontRefType, const void ∗pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
• void gslc_DrvFontsDestruct (gslc_tsGui ∗pGui)
Release all fonts defined in the GUI.
• bool gslc_DrvGetTxtSize (gslc_tsGui ∗pGui, gslc_tsFont ∗pFont, const char ∗pStr, gslc_teTxtFlags eTxt←-
Flags, int16_t ∗pnTxtX, int16_t ∗pnTxtY, uint16_t ∗pnTxtSzW, uint16_t ∗pnTxtSzH)
Get the extent (width and height) of a text string.
• bool gslc_DrvDrawTxt (gslc_tsGui ∗pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont ∗pFont, const char ∗pStr,
gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
• void gslc_DrvPageFlipNow (gslc_tsGui ∗pGui)
Force a page flip to occur.
• bool gslc_DrvDrawPoint (gslc_tsGui ∗pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawPoints (gslc_tsGui ∗pGui, gslc_tsPt ∗asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
• bool gslc_DrvDrawFrameRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
• bool gslc_DrvDrawFillRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
• bool gslc_DrvDrawFrameRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor n←-
Col)
Draw a framed rounded rectangle.
• bool gslc_DrvDrawFillRoundRect (gslc_tsGui ∗pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
• bool gslc_DrvDrawLine (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor
nCol)
Draw a line.
• bool gslc_DrvDrawFrameCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_ts←-
Color nCol)
Draw a framed circle.
• bool gslc_DrvDrawFillCircle (gslc_tsGui ∗pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor
nCol)
Draw a filled circle.
• bool gslc_DrvDrawFrameTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1,
int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
• bool gslc_DrvDrawFillTriangle (gslc_tsGui ∗pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t
nX2, int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
• bool gslc_DrvDrawImage (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 665

Copy all of source image to destination screen at specified coordinate.


• void gslc_DrvDrawMonoFromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char ∗p←-
Bitmap, bool bProgMem)
Draw a monochrome bitmap from a memory array.
• void gslc_DrvDrawBmp24FromMem (gslc_tsGui ∗pGui, int16_t nDstX, int16_t nDstY, const unsigned char
∗pBitmap, bool bProgMem)
Draw a color 24-bit depth bitmap from a memory array.
• void gslc_DrvDrawBkgnd (gslc_tsGui ∗pGui)
Copy the background image to destination screen.
• bool gslc_DrvInitTouch (gslc_tsGui ∗pGui, const char ∗acDev)
Perform any touchscreen-specific initialization.
• bool gslc_DrvGetTouch (gslc_tsGui ∗pGui, int16_t ∗pnX, int16_t ∗pnY, uint16_t ∗pnPress, gslc_teInputRaw←-
Event ∗peInputEvent, int16_t ∗pnInputVal)
Get the last touch event from the internal touch handler.
• bool gslc_DrvRotate (gslc_tsGui ∗pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
• uint16_t gslc_DrvAdaptColorToRaw (gslc_tsColor nCol)

9.57.1 Detailed Description

GUIslice library (driver layer for UTFT)

9.57.2 Macro Definition Documentation

9.57.2.1 DRV_HAS_DRAW_BMP_MEM

#define DRV_HAS_DRAW_BMP_MEM

Support gslc_DrvDrawBmp24FromMem()

9.57.2.2 DRV_HAS_DRAW_CIRCLE_FILL

#define DRV_HAS_DRAW_CIRCLE_FILL

Support gslc_DrvDrawFillCircle()

9.57.2.3 DRV_HAS_DRAW_CIRCLE_FRAME

#define DRV_HAS_DRAW_CIRCLE_FRAME

Support gslc_DrvDrawFrameCircle()

Generated by Doxygen
666 File Documentation

9.57.2.4 DRV_HAS_DRAW_LINE

#define DRV_HAS_DRAW_LINE

Support gslc_DrvDrawLine()

9.57.2.5 DRV_HAS_DRAW_POINT

#define DRV_HAS_DRAW_POINT

Support gslc_DrvDrawPoint()

9.57.2.6 DRV_HAS_DRAW_POINTS

#define DRV_HAS_DRAW_POINTS

Support gslc_DrvDrawPoints()

9.57.2.7 DRV_HAS_DRAW_RECT_FILL

#define DRV_HAS_DRAW_RECT_FILL

Support gslc_DrvDrawFillRect()

9.57.2.8 DRV_HAS_DRAW_RECT_FRAME

#define DRV_HAS_DRAW_RECT_FRAME

Support gslc_DrvDrawFrameRect()

9.57.2.9 DRV_HAS_DRAW_RECT_ROUND_FILL

#define DRV_HAS_DRAW_RECT_ROUND_FILL

Support gslc_DrvDrawFillRoundRect()

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 667

9.57.2.10 DRV_HAS_DRAW_RECT_ROUND_FRAME

#define DRV_HAS_DRAW_RECT_ROUND_FRAME

Support gslc_DrvDrawFrameRoundRect()

9.57.2.11 DRV_HAS_DRAW_TEXT

#define DRV_HAS_DRAW_TEXT

Support gslc_DrvDrawTxt()

9.57.2.12 DRV_HAS_DRAW_TRI_FILL

#define DRV_HAS_DRAW_TRI_FILL

Support gslc_DrvDrawFillTriangle()

9.57.2.13 DRV_HAS_DRAW_TRI_FRAME

#define DRV_HAS_DRAW_TRI_FRAME

Support gslc_DrvDrawFrameTriangle()

9.57.2.14 DRV_OVERRIDE_TXT_ALIGN

#define DRV_OVERRIDE_TXT_ALIGN

Driver provides text alignment.

9.57.3 Function Documentation

9.57.3.1 gslc_DrvAdaptColorToRaw()

uint16_t gslc_DrvAdaptColorToRaw (
gslc_tsColor nCol )

9.57.3.2 gslc_DrvDestruct()

void gslc_DrvDestruct (
gslc_tsGui ∗ pGui )

Free up any members associated with the driver.

• Eg. renderers, windows, background surfaces, etc.

Generated by Doxygen
668 File Documentation

Parameters

in pGui Pointer to GUI

Returns

none

9.57.3.3 gslc_DrvDrawBkgnd()

void gslc_DrvDrawBkgnd (
gslc_tsGui ∗ pGui )

Copy the background image to destination screen.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.57.3.4 gslc_DrvDrawBmp24FromMem()

void gslc_DrvDrawBmp24FromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a color 24-bit depth bitmap from a memory array.

• Note that users must convert images from their native format (eg. BMP, PNG, etc.) into a C array.
Please refer to the following guide for details: https://github.com/ImpulseAdventure/GU←-
Islice/wiki/Display-Images-from-FLASH
• The converted file (c array) can then be included in the sketch.

Parameters

in pGui Pointer to GUI


in nDstX X coord for copy
in nDstY Y coord for copy
in pBitmap Pointer to bitmap buffer
Generated by Doxygen
in bProgMem Bitmap is stored in Flash if true, RAM otherwise
9.57 src/GUIslice_drv_utft.h File Reference 669

Returns

none

9.57.3.5 gslc_DrvDrawFillCircle()

bool gslc_DrvDrawFillCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a filled circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to fill

Returns

true if success, false if error

9.57.3.6 gslc_DrvDrawFillRect()

bool gslc_DrvDrawFillRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a filled rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nCol Color RGB value to fill

Returns

true if success, false if error

Generated by Doxygen
670 File Documentation

9.57.3.7 gslc_DrvDrawFillRoundRect()

bool gslc_DrvDrawFillRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a filled rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to fill
in nRadius Radius for rounded corners
in nCol Color RGB value to fill

Returns

true if success, false if error

9.57.3.8 gslc_DrvDrawFillTriangle()

bool gslc_DrvDrawFillTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a filled triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to fill

Returns

true if success, false if error

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 671

9.57.3.9 gslc_DrvDrawFrameCircle()

bool gslc_DrvDrawFrameCircle (
gslc_tsGui ∗ pGui,
int16_t nMidX,
int16_t nMidY,
uint16_t nRadius,
gslc_tsColor nCol )

Draw a framed circle.

Parameters

in pGui Pointer to GUI


in nMidX Center of circle (X coordinate)
in nMidY Center of circle (Y coordinate)
in nRadius Radius of circle
in nCol Color RGB value to frame

Returns

true if success, false if error

9.57.3.10 gslc_DrvDrawFrameRect()

bool gslc_DrvDrawFrameRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
gslc_tsColor nCol )

Draw a framed rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nCol Color RGB value to frame

Returns

true if success, false if error

Generated by Doxygen
672 File Documentation

9.57.3.11 gslc_DrvDrawFrameRoundRect()

bool gslc_DrvDrawFrameRoundRect (
gslc_tsGui ∗ pGui,
gslc_tsRect rRect,
int16_t nRadius,
gslc_tsColor nCol )

Draw a framed rounded rectangle.

Parameters

in pGui Pointer to GUI


in rRect Rectangular region to frame
in nRadius Radius for rounded corners
in nCol Color RGB value to frame

Returns

true if success, false if error

9.57.3.12 gslc_DrvDrawFrameTriangle()

bool gslc_DrvDrawFrameTriangle (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
int16_t nX2,
int16_t nY2,
gslc_tsColor nCol )

Draw a framed triangle.

Parameters

in pGui Pointer to GUI


in nX0 X Coordinate #1
in nY0 Y Coordinate #1
in nX1 X Coordinate #2
in nY1 Y Coordinate #2
in nX2 X Coordinate #3
in nY2 Y Coordinate #3
in nCol Color RGB value to frame

Returns

true if success, false if error

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 673

9.57.3.13 gslc_DrvDrawImage()

bool gslc_DrvDrawImage (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
gslc_tsImgRef sImgRef )

Copy all of source image to destination screen at specified coordinate.

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in sImgRef Image reference

Returns

true if success, false if fail

9.57.3.14 gslc_DrvDrawLine()

bool gslc_DrvDrawLine (
gslc_tsGui ∗ pGui,
int16_t nX0,
int16_t nY0,
int16_t nX1,
int16_t nY1,
gslc_tsColor nCol )

Draw a line.

Parameters

in pGui Pointer to GUI


in nX0 Line start (X coordinate)
in nY0 Line start (Y coordinate)
in nX1 Line finish (X coordinate)
in nY1 Line finish (Y coordinate)
in nCol Color RGB value to draw

Returns

true if success, false if error

Generated by Doxygen
674 File Documentation

9.57.3.15 gslc_DrvDrawMonoFromMem()

void gslc_DrvDrawMonoFromMem (
gslc_tsGui ∗ pGui,
int16_t nDstX,
int16_t nDstY,
const unsigned char ∗ pBitmap,
bool bProgMem )

Draw a monochrome bitmap from a memory array.

• Draw from the bitmap buffer using the foreground color defined in the header (unset bits are transparent)

Parameters

in pGui Pointer to GUI


in nDstX Destination X coord for copy
in nDstY Destination Y coord for copy
in pBitmap Pointer to bitmap buffer
in bProgMem Bitmap is stored in Flash if true, RAM otherwise

Returns

none

9.57.3.16 gslc_DrvDrawPoint()

bool gslc_DrvDrawPoint (
gslc_tsGui ∗ pGui,
int16_t nX,
int16_t nY,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in nX X coordinate of point
in nY Y coordinate of point
in nCol Color RGB value to draw

Returns

true if success, false if error

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 675

9.57.3.17 gslc_DrvDrawPoints()

bool gslc_DrvDrawPoints (
gslc_tsGui ∗ pGui,
gslc_tsPt ∗ asPt,
uint16_t nNumPt,
gslc_tsColor nCol )

Draw a point.

Parameters

in pGui Pointer to GUI


in asPt Array of points to draw
in n←- Number of points in array
NumPt
in nCol Color RGB value to draw

Returns

true if success, false if error

9.57.3.18 gslc_DrvDrawTxt()

bool gslc_DrvDrawTxt (
gslc_tsGui ∗ pGui,
int16_t nTxtX,
int16_t nTxtY,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
gslc_tsColor colTxt,
gslc_tsColor colBg )

Draw a text string at the given coordinate.

Parameters

in pGui Pointer to GUI


in nTxtX X coordinate of top-left text string
in nTxtY Y coordinate of top-left text string
in pFont Ptr to Font
in pStr String to display
in eTxtFlags Flags associated with text string
in colTxt Color to draw text
in colBg unused in ADAGFX, defaults to black

Generated by Doxygen
676 File Documentation

Returns

true if success, false if failure

9.57.3.19 gslc_DrvFontAdd()

const void∗ gslc_DrvFontAdd (


gslc_teFontRefType eFontRefType,
const void ∗ pvFontRef,
uint16_t nFontSz )

Load a font from a resource and return pointer to it.

Parameters

in eFontRefType Font reference type (GSLC_FONTREF_PTR for Arduino)


in pvFontRef Font reference pointer (Pointer to the GFXFont array)
in nFontSz Typeface size to use

Returns

Void ptr to driver-specific font if load was successful, NULL otherwise

9.57.3.20 gslc_DrvFontsDestruct()

void gslc_DrvFontsDestruct (
gslc_tsGui ∗ pGui )

Release all fonts defined in the GUI.

Parameters

in pGui Pointer to GUI

Returns

none

9.57.3.21 gslc_DrvGetDriverDisp()

void∗ gslc_DrvGetDriverDisp (
gslc_tsGui ∗ pGui )

Get the native display driver instance.

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 677

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used.
If no driver was created then this function will return NULL.

9.57.3.22 gslc_DrvGetDriverTouch()

void∗ gslc_DrvGetDriverTouch (
gslc_tsGui ∗ pGui )

Get the native touch driver instance.

• This can be useful to access special commands available in the selected driver.

Parameters

in pGui Pointer to GUI

Returns

Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If
no driver was created then this function will return NULL.

9.57.3.23 gslc_DrvGetNameDisp()

const char∗ gslc_DrvGetNameDisp (


gslc_tsGui ∗ pGui )

Get the display driver name.

Parameters

in pGui Pointer to GUI

Generated by Doxygen
678 File Documentation

Returns

String containing driver name

9.57.3.24 gslc_DrvGetNameTouch()

const char∗ gslc_DrvGetNameTouch (


gslc_tsGui ∗ pGui )

Get the touch driver name.

Parameters

in pGui Pointer to GUI

Returns

String containing driver name

9.57.3.25 gslc_DrvGetTouch()

bool gslc_DrvGetTouch (
gslc_tsGui ∗ pGui,
int16_t ∗ pnX,
int16_t ∗ pnY,
uint16_t ∗ pnPress,
gslc_teInputRawEvent ∗ peInputEvent,
int16_t ∗ pnInputVal )

Get the last touch event from the internal touch handler.

Parameters

in pGui Pointer to GUI


out pnX Ptr to X coordinate of last touch event
out pnY Ptr to Y coordinate of last touch event
out pnPress Ptr to Pressure level of last touch event (0 for none, 1 for touch)
out peInputEvent Indication of event type
out pnInputVal Additional data for event type

Returns

true if an event was detected or false otherwise

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 679

9.57.3.26 gslc_DrvGetTxtSize()

bool gslc_DrvGetTxtSize (
gslc_tsGui ∗ pGui,
gslc_tsFont ∗ pFont,
const char ∗ pStr,
gslc_teTxtFlags eTxtFlags,
int16_t ∗ pnTxtX,
int16_t ∗ pnTxtY,
uint16_t ∗ pnTxtSzW,
uint16_t ∗ pnTxtSzH )

Get the extent (width and height) of a text string.

Parameters

in pGui Pointer to GUI


in pFont Ptr to Font structure
in pStr String to display
in eTxtFlags Flags associated with text string
out pnTxtX Ptr to offset X of text
out pnTxtY Ptr to offset Y of text
out pnTxtSzW Ptr to width of text
out pnTxtSzH Ptr to height of text

Returns

true if success, false if failure

9.57.3.27 gslc_DrvImageDestruct()

void gslc_DrvImageDestruct (
void ∗ pvImg )

Release an image surface.

Parameters
in pvImg Void ptr to image

Returns

none

Generated by Doxygen
680 File Documentation

9.57.3.28 gslc_DrvInit()

bool gslc_DrvInit (
gslc_tsGui ∗ pGui )

Initialize the SDL library.

• Performs clean startup workaround (if enabled)

• Configures video mode

• Initializes font support

PRE:

• The environment variables should be configured before calling gslc_DrvInit(). This can be done with gslc_←-
DrvInitEnv() or manually in user function.

Parameters

in pGui Pointer to GUI

Returns

true if success, false if fail

9.57.3.29 gslc_DrvInitTouch()

bool gslc_DrvInitTouch (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 681

9.57.3.30 gslc_DrvInitTs()

bool gslc_DrvInitTs (
gslc_tsGui ∗ pGui,
const char ∗ acDev )

Perform any touchscreen-specific initialization.

Parameters

in pGui Pointer to GUI


in acDev Device path to touchscreen eg. "/dev/input/touchscreen"

Returns

true if successful

9.57.3.31 gslc_DrvLoadImage()

void∗ gslc_DrvLoadImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Load a bitmap (∗.bmp) and create a new image resource.

Transparency is enabled by GSLC_BMP_TRANS_EN through use of color (GSLC_BMP_TRANS_RGB).

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

Image pointer (surface/texture) or NULL if error

9.57.3.32 gslc_DrvPageFlipNow()

void gslc_DrvPageFlipNow (
gslc_tsGui ∗ pGui )

Force a page flip to occur.

This generally copies active screen surface to the display.

Generated by Doxygen
682 File Documentation

Parameters

in pGui Pointer to GUI

Returns

none

9.57.3.33 gslc_DrvRotate()

bool gslc_DrvRotate (
gslc_tsGui ∗ pGui,
uint8_t nRotation )

Change rotation, automatically adapt touchscreen axes swap/flip.

Parameters

in pGui Pointer to GUI


in nRotation Screen Rotation value (0, 1, 2 or 3)

Returns

true if successful

9.57.3.34 gslc_DrvSetBkgndColor()

bool gslc_DrvSetBkgndColor (
gslc_tsGui ∗ pGui,
gslc_tsColor nCol )

Configure the background to use a solid color.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in nCol RGB Color to use

Generated by Doxygen
9.57 src/GUIslice_drv_utft.h File Reference 683

Returns

true if success, false if fail

9.57.3.35 gslc_DrvSetBkgndImage()

bool gslc_DrvSetBkgndImage (
gslc_tsGui ∗ pGui,
gslc_tsImgRef sImgRef )

Configure the background to use a bitmap image.

• The background is used when redrawing the entire page

Parameters

in pGui Pointer to GUI


in sImgRef Image reference

Returns

true if success, false if fail

9.57.3.36 gslc_DrvSetClipRect()

bool gslc_DrvSetClipRect (
gslc_tsGui ∗ pGui,
gslc_tsRect ∗ pRect )

Set the clipping rectangle for future drawing updates.

Parameters

in pGui Pointer to GUI


in pRect Rectangular region to constrain edits

Returns

true if success, false if error

Generated by Doxygen
684 File Documentation

9.57.3.37 gslc_DrvSetElemImageGlow()

bool gslc_DrvSetElemImageGlow (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's glow-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.57.3.38 gslc_DrvSetElemImageNorm()

bool gslc_DrvSetElemImageNorm (
gslc_tsGui ∗ pGui,
gslc_tsElem ∗ pElem,
gslc_tsImgRef sImgRef )

Set an element's normal-state image.

Parameters

in pGui Pointer to GUI


in pElem Pointer to Element to update
in sImgRef Image reference

Returns

true if success, false if error

9.58 src/GUIslice_ex.h File Reference

#include "GUIslice.h"
#include "elem/XCheckbox.h"
#include "elem/XGauge.h"
#include "elem/XGraph.h"
#include "elem/XSelNum.h"
#include "elem/XSlider.h"

Generated by Doxygen
9.59 src/GUIslice_th.cpp File Reference 685

#include "elem/XTextbox.h"
Include dependency graph for GUIslice_ex.h:

src/GUIslice_ex.h

elem/XCheckbox.h elem/XGauge.h elem/XGraph.h elem/XSelNum.h elem/XSlider.h elem/XTextbox.h

GUIslice.h

stdio.h stdlib.h stdbool.h string.h inttypes.h GUIslice_config.h

9.59 src/GUIslice_th.cpp File Reference

#include "GUIslice_th.h"
Include dependency graph for GUIslice_th.cpp:

src/GUIslice_th.cpp

GUIslice_th.h

Arduino.h

Functions

• void gslc_InitTouchHandler (TouchHandler ∗pTH)


• TouchHandler ∗ gslc_getTouchHandler (void)

Variables

• TouchHandler ∗ pTouchHandler

9.59.1 Function Documentation

Generated by Doxygen
686 File Documentation

9.59.1.1 gslc_getTouchHandler()

TouchHandler∗ gslc_getTouchHandler (
void )

9.59.1.2 gslc_InitTouchHandler()

void gslc_InitTouchHandler (
TouchHandler ∗ pTH )

9.59.2 Variable Documentation

9.59.2.1 pTouchHandler

TouchHandler∗ pTouchHandler

9.60 src/GUIslice_th.h File Reference

#include <Arduino.h>
Include dependency graph for GUIslice_th.h:

src/GUIslice_th.h

Arduino.h

This graph shows which files directly or indirectly include this file:

src/GUIslice_th.h

src/GUIslice_th.cpp src/GUIslice_th_XPT2046.h

Generated by Doxygen
9.61 src/GUIslice_th_XPT2046.h File Reference 687

Data Structures
• class THPoint
• class TouchHandler

Functions
• void gslc_InitTouchHandler (TouchHandler ∗pTHO)
• TouchHandler ∗ gslc_getTouchHandler (void)

9.60.1 Function Documentation

9.60.1.1 gslc_getTouchHandler()

TouchHandler∗ gslc_getTouchHandler (
void )

9.60.1.2 gslc_InitTouchHandler()

void gslc_InitTouchHandler (
TouchHandler ∗ pTHO )

9.61 src/GUIslice_th_XPT2046.h File Reference

#include <Arduino.h>
#include <GUIslice_th.h>
#include <XPT2046_touch.h>
Include dependency graph for GUIslice_th_XPT2046.h:

src/GUIslice_th_XPT2046.h

GUIslice_th.h XPT2046_touch.h

Arduino.h

Generated by Doxygen
688 File Documentation

Data Structures

• class TouchHandler_XPT2046

9.62 src/GUIslice_version.h File Reference

This graph shows which files directly or indirectly include this file:

src/GUIslice_version.h

src/GUIslice.c

Macros

• #define GUISLICE_VER

9.62.1 Macro Definition Documentation

9.62.1.1 GUISLICE_VER

#define GUISLICE_VER

Generated by Doxygen

You might also like