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

Dependencies:   EALib ewgui mbed

MyWindow.h

Committer:
embeddedartists
Date:
2014-04-14
Revision:
2:789b4879e22f
Parent:
0:6b81fd4666bb

File content as of revision 2:789b4879e22f:


#ifndef MYWINDOW_H
#define MYWINDOW_H

#include "EwWindow.h"
#include "EwButton.h"
#include "EwCheckBox.h"
#include "EwDropDown.h"

class MyWindow : public EwWindow {
public:

    MyWindow(EwWindow* parent);

    virtual bool paintEvent();
    virtual bool touchEvent(int x, int y, EwTouchState_t state);

    virtual bool resizedEvent() {printf("MyWindow resized\n"); return true;}


private:

    int _clickCnt;
    bool _pressed;
    int _pressX;
    int _pressY;
    EwButton _changeBtn;
    EwCheckBox _checkBox;
    EwDropDown _dropDownLst;


    void clickListener(EwWindow* w);
    void checkedListener(EwWindow* w);
};

#endif