60 #if (GSLC_USE_PROGMEM) 61 #define GSLC_PMEM PROGMEM 83 #define GSLC_2PI 6.28318530718 178 #define GSLC_ELEM_FEA_VALID 0x80 179 #define GSLC_ELEM_FEA_EDIT_EN 0x20 180 #define GSLC_ELEM_FEA_ROUND_EN 0x10 181 #define GSLC_ELEM_FEA_CLICK_EN 0x08 182 #define GSLC_ELEM_FEA_GLOW_EN 0x04 183 #define GSLC_ELEM_FEA_FRAME_EN 0x02 184 #define GSLC_ELEM_FEA_FILL_EN 0x01 185 #define GSLC_ELEM_FEA_NONE 0x00 189 #define GSLC_ALIGNV_TOP 0x10 190 #define GSLC_ALIGNV_MID 0x20 191 #define GSLC_ALIGNV_BOT 0x40 192 #define GSLC_ALIGNH_LEFT 0x01 193 #define GSLC_ALIGNH_MID 0x02 194 #define GSLC_ALIGNH_RIGHT 0x04 195 #define GSLC_ALIGN_TOP_LEFT GSLC_ALIGNH_LEFT | GSLC_ALIGNV_TOP 196 #define GSLC_ALIGN_TOP_MID GSLC_ALIGNH_MID | GSLC_ALIGNV_TOP 197 #define GSLC_ALIGN_TOP_RIGHT GSLC_ALIGNH_RIGHT | GSLC_ALIGNV_TOP 198 #define GSLC_ALIGN_MID_LEFT GSLC_ALIGNH_LEFT | GSLC_ALIGNV_MID 199 #define GSLC_ALIGN_MID_MID GSLC_ALIGNH_MID | GSLC_ALIGNV_MID 200 #define GSLC_ALIGN_MID_RIGHT GSLC_ALIGNH_RIGHT | GSLC_ALIGNV_MID 201 #define GSLC_ALIGN_BOT_LEFT GSLC_ALIGNH_LEFT | GSLC_ALIGNV_BOT 202 #define GSLC_ALIGN_BOT_MID GSLC_ALIGNH_MID | GSLC_ALIGNV_BOT 203 #define GSLC_ALIGN_BOT_RIGHT GSLC_ALIGNH_RIGHT | GSLC_ALIGNV_BOT 207 #define GSLC_COL_RED_DK4 (gslc_tsColor) {128, 0, 0} 208 #define GSLC_COL_RED_DK3 (gslc_tsColor) {160, 0, 0} 209 #define GSLC_COL_RED_DK2 (gslc_tsColor) {192, 0, 0} 210 #define GSLC_COL_RED_DK1 (gslc_tsColor) {224, 0, 0} 211 #define GSLC_COL_RED (gslc_tsColor) {255, 0, 0} 212 #define GSLC_COL_RED_LT1 (gslc_tsColor) {255, 32, 32} 213 #define GSLC_COL_RED_LT2 (gslc_tsColor) {255, 64, 64} 214 #define GSLC_COL_RED_LT3 (gslc_tsColor) {255, 96, 96} 215 #define GSLC_COL_RED_LT4 (gslc_tsColor) {255,128,128} 216 #define GSLC_COL_GREEN_DK4 (gslc_tsColor) { 0,128, 0} 217 #define GSLC_COL_GREEN_DK3 (gslc_tsColor) { 0,160, 0} 218 #define GSLC_COL_GREEN_DK2 (gslc_tsColor) { 0,192, 0} 219 #define GSLC_COL_GREEN_DK1 (gslc_tsColor) { 0,224, 0} 220 #define GSLC_COL_GREEN (gslc_tsColor) { 0,255, 0} 221 #define GSLC_COL_GREEN_LT1 (gslc_tsColor) { 32,255, 32} 222 #define GSLC_COL_GREEN_LT2 (gslc_tsColor) { 64,255, 64} 223 #define GSLC_COL_GREEN_LT3 (gslc_tsColor) { 96,255, 96} 224 #define GSLC_COL_GREEN_LT4 (gslc_tsColor) {128,255,128} 225 #define GSLC_COL_BLUE_DK4 (gslc_tsColor) { 0, 0,128} 226 #define GSLC_COL_BLUE_DK3 (gslc_tsColor) { 0, 0,160} 227 #define GSLC_COL_BLUE_DK2 (gslc_tsColor) { 0, 0,192} 228 #define GSLC_COL_BLUE_DK1 (gslc_tsColor) { 0, 0,224} 229 #define GSLC_COL_BLUE (gslc_tsColor) { 0, 0,255} 230 #define GSLC_COL_BLUE_LT1 (gslc_tsColor) { 32, 32,255} 231 #define GSLC_COL_BLUE_LT2 (gslc_tsColor) { 64, 64,255} 232 #define GSLC_COL_BLUE_LT3 (gslc_tsColor) { 96, 96,255} 233 #define GSLC_COL_BLUE_LT4 (gslc_tsColor) {128,128,255} 234 #define GSLC_COL_BLACK (gslc_tsColor) { 0, 0, 0} 235 #define GSLC_COL_GRAY_DK3 (gslc_tsColor) { 32, 32, 32} 236 #define GSLC_COL_GRAY_DK2 (gslc_tsColor) { 64, 64, 64} 237 #define GSLC_COL_GRAY_DK1 (gslc_tsColor) { 96, 96, 96} 238 #define GSLC_COL_GRAY (gslc_tsColor) {128,128,128} 239 #define GSLC_COL_GRAY_LT1 (gslc_tsColor) {160,160,160} 240 #define GSLC_COL_GRAY_LT2 (gslc_tsColor) {192,192,192} 241 #define GSLC_COL_GRAY_LT3 (gslc_tsColor) {224,224,224} 242 #define GSLC_COL_WHITE (gslc_tsColor) {255,255,255} 244 #define GSLC_COL_YELLOW (gslc_tsColor) {255,255,0} 245 #define GSLC_COL_YELLOW_DK (gslc_tsColor) {64,64,0} 246 #define GSLC_COL_PURPLE (gslc_tsColor) {128,0,128} 247 #define GSLC_COL_CYAN (gslc_tsColor) {0,255,255} 248 #define GSLC_COL_MAGENTA (gslc_tsColor) {255,0,255} 249 #define GSLC_COL_TEAL (gslc_tsColor) {0,128,128} 250 #define GSLC_COL_ORANGE (gslc_tsColor) {255,165,0} 251 #define GSLC_COL_BROWN (gslc_tsColor) {165,42,42} 254 #define GSLC_COLMONO_BLACK (gslc_tsColor) {255,255,255} 255 #define GSLC_COLMONO_WHITE (gslc_tsColor) { 0, 0, 0} 347 #define TOUCH_ROTATION_DATA 0x6350 348 #define TOUCH_ROTATION_SWAPXY(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 2 ) & 0x01 ) 349 #define TOUCH_ROTATION_FLIPX(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 1 ) & 0x01 ) 350 #define TOUCH_ROTATION_FLIPY(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 0 ) & 0x01 ) 432 #define GSLC_ELEMREF_DEFAULT (GSLC_ELEMREF_SRC_RAM | GSLC_ELEMREF_VISIBLE) 499 typedef bool (*
GSLC_CB_DRAW)(
void* pvGui,
void* pvElemRef,gslc_teRedrawType eRedraw);
623 char pStrBuf[GSLC_LOCAL_STR_LEN];
726 #if !defined(DRV_TOUCH_NONE) 749 #if (GSLC_FEATURE_COMPOUND) 811 #define GSLC_MIN(a,b) (a<b)?a:b 812 #define GSLC_MAX(a,b) (a>b)?a:b 1064 bool gslc_IsInWH(int16_t nSelX,int16_t nSelY,uint16_t nWidth,uint16_t nHeight);
1211 void gslc_PolarToXY(uint16_t nRad,int16_t n64Ang,int16_t* nDX,int16_t* nDY);
1457 int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,
gslc_tsColor nCol);
1475 int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,
gslc_tsColor nCol);
1532 gslc_tsColor cArcStart,
gslc_tsColor cArcEnd, int16_t nAngSecStart, int16_t nAngSecEnd, int16_t nAngGradStart, int16_t nAngGradRange);
1556 gslc_tsColor cArc, int16_t nAngSecStart, int16_t nAngSecEnd);
1582 const void* pvFontRef,uint16_t nFontSz);
1602 const void* pvFontRef, uint16_t nFontSz);
1825 gslc_tsRect rElem,
char* pStrBuf,uint8_t nStrBufMax,int16_t nFontId);
1846 gslc_tsRect rElem,
char* pStrBuf,uint8_t nStrBufMax,
2106 void gslc_StrCopy(
char* pDstStr,
const char* pSrcStr,uint16_t nDstLen);
2377 #if !defined(DRV_TOUCH_NONE) 2387 #define TOUCH_ROTATION_DATA 0x6350 2388 #define TOUCH_ROTATION_SWAPXY(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 2 ) & 0x01 ) 2389 #define TOUCH_ROTATION_FLIPX(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 1 ) & 0x01 ) 2390 #define TOUCH_ROTATION_FLIPY(rotation) ((( TOUCH_ROTATION_DATA >> ((rotation&0x03)*4) ) >> 0 ) & 0x01 ) 2417 bool gslc_GetTouch(
gslc_tsGui* pGui, int16_t* pnX, int16_t* pnY, uint16_t* pnPress, gslc_teInputRawEvent* peInputEvent, int16_t* pnInputVal);
2466 #endif // !DRV_TOUCH_NONE 2483 void gslc_InputMapAdd(
gslc_tsGui* pGui,gslc_teInputRawEvent eInputEvent,int16_t nInputVal,gslc_teAction eAction,int16_t nActionVal);
2509 #if (GSLC_USE_PROGMEM) 2511 #define GSLC_DEBUG_PRINT(sFmt, ...) \ 2514 gslc_DebugPrintf(PSTR(sFmt),__VA_ARGS__); \ 2517 #define GSLC_DEBUG2_PRINT(sFmt, ...) \ 2519 if (DEBUG_ERR >= 2) { \ 2520 gslc_DebugPrintf(PSTR(sFmt),__VA_ARGS__); \ 2525 #define GSLC_DEBUG_PRINT(sFmt, ...) \ 2528 gslc_DebugPrintf(sFmt,__VA_ARGS__); \ 2531 #define GSLC_DEBUG2_PRINT(sFmt, ...) \ 2533 if (DEBUG_ERR >= 2) { \ 2534 gslc_DebugPrintf(sFmt,__VA_ARGS__); \ 2539 #define GSLC_DEBUG_PRINT_CONST(sFmt, ...) \ 2542 gslc_DebugPrintf(sFmt,__VA_ARGS__); \ 2545 #define GSLC_DEBUG2_PRINT_CONST(sFmt, ...) \ 2547 if (DEBUG_ERR >= 2) { \ 2548 gslc_DebugPrintf(sFmt,__VA_ARGS__); \ 2714 #if (GSLC_USE_PROGMEM) 2716 #define gslc_ElemCreateTxt_P(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,pFont,colTxt,colFrame,colFill,nAlignTxt,bFrameEn,bFillEn) \ 2717 static const char str##nElemId[] PROGMEM = strTxt; \ 2718 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2719 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2720 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2722 nFeatures##nElemId, \ 2724 (gslc_tsRect){nX,nY,nW,nH}, \ 2725 GSLC_GROUP_ID_NONE, \ 2726 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2727 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2728 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2730 (char*)str##nElemId, \ 2732 (gslc_teTxtFlags)(GSLC_TXT_MEM_PROG | GSLC_TXT_ALLOC_EXT), \ 2745 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2746 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2749 #define gslc_ElemCreateTxt_P_R(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,strLength,pFont,colTxt,colFrame,colFill,nAlignTxt,bFrameEn,bFillEn) \ 2750 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2751 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2752 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2754 nFeatures##nElemId, \ 2756 (gslc_tsRect){nX,nY,nW,nH}, \ 2757 GSLC_GROUP_ID_NONE, \ 2758 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2759 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2760 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2764 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 2777 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2778 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2780 #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,pfuncXTouch,pfuncXTick) \ 2781 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2782 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0) | (bClickEn?GSLC_ELEM_FEA_CLICK_EN:0) | (bGlowEn?GSLC_ELEM_FEA_GLOW_EN:0); \ 2783 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2785 nFeatures##nElemId, \ 2787 (gslc_tsRect){nX,nY,nW,nH}, \ 2788 GSLC_GROUP_ID_NONE, \ 2789 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2790 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2791 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2795 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 2808 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2809 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2813 #define gslc_ElemCreateBox_P(pGui,nElemId,nPage,nX,nY,nW,nH,colFrame,colFill,bFrameEn,bFillEn,pfuncXDraw,pfuncXTick) \ 2814 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2815 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2816 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2818 nFeatures##nElemId, \ 2820 (gslc_tsRect){nX,nY,nW,nH}, \ 2821 GSLC_GROUP_ID_NONE, \ 2822 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2823 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2824 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2831 GSLC_ALIGN_MID_MID, \ 2841 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2842 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2844 #define gslc_ElemCreateLine_P(pGui,nElemId,nPage,nX0,nY0,nX1,nY1,colFill) \ 2845 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID; \ 2846 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2848 nFeatures##nElemId, \ 2850 (gslc_tsRect){nX0,nY0,nX1-nX0+1,nY1-nY0+1}, \ 2851 GSLC_GROUP_ID_NONE, \ 2852 colFill,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2853 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2854 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2861 GSLC_ALIGN_MID_MID, \ 2871 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2872 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2874 #define gslc_ElemCreateBtnTxt_P(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,pFont,colTxt,colFrame,colFill,colFrameGlow,colFillGlow,nAlignTxt,bFrameEn,bFillEn,callFunc,extraData) \ 2875 static const char str##nElemId[] PROGMEM = strTxt; \ 2876 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2877 GSLC_ELEM_FEA_CLICK_EN | GSLC_ELEM_FEA_GLOW_EN | \ 2878 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2879 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2881 nFeatures##nElemId, \ 2883 (gslc_tsRect){nX,nY,nW,nH}, \ 2884 GSLC_GROUP_ID_NONE, \ 2885 colFrame,colFill,colFrameGlow,colFillGlow, \ 2886 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2887 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2889 (char*)str##nElemId, \ 2891 (gslc_teTxtFlags)(GSLC_TXT_MEM_PROG | GSLC_TXT_ALLOC_EXT), \ 2904 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2905 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2907 #define gslc_ElemCreateBtnTxt_P_R(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,strLength,pFont,colTxt,colFrame,colFill,colFrameGlow,colFillGlow,nAlignTxt,bFrameEn,bFillEn,callFunc,extraData) \ 2908 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2909 GSLC_ELEM_FEA_CLICK_EN | GSLC_ELEM_FEA_GLOW_EN | \ 2910 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2911 static const gslc_tsElem sElem##nElemId PROGMEM = { \ 2913 nFeatures##nElemId, \ 2915 (gslc_tsRect){nX,nY,nW,nH}, \ 2916 GSLC_GROUP_ID_NONE, \ 2917 colFrame,colFill,colFrameGlow,colFillGlow, \ 2918 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2919 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2923 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 2936 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2937 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_PROG | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2943 #define gslc_ElemCreateTxt_P(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,pFont,colTxt,colFrame,colFill,nAlignTxt,bFrameEn,bFillEn) \ 2944 static const char str##nElemId[] = strTxt; \ 2945 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2946 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2947 static const gslc_tsElem sElem##nElemId = { \ 2949 nFeatures##nElemId, \ 2951 (gslc_tsRect){nX,nY,nW,nH}, \ 2952 GSLC_GROUP_ID_NONE, \ 2953 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2954 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2955 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2957 (char*)str##nElemId, \ 2959 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 2972 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 2973 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 2976 #define gslc_ElemCreateTxt_P_R(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,strLength,pFont,colTxt,colFrame,colFill,nAlignTxt,bFrameEn,bFillEn) \ 2977 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 2978 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 2979 static const gslc_tsElem sElem##nElemId = { \ 2981 nFeatures##nElemId, \ 2983 (gslc_tsRect){nX,nY,nW,nH}, \ 2984 GSLC_GROUP_ID_NONE, \ 2985 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 2986 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2987 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 2991 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 3004 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 3005 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 3007 #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,pfuncXTouch,pfuncXTick) \ 3008 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 3009 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0) | (bClickEn?GSLC_ELEM_FEA_CLICK_EN:0) | (bGlowEn?GSLC_ELEM_FEA_GLOW_EN:0); \ 3010 static const gslc_tsElem sElem##nElemId = { \ 3012 nFeatures##nElemId, \ 3014 (gslc_tsRect){nX,nY,nW,nH}, \ 3015 GSLC_GROUP_ID_NONE, \ 3016 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 3017 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3018 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3022 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 3035 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 3036 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 3039 #define gslc_ElemCreateBox_P(pGui,nElemId,nPage,nX,nY,nW,nH,colFrame,colFill,bFrameEn,bFillEn,pfuncXDraw,pfuncXTick) \ 3040 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 3041 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 3042 static const gslc_tsElem sElem##nElemId = { \ 3044 nFeatures##nElemId, \ 3046 (gslc_tsRect){nX,nY,nW,nH}, \ 3047 GSLC_GROUP_ID_NONE, \ 3048 colFrame,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 3049 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3050 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3057 GSLC_ALIGN_MID_MID, \ 3067 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 3068 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 3070 #define gslc_ElemCreateLine_P(pGui,nElemId,nPage,nX0,nY0,nX1,nY1,colFill) \ 3071 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID; \ 3072 static const gslc_tsElem sElem##nElemId = { \ 3074 nFeatures##nElemId, \ 3076 (gslc_tsRect){nX0,nY0,nX1-nX0+1,nY1-nY0+1}, \ 3077 GSLC_GROUP_ID_NONE, \ 3078 colFill,colFill,GSLC_COL_BLACK,GSLC_COL_BLACK, \ 3079 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3080 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3087 GSLC_ALIGN_MID_MID, \ 3097 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 3098 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 3100 #define gslc_ElemCreateBtnTxt_P(pGui,nElemId,nPage,nX,nY,nW,nH,strTxt,pFont,colTxt,colFrame,colFill,colFrameGlow,colFillGlow,nAlignTxt,bFrameEn,bFillEn,callFunc,extraData) \ 3101 static const char str##nElemId[] = strTxt; \ 3102 static const uint8_t nFeatures##nElemId = GSLC_ELEM_FEA_VALID | \ 3103 GSLC_ELEM_FEA_CLICK_EN | GSLC_ELEM_FEA_GLOW_EN | \ 3104 (bFrameEn?GSLC_ELEM_FEA_FRAME_EN:0) | (bFillEn?GSLC_ELEM_FEA_FILL_EN:0); \ 3105 static const gslc_tsElem sElem##nElemId = { \ 3107 nFeatures##nElemId, \ 3109 (gslc_tsRect){nX,nY,nW,nH}, \ 3110 GSLC_GROUP_ID_NONE, \ 3111 colFrame,colFill,colFrameGlow,colFillGlow, \ 3112 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3113 (gslc_tsImgRef){NULL,NULL,GSLC_IMGREF_NONE,NULL}, \ 3115 (char*)str##nElemId, \ 3117 (gslc_teTxtFlags)(GSLC_TXT_MEM_RAM | GSLC_TXT_ALLOC_EXT), \ 3130 gslc_ElemAdd(pGui,nPage,(gslc_tsElem*)&sElem##nElemId, \ 3131 (gslc_teElemRefFlags)(GSLC_ELEMREF_SRC_CONST | GSLC_ELEMREF_VISIBLE | GSLC_ELEMREF_REDRAW_FULL)); 3134 #endif // GSLC_USE_PROGMEM 3187 gslc_tsRect rElem,
char* pStrBuf,uint8_t nStrBufMax,int16_t nFontId);
3477 #if !defined(DRV_TOUCH_NONE) 3492 #endif // !DRV_TOUCH_NONE 3686 #if !defined(DRV_TOUCH_NONE) 3763 #endif // !DRV_TOUCH_NONE 3841 #endif // __cplusplus 3842 #endif // _GUISLICE_H_ void gslc_CollectSetParent(gslc_tsGui *pGui, gslc_tsCollect *pCollect, gslc_tsElemRef *pElemRefParent)
Assign the parent element reference to all elements within a collection.
Definition: GUIslice.c:5270
Module is enabled but failed to init.
Definition: GUIslice.h:338
gslc_tsElem sElemTmpProg
Temporary element for Flash compatibility.
Definition: GUIslice.h:754
Button element type.
Definition: GUIslice.h:168
Mask for subtype.
Definition: GUIslice.h:313
void gslc_ElemDraw(gslc_tsGui *pGui, int16_t nPageId, int16_t nElemId)
Draw an element to the active display.
Definition: GUIslice.c:2927
gslc_tsImgRef sImgRefBkgnd
Image reference for background.
Definition: GUIslice.h:774
const void * pvFont
Void ptr to the font reference (type defined by driver)
Definition: GUIslice.h:563
char * gslc_ElemGetTxtStr(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Fetch the current text string associated with an Element.
Definition: GUIslice.c:3374
void gslc_PageFlipGo(gslc_tsGui *pGui)
Update the visible screen if page has been marked for flipping.
Definition: GUIslice.c:2366
gslc_tsPage * gslc_PageFindById(gslc_tsGui *pGui, int16_t nPageId)
Find a page in the GUI by its ID.
Definition: GUIslice.c:2381
void * pvScope
Event target scope (eg. Page,Collection,Event)
Definition: GUIslice.h:544
bool(* GSLC_CB_INPUT)(void *pvGui, void *pvElemRef, int16_t nStatus, void *pvData)
Callback function for element input ready.
Definition: GUIslice.h:511
void gslc_ElemSetTxtMargin(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, unsigned nMargin)
Set the margin around of a textual element.
Definition: GUIslice.c:3316
void gslc_InvalidateRgnScreen(gslc_tsGui *pGui)
Mark the entire screen as invalidated.
Definition: GUIslice.c:1427
gslc_tsElemRef * pElemRefParent
Parent element reference.
Definition: GUIslice.h:618
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.
Definition: GUIslice.c:1351
void gslc_CollectInput(gslc_tsGui *pGui, gslc_tsCollect *pCollect, gslc_tsEventTouch *pEventTouch)
Handle direct input events within the element collection.
Definition: GUIslice.c:3732
int gslc_CollectGetNextId(gslc_tsGui *pGui, gslc_tsCollect *pCollect)
Allocate the next available Element ID in a collection.
Definition: GUIslice.c:5202
void gslc_DrawLineH(gslc_tsGui *pGui, int16_t nX, int16_t nY, uint16_t nW, gslc_tsColor nCol)
Draw a horizontal line.
Definition: GUIslice.c:1227
Starting Font ID for user assignments.
Definition: GUIslice.h:148
No text string present.
Definition: GUIslice.h:467
bool gslc_ElemGetVisible(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the visibility status for an element.
Definition: GUIslice.c:3567
gslc_teInitStat eInitStatTouch
Status of touch initialization.
Definition: GUIslice.h:756
int16_t nY
Touch Y coordinate (or param2)
Definition: GUIslice.h:555
Current page.
Definition: GUIslice.h:126
Starting Page ID for user assignments.
Definition: GUIslice.h:118
gslc_teTxtFlags eTxtFlags
Flags associated with text buffer.
Definition: GUIslice.h:628
Button A (short press)
Definition: GUIslice.h:286
void gslc_SetTouchRemapYX(gslc_tsGui *pGui, bool bSwap)
Configure touchscreen XY swap.
Definition: GUIslice.c:4391
Advance focus to the next GUI element.
Definition: GUIslice.h:276
gslc_tsElemRef * gslc_CollectFindElemFromCoord(gslc_tsGui *pGui, gslc_tsCollect *pCollect, int16_t nX, int16_t nY)
Find an element in a collection by a coordinate coordinate.
Definition: GUIslice.c:5226
Line element type.
Definition: GUIslice.h:171
gslc_tsElemRef * gslc_ElemCreateImg(gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem, gslc_tsImgRef sImgRef)
Create an image Element.
Definition: GUIslice.c:2775
Event structure.
Definition: GUIslice.h:541
void gslc_DrawFrameQuad(gslc_tsGui *pGui, gslc_tsPt *psPt, gslc_tsColor nCol)
Draw a framed quadrilateral.
Definition: GUIslice.c:1706
void gslc_SetPageOverlay(gslc_tsGui *pGui, int16_t nPageId)
Select a page for the overlay layer in the page stack.
Definition: GUIslice.c:2100
gslc_tsColor sTransCol
Color used for transparent image regions (GSLC_BMP_TRANS_EN=1)
Definition: GUIslice.h:747
int16_t gslc_sinFX(int16_t n64Ang)
Calculate fixed-point sine function from fractional degrees.
Definition: GUIslice.c:1002
No Font ID has been assigned.
Definition: GUIslice.h:149
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.
Definition: GUIslice.c:3234
uint8_t b
RGB blue value.
Definition: GUIslice.h:537
Touch event (move inside tracked element)
Definition: GUIslice.h:323
gslc_tsColor colElemFillGlow
Color to use for fill when glowing.
Definition: GUIslice.h:605
uint8_t nInputMapCnt
Current number of input maps.
Definition: GUIslice.h:805
void gslc_CollectSetElemTracked(gslc_tsGui *pGui, gslc_tsCollect *pCollect, gslc_tsElemRef *pElemRef)
Set the element within a collection that is currently being tracked.
Definition: GUIslice.c:5216
Touch event (move outside tracked element)
Definition: GUIslice.h:324
gslc_tsColor colElemText
Color of overlay text.
Definition: GUIslice.h:631
uint8_t nFlipX
Adafruit GFX Touch Flip x axis.
Definition: GUIslice.h:730
int16_t nElemAutoIdNext
Next Element ID for auto-assignment.
Definition: GUIslice.h:660
gslc_teFontRefType
Font Reference types.
Definition: GUIslice.h:383
Text string allocated in external memory (GSLC_STR_LOCAL=0), ie. user code.
Definition: GUIslice.h:469
int16_t nTouchCalPressMax
Calibration maximum pressure threshold.
Definition: GUIslice.h:738
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.
Definition: GUIslice.c:3249
struct gslc_tsElem gslc_tsElem
Element Struct.
Definition: GUIslice.h:486
Definition: GUIslice.h:478
Image is stored on SD card.
Definition: GUIslice.h:440
gslc_tsFont * asFont
Collection of loaded fonts.
Definition: GUIslice.h:741
Touch event (down)
Definition: GUIslice.h:316
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.
Definition: GUIslice.c:1977
gslc_teInitStat
Status of a module's initialization.
Definition: GUIslice.h:335
gslc_tsColor colElemTextGlow
Color of overlay text when glowing.
Definition: GUIslice.h:632
bool bInvalidateEn
A region of the display has been invalidated.
Definition: GUIslice.h:794
void gslc_DrawFrameRoundRect(gslc_tsGui *pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a framed rounded rectangle.
Definition: GUIslice.c:1287
Button D (long press)
Definition: GUIslice.h:293
gslc_tsElemRef * gslc_ElemCreateBox(gslc_tsGui *pGui, int16_t nElemId, int16_t nPage, gslc_tsRect rElem)
Create a Box Element.
Definition: GUIslice.c:2719
Touch event (up outside tracked element)
Definition: GUIslice.h:321
uint8_t nSwapXY
Adafruit GFX Touch Swap x and y axes.
Definition: GUIslice.h:729
Module is enabled and initalized OK.
Definition: GUIslice.h:339
Direct event select focus element.
Definition: GUIslice.h:328
Force a full redraw.
Definition: GUIslice.h:366
void gslc_StrCopy(char *pDstStr, const char *pSrcStr, uint16_t nDstLen)
Helper routine to perform string deep copy.
Definition: GUIslice.c:3337
Encoding is plain text (LATIN1))
Definition: GUIslice.h:470
struct gslc_tsRect gslc_tsRect
Rectangular region. Defines X,Y corner coordinates plus dimensions.
int16_t nTouchLastY
Last touch event Y coord.
Definition: GUIslice.h:759
void gslc_ElemUpdateFont(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int nFontId)
Update the Font selected for an Element's text.
Definition: GUIslice.c:3422
uint8_t nDispDepth
Bit depth of display (bits per pixel)
Definition: GUIslice.h:722
gslc_teElemId
Element ID enumerations.
Definition: GUIslice.h:98
const unsigned char * pImgBuf
Pointer to input image buffer in memory [RAM,FLASH].
Definition: GUIslice.h:570
int16_t nPageId
Page identifier.
Definition: GUIslice.h:688
int16_t nTouchCalPressMin
Calibration minimum pressure threshold.
Definition: GUIslice.h:737
void gslc_ElemSetTxtEnc(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teTxtFlags eFlags)
Update the text string encoding mode.
Definition: GUIslice.c:3413
Base page.
Definition: GUIslice.h:125
gslc_tsInputMap * asInputMap
Array of input maps.
Definition: GUIslice.h:803
Box / frame element type.
Definition: GUIslice.h:170
void gslc_PageDestruct(gslc_tsGui *pGui, gslc_tsPage *pPage)
Free up any members associated with a page.
Definition: GUIslice.c:5006
Button A (long press)
Definition: GUIslice.h:287
int16_t nTouchLastX
Last touch event X coord.
Definition: GUIslice.h:758
void gslc_SetRoundRadius(gslc_tsGui *pGui, uint8_t nRadius)
Set the global rounded radius.
Definition: GUIslice.c:2605
gslc_tePin
General purpose pin/button constants.
Definition: GUIslice.h:285
bool gslc_SetBkgndColor(gslc_tsGui *pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
Definition: GUIslice.c:4841
gslc_tsImgRef gslc_ResetImage()
Create a blank image reference structure.
Definition: GUIslice.c:932
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.
Definition: GUIslice.c:4331
gslc_teRedrawType
Redraw types.
Definition: GUIslice.h:370
Touch event (down inside tracked element)
Definition: GUIslice.h:317
Button B (short press)
Definition: GUIslice.h:288
Default font mode.
Definition: GUIslice.h:396
bool gslc_ColorEqual(gslc_tsColor a, gslc_tsColor b)
Check whether two colors are equal.
Definition: GUIslice.c:1145
void gslc_ElemSetGlow(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bGlowing)
Update the glowing indicator for an element.
Definition: GUIslice.c:3516
Button Left (short press)
Definition: GUIslice.h:298
int16_t nGroup
Group ID that the element belongs to.
Definition: GUIslice.h:600
void gslc_InvalidateRgnAdd(gslc_tsGui *pGui, gslc_tsRect rAddRect)
Add a rectangular region to the invalidation region.
Definition: GUIslice.c:1451
uint16_t nDisp0H
Height of the display (pixels) in native orientation.
Definition: GUIslice.h:721
uint16_t h
Height of region.
Definition: GUIslice.h:523
bool gslc_SetTransparentColor(gslc_tsGui *pGui, gslc_tsColor nCol)
Configure the color to use for image transparency.
Definition: GUIslice.c:4851
Key press up (released)
Definition: GUIslice.h:264
gslc_tsElemRef * pElemRefTracked
Element reference currently being touch-tracked (NULL for none)
Definition: GUIslice.h:667
void gslc_PageRedrawCalc(gslc_tsGui *pGui)
Perform a redraw calculation on the page to determine if additional elements should also be redrawn...
Definition: GUIslice.c:2164
struct gslc_tsEvent gslc_tsEvent
Event structure.
Definition: GUIslice.h:487
Full redraw of element requested.
Definition: GUIslice.h:372
Encoding is UTF-8.
Definition: GUIslice.h:471
void gslc_ElemSetFillEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFillEn)
Set the fill state for an Element.
Definition: GUIslice.c:3193
Touch event (down outside tracked element)
Definition: GUIslice.h:318
void * pvDriver
Driver-specific members (gslc_tsDriver*)
Definition: GUIslice.h:765
User elements start at index 0.
Definition: GUIslice.h:159
Font mode 1.
Definition: GUIslice.h:397
Module status has not been defined yet.
Definition: GUIslice.h:336
gslc_tsImgRef sImgRefNorm
Image reference to draw (normal)
Definition: GUIslice.h:607
uint8_t nFontMax
Maximum number of fonts to allocate.
Definition: GUIslice.h:742
gslc_teTypeCore
Element type.
Definition: GUIslice.h:164
gslc_tsCollect sCollect
Collection of elements on page.
Definition: GUIslice.h:686
Font reference is a pointer to a font structure.
Definition: GUIslice.h:385
int gslc_GetPageCur(gslc_tsGui *pGui)
Fetch the current page ID.
Definition: GUIslice.c:2015
int16_t x
X coordinate.
Definition: GUIslice.h:529
Element is read/write Stored in RAM (internal element array)) Access directly.
Definition: GUIslice.h:408
void gslc_DrawFrameRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
Definition: GUIslice.c:1260
Image reference structure.
Definition: GUIslice.h:569
bool gslc_CollectGetRedraw(gslc_tsGui *pGui, gslc_tsCollect *pCollect)
Determine if any elements in a collection need redraw.
Definition: GUIslice.c:4701
gslc_teElemRefFlags
Element reference flags: Describes characteristics of an element.
Definition: GUIslice.h:405
Incremental redraw (as needed)
Definition: GUIslice.h:365
gslc_teTxtFlags
Text reference flags: Describes the characteristics of a text string (ie.
Definition: GUIslice.h:463
int8_t nTxtMarginY
Margin of overlay text within rect region (y offset)
Definition: GUIslice.h:635
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.
Definition: GUIslice.c:1113
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.
Definition: GUIslice.c:2646
gslc_teAction eAction
Resulting action.
Definition: GUIslice.h:708
Starting Element ID to start auto-assignment (when GSLC_ID_AUTO is specified)
Definition: GUIslice.h:105
Direct event focus on element.
Definition: GUIslice.h:326
Image is stored in file system.
Definition: GUIslice.h:439
void gslc_ResetFont(gslc_tsFont *pFont)
Initialize a Font struct.
Definition: GUIslice.c:4937
GSLC_CB_TOUCH pfuncXTouch
Callback func ptr for touch.
Definition: GUIslice.h:645
gslc_tsRect rElem
Rect region containing element.
Definition: GUIslice.h:599
uint16_t nDispW
Width of the display (pixels)
Definition: GUIslice.h:718
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.
Definition: GUIslice.c:1169
Font mode 2.
Definition: GUIslice.h:398
bool gslc_IsInRect(int16_t nSelX, int16_t nSelY, gslc_tsRect rRect)
Determine if a coordinate is inside of a rectangular region.
Definition: GUIslice.c:766
No redraw requested.
Definition: GUIslice.h:418
void gslc_ResetElem(gslc_tsElem *pElem)
Initialize an Element struct.
Definition: GUIslice.c:4887
Perform background tick handling.
Definition: GUIslice.h:358
Incremental redraw of element requested.
Definition: GUIslice.h:420
bool bTouchRemapYX
Enable touch controller swapping of X & Y.
Definition: GUIslice.h:762
void gslc_ElemSetStyleFrom(gslc_tsGui *pGui, gslc_tsElemRef *pElemRefSrc, gslc_tsElemRef *pElemRefDest)
Copy style settings from one element to another.
Definition: GUIslice.c:3637
uint16_t nElemCnt
Number of elements allocated.
Definition: GUIslice.h:659
void gslc_PageFlipSet(gslc_tsGui *pGui, bool bNeeded)
Indicate whether the screen requires page flip.
Definition: GUIslice.c:2341
void gslc_ElemSetRect(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsRect rElem)
Set the position and size for an element.
Definition: GUIslice.c:3280
gslc_tsPage * asPage
Array of all pages defined in system.
Definition: GUIslice.h:781
Key press down / pin input asserted.
Definition: GUIslice.h:263
gslc_tsRect rInvalidateRect
The rect region that has been invalidated.
Definition: GUIslice.h:795
Element state is glowing.
Definition: GUIslice.h:422
gslc_teElemRefFlags eElemFlags
Element reference flags.
Definition: GUIslice.h:580
uint8_t r
RGB red value.
Definition: GUIslice.h:535
void gslc_CollectSetFocus(gslc_tsGui *pGui, gslc_tsCollect *pCollect, int16_t nElemInd)
Set the element index within a collection that is currently in focus.
Definition: GUIslice.c:5260
bool gslc_ElemGetGlowEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the glowing enable for an element.
Definition: GUIslice.c:3607
int8_t nTxtMarginX
Margin of overlay text within rect region (x offset)
Definition: GUIslice.h:634
void gslc_DrawFrameCircle(gslc_tsGui *pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor nCol)
Draw a framed circle.
Definition: GUIslice.c:1464
void gslc_ElemSetFrameEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bFrameEn)
Set the frame state for an Element.
Definition: GUIslice.c:3207
Text label element type.
Definition: GUIslice.h:169
bool gslc_PageFlipGet(gslc_tsGui *pGui)
Get state of pending page flip state.
Definition: GUIslice.c:2357
void gslc_PageRedrawGo(gslc_tsGui *pGui)
Redraw all elements on the active page.
Definition: GUIslice.c:2235
bool gslc_FontSetMode(gslc_tsGui *pGui, int16_t nFontId, gslc_teFontRefMode eFontMode)
Set the font operating mode.
Definition: GUIslice.c:1918
gslc_teRedrawType gslc_ElemGetRedraw(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the need-redraw status for an element.
Definition: GUIslice.c:3495
void gslc_PopupHide(gslc_tsGui *pGui)
Hides the currently active popup dialog.
Definition: GUIslice.c:2125
gslc_tsFont * gslc_FontGet(gslc_tsGui *pGui, int16_t nFontId)
Fetch a font from its ID value.
Definition: GUIslice.c:1907
uint8_t nSubType
Event sub-type.
Definition: GUIslice.h:543
bool gslc_ElemEvent(void *pvGui, gslc_tsEvent sEvent)
Common event handler function for an element.
Definition: GUIslice.c:2809
gslc_teAction
GUI Action Requested These actions are usually the result of an InputMap lookup.
Definition: GUIslice.h:272
void gslc_ElemSetTickFunc(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_TICK funcCb)
Assign the tick callback function for an element.
Definition: GUIslice.c:3706
Button Select (short press)
Definition: GUIslice.h:300
bool bTouchRemapEn
Enable touch remapping?
Definition: GUIslice.h:761
int16_t y
Y coordinate.
Definition: GUIslice.h:530
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...
Definition: GUIslice.c:4211
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.
Definition: GUIslice.c:2934
uint8_t nRotation
Adafruit GFX Rotation of display.
Definition: GUIslice.h:725
void gslc_SetTouchPressCal(gslc_tsGui *pGui, uint16_t nPressMin, uint16_t nPressMax)
Configure touchscreen calibration pressure values.
Definition: GUIslice.c:4380
Button Right (short press)
Definition: GUIslice.h:299
int gslc_ElemGetId(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get an Element ID from an element structure.
Definition: GUIslice.c:2481
uint8_t nFontCnt
Number of fonts allocated.
Definition: GUIslice.h:743
int16_t x
X coordinate of corner.
Definition: GUIslice.h:520
Incremental redraw of element requested.
Definition: GUIslice.h:373
gslc_tsElemRef * gslc_CollectElemAdd(gslc_tsGui *pGui, gslc_tsCollect *pCollect, const gslc_tsElem *pElem, gslc_teElemRefFlags eFlags)
Add an element to a collection.
Definition: GUIslice.c:4603
No input event.
Definition: GUIslice.h:261
gslc_tsImgRef gslc_GetImageFromFile(const char *pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in LINUX filesystem.
Definition: GUIslice.c:942
gslc_tsElemRef * gslc_CollectGetElemRefTracked(gslc_tsGui *pGui, gslc_tsCollect *pCollect)
Get the element within a collection that is currently being tracked.
Definition: GUIslice.c:5210
int16_t nActionVal
The value for the output action.
Definition: GUIslice.h:709
void gslc_DebugPrintf(const char *pFmt,...)
Optimized printf routine for GUIslice debug/error output.
Definition: GUIslice.c:392
GSLC_CB_EVENT pfuncXEvent
UNUSED: Callback func ptr for event tree (draw,touch,tick)
Definition: GUIslice.h:642
uint8_t nStrBufMax
Size of string buffer.
Definition: GUIslice.h:627
gslc_teEventType eType
Event type.
Definition: GUIslice.h:542
Module is not enabled.
Definition: GUIslice.h:337
bool gslc_CollectFindFocusStep(gslc_tsGui *pGui, gslc_tsCollect *pCollect, bool bNext, bool *pbWrapped, int16_t *pnElemInd)
Definition: GUIslice.c:5090
Mask for type: coord/direct mode.
Definition: GUIslice.h:309
Defines maximum number of pages in stack.
Definition: GUIslice.h:129
void gslc_CollectDestruct(gslc_tsGui *pGui, gslc_tsCollect *pCollect)
Free up any members associated with an element collection.
Definition: GUIslice.c:4979
void gslc_SetStackPage(gslc_tsGui *pGui, uint8_t nStackPos, int16_t nPageId)
Assign a page to the page stack.
Definition: GUIslice.c:2024
struct gslc_tsPt gslc_tsPt
Define point coordinates.
Image format is JPG (ESP32/ESP8366)
Definition: GUIslice.h:448
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.
Definition: GUIslice.c:1619
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.
Definition: GUIslice.c:2406
gslc_tsElemRef * asElemRef
Array of element references.
Definition: GUIslice.h:662
int16_t nTouchCalYMax
Calibration Y maximum reading.
Definition: GUIslice.h:736
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.
Definition: GUIslice.c:2745
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.
Definition: GUIslice.c:1588
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. ...
Definition: GUIslice.c:3972
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.
Definition: GUIslice.c:1249
Button C (short press)
Definition: GUIslice.h:290
int16_t gslc_cosFX(int16_t n64Ang)
Calculate fixed-point cosine function from fractional degrees.
Definition: GUIslice.c:1070
uint8_t nPageMax
Maximum number of pages that can be defined.
Definition: GUIslice.h:782
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.
Definition: GUIslice.c:1818
void gslc_ElemSetTxtStr(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, const char *pStr)
Update the text string associated with an Element.
Definition: GUIslice.c:3353
gslc_teStackPage
Define page stack.
Definition: GUIslice.h:124
Definition: GUIslice.h:364
const char * pFname
Pathname to input image file [FILE,SD].
Definition: GUIslice.h:571
bool gslc_InitTouch(gslc_tsGui *pGui, const char *acDev)
Initialize the touchscreen device driver.
Definition: GUIslice.c:4301
bool gslc_ElemDrawByRef(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teRedrawType eRedraw)
Draw an element to the active display.
Definition: GUIslice.c:3033
No redraw requested.
Definition: GUIslice.h:371
struct gslc_tsEventTouch gslc_tsEventTouch
Structure used to pass touch data through event.
uint16_t nDispH
Height of the display (pixels)
Definition: GUIslice.h:719
gslc_tePageId
Page ID enumerations.
Definition: GUIslice.h:116
No element defined.
Definition: GUIslice.h:406
gslc_tsColor colElemFrameGlow
Color to use for frame when glowing.
Definition: GUIslice.h:604
Rectangular region. Defines X,Y corner coordinates plus dimensions.
Definition: GUIslice.h:519
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.
Definition: GUIslice.c:776
void gslc_SetStackState(gslc_tsGui *pGui, uint8_t nStackPos, bool bActive, bool bDoDraw)
Change the status of a page in a page stack.
Definition: GUIslice.c:2079
gslc_teInputRawEvent
Raw input event types: touch, key, GPIOs.
Definition: GUIslice.h:260
Direct event set value (relative) on focus element.
Definition: GUIslice.h:329
Image format is raw monochrome (1-bit)
Definition: GUIslice.h:447
Text string is in PROGMEM (read-only)
Definition: GUIslice.h:466
void gslc_PopupShow(gslc_tsGui *pGui, int16_t nPageId, bool bModal)
Show a popup dialog.
Definition: GUIslice.c:2105
int16_t(* GSLC_CB_DEBUG_OUT)(char ch)
Definition: GUIslice.h:73
uint8_t nPageCnt
Current number of pages defined.
Definition: GUIslice.h:783
uint16_t w
Width of region.
Definition: GUIslice.h:522
bool gslc_ClipPt(gslc_tsRect *pClipRect, int16_t nX, int16_t nY)
Perform basic clipping of a single point to a clipping region.
Definition: GUIslice.c:804
gslc_tsFont * pTxtFont
Ptr to Font for overlay text.
Definition: GUIslice.h:636
bool gslc_ElemSendEventTouch(gslc_tsGui *pGui, gslc_tsElemRef *pElemRefTracked, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Trigger an element's touch event.
Definition: GUIslice.c:4869
Base value for extended type enumerations.
Definition: GUIslice.h:174
GPIO pin input deasserted (eg. set to 0 / Low)
Definition: GUIslice.h:266
GSLC_CB_DEBUG_OUT g_pfDebugOut
Global debug output function.
Definition: GUIslice.c:76
Custom event.
Definition: GUIslice.h:359
void gslc_InitDebug(GSLC_CB_DEBUG_OUT pfunc)
Initialize debug output.
Definition: GUIslice.c:360
void * gslc_GetXDataFromRef(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nType, int16_t nLineNum)
Returns a pointer to the data structure associated with an extended element.
Definition: GUIslice.c:2576
Direct event set value (absolute) on focus element.
Definition: GUIslice.h:330
uint16_t nElemMax
Maximum number of elements to allocate (in RAM)
Definition: GUIslice.h:658
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.
Definition: GUIslice.c:1154
No event; ignore.
Definition: GUIslice.h:355
void gslc_InvalidateRgnReset(gslc_tsGui *pGui)
Reset the invalidation region.
Definition: GUIslice.c:1418
uint8_t nRoundRadius
Radius for rounded elements.
Definition: GUIslice.h:745
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).
Definition: GUIslice.c:1886
void gslc_DrawLineV(gslc_tsGui *pGui, int16_t nX, int16_t nY, uint16_t nH, gslc_tsColor nCol)
Draw a vertical line.
Definition: GUIslice.c:1237
Advance focus to the previous GUI element.
Definition: GUIslice.h:275
gslc_tsElemRef * gslc_ElemAdd(gslc_tsGui *pGui, int16_t nPageId, gslc_tsElem *pElem, gslc_teElemRefFlags eFlags)
Add the Element to the list of generated elements in the GUI environment.
Definition: GUIslice.c:4732
Auto-assigned Element ID requested.
Definition: GUIslice.h:102
int16_t nId
Element ID specified by user.
Definition: GUIslice.h:595
bool bScreenNeedFlip
Screen requires a page flip.
Definition: GUIslice.h:791
gslc_teImgRefFlags eImgFlags
Image reference flags.
Definition: GUIslice.h:572
void gslc_SetTouchRemapCal(gslc_tsGui *pGui, uint16_t nXMin, uint16_t nXMax, uint16_t nYMin, uint16_t nYMax)
Configure touchscreen calibration remapping values.
Definition: GUIslice.c:4367
bool gslc_PageRedrawGet(gslc_tsGui *pGui)
Get the need-redraw status for the current page.
Definition: GUIslice.c:2146
bool bScreenNeedRedraw
Screen requires a redraw.
Definition: GUIslice.h:790
void gslc_ElemSetGroup(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int nGroupId)
Set the group ID for an element.
Definition: GUIslice.c:3264
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.
Definition: GUIslice.c:1825
Touch event (up inside tracked element)
Definition: GUIslice.h:320
uint16_t nDisp0W
Width of the display (pixels) in native orientation.
Definition: GUIslice.h:720
Mask for Redraw flags.
Definition: GUIslice.h:427
bool gslc_CollectEvent(void *pvGui, gslc_tsEvent sEvent)
Common event handler function for an element collection.
Definition: GUIslice.c:4535
No element type specified.
Definition: GUIslice.h:166
bool(* GSLC_CB_TOUCH)(void *pvGui, void *pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY)
Callback function for element touch tracking.
Definition: GUIslice.h:502
uint8_t g
RGB green value.
Definition: GUIslice.h:536
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.
Definition: GUIslice.c:1122
gslc_teInputRawEvent eEvent
The input event.
Definition: GUIslice.h:706
bool gslc_ClipRect(gslc_tsRect *pClipRect, gslc_tsRect *pRect)
Perform basic clipping of a rectangle to a clipping region.
Definition: GUIslice.c:905
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 st...
Definition: GUIslice.c:2519
Touch event (move)
Definition: GUIslice.h:322
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.
Definition: GUIslice.c:2617
gslc_tsImgRef sImgRefGlow
Image reference to draw (glowing)
Definition: GUIslice.h:608
gslc_tsEvent gslc_EventCreate(gslc_tsGui *pGui, gslc_teEventType eType, uint8_t nSubType, void *pvScope, void *pvData)
Create an event structure.
Definition: GUIslice.c:749
Button E (long press)
Definition: GUIslice.h:295
void * gslc_GetDriverDisp(gslc_tsGui *pGui)
Get the native display driver instance.
Definition: GUIslice.c:115
Text string is in SRAM (read-write)
Definition: GUIslice.h:465
const char * gslc_GetNameTouch(gslc_tsGui *pGui)
Get the GUIslice touch driver name.
Definition: GUIslice.c:110
Button D (short press)
Definition: GUIslice.h:292
void * gslc_GetDriverTouch(gslc_tsGui *pGui)
Get the native touch driver instance.
Definition: GUIslice.c:120
void gslc_ElemSetDrawFunc(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_DRAW funcCb)
Assign the drawing callback function for an element.
Definition: GUIslice.c:3697
gslc_teElemInd
Element Index enumerations.
Definition: GUIslice.h:156
void gslc_SetTouchRemapEn(gslc_tsGui *pGui, bool bEn)
Configure touchscreen remapping.
Definition: GUIslice.c:4357
gslc_teImgRefFlags
Image reference flags: Describes characteristics of an image reference.
Definition: GUIslice.h:436
bool gslc_SetBkgndImage(gslc_tsGui *pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
Definition: GUIslice.c:4831
No Element ID has been assigned.
Definition: GUIslice.h:101
bool gslc_ElemGetGlow(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the glowing indicator for an element.
Definition: GUIslice.c:3534
int16_t gslc_CollectGetFocus(gslc_tsGui *pGui, gslc_tsCollect *pCollect)
Get the element index within a collection that is currently in focus.
Definition: GUIslice.c:5254
No image defined.
Definition: GUIslice.h:437
const char * gslc_GetNameDisp(gslc_tsGui *pGui)
Get the GUIslice display driver name.
Definition: GUIslice.c:105
Element is currently shown (ie. visible)
Definition: GUIslice.h:423
int16_t y
Y coordinate of corner.
Definition: GUIslice.h:521
gslc_tsElemRef sElemRefTmp
Temporary element reference.
Definition: GUIslice.h:751
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.
Definition: GUIslice.c:3714
uint8_t nTouchRotation
Touchscreen rotation offset vs display.
Definition: GUIslice.h:728
void gslc_TrackInput(gslc_tsGui *pGui, gslc_tsPage *pPage, gslc_teInputRawEvent eInputEvent, int16_t nInputVal)
Handles a direct input event and performs the necessary tracking, glowing and selection actions depen...
Definition: GUIslice.c:4024
uint16_t nSize
Font size.
Definition: GUIslice.h:564
Track touch event.
Definition: GUIslice.h:357
Element collection struct.
Definition: GUIslice.h:656
Structure used to pass touch data through event.
Definition: GUIslice.h:552
void gslc_ElemSetVisible(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bVisible)
Update the visibility status for an element.
Definition: GUIslice.c:3544
bool gslc_PageEvent(void *pvGui, gslc_tsEvent sEvent)
Common event handler function for a page.
Definition: GUIslice.c:1936
Image is stored in program memory (PROGMEM)
Definition: GUIslice.h:442
void gslc_ElemSetTxtAlign(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, unsigned nAlign)
Set the alignment of a textual element (horizontal and vertical)
Definition: GUIslice.c:3307
uint16_t nElemRefMax
Maximum number of element references to allocate.
Definition: GUIslice.h:663
void * pvImgRaw
Ptr to raw output image data (for pre-loaded images)
Definition: GUIslice.h:573
Button B (long press)
Definition: GUIslice.h:289
bool gslc_InputMapLookup(gslc_tsGui *pGui, gslc_teInputRawEvent eInputEvent, int16_t nInputVal, gslc_teAction *peAction, int16_t *pnActionVal)
Definition: GUIslice.c:329
bool gslc_ElemGetOnScreen(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Determine whether an element is visible on the screen.
Definition: GUIslice.c:3577
Text string allocated in internal element memory (GSLC_STR_LOCAL=1)
Definition: GUIslice.h:468
Element reference structure.
Definition: GUIslice.h:578
gslc_teEventType
Event types.
Definition: GUIslice.h:354
void gslc_ElemSetGlowEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bGlowEn)
Update the glowing enable for an element.
Definition: GUIslice.c:3594
uint16_t nElemRefCnt
Number of element references allocated.
Definition: GUIslice.h:664
GSLC_CB_TICK pfuncXTick
Callback func ptr for timer/main loop tick.
Definition: GUIslice.h:646
gslc_teFontRefMode
Font Reference modes.
Definition: GUIslice.h:395
Mask for Source flags.
Definition: GUIslice.h:426
No Element Index is available.
Definition: GUIslice.h:158
gslc_tsElem * asElem
Array of elements.
Definition: GUIslice.h:657
gslc_tsElem * gslc_GetElemFromRefD(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, int16_t nLineNum)
Returns a pointer to an element from an element reference.
Definition: GUIslice.c:2561
No touch event active.
Definition: GUIslice.h:306
Event based on touch coordinate.
Definition: GUIslice.h:310
bool gslc_Init(gslc_tsGui *pGui, void *pvDriver, gslc_tsPage *asPage, uint8_t nMaxPage, gslc_tsFont *asFont, uint8_t nMaxFont)
Initialize the GUIslice library.
Definition: GUIslice.c:126
int16_t nX
Touch X coordinate (or param1)
Definition: GUIslice.h:554
int16_t gslc_PageFocusStep(gslc_tsGui *pGui, gslc_tsPage *pPage, bool bNext)
Definition: GUIslice.c:2447
Image format is BMP (16-bit RGB565)
Definition: GUIslice.h:446
Mask for updating location of text string buffer allocation.
Definition: GUIslice.h:475
uint8_t nInputMapMax
Maximum number of input maps.
Definition: GUIslice.h:804
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.
Definition: GUIslice.c:818
void gslc_ElemSetTxtCol(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsColor colVal)
Update the text string color associated with an Element ID.
Definition: GUIslice.c:3381
void * pvData
Generic data pointer for event.
Definition: GUIslice.h:545
void gslc_ElemSetImage(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_tsImgRef sImgRef, gslc_tsImgRef sImgRefSel)
Set an element to use a bitmap image.
Definition: GUIslice.c:4804
int16_t nTouchCalXMin
Calibration X minimum reading.
Definition: GUIslice.h:733
gslc_tsElem * pElem
Pointer to element in memory [RAM,FLASH].
Definition: GUIslice.h:579
Adjust value (relative) of focused element.
Definition: GUIslice.h:278
Select the currently focused GUI element.
Definition: GUIslice.h:277
void gslc_ElemSetRedraw(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teRedrawType eRedraw)
Update the need-redraw status for an element.
Definition: GUIslice.c:3432
void gslc_SetElemRefFlag(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, uint8_t nFlagMask, uint8_t nFlagVal)
Set the flags associated with an element reference.
Definition: GUIslice.c:2504
void gslc_DrawFillRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
Definition: GUIslice.c:1306
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.
Definition: GUIslice.c:5052
Invalid action.
Definition: GUIslice.h:273
uint16_t nTouchLastPress
Last touch event pressure (0=none))
Definition: GUIslice.h:760
gslc_tsElemRef * gslc_CollectFindElemById(gslc_tsGui *pGui, gslc_tsCollect *pCollect, int16_t nElemId)
Find an element in a collection by its Element ID.
Definition: GUIslice.c:5169
gslc_teGroupId
Group ID enumerations.
Definition: GUIslice.h:133
bool(* GSLC_CB_TICK)(void *pvGui, void *pvElemRef)
Callback function for element tick.
Definition: GUIslice.h:505
bool(* GSLC_CB_PIN_POLL)(void *pvGui, int16_t *pnPinInd, int16_t *pnPinVal)
Callback function for pin polling.
Definition: GUIslice.h:508
gslc_tsImgRef gslc_GetImageFromSD(const char *pFname, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap file in SD card.
Definition: GUIslice.c:952
GSLC_CB_PIN_POLL pfuncPinPoll
Callback func ptr for pin polling.
Definition: GUIslice.h:799
gslc_tsImgRef gslc_GetImageFromProg(const unsigned char *pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in program memory (PROGMEM)
Definition: GUIslice.c:982
gslc_teFontRefType eFontRefType
Font reference type.
Definition: GUIslice.h:561
uint8_t nFrameRateCnt
Diagnostic frame rate count.
Definition: GUIslice.h:776
No action to perform.
Definition: GUIslice.h:274
void gslc_Update(gslc_tsGui *pGui)
Perform main GUIslice handling functions.
Definition: GUIslice.c:582
Starting Group ID for user assignments.
Definition: GUIslice.h:135
Touch / mouse event.
Definition: GUIslice.h:262
int16_t nType
Element type enumeration.
Definition: GUIslice.h:598
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.
Definition: GUIslice.c:4420
void gslc_InvalidateRgnPage(gslc_tsGui *pGui, gslc_tsPage *pPage)
Include an entire page (eg.
Definition: GUIslice.c:1436
void gslc_ElemSetTxtMem(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, gslc_teTxtFlags eFlags)
Update the text string location in memory.
Definition: GUIslice.c:3395
Direct event focus away from focused element.
Definition: GUIslice.h:327
gslc_tsRect rBounds
Bounding rect for page elements.
Definition: GUIslice.h:694
uint8_t nFeatures
Element feature vector (appearance/behavior))
Definition: GUIslice.h:596
gslc_tsElem sElemTmp
Temporary element.
Definition: GUIslice.h:750
GPIO pin input asserted (eg. set to 1 / High)
Definition: GUIslice.h:265
gslc_teTouch
Processed event from input raw events and actions.
Definition: GUIslice.h:305
void gslc_Quit(gslc_tsGui *pGui)
Exit the GUIslice environment.
Definition: GUIslice.c:574
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.
Definition: GUIslice.c:2685
void gslc_UnionRect(gslc_tsRect *pRect, gslc_tsRect rAddRect)
Expand a rect to include another rect.
Definition: GUIslice.c:1380
int16_t nVal
The value associated with the input event.
Definition: GUIslice.h:707
ID for Temporary Element.
Definition: GUIslice.h:103
void gslc_ElemDestruct(gslc_tsElem *pElem)
Free up any members associated with an element.
Definition: GUIslice.c:4953
int16_t nElemIndFocused
Element index currently in focus (eg. by keyboard/pin control), GSLC_IND_NONE for none...
Definition: GUIslice.h:670
gslc_teEventSubType
Event sub-types.
Definition: GUIslice.h:363
gslc_teFontRefMode eFontRefMode
Font reference mode.
Definition: GUIslice.h:562
int gslc_ElemGetGroup(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the group ID for an element.
Definition: GUIslice.c:3272
char * pStrBuf
Ptr to text string buffer to overlay.
Definition: GUIslice.h:625
gslc_tsRect gslc_ElemGetRect(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef)
Get the rectangular region for an element.
Definition: GUIslice.c:3298
void gslc_ElemSetRoundEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bRoundEn)
Set the rounded frame/fill state for an Element.
Definition: GUIslice.c:3220
void gslc_ElemSetTouchFunc(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, GSLC_CB_TOUCH funcCb)
Update the touch function callback for an element.
Definition: GUIslice.c:3628
Define point coordinates.
Definition: GUIslice.h:528
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)
Definition: GUIslice.c:1866
void gslc_SetPageCur(gslc_tsGui *pGui, int16_t nPageId)
Select a page for the current layer in the page stack.
Definition: GUIslice.c:2095
uint8_t gslc_GetElemRefFlag(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, uint8_t nFlagMask)
Get the flags associated with an element reference.
Definition: GUIslice.c:2491
Button E (short press)
Definition: GUIslice.h:294
bool gslc_SetClipRect(gslc_tsGui *pGui, gslc_tsRect *pRect)
Set the clipping rectangle for further drawing.
Definition: GUIslice.c:4779
GUI structure.
Definition: GUIslice.h:716
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)
Definition: GUIslice.c:3326
bool gslc_GuiRotate(gslc_tsGui *pGui, uint8_t nRotation)
Dynamically change rotation, automatically adapt touchscreen axes swap/flip.
Definition: GUIslice.c:4857
Button Up (short press)
Definition: GUIslice.h:296
gslc_teFontId
Font ID enumerations.
Definition: GUIslice.h:146
Mask for updating text memory type.
Definition: GUIslice.h:474
Element Struct.
Definition: GUIslice.h:593
int16_t nTouchCalXMax
Calibration X maximum reading.
Definition: GUIslice.h:734
Perform redraw.
Definition: GUIslice.h:356
Color structure. Defines RGB triplet.
Definition: GUIslice.h:534
Element is read-only / const Stored in FLASH (external to element array) Access via PROGMEM...
Definition: GUIslice.h:411
void gslc_SetPageBase(gslc_tsGui *pGui, int16_t nPageId)
Assigns a page for the base layer in the page stack.
Definition: GUIslice.c:2090
uint8_t nFrameRateStart
Diagnostic frame rate timestamp.
Definition: GUIslice.h:777
Font reference structure.
Definition: GUIslice.h:559
gslc_tsRect gslc_GetClipRect(gslc_tsGui *pGui)
Get the current the clipping rectangle.
Definition: GUIslice.c:4773
Font reference is a filename (full path)
Definition: GUIslice.h:384
void * pXData
Ptr to extended data structure.
Definition: GUIslice.h:639
No Group ID has been assigned.
Definition: GUIslice.h:137
uint8_t nFlipY
Adafruit GFX Touch Flip x axis.
Definition: GUIslice.h:731
gslc_tsColor colElemFill
Color for background fill.
Definition: GUIslice.h:603
Button C (long press)
Definition: GUIslice.h:291
uint8_t nInputMode
Input mode: 0=navigate, 1=edit.
Definition: GUIslice.h:806
Image format is BMP (24-bit)
Definition: GUIslice.h:445
Mask for Source flags.
Definition: GUIslice.h:451
Button Down (short press)
Definition: GUIslice.h:297
Touch event (up)
Definition: GUIslice.h:319
void gslc_ElemSetClickEn(gslc_tsGui *pGui, gslc_tsElemRef *pElemRef, bool bClickEn)
Update the click enable for an element.
Definition: GUIslice.c:3615
Background element type.
Definition: GUIslice.h:167
No Page ID has been assigned.
Definition: GUIslice.h:120
void gslc_DrawFillQuad(gslc_tsGui *pGui, gslc_tsPt *psPt, gslc_tsColor nCol)
Draw a filled quadrilateral.
Definition: GUIslice.c:1728
Mask for updating text encoding.
Definition: GUIslice.h:476
Internal debug action.
Definition: GUIslice.h:280
Adjust value (absolute) of focused element.
Definition: GUIslice.h:279
Starting Element ID for user assignments.
Definition: GUIslice.h:100
void gslc_DrawFillCircle(gslc_tsGui *pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor nCol)
Draw a filled circle.
Definition: GUIslice.c:1535
char * gslc_GetVer(gslc_tsGui *pGui)
Get the GUIslice version number.
Definition: GUIslice.c:99
GSLC_CB_DRAW pfuncXDraw
Callback func ptr for custom drawing.
Definition: GUIslice.h:644
bool bRedrawPartialEn
Driver supports partial page redraw.
Definition: GUIslice.h:766
int16_t nTouchCalYMin
Calibration Y minimum reading.
Definition: GUIslice.h:735
gslc_tsImgRef gslc_GetImageFromRam(unsigned char *pImgBuf, gslc_teImgRefFlags eFmt)
Create an image reference to a bitmap in SRAM.
Definition: GUIslice.c:971
Event based on specific element index (keyboard/GPIO action)
Definition: GUIslice.h:311
bool(* GSLC_CB_EVENT)(void *pvGui, gslc_tsEvent sEvent)
Callback function for element drawing.
Definition: GUIslice.h:496
Full redraw of element requested.
Definition: GUIslice.h:419
Image is stored in RAM.
Definition: GUIslice.h:441
void gslc_PolarToXY(uint16_t nRad, int16_t n64Ang, int16_t *nDX, int16_t *nDY)
Convert polar coordinate to cartesian.
Definition: GUIslice.c:1102
gslc_tsColor colElemFrame
Color for frame.
Definition: GUIslice.h:602
void gslc_GuiDestruct(gslc_tsGui *pGui)
Free up any surfaces associated with the GUI, pages, collections and elements.
Definition: GUIslice.c:5018
void gslc_CollectTouch(gslc_tsGui *pGui, gslc_tsCollect *pCollect, gslc_tsEventTouch *pEventTouch)
Handle touch events within the element collection.
Definition: GUIslice.c:3855
Mask for Format flags.
Definition: GUIslice.h:452
Overlay page (eg. popups)
Definition: GUIslice.h:127
void gslc_PageRedrawSet(gslc_tsGui *pGui, bool bRedraw)
Update the need-redraw status for the current page.
Definition: GUIslice.c:2137
bool(* GSLC_CB_DRAW)(void *pvGui, void *pvElemRef, gslc_teRedrawType eRedraw)
Callback function for element drawing.
Definition: GUIslice.h:499
int16_t nId
Font ID specified by user.
Definition: GUIslice.h:560
Font mode 3.
Definition: GUIslice.h:399
gslc_teTouch eTouch
Touch state.
Definition: GUIslice.h:553
void gslc_DrawFillRoundRect(gslc_tsGui *pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
Definition: GUIslice.c:1329
Element is read-only / const Stored in FLASH (external to element array) Access directly.
Definition: GUIslice.h:414
struct gslc_tsColor gslc_tsColor
Color structure. Defines RGB triplet.
int8_t eTxtAlign
Alignment of overlay text.
Definition: GUIslice.h:633
Page structure.
Definition: GUIslice.h:684