Example that shows how to use the ewgui wrapper classes in combination with Segger's emwin library.

Dependencies:   EALib ewgui mbed

Committer:
embeddedartists
Date:
Mon Dec 16 07:09:17 2013 +0000
Revision:
0:6b81fd4666bb
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 0:6b81fd4666bb 1
embeddedartists 0:6b81fd4666bb 2 #ifndef MYWINDOW_H
embeddedartists 0:6b81fd4666bb 3 #define MYWINDOW_H
embeddedartists 0:6b81fd4666bb 4
embeddedartists 0:6b81fd4666bb 5 #include "EwWindow.h"
embeddedartists 0:6b81fd4666bb 6 #include "EwButton.h"
embeddedartists 0:6b81fd4666bb 7 #include "EwCheckBox.h"
embeddedartists 0:6b81fd4666bb 8 #include "EwDropDown.h"
embeddedartists 0:6b81fd4666bb 9
embeddedartists 0:6b81fd4666bb 10 class MyWindow : public EwWindow {
embeddedartists 0:6b81fd4666bb 11 public:
embeddedartists 0:6b81fd4666bb 12
embeddedartists 0:6b81fd4666bb 13 MyWindow(EwWindow* parent);
embeddedartists 0:6b81fd4666bb 14
embeddedartists 0:6b81fd4666bb 15 virtual bool paintEvent();
embeddedartists 0:6b81fd4666bb 16 virtual bool touchEvent(int x, int y, EwTouchState_t state);
embeddedartists 0:6b81fd4666bb 17
embeddedartists 0:6b81fd4666bb 18 virtual bool resizedEvent() {printf("MyWindow resized\n"); return true;}
embeddedartists 0:6b81fd4666bb 19
embeddedartists 0:6b81fd4666bb 20
embeddedartists 0:6b81fd4666bb 21 private:
embeddedartists 0:6b81fd4666bb 22
embeddedartists 0:6b81fd4666bb 23 int _clickCnt;
embeddedartists 0:6b81fd4666bb 24 bool _pressed;
embeddedartists 0:6b81fd4666bb 25 int _pressX;
embeddedartists 0:6b81fd4666bb 26 int _pressY;
embeddedartists 0:6b81fd4666bb 27 EwButton _changeBtn;
embeddedartists 0:6b81fd4666bb 28 EwCheckBox _checkBox;
embeddedartists 0:6b81fd4666bb 29 EwDropDown _dropDownLst;
embeddedartists 0:6b81fd4666bb 30
embeddedartists 0:6b81fd4666bb 31
embeddedartists 0:6b81fd4666bb 32 void clickListener(EwWindow* w);
embeddedartists 0:6b81fd4666bb 33 void checkedListener(EwWindow* w);
embeddedartists 0:6b81fd4666bb 34 };
embeddedartists 0:6b81fd4666bb 35
embeddedartists 0:6b81fd4666bb 36 #endif