Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This program displays how to use the emWin library from Segger.
Dependencies: EALib ewgui mbed
This program requires the emWin library. Instructions and more information.
MyWindow.h@0:7f5765fcd048, 2015-07-14 (annotated)
- Committer:
- embeddedartists
- Date:
- Tue Jul 14 11:34:15 2015 +0000
- Revision:
- 0:7f5765fcd048
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:7f5765fcd048 | 1 | |
embeddedartists | 0:7f5765fcd048 | 2 | #ifndef MYWINDOW_H |
embeddedartists | 0:7f5765fcd048 | 3 | #define MYWINDOW_H |
embeddedartists | 0:7f5765fcd048 | 4 | |
embeddedartists | 0:7f5765fcd048 | 5 | #include "EwWindow.h" |
embeddedartists | 0:7f5765fcd048 | 6 | #include "EwButton.h" |
embeddedartists | 0:7f5765fcd048 | 7 | #include "EwCheckBox.h" |
embeddedartists | 0:7f5765fcd048 | 8 | #include "EwDropDown.h" |
embeddedartists | 0:7f5765fcd048 | 9 | |
embeddedartists | 0:7f5765fcd048 | 10 | class MyWindow : public EwWindow { |
embeddedartists | 0:7f5765fcd048 | 11 | public: |
embeddedartists | 0:7f5765fcd048 | 12 | |
embeddedartists | 0:7f5765fcd048 | 13 | MyWindow(EwWindow* parent); |
embeddedartists | 0:7f5765fcd048 | 14 | |
embeddedartists | 0:7f5765fcd048 | 15 | virtual bool paintEvent(); |
embeddedartists | 0:7f5765fcd048 | 16 | virtual bool touchEvent(int x, int y, EwTouchState_t state); |
embeddedartists | 0:7f5765fcd048 | 17 | |
embeddedartists | 0:7f5765fcd048 | 18 | virtual bool resizedEvent() {printf("MyWindow resized\n"); return true;} |
embeddedartists | 0:7f5765fcd048 | 19 | |
embeddedartists | 0:7f5765fcd048 | 20 | |
embeddedartists | 0:7f5765fcd048 | 21 | private: |
embeddedartists | 0:7f5765fcd048 | 22 | |
embeddedartists | 0:7f5765fcd048 | 23 | int _clickCnt; |
embeddedartists | 0:7f5765fcd048 | 24 | bool _pressed; |
embeddedartists | 0:7f5765fcd048 | 25 | int _pressX; |
embeddedartists | 0:7f5765fcd048 | 26 | int _pressY; |
embeddedartists | 0:7f5765fcd048 | 27 | EwButton _changeBtn; |
embeddedartists | 0:7f5765fcd048 | 28 | EwCheckBox _checkBox; |
embeddedartists | 0:7f5765fcd048 | 29 | EwDropDown _dropDownLst; |
embeddedartists | 0:7f5765fcd048 | 30 | |
embeddedartists | 0:7f5765fcd048 | 31 | |
embeddedartists | 0:7f5765fcd048 | 32 | void clickListener(EwWindow* w); |
embeddedartists | 0:7f5765fcd048 | 33 | void checkedListener(EwWindow* w); |
embeddedartists | 0:7f5765fcd048 | 34 | }; |
embeddedartists | 0:7f5765fcd048 | 35 | |
embeddedartists | 0:7f5765fcd048 | 36 | #endif |
embeddedartists | 0:7f5765fcd048 | 37 |