skeletonKey
BEng Dissertation; Pen-testing device
GUI_GSLC.h
1//<File !Start!>
2// FILE: [GUI_GSLC.h]
3// Created by GUIslice Builder version: [0.17.b40]
4//
5// GUIslice Builder Generated GUI Framework File
6//
7// For the latest guides, updates and support view:
8// https://github.com/ImpulseAdventure/GUIslice
9//
10//<File !End!>
11
12#ifndef _GUISLICE_GEN_H
13#define _GUISLICE_GEN_H
14
15// ------------------------------------------------
16// Headers to include
17// ------------------------------------------------
18
19#include "GUIslice.h"
20#include "GUIslice_drv.h"
21
22// Include any extended elements
23//<Includes !Start!>
24// Include extended elements
25#include "elem/XListbox.h"
26#include "elem/XSlider.h"
27//<Includes !End!>
28
29// ------------------------------------------------
30// Headers and Defines for fonts
31// Note that font files are located within the Adafruit-GFX library folder:
32// ------------------------------------------------
33//<Fonts !Start!>
34#if !defined(DRV_DISP_TFT_ESPI)
35 #error E_PROJECT_OPTIONS tab->Graphics Library should be Adafruit_GFX
36#endif
37#include <TFT_eSPI.h>
38//<Fonts !End!>
39
40// ------------------------------------------------
41// Defines for resources
42// ------------------------------------------------
43//<Resources !Start!>
44extern "C" const unsigned short bootLogo[] PROGMEM;
45extern "C" const unsigned short homeButton[] PROGMEM;
46extern "C" const unsigned short settingsButton[] PROGMEM;
47//<Resources !End!>
48
49// ------------------------------------------------
50// Enumerations for pages, elements, fonts, images
51// ------------------------------------------------
52//<Enum !Start!>
53enum {E_PG_BASE,E_PG_MAIN,E_PG_Settings,E_PG_RFID,E_PG_SubGHz,E_PG_WIFI
54 ,E_PG_USB,E_PG_BLE,E_PG_IR,E_Popup_Boot,E_Popup_HandshakeCapture};
55enum {BLE_Button_Send,Base_Button_home,Base_Button_settings
56 ,Base_Line_topBar,Base_Text_Bat,Base_Text_PageLabel
57 ,Boot_Image_logo,HandshakeCapture_Box_background
58 ,HandshakeCapture_Button_active,HandshakeCapture_Button_exit
59 ,HandshakeCapture_Button_passive,HandshakeCapture_Text_title
60 ,IR_Button_Back,IR_Button_Capture,IR_Button_Jam,IR_Button_Select
61 ,IR_Listbox_stored,IR_Listscroll_stored,Main_Button_BLE
62 ,Main_Button_BadUSB,Main_Button_IR,Main_Button_RFID
63 ,Main_Button_SubGHz,Main_Button_WIFI
64 ,Settings_Button_calibrateTouch,Settings_Button_vibrationToggle
65 ,SubGHz_Button_capture,SubGHz_Button_frequency
66 ,SubGHz_Button_jaming,SubGHz_Button_transmit
67 ,SubGHz_Listbox_signals,SubGHz_Listscroll_signals
68 ,WiFi_Button_deauth,WiFi_Button_handshake
69 ,WiFi_Button_rickRollBeacon,WiFi_Button_scanNetworks
70 ,WiFi_Listbox_networks,WiFi_Listscroll_networks};
71// Must use separate enum for fonts with MAX_FONT at end to use gslc_FontSet.
72enum {E_BUILTIN10X16,E_BUILTIN5X8,MAX_FONT};
73//<Enum !End!>
74
75typedef enum {
76 mainMenu,
77 settingsMenu,
78 rfidMenu,
79 subGHzMenu,
80 wifiMenu,
81 bleMenu,
82 usbMenu,
83 irMenu
84} pageOptions;
85
86typedef enum {
87 irDeviceTypesList,
88 irDeviceBrandsList,
89 irDevicesList,
90 irDeviceCommandsList
91} irMenuLevels;
92
93// ------------------------------------------------
94// Instantiate the GUI
95// ------------------------------------------------
96
97// ------------------------------------------------
98// Define the maximum number of elements and pages
99// ------------------------------------------------
100//<ElementDefines !Start!>
101#define MAX_PAGE 11
102
103#define MAX_ELEM_PG_BASE 5 // # Elems total on page
104#define MAX_ELEM_PG_BASE_RAM MAX_ELEM_PG_BASE // # Elems in RAM
105
106#define MAX_ELEM_PG_MAIN 6 // # Elems total on page
107#define MAX_ELEM_PG_MAIN_RAM MAX_ELEM_PG_MAIN // # Elems in RAM
108
109#define MAX_ELEM_PG_Settings 2 // # Elems total on page
110#define MAX_ELEM_PG_Settings_RAM MAX_ELEM_PG_Settings // # Elems in RAM
111
112#define MAX_ELEM_PG_RFID 0 // # Elems total on page
113#define MAX_ELEM_PG_RFID_RAM MAX_ELEM_PG_RFID // # Elems in RAM
114
115#define MAX_ELEM_PG_SubGHz 7 // # Elems total on page
116#define MAX_ELEM_PG_SubGHz_RAM MAX_ELEM_PG_SubGHz // # Elems in RAM
117
118#define MAX_ELEM_PG_WIFI 7 // # Elems total on page
119#define MAX_ELEM_PG_WIFI_RAM MAX_ELEM_PG_WIFI // # Elems in RAM
120
121#define MAX_ELEM_PG_USB 0 // # Elems total on page
122#define MAX_ELEM_PG_USB_RAM MAX_ELEM_PG_USB // # Elems in RAM
123
124#define MAX_ELEM_PG_BLE 1 // # Elems total on page
125#define MAX_ELEM_PG_BLE_RAM MAX_ELEM_PG_BLE // # Elems in RAM
126
127#define MAX_ELEM_PG_IR 7 // # Elems total on page
128#define MAX_ELEM_PG_IR_RAM MAX_ELEM_PG_IR // # Elems in RAM
129
130#define MAX_ELEM_Popup_Boot 1 // # Elems total on page
131#define MAX_ELEM_Popup_Boot_RAM MAX_ELEM_Popup_Boot // # Elems in RAM
132
133#define MAX_ELEM_Popup_HandshakeCapture 5 // # Elems total on page
134#define MAX_ELEM_Popup_HandshakeCapture_RAM MAX_ELEM_Popup_HandshakeCapture // # Elems in RAM
135//<ElementDefines !End!>
136
137// ------------------------------------------------
138// Create element storage
139// ------------------------------------------------
140gslc_tsGui m_gui;
141gslc_tsDriver m_drv;
142gslc_tsFont m_asFont[MAX_FONT];
143gslc_tsPage m_asPage[MAX_PAGE];
144
145//<GUI_Extra_Elements !Start!>
146gslc_tsElem m_asBasePage1Elem[MAX_ELEM_PG_BASE_RAM];
147gslc_tsElemRef m_asBasePage1ElemRef[MAX_ELEM_PG_BASE];
148gslc_tsElem m_asPage1Elem[MAX_ELEM_PG_MAIN_RAM];
149gslc_tsElemRef m_asPage1ElemRef[MAX_ELEM_PG_MAIN];
150gslc_tsElem m_asPage3Elem[MAX_ELEM_PG_Settings_RAM];
151gslc_tsElemRef m_asPage3ElemRef[MAX_ELEM_PG_Settings];
152gslc_tsElem m_asPage4Elem[MAX_ELEM_PG_RFID_RAM];
153gslc_tsElemRef m_asPage4ElemRef[MAX_ELEM_PG_RFID];
154gslc_tsElem m_asPage5Elem[MAX_ELEM_PG_SubGHz_RAM];
155gslc_tsElemRef m_asPage5ElemRef[MAX_ELEM_PG_SubGHz];
156gslc_tsElem m_asPage6Elem[MAX_ELEM_PG_WIFI_RAM];
157gslc_tsElemRef m_asPage6ElemRef[MAX_ELEM_PG_WIFI];
158gslc_tsElem m_asPage7Elem[MAX_ELEM_PG_USB_RAM];
159gslc_tsElemRef m_asPage7ElemRef[MAX_ELEM_PG_USB];
160gslc_tsElem m_asPage8Elem[MAX_ELEM_PG_BLE_RAM];
161gslc_tsElemRef m_asPage8ElemRef[MAX_ELEM_PG_BLE];
162gslc_tsElem m_asPage9Elem[MAX_ELEM_PG_IR_RAM];
163gslc_tsElemRef m_asPage9ElemRef[MAX_ELEM_PG_IR];
164gslc_tsElem m_asPopup1Elem[MAX_ELEM_Popup_Boot_RAM];
165gslc_tsElemRef m_asPopup1ElemRef[MAX_ELEM_Popup_Boot];
166gslc_tsElem m_asPopup2Elem[MAX_ELEM_Popup_HandshakeCapture_RAM];
167gslc_tsElemRef m_asPopup2ElemRef[MAX_ELEM_Popup_HandshakeCapture];
168gslc_tsXListbox m_sListbox2;
169// - Note that XLISTBOX_BUF_OH_R is extra required per item
170char m_acListboxBuf2[50 + XLISTBOX_BUF_OH_R];
171gslc_tsXSlider m_sListScroll2;
172gslc_tsXListbox m_sListbox1;
173// - Note that XLISTBOX_BUF_OH_R is extra required per item
174char m_acListboxBuf1[50 + XLISTBOX_BUF_OH_R];
175gslc_tsXSlider m_sListScroll1;
176gslc_tsXListbox m_sListbox3;
177// - Note that XLISTBOX_BUF_OH_R is extra required per item
178char m_acListboxBuf3[500 + XLISTBOX_BUF_OH_R];
179gslc_tsXSlider m_sListScroll3;
180
181#define MAX_STR 200
182
183//<GUI_Extra_Elements !End!>
184
185// ------------------------------------------------
186// Program Globals
187// ------------------------------------------------
188
189// Element References for direct access
190//<Extern_References !Start!>
191extern gslc_tsElemRef* batteryChrgTxt;
192extern gslc_tsElemRef* m_pBLEselectButtonTxt;
193extern gslc_tsElemRef* m_pElemBtn10;
194extern gslc_tsElemRef* m_pElemListbox_IR;
195extern gslc_tsElemRef* m_pElemListbox_SubGHz;
196extern gslc_tsElemRef* m_pElemListbox_WiFi;
197extern gslc_tsElemRef* m_pElemOutTxt1;
198extern gslc_tsElemRef* m_pIRselectButtonTxt;
199extern gslc_tsElemRef* m_pListSlider_IR;
200extern gslc_tsElemRef* m_pListSlider_SubGHz;
201extern gslc_tsElemRef* m_pListSlider_WiFi;
202extern gslc_tsElemRef* m_pSettingsVibroButtonTxt;
203extern gslc_tsElemRef* m_pSubGHzJammingButton;
204extern gslc_tsElemRef* m_pWiFiDeauthButtonTxt;
205extern gslc_tsElemRef* m_pWiFiDeauthButtonTxt16_18;
206extern gslc_tsElemRef* m_pWiFiRickButtonTxt;
207//<Extern_References !End!>
208
209// Define debug message function
210static int16_t DebugOut(char ch);
211
212// Create SPI object to be retrieved by the driver
213// SPIClass tftSPI;
214
215// ------------------------------------------------
216// Callback Methods
217// ------------------------------------------------
218bool CbBtnCommon(void* pvGui, void* pvElemRef, gslc_teTouch eTouch, int16_t nX, int16_t nY);
219bool CbCheckbox(void* pvGui, void* pvElemRef, int16_t nSelId, bool bState);
220bool CbDrawScanner(void* pvGui, void* pvElemRef, gslc_teRedrawType eRedraw);
221bool CbKeypad(void* pvGui, void* pvElemRef, int16_t nState, void* pvData);
222bool CbListbox(void* pvGui, void* pvElemRef, int16_t nSelId);
223bool CbSlidePos(void* pvGui, void* pvElemRef, int16_t nPos);
224bool CbSpinner(void* pvGui, void* pvElemRef, int16_t nState, void* pvData);
225bool CbTickScanner(void* pvGui, void* pvScope);
226
227// ------------------------------------------------
228// Create page elements
229// ------------------------------------------------
230void InitGUIslice_gen() {
231 gslc_tsElemRef* pElemRef = NULL;
232
233 if (!gslc_Init(&m_gui, &m_drv, m_asPage, MAX_PAGE, m_asFont, MAX_FONT)) {
234 return;
235 }
236
237 // ------------------------------------------------
238 // Load Fonts
239 // ------------------------------------------------
240 //<Load_Fonts !Start!>
241 if (!gslc_FontSet(&m_gui,E_BUILTIN10X16,GSLC_FONTREF_PTR,NULL,2)) { return; }
242 if (!gslc_FontSet(&m_gui,E_BUILTIN5X8,GSLC_FONTREF_PTR,NULL,1)) { return; }
243 //<Load_Fonts !End!>
244
245 //<InitGUI !Start!>
246 gslc_PageAdd(&m_gui,E_PG_BASE,m_asBasePage1Elem,MAX_ELEM_PG_BASE_RAM,m_asBasePage1ElemRef,MAX_ELEM_PG_BASE);
247 gslc_PageAdd(&m_gui,E_PG_MAIN,m_asPage1Elem,MAX_ELEM_PG_MAIN_RAM,m_asPage1ElemRef,MAX_ELEM_PG_MAIN);
248 gslc_PageAdd(&m_gui,E_PG_Settings,m_asPage3Elem,MAX_ELEM_PG_Settings_RAM,m_asPage3ElemRef,MAX_ELEM_PG_Settings);
249 gslc_PageAdd(&m_gui,E_PG_RFID,m_asPage4Elem,MAX_ELEM_PG_RFID_RAM,m_asPage4ElemRef,MAX_ELEM_PG_RFID);
250 gslc_PageAdd(&m_gui,E_PG_SubGHz,m_asPage5Elem,MAX_ELEM_PG_SubGHz_RAM,m_asPage5ElemRef,MAX_ELEM_PG_SubGHz);
251 gslc_PageAdd(&m_gui,E_PG_WIFI,m_asPage6Elem,MAX_ELEM_PG_WIFI_RAM,m_asPage6ElemRef,MAX_ELEM_PG_WIFI);
252 gslc_PageAdd(&m_gui,E_PG_USB,m_asPage7Elem,MAX_ELEM_PG_USB_RAM,m_asPage7ElemRef,MAX_ELEM_PG_USB);
253 gslc_PageAdd(&m_gui,E_PG_BLE,m_asPage8Elem,MAX_ELEM_PG_BLE_RAM,m_asPage8ElemRef,MAX_ELEM_PG_BLE);
254 gslc_PageAdd(&m_gui,E_PG_IR,m_asPage9Elem,MAX_ELEM_PG_IR_RAM,m_asPage9ElemRef,MAX_ELEM_PG_IR);
255 gslc_PageAdd(&m_gui,E_Popup_Boot,m_asPopup1Elem,MAX_ELEM_Popup_Boot_RAM,m_asPopup1ElemRef,MAX_ELEM_Popup_Boot);
256 gslc_PageAdd(&m_gui,E_Popup_HandshakeCapture,m_asPopup2Elem,MAX_ELEM_Popup_HandshakeCapture_RAM,m_asPopup2ElemRef,MAX_ELEM_Popup_HandshakeCapture);
257
258 // Now mark E_PG_BASE as a "base" page which means that it's elements
259 // are always visible. This is useful for common page elements.
260 gslc_SetPageBase(&m_gui, E_PG_BASE);
261
262
263 // NOTE: The current page defaults to the first page added. Here we explicitly
264 // ensure that the main page is the correct page no matter the add order.
265 gslc_SetPageCur(&m_gui,E_PG_MAIN);
266
267 // Set Background to a flat color
268 gslc_SetBkgndColor(&m_gui,GSLC_COL_BLACK);
269
270 // -----------------------------------
271 // PAGE: E_PG_BASE
272
273
274 // Create Base_Text_PageLabel runtime modifiable text
275 static char m_sDisplayText1[16] = "Main Menu";
276 pElemRef = gslc_ElemCreateTxt(&m_gui,Base_Text_PageLabel,E_PG_BASE,(gslc_tsRect){70,18,180,16},
277 (char*)m_sDisplayText1,16,E_BUILTIN10X16);
278 gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_MID);
279 gslc_ElemSetFillEn(&m_gui,pElemRef,false);
280 m_pElemOutTxt1 = pElemRef;
281
282 // Create Base_Text_Bat runtime modifiable text
283 static char m_sDisplayText2[7] = "100%";
284 pElemRef = gslc_ElemCreateTxt(&m_gui,Base_Text_Bat,E_PG_BASE,(gslc_tsRect){243,19,72,16},
285 (char*)m_sDisplayText2,7,E_BUILTIN10X16);
286 gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_RIGHT);
287 gslc_ElemSetFillEn(&m_gui,pElemRef,false);
288 batteryChrgTxt = pElemRef;
289
290 // Create Base_Line_topBar line
291 pElemRef = gslc_ElemCreateLine(&m_gui,Base_Line_topBar,E_PG_BASE,0,49,320,49);
292 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLACK,GSLC_COL_GRAY_LT3,GSLC_COL_GRAY_LT3);
293
294 // Create Base_Button_home button with image label
295 pElemRef = gslc_ElemCreateBtnImg(&m_gui,Base_Button_home,E_PG_BASE,(gslc_tsRect){8,8,32,32},
296 gslc_GetImageFromProg((const unsigned char*)homeButton,GSLC_IMGREF_FMT_BMP24),
297 gslc_GetImageFromProg((const unsigned char*)homeButton,GSLC_IMGREF_FMT_BMP24),
298 &CbBtnCommon);
299
300 // Create Base_Button_settings button with image label
301 pElemRef = gslc_ElemCreateBtnImg(&m_gui,Base_Button_settings,E_PG_BASE,(gslc_tsRect){48,8,32,32},
302 gslc_GetImageFromProg((const unsigned char*)settingsButton,GSLC_IMGREF_FMT_BMP24),
303 gslc_GetImageFromProg((const unsigned char*)settingsButton,GSLC_IMGREF_FMT_BMP24),
304 &CbBtnCommon);
305
306 // -----------------------------------
307 // PAGE: E_PG_MAIN
308
309
310 // create Main_Button_RFID button with text label
311 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_RFID,E_PG_MAIN,
312 (gslc_tsRect){40,80,96,96},(char*)"RFID",0,E_BUILTIN10X16,&CbBtnCommon);
313 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
314
315 // create Main_Button_SubGHz button with text label
316 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_SubGHz,E_PG_MAIN,
317 (gslc_tsRect){184,80,96,96},(char*)"Sub-GHz",0,E_BUILTIN10X16,&CbBtnCommon);
318 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
319
320 // create Main_Button_WIFI button with text label
321 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_WIFI,E_PG_MAIN,
322 (gslc_tsRect){40,208,96,96},(char*)"WiFi",0,E_BUILTIN10X16,&CbBtnCommon);
323 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
324
325 // create Main_Button_BadUSB button with text label
326 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_BadUSB,E_PG_MAIN,
327 (gslc_tsRect){40,336,96,96},(char*)"Bad USB",0,E_BUILTIN10X16,&CbBtnCommon);
328 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
329
330 // create Main_Button_BLE button with text label
331 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_BLE,E_PG_MAIN,
332 (gslc_tsRect){184,208,96,96},(char*)"BLE",0,E_BUILTIN10X16,&CbBtnCommon);
333 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
334
335 // create Main_Button_IR button with text label
336 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Main_Button_IR,E_PG_MAIN,
337 (gslc_tsRect){184,336,96,96},(char*)"IR",0,E_BUILTIN10X16,&CbBtnCommon);
338 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
339
340 // -----------------------------------
341 // PAGE: E_PG_Settings
342
343
344 // create Settings_Button_calibrateTouch button with text label
345 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Settings_Button_calibrateTouch,E_PG_Settings,
346 (gslc_tsRect){40,64,240,32},(char*)"Touch Calibration",0,E_BUILTIN5X8,&CbBtnCommon);
347 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
348
349 // Create Settings_Button_vibrationToggle button with modifiable text label
350 static char m_strbtn12[21] = "Vibration Disabled";
351 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,Settings_Button_vibrationToggle,E_PG_Settings,
352 (gslc_tsRect){40,112,240,32},
353 (char*)m_strbtn12,21,E_BUILTIN5X8,&CbBtnCommon);
354 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED_DK2,GSLC_COL_BLUE_DK1);
355 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
356 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
357 m_pSettingsVibroButtonTxt = pElemRef;
358
359 // -----------------------------------
360 // PAGE: E_PG_RFID
361
362
363 // -----------------------------------
364 // PAGE: E_PG_SubGHz
365
366
367 // Create SubGHz_Button_jaming button with modifiable text label
368 static char m_strbtn16[27] = "Jamming Dissabled";
369 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,SubGHz_Button_jaming,E_PG_SubGHz,
370 (gslc_tsRect){40,104,240,32},
371 (char*)m_strbtn16,27,E_BUILTIN5X8,&CbBtnCommon);
372 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED_DK2,GSLC_COL_BLUE_DK1);
373 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
374 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
375 m_pSubGHzJammingButton = pElemRef;
376
377 // create SubGHz_Button_capture button with text label
378 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,SubGHz_Button_capture,E_PG_SubGHz,
379 (gslc_tsRect){40,144,240,32},(char*)"Capture Signals",0,E_BUILTIN5X8,&CbBtnCommon);
380 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
381
382 // Create SubGHz_Button_frequency button with modifiable text label
383 static char m_strbtn18[27] = "Change Frequency";
384 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,SubGHz_Button_frequency,E_PG_SubGHz,
385 (gslc_tsRect){40,64,240,32},
386 (char*)m_strbtn18,27,E_BUILTIN5X8,&CbBtnCommon);
387 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
388 m_pWiFiDeauthButtonTxt16_18 = pElemRef;
389
390 // Create wrapping box for listbox SubGHz_Listbox_signals and scrollbar
391 pElemRef = gslc_ElemCreateBox(&m_gui,GSLC_ID_AUTO,E_PG_SubGHz,(gslc_tsRect){40,224,240,247});
392 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
393
394 // Create listbox
395 pElemRef = gslc_ElemXListboxCreate(&m_gui,SubGHz_Listbox_signals,E_PG_SubGHz,&m_sListbox2,
396 (gslc_tsRect){40+2,224+4,240-4-15,247-7},E_BUILTIN5X8,
397 (uint8_t*)&m_acListboxBuf2,sizeof(m_acListboxBuf2),0);
398 gslc_ElemXListboxSetSize(&m_gui, pElemRef, 10, 1); // 10 rows, 1 columns
399 gslc_ElemXListboxItemsSetSize(&m_gui, pElemRef, -1, -1);
400 gslc_ElemSetTxtMarginXY(&m_gui, pElemRef, 5, 5);
401 gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_YELLOW);
402 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
403 gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListbox);
404 gslc_ElemXListboxItemsSetGap(&m_gui, pElemRef, 5,GSLC_COL_BLACK);
405 gslc_ElemSetFrameEn(&m_gui,pElemRef,true);
406 m_pElemListbox_SubGHz = pElemRef;
407
408 // Create vertical scrollbar for listbox
409 pElemRef = gslc_ElemXSliderCreate(&m_gui,SubGHz_Listscroll_signals,E_PG_SubGHz,&m_sListScroll2,
410 (gslc_tsRect){40+240-2-15,224+4,15,247-8},0,100,0,5,true);
411 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_BLUE);
412 gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
413 m_pListSlider_SubGHz = pElemRef;
414
415 // create SubGHz_Button_transmit button with text label
416 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,SubGHz_Button_transmit,E_PG_SubGHz,
417 (gslc_tsRect){40,184,240,32},(char*)"Transmit Captured Signal",0,E_BUILTIN5X8,&CbBtnCommon);
418 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
419
420 // -----------------------------------
421 // PAGE: E_PG_WIFI
422
423
424 // Create WiFi_Button_rickRollBeacon button with modifiable text label
425 static char m_strbtn8[27] = "Rick Roll Beacon Spam";
426 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,WiFi_Button_rickRollBeacon,E_PG_WIFI,
427 (gslc_tsRect){40,64,240,32},
428 (char*)m_strbtn8,27,E_BUILTIN5X8,&CbBtnCommon);
429 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED_DK2,GSLC_COL_BLUE_DK1);
430 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
431 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
432 m_pWiFiRickButtonTxt = pElemRef;
433
434 // create WiFi_Button_scanNetworks button with text label
435 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,WiFi_Button_scanNetworks,E_PG_WIFI,
436 (gslc_tsRect){40,104,240,32},(char*)"Scan WiFi Networks",0,E_BUILTIN5X8,&CbBtnCommon);
437 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
438
439 // Create WiFi_Button_deauth button with modifiable text label
440 static char m_strbtn9[27] = "Deauthentication Dissabled";
441 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,WiFi_Button_deauth,E_PG_WIFI,
442 (gslc_tsRect){40,184,240,32},
443 (char*)m_strbtn9,27,E_BUILTIN5X8,&CbBtnCommon);
444 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED_DK2,GSLC_COL_BLUE_DK1);
445 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
446 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
447 m_pWiFiDeauthButtonTxt = pElemRef;
448
449 // Create WiFi_Button_handshake button with modifiable text label
450 static char m_strbtn10[31] = "Handshake Capture";
451 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,WiFi_Button_handshake,E_PG_WIFI,
452 (gslc_tsRect){40,144,240,32},
453 (char*)m_strbtn10,31,E_BUILTIN5X8,&CbBtnCommon);
454 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
455 m_pElemBtn10 = pElemRef;
456
457 // Create wrapping box for listbox WiFi_Listbox_networks and scrollbar
458 pElemRef = gslc_ElemCreateBox(&m_gui,GSLC_ID_AUTO,E_PG_WIFI,(gslc_tsRect){40,224,240,247});
459 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
460
461 // Create listbox
462 pElemRef = gslc_ElemXListboxCreate(&m_gui,WiFi_Listbox_networks,E_PG_WIFI,&m_sListbox1,
463 (gslc_tsRect){40+2,224+4,240-4-15,247-7},E_BUILTIN5X8,
464 (uint8_t*)&m_acListboxBuf1,sizeof(m_acListboxBuf1),0);
465 gslc_ElemXListboxSetSize(&m_gui, pElemRef, 10, 1); // 10 rows, 1 columns
466 gslc_ElemXListboxItemsSetSize(&m_gui, pElemRef, -1, -1);
467 gslc_ElemSetTxtMarginXY(&m_gui, pElemRef, 5, 5);
468 gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_YELLOW);
469 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
470 gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListbox);
471 gslc_ElemXListboxItemsSetGap(&m_gui, pElemRef, 5,GSLC_COL_BLACK);
472 gslc_ElemSetFrameEn(&m_gui,pElemRef,true);
473 m_pElemListbox_WiFi = pElemRef;
474
475 // Create vertical scrollbar for listbox
476 pElemRef = gslc_ElemXSliderCreate(&m_gui,WiFi_Listscroll_networks,E_PG_WIFI,&m_sListScroll1,
477 (gslc_tsRect){40+240-2-15,224+4,15,247-8},0,100,0,5,true);
478 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_BLUE);
479 gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
480 m_pListSlider_WiFi = pElemRef;
481
482 // -----------------------------------
483 // PAGE: E_PG_USB
484
485
486 // -----------------------------------
487 // PAGE: E_PG_BLE
488
489
490 // create BLE_Button_Send button with text label
491 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,BLE_Button_Send,E_PG_BLE,
492 (gslc_tsRect){40,64,240,32},(char*)"Never gonna what?",0,E_BUILTIN5X8,&CbBtnCommon);
493 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED,GSLC_COL_BLUE_DK1);
494 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
495 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
496 m_pBLEselectButtonTxt = pElemRef;
497
498 // -----------------------------------
499 // PAGE: E_PG_IR
500
501
502 // Create wrapping box for listbox IR_Listbox_stored and scrollbar
503 pElemRef = gslc_ElemCreateBox(&m_gui,GSLC_ID_AUTO,E_PG_IR,(gslc_tsRect){40,104,240,247});
504 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
505
506 // Create listbox
507 pElemRef = gslc_ElemXListboxCreate(&m_gui,IR_Listbox_stored,E_PG_IR,&m_sListbox3,
508 (gslc_tsRect){40+2,104+4,240-4-15,247-7},E_BUILTIN5X8,
509 (uint8_t*)&m_acListboxBuf3,sizeof(m_acListboxBuf3),0);
510 gslc_ElemXListboxSetSize(&m_gui, pElemRef, 10, 1); // 10 rows, 1 columns
511 gslc_ElemXListboxItemsSetSize(&m_gui, pElemRef, -1, -1);
512 gslc_ElemSetTxtMarginXY(&m_gui, pElemRef, 5, 5);
513 gslc_ElemSetTxtCol(&m_gui,pElemRef,GSLC_COL_YELLOW);
514 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_GRAY_LT2);
515 gslc_ElemXListboxSetSelFunc(&m_gui, pElemRef, &CbListbox);
516 gslc_ElemXListboxItemsSetGap(&m_gui, pElemRef, 5,GSLC_COL_BLACK);
517 gslc_ElemSetFrameEn(&m_gui,pElemRef,true);
518 m_pElemListbox_IR = pElemRef;
519
520 // Create vertical scrollbar for listbox
521 pElemRef = gslc_ElemXSliderCreate(&m_gui,IR_Listscroll_stored,E_PG_IR,&m_sListScroll3,
522 (gslc_tsRect){40+240-2-15,104+4,15,247-8},0,100,0,5,true);
523 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE,GSLC_COL_BLACK,GSLC_COL_BLUE);
524 gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
525 m_pListSlider_IR = pElemRef;
526
527 // create IR_Button_Select button with text label
528 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,IR_Button_Select,E_PG_IR,
529 (gslc_tsRect){40,64,240,32},(char*)"Select",0,E_BUILTIN5X8,&CbBtnCommon);
530 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
531 m_pIRselectButtonTxt = pElemRef;
532
533 // create IR_Button_Back button with text label
534 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,IR_Button_Back,E_PG_IR,
535 (gslc_tsRect){40,360,240,32},(char*)"Back",0,E_BUILTIN5X8,&CbBtnCommon);
536 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
537
538 // create IR_Button_Capture button with text label
539 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,IR_Button_Capture,E_PG_IR,
540 (gslc_tsRect){40,400,240,32},(char*)"Capture IR",0,E_BUILTIN5X8,&CbBtnCommon);
541 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
542
543 // create IR_Button_Jam button with text label
544 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,IR_Button_Jam,E_PG_IR,
545 (gslc_tsRect){40,440,240,32},(char*)"Jamming Disabled",0,E_BUILTIN5X8,&CbBtnCommon);
546 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
547
548 // -----------------------------------
549 // PAGE: E_Popup_Boot
550
551
552 // Create Boot_Image_logo using Image
553 pElemRef = gslc_ElemCreateImg(&m_gui,Boot_Image_logo,E_Popup_Boot,(gslc_tsRect){0,0,320,480},
554 gslc_GetImageFromProg((const unsigned char*)bootLogo,GSLC_IMGREF_FMT_BMP24));
555
556 // -----------------------------------
557 // PAGE: E_Popup_HandshakeCapture
558
559
560 // Create HandshakeCapture_Box_background box
561 pElemRef = gslc_ElemCreateBox(&m_gui,HandshakeCapture_Box_background,E_Popup_HandshakeCapture,(gslc_tsRect){32,136,256,264});
562 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
563
564 // create HandshakeCapture_Button_passive button with text label
565 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,HandshakeCapture_Button_passive,E_Popup_HandshakeCapture,
566 (gslc_tsRect){40,208,240,32},(char*)"Passive",0,E_BUILTIN5X8,&CbBtnCommon);
567 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
568
569 // create HandshakeCapture_Button_active button with text label
570 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,HandshakeCapture_Button_active,E_Popup_HandshakeCapture,
571 (gslc_tsRect){40,248,240,32},(char*)"Active",0,E_BUILTIN5X8,&CbBtnCommon);
572 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
573
574 // create HandshakeCapture_Button_exit button with text label
575 pElemRef = gslc_ElemCreateBtnTxt(&m_gui,HandshakeCapture_Button_exit,E_Popup_HandshakeCapture,
576 (gslc_tsRect){40,352,240,32},(char*)"Exit",0,E_BUILTIN5X8,&CbBtnCommon);
577 gslc_ElemSetCol(&m_gui,pElemRef,GSLC_COL_BLUE_DK2,GSLC_COL_RED_DK2,GSLC_COL_BLUE_DK1);
578 gslc_ElemSetRoundEn(&m_gui, pElemRef, true);
579 gslc_ElemSetFrameEn(&m_gui,pElemRef,false);
580
581 // Create HandshakeCapture_Text_title text label
582 pElemRef = gslc_ElemCreateTxt(&m_gui,HandshakeCapture_Text_title,E_Popup_HandshakeCapture,(gslc_tsRect){72,152,180,8},
583 (char*)"Select Deauthentication Method",0,E_BUILTIN5X8);
584 gslc_ElemSetTxtAlign(&m_gui,pElemRef,GSLC_ALIGN_MID_MID);
585 //<InitGUI !End!>
586
587 //<Startup !Start!>
588 gslc_GuiRotate(&m_gui, 0);
589 //<Startup !End!>
590}
591
592#endif // end _GUISLICE_GEN_H