2020-09-09 01:53:59 +00:00
|
|
|
//<File !Start!>
|
2020-09-09 23:36:39 +00:00
|
|
|
// FILE: [_controller_GSLC.h]
|
2020-09-09 01:53:59 +00:00
|
|
|
// Created by GUIslice Builder version: [0.15.b004]
|
|
|
|
//
|
|
|
|
// GUIslice Builder Generated GUI Framework File
|
|
|
|
//
|
|
|
|
// For the latest guides, updates and support view:
|
|
|
|
// https://github.com/ImpulseAdventure/GUIslice
|
|
|
|
//
|
|
|
|
//<File !End!>
|
|
|
|
|
|
|
|
#ifndef _GUISLICE_GEN_H
|
|
|
|
#define _GUISLICE_GEN_H
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Headers to include
|
|
|
|
// ------------------------------------------------
|
|
|
|
#include "src/guislice/GUIslice.h"
|
|
|
|
#include "src/guislice/GUIslice_drv.h"
|
|
|
|
|
|
|
|
// Include any extended elements
|
|
|
|
//<Includes !Start!>
|
|
|
|
// Include extended elements
|
2020-09-09 02:49:16 +00:00
|
|
|
#include "src/guislice/XCheckbox.h"
|
2020-09-13 07:41:21 +00:00
|
|
|
#include "src/guislice/XListbox.h"
|
2020-09-09 01:53:59 +00:00
|
|
|
#include "src/guislice/XProgress.h"
|
2020-09-13 07:41:21 +00:00
|
|
|
#include "src/guislice/XSlider.h"
|
2020-09-09 01:53:59 +00:00
|
|
|
#include "src/guislice/XTextbox.h"
|
|
|
|
//<Includes !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Headers and Defines for fonts
|
|
|
|
// Note that font files are located within the Adafruit-GFX library folder:
|
|
|
|
// ------------------------------------------------
|
|
|
|
//<Fonts !Start!>
|
|
|
|
#if defined(DRV_DISP_TFT_ESPI)
|
|
|
|
#error Project tab->Target Platform should be tft_espi
|
|
|
|
#endif
|
|
|
|
#include <Adafruit_GFX.h>
|
|
|
|
#include "src/guislice/NotoMono8pt7b.h"
|
|
|
|
//<Fonts !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Defines for resources
|
|
|
|
// ------------------------------------------------
|
|
|
|
//<Resources !Start!>
|
|
|
|
//<Resources !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Enumerations for pages, elements, fonts, images
|
|
|
|
// ------------------------------------------------
|
|
|
|
//<Enum !Start!>
|
2020-09-13 07:41:21 +00:00
|
|
|
enum {E_PG_BASE,E_PG_MAIN,E_CONF_RPI,E_WIRING,E_SD_CARD};
|
|
|
|
enum {E_ELEM_BATT_LEVEL,E_ELEM_LS_DIA,E_ELEM_RD96,E_ELEM_RD_1152
|
|
|
|
,E_ELEM_RD_UART0,E_ELEM_RD_UART5,E_ELEM_STATUS,E_ELEM_TEXT
|
|
|
|
,E_ELEM_TEXT3,E_ELEM_TEXT4,E_ELEM_TX96,E_ELEM_TX_1152
|
|
|
|
,E_ELEM_TX_SD_INFO,E_ELEM_TX_UART1,E_ELEM_TX_UART5,E_SLR_DIAGRAMS
|
|
|
|
,E_STATUS_LINE};
|
2020-09-09 02:49:16 +00:00
|
|
|
enum {E_GRP_SPD,E_GRP_UART};
|
2020-09-09 01:53:59 +00:00
|
|
|
// Must use separate enum for fonts with MAX_FONT at end to use gslc_FontSet.
|
2020-09-13 06:25:03 +00:00
|
|
|
enum {E_AO_NOTOMONO8PT7B,MAX_FONT};
|
2020-09-09 01:53:59 +00:00
|
|
|
//<Enum !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Instantiate the GUI
|
|
|
|
// ------------------------------------------------
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Define the maximum number of elements and pages
|
|
|
|
// ------------------------------------------------
|
|
|
|
//<ElementDefines !Start!>
|
2020-09-13 07:41:21 +00:00
|
|
|
#define MAX_PAGE 5
|
2020-09-09 01:53:59 +00:00
|
|
|
|
2020-09-13 00:05:58 +00:00
|
|
|
#define MAX_ELEM_PG_BASE 3 // # Elems total on page
|
|
|
|
#define MAX_ELEM_PG_BASE_RAM MAX_ELEM_PG_BASE // # Elems in RAM
|
|
|
|
|
|
|
|
#define MAX_ELEM_PG_MAIN 1 // # Elems total on page
|
2020-09-09 01:53:59 +00:00
|
|
|
#define MAX_ELEM_PG_MAIN_RAM MAX_ELEM_PG_MAIN // # Elems in RAM
|
2020-09-09 02:49:16 +00:00
|
|
|
|
2020-09-13 00:05:58 +00:00
|
|
|
#define MAX_ELEM_CONF_RPI 10 // # Elems total on page
|
2020-09-09 02:49:16 +00:00
|
|
|
#define MAX_ELEM_CONF_RPI_RAM MAX_ELEM_CONF_RPI // # Elems in RAM
|
2020-09-13 00:05:58 +00:00
|
|
|
|
2020-09-13 07:41:21 +00:00
|
|
|
#define MAX_ELEM_WIRING 3 // # Elems total on page
|
|
|
|
#define MAX_ELEM_WIRING_RAM MAX_ELEM_WIRING // # Elems in RAM
|
|
|
|
|
2020-09-13 06:25:03 +00:00
|
|
|
#define MAX_ELEM_SD_CARD 1 // # Elems total on page
|
2020-09-13 00:05:58 +00:00
|
|
|
#define MAX_ELEM_SD_CARD_RAM MAX_ELEM_SD_CARD // # Elems in RAM
|
2020-09-09 01:53:59 +00:00
|
|
|
//<ElementDefines !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Create element storage
|
|
|
|
// ------------------------------------------------
|
|
|
|
gslc_tsGui m_gui;
|
|
|
|
gslc_tsDriver m_drv;
|
|
|
|
gslc_tsFont m_asFont[MAX_FONT];
|
|
|
|
gslc_tsPage m_asPage[MAX_PAGE];
|
|
|
|
|
|
|
|
//<GUI_Extra_Elements !Start!>
|
2020-09-13 00:05:58 +00:00
|
|
|
gslc_tsElem m_asBasePage1Elem[MAX_ELEM_PG_BASE_RAM];
|
|
|
|
gslc_tsElemRef m_asBasePage1ElemRef[MAX_ELEM_PG_BASE];
|
2020-09-09 01:53:59 +00:00
|
|
|
gslc_tsElem m_asPage1Elem[MAX_ELEM_PG_MAIN_RAM];
|
|
|
|
gslc_tsElemRef m_asPage1ElemRef[MAX_ELEM_PG_MAIN];
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_tsElem m_asPage2Elem[MAX_ELEM_CONF_RPI_RAM];
|
|
|
|
gslc_tsElemRef m_asPage2ElemRef[MAX_ELEM_CONF_RPI];
|
2020-09-13 07:41:21 +00:00
|
|
|
gslc_tsElem m_asPage3Elem[MAX_ELEM_WIRING_RAM];
|
|
|
|
gslc_tsElemRef m_asPage3ElemRef[MAX_ELEM_WIRING];
|
|
|
|
gslc_tsElem m_asPage4Elem[MAX_ELEM_SD_CARD_RAM];
|
|
|
|
gslc_tsElemRef m_asPage4ElemRef[MAX_ELEM_SD_CARD];
|
2020-09-13 00:05:58 +00:00
|
|
|
gslc_tsXProgress m_sXBarGauge2;
|
2020-09-09 01:53:59 +00:00
|
|
|
gslc_tsXTextbox m_sTextbox1;
|
|
|
|
char m_acTextboxBuf1[952]; // NRows=17 NCols=56
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_tsXCheckbox m_asXRadio1;
|
|
|
|
gslc_tsXCheckbox m_asXRadio2;
|
|
|
|
gslc_tsXCheckbox m_asXRadio3;
|
|
|
|
gslc_tsXCheckbox m_asXRadio4;
|
2020-09-13 07:41:21 +00:00
|
|
|
gslc_tsXListbox m_sListbox1;
|
|
|
|
// - Note that XLISTBOX_BUF_OH_R is extra required per item
|
|
|
|
char m_acListboxBuf1[512 + XLISTBOX_BUF_OH_R];
|
|
|
|
gslc_tsXSlider m_sListScroll1;
|
|
|
|
gslc_tsXTextbox m_sTextbox3;
|
|
|
|
char m_acTextboxBuf3[696]; // NRows=12 NCols=58
|
2020-09-09 01:53:59 +00:00
|
|
|
|
|
|
|
#define MAX_STR 100
|
|
|
|
|
|
|
|
//<GUI_Extra_Elements !End!>
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Program Globals
|
|
|
|
// ------------------------------------------------
|
|
|
|
|
|
|
|
// Element References for direct access
|
|
|
|
//<Extern_References !Start!>
|
2020-09-13 07:41:21 +00:00
|
|
|
extern gslc_tsElemRef* m_SliderDiagrams;
|
2020-09-09 01:53:59 +00:00
|
|
|
extern gslc_tsElemRef* m_pElemBatteryLevel;
|
2020-09-13 07:41:21 +00:00
|
|
|
extern gslc_tsElemRef* m_pElemLsDiagrams;
|
2020-09-09 02:49:16 +00:00
|
|
|
extern gslc_tsElemRef* m_pElemRd1152;
|
|
|
|
extern gslc_tsElemRef* m_pElemRd96;
|
|
|
|
extern gslc_tsElemRef* m_pElemRdUART0;
|
|
|
|
extern gslc_tsElemRef* m_pElemRdUART5;
|
2020-09-13 00:05:58 +00:00
|
|
|
extern gslc_tsElemRef* m_pElemSDInfo;
|
2020-09-09 01:53:59 +00:00
|
|
|
extern gslc_tsElemRef* m_pElemStatusText;
|
|
|
|
extern gslc_tsElemRef* m_pElemText;
|
|
|
|
extern gslc_tsElemRef* m_pTextSlider;
|
2020-09-13 07:41:21 +00:00
|
|
|
extern gslc_tsElemRef* m_pTextSlider3;
|
2020-09-09 01:53:59 +00:00
|
|
|
//<Extern_References !End!>
|
|
|
|
|
|
|
|
// Define debug message function
|
|
|
|
static int16_t DebugOut(char ch);
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Callback Methods
|
|
|
|
// ------------------------------------------------
|
|
|
|
bool CbBtnCommon(void* pvGui,void *pvElemRef,gslc_teTouch eTouch,int16_t nX,int16_t nY);
|
|
|
|
bool CbCheckbox(void* pvGui, void* pvElemRef, int16_t nSelId, bool bState);
|
|
|
|
bool CbDrawScanner(void* pvGui,void* pvElemRef,gslc_teRedrawType eRedraw);
|
|
|
|
bool CbKeypad(void* pvGui, void *pvElemRef, int16_t nState, void* pvData);
|
|
|
|
bool CbListbox(void* pvGui, void* pvElemRef, int16_t nSelId);
|
|
|
|
bool CbSlidePos(void* pvGui,void* pvElemRef,int16_t nPos);
|
|
|
|
bool CbSpinner(void* pvGui, void *pvElemRef, int16_t nState, void* pvData);
|
|
|
|
bool CbTickScanner(void* pvGui,void* pvScope);
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Create page elements
|
|
|
|
// ------------------------------------------------
|
|
|
|
void InitGUIslice_gen()
|
|
|
|
{
|
|
|
|
gslc_tsElemRef* pElemRef = NULL;
|
|
|
|
|
|
|
|
if (!gslc_Init(&m_gui,&m_drv,m_asPage,MAX_PAGE,m_asFont,MAX_FONT)) { return; }
|
|
|
|
|
|
|
|
// ------------------------------------------------
|
|
|
|
// Load Fonts
|
|
|
|
// ------------------------------------------------
|
|
|
|
//<Load_Fonts !Start!>
|
|
|
|
if (!gslc_FontSet(&m_gui,E_AO_NOTOMONO8PT7B,GSLC_FONTREF_PTR,&NotoMono8pt7b,1)) { return; }
|
|
|
|
//<Load_Fonts !End!>
|
|
|
|
|
|
|
|
//<InitGUI !Start!>
|
2020-09-13 00:05:58 +00:00
|
|
|
gslc_PageAdd(&m_gui,E_PG_BASE,m_asBasePage1Elem,MAX_ELEM_PG_BASE_RAM,m_asBasePage1ElemRef,MAX_ELEM_PG_BASE);
|
2020-09-09 01:53:59 +00:00
|
|
|
gslc_PageAdd(&m_gui,E_PG_MAIN,m_asPage1Elem,MAX_ELEM_PG_MAIN_RAM,m_asPage1ElemRef,MAX_ELEM_PG_MAIN);
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_PageAdd(&m_gui,E_CONF_RPI,m_asPage2Elem,MAX_ELEM_CONF_RPI_RAM,m_asPage2ElemRef,MAX_ELEM_CONF_RPI);
|
2020-09-13 07:41:21 +00:00
|
|
|
gslc_PageAdd(&m_gui,E_WIRING,m_asPage3Elem,MAX_ELEM_WIRING_RAM,m_asPage3ElemRef,MAX_ELEM_WIRING);
|
|
|
|
gslc_PageAdd(&m_gui,E_SD_CARD,m_asPage4Elem,MAX_ELEM_SD_CARD_RAM,m_asPage4ElemRef,MAX_ELEM_SD_CARD);
|
2020-09-13 00:05:58 +00:00
|
|
|
|
|
|
|
// Now mark E_PG_BASE as a "base" page which means that it's elements
|
|
|
|
// are always visible. This is useful for common page elements.
|
|
|
|
gslc_SetPageBase(&m_gui, E_PG_BASE);
|
|
|
|
|
2020-09-09 01:53:59 +00:00
|
|
|
|
|
|
|
// NOTE: The current page defaults to the first page added. Here we explicitly
|
|
|
|
// ensure that the main page is the correct page no matter the add order.
|
|
|
|
gslc_SetPageCur(&m_gui,E_PG_MAIN);
|
|
|
|
|
|
|
|
// Set Background to a flat color
|
|
|
|
gslc_SetBkgndColor(&m_gui,GSLC_COL_BLACK);
|
|
|
|
|
|
|
|
// -----------------------------------
|
2020-09-13 00:05:58 +00:00
|
|
|
// PAGE: E_PG_BASE
|
2020-09-09 01:53:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Create progress bar E_ELEM_BATT_LEVEL
|
2020-09-13 00:05:58 +00:00
|
|
|
pElemRef = gslc_ElemXProgressCreate(&m_gui,E_ELEM_BATT_LEVEL,E_PG_BASE,&m_sXBarGauge2,
|
2020-09-09 01:53:59 +00:00
|
|
|
(gslc_tsRect){263,5,50,15},0,100,0,GSLC_COL_GREEN,false);
|
|
|
|
m_pElemBatteryLevel = pElemRef;
|
|
|
|
|
|
|
|
// Create E_ELEM_STATUS text label
|
2020-09-13 00:05:58 +00:00
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_STATUS,E_PG_BASE,(gslc_tsRect){2,2,250,21},
|
|
|
|
(char*)"Serial Console",0,E_AO_NOTOMONO8PT7B);
|
2020-09-09 01:53:59 +00:00
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GREEN);
|
|
|
|
m_pElemStatusText = pElemRef;
|
2020-09-13 00:05:58 +00:00
|
|
|
|
|
|
|
// Create E_STATUS_LINE line
|
|
|
|
pElemRef = gslc_ElemCreateLine(&m_gui,E_STATUS_LINE,E_PG_BASE,0,25,320,25);
|
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLACK,GSLC_COL_GRAY_DK1,GSLC_COL_GRAY_DK1);
|
|
|
|
|
|
|
|
// -----------------------------------
|
|
|
|
// PAGE: E_PG_MAIN
|
|
|
|
|
2020-09-09 01:53:59 +00:00
|
|
|
|
|
|
|
// Create textbox
|
|
|
|
pElemRef = gslc_ElemXTextboxCreate(&m_gui,E_ELEM_TEXT,E_PG_MAIN,&m_sTextbox1,
|
|
|
|
(gslc_tsRect){3,30,313,202},E_AO_NOTOMONO8PT7B,
|
|
|
|
(char*)&m_acTextboxBuf1,17,56);
|
|
|
|
gslc_ElemXTextboxWrapSet(&m_gui,pElemRef,true);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLACK);
|
|
|
|
m_pElemText = pElemRef;
|
2020-09-09 02:49:16 +00:00
|
|
|
|
|
|
|
// -----------------------------------
|
|
|
|
// PAGE: E_CONF_RPI
|
|
|
|
|
|
|
|
|
|
|
|
// Create E_ELEM_TEXT3 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TEXT3,E_CONF_RPI,(gslc_tsRect){2,40,40,21},
|
|
|
|
(char*)"UART",0,E_AO_NOTOMONO8PT7B);
|
2020-09-13 02:59:21 +00:00
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_BLUE_LT2);
|
2020-09-09 02:49:16 +00:00
|
|
|
|
|
|
|
// Create E_ELEM_TEXT4 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TEXT4,E_CONF_RPI,(gslc_tsRect){2,120,120,21},
|
|
|
|
(char*)"Speed / Baud",0,E_AO_NOTOMONO8PT7B);
|
2020-09-13 02:59:21 +00:00
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_BLUE_LT2);
|
2020-09-09 02:49:16 +00:00
|
|
|
|
|
|
|
// Create radio button E_ELEM_RD_UART5
|
|
|
|
pElemRef = gslc_ElemXCheckboxCreate(&m_gui,E_ELEM_RD_UART5,E_CONF_RPI,&m_asXRadio1,
|
2020-09-13 02:59:21 +00:00
|
|
|
(gslc_tsRect){160,80,20,20},true,GSLCX_CHECKBOX_STYLE_ROUND,GSLC_COL_BLUE_LT2,false);
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_ElemSetGroup(&m_gui,pElemRef,E_GRP_UART);
|
|
|
|
m_pElemRdUART5 = pElemRef;
|
|
|
|
|
|
|
|
// Create radio button E_ELEM_RD_UART0
|
|
|
|
pElemRef = gslc_ElemXCheckboxCreate(&m_gui,E_ELEM_RD_UART0,E_CONF_RPI,&m_asXRadio2,
|
2020-09-13 02:59:21 +00:00
|
|
|
(gslc_tsRect){10,80,20,20},true,GSLCX_CHECKBOX_STYLE_ROUND,GSLC_COL_BLUE_LT2,true);
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_ElemSetGroup(&m_gui,pElemRef,E_GRP_UART);
|
|
|
|
m_pElemRdUART0 = pElemRef;
|
|
|
|
|
|
|
|
// Create E_ELEM_TX_UART1 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TX_UART1,E_CONF_RPI,(gslc_tsRect){40,80,50,21},
|
|
|
|
(char*)"UART0",0,E_AO_NOTOMONO8PT7B);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
|
|
|
|
|
|
|
// Create E_ELEM_TX_UART5 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TX_UART5,E_CONF_RPI,(gslc_tsRect){190,80,50,21},
|
|
|
|
(char*)"UART5",0,E_AO_NOTOMONO8PT7B);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
|
|
|
|
|
|
|
// Create radio button E_ELEM_RD96
|
|
|
|
pElemRef = gslc_ElemXCheckboxCreate(&m_gui,E_ELEM_RD96,E_CONF_RPI,&m_asXRadio3,
|
2020-09-13 02:59:21 +00:00
|
|
|
(gslc_tsRect){160,160,20,20},true,GSLCX_CHECKBOX_STYLE_ROUND,GSLC_COL_BLUE_LT2,false);
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_ElemSetGroup(&m_gui,pElemRef,E_GRP_SPD);
|
|
|
|
m_pElemRd96 = pElemRef;
|
|
|
|
|
|
|
|
// Create radio button E_ELEM_RD_1152
|
|
|
|
pElemRef = gslc_ElemXCheckboxCreate(&m_gui,E_ELEM_RD_1152,E_CONF_RPI,&m_asXRadio4,
|
2020-09-13 02:59:21 +00:00
|
|
|
(gslc_tsRect){10,160,20,20},true,GSLCX_CHECKBOX_STYLE_ROUND,GSLC_COL_BLUE_LT2,true);
|
2020-09-09 02:49:16 +00:00
|
|
|
gslc_ElemSetGroup(&m_gui,pElemRef,E_GRP_SPD);
|
|
|
|
m_pElemRd1152 = pElemRef;
|
|
|
|
|
|
|
|
// Create E_ELEM_TX_1152 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TX_1152,E_CONF_RPI,(gslc_tsRect){40,160,60,21},
|
|
|
|
(char*)"115200",0,E_AO_NOTOMONO8PT7B);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
|
|
|
|
|
|
|
// Create E_ELEM_TX96 text label
|
|
|
|
pElemRef = gslc_ElemCreateTxt(&m_gui,E_ELEM_TX96,E_CONF_RPI,(gslc_tsRect){190,160,40,21},
|
|
|
|
(char*)"9600",0,E_AO_NOTOMONO8PT7B);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
2020-09-13 00:05:58 +00:00
|
|
|
|
2020-09-13 07:41:21 +00:00
|
|
|
// -----------------------------------
|
|
|
|
// PAGE: E_WIRING
|
|
|
|
|
|
|
|
|
|
|
|
// Create wrapping box for listbox E_ELEM_LS_DIA and scrollbar
|
|
|
|
pElemRef = gslc_ElemCreateBox(&m_gui,GSLC_ID_AUTO,E_WIRING,(gslc_tsRect){3,30,313,200});
|
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLUE_LT2);
|
|
|
|
|
|
|
|
// Create listbox
|
|
|
|
pElemRef = gslc_ElemXListboxCreate(&m_gui,E_ELEM_LS_DIA,E_WIRING,&m_sListbox1,
|
|
|
|
(gslc_tsRect){3+2,30+4,313-23,200-7},E_AO_NOTOMONO8PT7B,
|
|
|
|
(uint8_t*)&m_acListboxBuf1,sizeof(m_acListboxBuf1),-1);
|
|
|
|
gslc_ElemXListboxSetSize(&m_gui, pElemRef, 12, 1); // 12 rows, 1 columns
|
|
|
|
gslc_ElemXListboxItemsSetSize(&m_gui, pElemRef, XLISTBOX_SIZE_AUTO, XLISTBOX_SIZE_AUTO);
|
|
|
|
gslc_ElemSetTxtMarginXY(&m_gui, pElemRef, 5, 0);
|
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLUE_LT2);
|
|
|
|
gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListbox);
|
|
|
|
gslc_ElemXListboxItemsSetGap(&m_gui, pElemRef, 2,GSLC_COL_BLACK);
|
|
|
|
gslc_ElemSetFrameEn(&m_gui,pElemRef,true);
|
|
|
|
m_pElemLsDiagrams = pElemRef;
|
|
|
|
|
|
|
|
// Create vertical scrollbar for listbox
|
|
|
|
pElemRef = gslc_ElemXSliderCreate(&m_gui,E_SLR_DIAGRAMS,E_WIRING,&m_sListScroll1,
|
|
|
|
(gslc_tsRect){3+313-21,30+4,20,200-8},0,0,0,5,true);
|
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_GRAY);
|
|
|
|
gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
|
|
|
|
m_SliderDiagrams = pElemRef;
|
|
|
|
|
2020-09-13 00:05:58 +00:00
|
|
|
// -----------------------------------
|
|
|
|
// PAGE: E_SD_CARD
|
|
|
|
|
|
|
|
|
|
|
|
// Create textbox
|
2020-09-13 07:41:21 +00:00
|
|
|
pElemRef = gslc_ElemXTextboxCreate(&m_gui,E_ELEM_TX_SD_INFO,E_SD_CARD,&m_sTextbox3,
|
2020-09-13 06:25:03 +00:00
|
|
|
(gslc_tsRect){3,30,323,200},E_AO_NOTOMONO8PT7B,
|
2020-09-13 07:41:21 +00:00
|
|
|
(char*)&m_acTextboxBuf3,12,58);
|
2020-09-13 06:25:03 +00:00
|
|
|
gslc_ElemXTextboxWrapSet(&m_gui,pElemRef,true);
|
2020-09-13 02:59:21 +00:00
|
|
|
gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_GRAY_LT3);
|
2020-09-13 00:05:58 +00:00
|
|
|
gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_GRAY,GSLC_COL_BLACK,GSLC_COL_BLACK);
|
|
|
|
m_pElemSDInfo = pElemRef;
|
2020-09-09 01:53:59 +00:00
|
|
|
//<InitGUI !End!>
|
|
|
|
|
|
|
|
//<Startup !Start!>
|
|
|
|
//<Startup !End!>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // end _GUISLICE_GEN_H
|