├── examples ├── current-sensor │ ├── .gitignore │ ├── data │ │ ├── no.bmp │ │ ├── ok.bmp │ │ ├── btn.bmp │ │ ├── msg.bmp │ │ ├── ok59.bmp │ │ ├── pic.bmp │ │ ├── about.bmp │ │ ├── cross.bmp │ │ ├── folder.bmp │ │ ├── label.bmp │ │ ├── magic.bmp │ │ └── cross16px.bmp │ ├── src │ │ ├── TFT │ │ │ └── Fonts │ │ │ │ ├── TrueType │ │ │ │ └── Not_yet_supported.txt │ │ │ │ ├── Font16.h │ │ │ │ ├── Font32rle.h │ │ │ │ ├── Font64rle.h │ │ │ │ ├── Font72rle.h │ │ │ │ ├── Font7srle.h │ │ │ │ ├── GFXFF │ │ │ │ ├── gfxfont.h │ │ │ │ ├── license.txt │ │ │ │ └── print.txt │ │ │ │ └── glcdfont.c │ │ ├── GUI │ │ │ ├── GUI.h │ │ │ ├── WindowPack.h │ │ │ ├── WindowPack.cpp │ │ │ ├── WindowMain.h │ │ │ ├── WindowPaint.h │ │ │ ├── GUI.cpp │ │ │ └── WindowPlot.h │ │ ├── UTF8-fonts │ │ │ └── customfonts.h │ │ ├── TouchWrapper │ │ │ ├── TouchWrapper.h │ │ │ └── TouchWrapper.cpp │ │ └── FIR-filter-class │ │ │ ├── README │ │ │ ├── filt.h │ │ │ └── filt.cpp │ ├── emGUIGlue.h │ ├── current-sensor.ino │ └── User_Setup.h └── demo-menu │ ├── data │ ├── no.bmp │ ├── ok.bmp │ ├── pic.bmp │ ├── about.bmp │ ├── folder.bmp │ ├── label.bmp │ └── magic.bmp │ ├── src │ └── TFT │ │ ├── Fonts │ │ ├── TrueType │ │ │ └── Not_yet_supported.txt │ │ ├── Font16.h │ │ ├── Font32rle.h │ │ ├── Font64rle.h │ │ ├── Font72rle.h │ │ ├── Font7srle.h │ │ ├── GFXFF │ │ │ ├── gfxfont.h │ │ │ ├── license.txt │ │ │ └── print.txt │ │ └── glcdfont.c │ │ ├── SPI9.h │ │ └── SPI9.cpp │ ├── GUI.h │ ├── emGUIGlue.h │ ├── demo-menu.ino │ ├── User_Setup.h │ └── GUI.cpp ├── Pictures ├── menu.jpg ├── plot.jpg ├── Image.PNG ├── paint.jpg ├── Text box.PNG ├── main menu.PNG ├── modal dialog.PNG ├── 0aabb3b8-45ac-4089-8034-bd3b26065207.jpg ├── af27046c-2f33-44af-a220-e1cf2456dcb5.jpg └── fa314fcf-e02c-4a30-bb53-9c6628b62733.jpg ├── src ├── emGUI │ ├── .gitignore │ ├── emGUI.hpp │ ├── Draw │ │ ├── Draw.c │ │ └── Draw.h │ ├── emGUI.h │ ├── cpp │ │ ├── PictureStack.hpp │ │ ├── Label.hpp │ │ ├── WindowHeader.hpp │ │ ├── Widget.hpp │ │ ├── Button.hpp │ │ └── DisposableWindow.hpp │ ├── Widgets │ │ ├── StatusBar.h │ │ ├── ProgressBar.h │ │ ├── StatusBar.c │ │ ├── Console.h │ │ ├── Button.h │ │ ├── KeyBoard.h │ │ ├── KeyRow.h │ │ ├── ModalDialog.h │ │ ├── Window.h │ │ ├── PictureStack.h │ │ ├── WindowManager.h │ │ ├── Label.h │ │ ├── Plot.h │ │ ├── ProgressBar.c │ │ ├── KeyRow.c │ │ ├── PictureStack.c │ │ ├── Widget.h │ │ ├── KeyBoard.c │ │ ├── Window.c │ │ ├── Console.c │ │ ├── WindowManager.c │ │ └── Button.c │ ├── options │ │ ├── opts.c │ │ └── opts.h │ ├── Changelog.md │ └── Readme.md ├── emGUI.h ├── emGUI_port_opts.h ├── gfxfont.h └── glcdfont.c ├── library.properties ├── keywords.txt └── README.md /examples/current-sensor/.gitignore: -------------------------------------------------------------------------------- 1 | /.vscode/ 2 | -------------------------------------------------------------------------------- /Pictures/menu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/menu.jpg -------------------------------------------------------------------------------- /Pictures/plot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/plot.jpg -------------------------------------------------------------------------------- /Pictures/Image.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/Image.PNG -------------------------------------------------------------------------------- /Pictures/paint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/paint.jpg -------------------------------------------------------------------------------- /Pictures/Text box.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/Text box.PNG -------------------------------------------------------------------------------- /Pictures/main menu.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/main menu.PNG -------------------------------------------------------------------------------- /Pictures/modal dialog.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/modal dialog.PNG -------------------------------------------------------------------------------- /examples/demo-menu/data/no.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/no.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/ok.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/ok.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/pic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/pic.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/no.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/no.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/ok.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/ok.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/about.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/about.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/folder.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/folder.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/label.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/label.bmp -------------------------------------------------------------------------------- /examples/demo-menu/data/magic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/demo-menu/data/magic.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/btn.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/btn.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/msg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/msg.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/ok59.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/ok59.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/pic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/pic.bmp -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/TrueType/Not_yet_supported.txt: -------------------------------------------------------------------------------- 1 | TO DO: Add support for converted True Type fonts in an RLE format. -------------------------------------------------------------------------------- /examples/current-sensor/data/about.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/about.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/cross.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/cross.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/folder.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/folder.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/label.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/label.bmp -------------------------------------------------------------------------------- /examples/current-sensor/data/magic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/magic.bmp -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/TrueType/Not_yet_supported.txt: -------------------------------------------------------------------------------- 1 | TO DO: Add support for converted True Type fonts in an RLE format. -------------------------------------------------------------------------------- /examples/current-sensor/data/cross16px.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/examples/current-sensor/data/cross16px.bmp -------------------------------------------------------------------------------- /Pictures/0aabb3b8-45ac-4089-8034-bd3b26065207.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/0aabb3b8-45ac-4089-8034-bd3b26065207.jpg -------------------------------------------------------------------------------- /Pictures/af27046c-2f33-44af-a220-e1cf2456dcb5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/af27046c-2f33-44af-a220-e1cf2456dcb5.jpg -------------------------------------------------------------------------------- /Pictures/fa314fcf-e02c-4a30-bb53-9c6628b62733.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libEmGUI/emGUI-arduino/HEAD/Pictures/fa314fcf-e02c-4a30-bb53-9c6628b62733.jpg -------------------------------------------------------------------------------- /examples/current-sensor/src/GUI/GUI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "../../emGUIGlue.h" 6 | #include "WindowPack.h" 7 | 8 | void GUIInit(); 9 | -------------------------------------------------------------------------------- /src/emGUI/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | 4 | # Libraries 5 | *.lib 6 | *.a 7 | 8 | # Shared objects (inc. Windows DLLs) 9 | *.dll 10 | *.so 11 | *.so.* 12 | *.dylib 13 | 14 | # Executables 15 | *.exe 16 | *.out 17 | *.app 18 | -------------------------------------------------------------------------------- /examples/demo-menu/GUI.h: -------------------------------------------------------------------------------- 1 | #ifndef _GUI_H_ 2 | #define _GUI_H_ 3 | 4 | #include 5 | #include "emGUIGlue.h" 6 | 7 | typedef enum { 8 | WINDOW_MENU, 9 | WINDOW_HW_TEST, 10 | WINDOW_TP_TEST, 11 | }eWindows; 12 | 13 | 14 | void GUIInit(); 15 | #endif //_GUI_H_ 16 | -------------------------------------------------------------------------------- /examples/demo-menu/emGUIGlue.h: -------------------------------------------------------------------------------- 1 | #ifndef _TFT_WRAPPER_H_ 2 | #define _TFT_WRAPPER_H_ 3 | 4 | #include 5 | 6 | void TFTSleep(); 7 | 8 | void TFTWake(); 9 | 10 | void vGUIGlueInit(); 11 | 12 | xFont xGetDefaultFont(); 13 | void vGUIGlueSetCtx(void *); 14 | 15 | #endif -------------------------------------------------------------------------------- /examples/current-sensor/emGUIGlue.h: -------------------------------------------------------------------------------- 1 | #ifndef _TFT_WRAPPER_H_ 2 | #define _TFT_WRAPPER_H_ 3 | 4 | #include 5 | 6 | 7 | 8 | void TFTSleep(); 9 | 10 | void TFTWake(); 11 | 12 | void vGUIGlueInit(); 13 | 14 | xFont xGetDefaultFont(); 15 | void vGUIGlueSetCtx(void *); 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /src/emGUI/emGUI.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "emGUI/emGUI.h" 4 | 5 | #include "emGUI/cpp/Widget.hpp" 6 | #include "emGUI/cpp/DisposableWindow.hpp" 7 | #include "emGUI/cpp/Button.hpp" 8 | #include "emGUI/cpp/Label.hpp" 9 | #include "emGUI/cpp/WindowHeader.hpp" 10 | #include "emGUI/cpp/PictureStack.hpp" -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/Font16.h: -------------------------------------------------------------------------------- 1 | #include "Font16.c" 2 | 3 | #define nr_chrs_f16 96 4 | #define chr_hgt_f16 16 5 | #define baseline_f16 13 6 | #define data_size_f16 8 7 | #define firstchr_f16 32 8 | 9 | extern const unsigned char widtbl_f16[96]; 10 | extern const unsigned char* const chrtbl_f16[96]; 11 | -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/Font16.h: -------------------------------------------------------------------------------- 1 | #include "Font16.c" 2 | 3 | #define nr_chrs_f16 96 4 | #define chr_hgt_f16 16 5 | #define baseline_f16 13 6 | #define data_size_f16 8 7 | #define firstchr_f16 32 8 | 9 | extern const unsigned char widtbl_f16[96]; 10 | extern const unsigned char* const chrtbl_f16[96]; 11 | -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/Font32rle.h: -------------------------------------------------------------------------------- 1 | #include "Font32rle.c" 2 | 3 | #define nr_chrs_f32 96 4 | #define chr_hgt_f32 26 5 | #define baseline_f32 19 6 | #define data_size_f32 8 7 | #define firstchr_f32 32 8 | 9 | extern const unsigned char widtbl_f32[96]; 10 | extern const unsigned char* const chrtbl_f32[96]; 11 | -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/Font64rle.h: -------------------------------------------------------------------------------- 1 | #include "Font64rle.c" 2 | 3 | #define nr_chrs_f64 96 4 | #define chr_hgt_f64 48 5 | #define baseline_f64 36 6 | #define data_size_f64 8 7 | #define firstchr_f64 32 8 | 9 | extern const unsigned char widtbl_f64[96]; 10 | extern const unsigned char* const chrtbl_f64[96]; 11 | -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/Font72rle.h: -------------------------------------------------------------------------------- 1 | #include "Font72rle.c" 2 | 3 | #define nr_chrs_f72 96 4 | #define chr_hgt_f72 75 5 | #define baseline_f72 73 6 | #define data_size_f72 8 7 | #define firstchr_f72 32 8 | 9 | extern const unsigned char widtbl_f72[96]; 10 | extern const unsigned char* const chrtbl_f72[96]; 11 | -------------------------------------------------------------------------------- /examples/demo-menu/src/TFT/Fonts/Font7srle.h: -------------------------------------------------------------------------------- 1 | #include "Font7srle.c" 2 | 3 | #define nr_chrs_f7s 96 4 | #define chr_hgt_f7s 48 5 | #define baseline_f7s 47 6 | #define data_size_f7s 8 7 | #define firstchr_f7s 32 8 | 9 | extern const unsigned char widtbl_f7s[96]; 10 | extern const unsigned char* const chrtbl_f7s[96]; 11 | -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/Font32rle.h: -------------------------------------------------------------------------------- 1 | #include "Font32rle.c" 2 | 3 | #define nr_chrs_f32 96 4 | #define chr_hgt_f32 26 5 | #define baseline_f32 19 6 | #define data_size_f32 8 7 | #define firstchr_f32 32 8 | 9 | extern const unsigned char widtbl_f32[96]; 10 | extern const unsigned char* const chrtbl_f32[96]; 11 | -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/Font64rle.h: -------------------------------------------------------------------------------- 1 | #include "Font64rle.c" 2 | 3 | #define nr_chrs_f64 96 4 | #define chr_hgt_f64 48 5 | #define baseline_f64 36 6 | #define data_size_f64 8 7 | #define firstchr_f64 32 8 | 9 | extern const unsigned char widtbl_f64[96]; 10 | extern const unsigned char* const chrtbl_f64[96]; 11 | -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/Font72rle.h: -------------------------------------------------------------------------------- 1 | #include "Font72rle.c" 2 | 3 | #define nr_chrs_f72 96 4 | #define chr_hgt_f72 75 5 | #define baseline_f72 73 6 | #define data_size_f72 8 7 | #define firstchr_f72 32 8 | 9 | extern const unsigned char widtbl_f72[96]; 10 | extern const unsigned char* const chrtbl_f72[96]; 11 | -------------------------------------------------------------------------------- /examples/current-sensor/src/TFT/Fonts/Font7srle.h: -------------------------------------------------------------------------------- 1 | #include "Font7srle.c" 2 | 3 | #define nr_chrs_f7s 96 4 | #define chr_hgt_f7s 48 5 | #define baseline_f7s 47 6 | #define data_size_f7s 8 7 | #define firstchr_f7s 32 8 | 9 | extern const unsigned char widtbl_f7s[96]; 10 | extern const unsigned char* const chrtbl_f7s[96]; 11 | -------------------------------------------------------------------------------- /src/emGUI/Draw/Draw.c: -------------------------------------------------------------------------------- 1 | #include "emGUI/Draw/Draw.h" 2 | #include 3 | 4 | static xDraw_t * _HDL = NULL; 5 | 6 | void vDrawSetHandler(xDraw_t * hdl) { 7 | _HDL = hdl; 8 | } 9 | 10 | xDraw_t * pxDrawHDL() { 11 | return _HDL; 12 | } 13 | 14 | void vDrawHandlerInit(xDraw_t * hdl) { 15 | memset(hdl, 0, sizeof(xDraw_t)); 16 | } -------------------------------------------------------------------------------- /examples/current-sensor/src/UTF8-fonts/customfonts.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Roboto-Bold.ttf.9pt.h" 4 | #include "Roboto-Bold.ttf.9pt.RUS.h" 5 | 6 | #include "Roboto-Regular.ttf.9pt.h" 7 | #include "Roboto-Regular.ttf.9pt.RUS.h" 8 | #include "Roboto-Regular.ttf.12pt.h" 9 | #include "Roboto-Regular.ttf.12pt.RUS.h" 10 | #include "Roboto-Regular.ttf.24pt.h" 11 | #include "Roboto-Regular.ttf.24pt.RUS.h" 12 | -------------------------------------------------------------------------------- /examples/current-sensor/src/GUI/WindowPack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "emGUI/emGUI.hpp" 4 | //#include "emGUI/emGUI.h" 5 | #include 6 | #include "../../emGUIGlue.h" 7 | 8 | typedef enum { 9 | WINDOW_MENU, 10 | WINDOW_PAINT, 11 | WINDOW_PLOT 12 | }eWindows; 13 | 14 | xFont getBigFont(); 15 | xFont getSmallFont(); 16 | xFont getBoldFont(); 17 | 18 | #include "WindowPlot.h" 19 | #include "WindowPaint.h" 20 | #include "WindowMain.h" -------------------------------------------------------------------------------- /src/emGUI.h: -------------------------------------------------------------------------------- 1 | #ifndef EMGUI_ARDUINO_H 2 | #define EMGUI_ARDUINO_H 3 | 4 | #if defined(__cplusplus) && !defined(_MSC_VER) 5 | //#include //to add GFX to arduino's include path 6 | #endif 7 | 8 | #if !defined(_MSC_VER) 9 | //Wrapper for passing PROGMEM placed strings to const char* methods of emGUI 10 | #define F_WRP(const_char_p) (String(F(const_char_p)).c_str()) 11 | #endif 12 | 13 | #if __cplusplus >= 201103L 14 | #include "emGUI/emGUI.hpp" 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/emGUI/emGUI.h: -------------------------------------------------------------------------------- 1 | #ifndef EMGUI_H 2 | #define EMGUI_H 3 | 4 | #define EMGUI_VERSION 2.0.0 5 | 6 | #include "options/opts.h" 7 | #include "Draw/Draw.h" 8 | #include "Widgets/Widget.h" 9 | #include "Widgets/WindowManager.h" 10 | #include "Widgets/Button.h" 11 | #include "Widgets/Label.h" 12 | #include "Widgets/StatusBar.h" 13 | #include "Widgets/Button.h" 14 | #include "Widgets/ModalDialog.h" 15 | #include "Widgets/Plot.h" 16 | #include "Widgets/PictureStack.h" 17 | #endif // !EMGUI_H 18 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 emGUI 2 | version=1.0.0 3 | author=romansavrulin , MikhailNatalenko 4 | maintainer=romansavrulin , MikhailNatalenko 5 | sentence=GUI for ESP8266 embedded devices 6 | paragraph=Features: Widgets arch, touch events. You can plug it to any graphic lib you like 7 | category=Display 8 | url=https://github.com/libEmGUI/emGUI-arduino.git 9 | architectures=esp8266 10 | includes=emGUI.h -------------------------------------------------------------------------------- /examples/current-sensor/src/TouchWrapper/TouchWrapper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "../../emGUIGlue.h" 6 | #include "../../User_Setup.h" 7 | 8 | class TouchWrapper : XPT2046_Touchscreen { 9 | public: 10 | TouchWrapper() : XPT2046_Touchscreen(TOUCH_CS) {} 11 | 12 | void init(bool debug = false); 13 | bool handleTouch(bool flag); 14 | 15 | protected: 16 | volatile xTouchEvent currentTouch; 17 | volatile bool bTouchInt = false; 18 | bool alreadyPoped = true; 19 | bool lastTouched = false; 20 | }; 21 | -------------------------------------------------------------------------------- /src/emGUI/cpp/PictureStack.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "emGUI/emGUI.h" 3 | #include "emGUI/cpp/Widget.hpp" 4 | 5 | namespace emGUI { 6 | 7 | class PictureStack : public Widget, public WidgetCaster { 8 | public: 9 | 10 | PictureStack(uint16_t usX, uint16_t usY, xPicture xPic, xWidget *pxWidParent) { 11 | xThis = pxPictureStackCreate(usX, usY, xPic, pxWidParent); 12 | xThis->pvUserData = this; 13 | xThis->pxDrawHandler = [](xWindow *pxW) -> bool { 14 | if (auto w = WidgetCaster::getObject(pxW)) 15 | w->onDrawUpdate(); 16 | 17 | return bPictureStackDraw(pxW); 18 | }; 19 | } 20 | 21 | virtual bool onDrawUpdate() { return false; } 22 | 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /examples/current-sensor/src/GUI/WindowPack.cpp: -------------------------------------------------------------------------------- 1 | #include "Arduino.h" 2 | #include "WindowPack.h" 3 | #include "./../TFT/Fonts/GFXFF/FreeSans9pt7b.h" 4 | #include "./../TFT/Fonts/GFXFF/FreeSansBold9pt7b.h" 5 | #include "./../TFT/Fonts/GFXFF/FreeSans24pt7b.h" 6 | #include "./../UTF8-fonts/customfonts.h" 7 | 8 | const GFXfont * bigFont[] = { &Roboto_Regular24pt7b , &Roboto_Regular24pt8bRUS, NULL }; 9 | const GFXfont * smallFont[] = { &Roboto_Regular9pt7b , &Roboto_Regular9pt8bRUS, NULL }; 10 | const GFXfont * boldFont[] = { &Roboto_Bold9pt7b , &Roboto_Bold9pt8bRUS, NULL }; 11 | 12 | 13 | xFont getBigFont(){ 14 | return bigFont; 15 | } 16 | xFont getSmallFont(){ 17 | return smallFont; 18 | } 19 | xFont getBoldFont(){ 20 | return boldFont; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/emGUI/cpp/Label.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "emGUI/emGUI.h" 4 | #include "emGUI/cpp/Widget.hpp" 5 | //#include 6 | 7 | namespace emGUI { 8 | 9 | class Label : public Widget, public WidgetCaster