Wrapper classes for the emwin library

Dependents:   app_emwin1 app_emwin2_pos lpc4088_ebb_gui_emwin

Committer:
embeddedartists
Date:
Mon Apr 14 08:38:33 2014 +0000
Revision:
1:0b16165ada7c
Parent:
0:316c181e9b65
Initialize uninitialized touchState in EwGui

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 0:316c181e9b65 1
embeddedartists 0:316c181e9b65 2 #ifndef EWFRAMEWINDOW_H
embeddedartists 0:316c181e9b65 3 #define EWFRAMEWINDOW_H
embeddedartists 0:316c181e9b65 4
embeddedartists 0:316c181e9b65 5 #include "EwWindow.h"
embeddedartists 0:316c181e9b65 6 #include "EwPainter.h"
embeddedartists 0:316c181e9b65 7
embeddedartists 0:316c181e9b65 8 #include "FRAMEWIN.h"
embeddedartists 0:316c181e9b65 9
embeddedartists 0:316c181e9b65 10 enum ewFrameWindowButtonAlign_t {
embeddedartists 0:316c181e9b65 11 FrameWindowButtonLeft = FRAMEWIN_BUTTON_LEFT,
embeddedartists 0:316c181e9b65 12 FrameWindowButtonRight = FRAMEWIN_BUTTON_RIGHT,
embeddedartists 0:316c181e9b65 13 };
embeddedartists 0:316c181e9b65 14
embeddedartists 0:316c181e9b65 15 enum ewFrameWindowColorIndex_t {
embeddedartists 0:316c181e9b65 16 FrameWindowColorIndexInactive = 0,
embeddedartists 0:316c181e9b65 17 FrameWindowColorIndexActive = 1
embeddedartists 0:316c181e9b65 18 };
embeddedartists 0:316c181e9b65 19
embeddedartists 0:316c181e9b65 20 /**
embeddedartists 0:316c181e9b65 21 * This is a wrapper class for the emwin FRAMEWIN interface.
embeddedartists 0:316c181e9b65 22 */
embeddedartists 0:316c181e9b65 23 class EwFrameWindow : public EwWindow {
embeddedartists 0:316c181e9b65 24 public:
embeddedartists 0:316c181e9b65 25
embeddedartists 0:316c181e9b65 26 EwFrameWindow(const char* pTitle, EwWindow* parent = 0);
embeddedartists 0:316c181e9b65 27 EwFrameWindow(int x, int y, int width, int height, const char* pTitle, EwWindow* parent = 0);
embeddedartists 0:316c181e9b65 28
embeddedartists 0:316c181e9b65 29 void addCloseButton(ewFrameWindowButtonAlign_t align, int32_t offset);
embeddedartists 0:316c181e9b65 30 void addMaxButton(ewFrameWindowButtonAlign_t align, int32_t offset);
embeddedartists 0:316c181e9b65 31 // TODO: addMenu(ewMenu* pMenu);
embeddedartists 0:316c181e9b65 32 void addMinButton(ewFrameWindowButtonAlign_t align, int32_t offset);
embeddedartists 0:316c181e9b65 33 bool isActive();
embeddedartists 0:316c181e9b65 34 ewColor_t getBarColor(ewFrameWindowColorIndex_t idx);
embeddedartists 0:316c181e9b65 35 int32_t getBorderSize();
embeddedartists 0:316c181e9b65 36 const ewFont_t* getFont();
embeddedartists 0:316c181e9b65 37 void getText(char* pBuffer, int32_t maxLen);
embeddedartists 0:316c181e9b65 38 ewTextAlign_t getTextAlign();
embeddedartists 0:316c181e9b65 39 int32_t getTitleHeight();
embeddedartists 0:316c181e9b65 40 bool isMaximized();
embeddedartists 0:316c181e9b65 41 bool isMinimized();
embeddedartists 0:316c181e9b65 42 void maximize();
embeddedartists 0:316c181e9b65 43 void minimize();
embeddedartists 0:316c181e9b65 44 void restore();
embeddedartists 0:316c181e9b65 45 void setActive(bool active);
embeddedartists 0:316c181e9b65 46 void setBarColor(ewFrameWindowColorIndex_t idx, ewColor_t c);
embeddedartists 0:316c181e9b65 47 void setBorderSize(uint32_t size);
embeddedartists 0:316c181e9b65 48 void setClientColor(ewColor_t c);
embeddedartists 0:316c181e9b65 49 void setFont(const ewFont_t* pFont);
embeddedartists 0:316c181e9b65 50 void setMoveable(bool moveable);
embeddedartists 0:316c181e9b65 51 void setResizeable(bool resizeable);
embeddedartists 0:316c181e9b65 52 void setText(const char* s);
embeddedartists 0:316c181e9b65 53 void setTextAlign(ewTextAlign_t align);
embeddedartists 0:316c181e9b65 54 void setTextColor(ewFrameWindowColorIndex_t idx, ewColor_t c);
embeddedartists 0:316c181e9b65 55 void setTitleHeight(int32_t height);
embeddedartists 0:316c181e9b65 56 void setTitleVisible(bool visible);
embeddedartists 0:316c181e9b65 57
embeddedartists 0:316c181e9b65 58
embeddedartists 0:316c181e9b65 59 static ewColor_t getDefaultBarColor(ewFrameWindowColorIndex_t idx);
embeddedartists 0:316c181e9b65 60 static int32_t getDefaultBorderSize();
embeddedartists 0:316c181e9b65 61 static ewColor_t getDefaultClientColor();
embeddedartists 0:316c181e9b65 62 static const ewFont_t* getDefaultFont();
embeddedartists 0:316c181e9b65 63 static ewColor_t getDefaultTextColor(ewFrameWindowColorIndex_t idx);
embeddedartists 0:316c181e9b65 64 static int32_t getDefaultTitleHeight();
embeddedartists 0:316c181e9b65 65
embeddedartists 0:316c181e9b65 66 static void setDefaultBarColor(ewFrameWindowColorIndex_t idx, ewColor_t c);
embeddedartists 0:316c181e9b65 67 static void setDefaultBorderSize(int32_t size);
embeddedartists 0:316c181e9b65 68 static void setDefaultClientColor(ewColor_t c);
embeddedartists 0:316c181e9b65 69 static void setDefaultTextColor(ewFrameWindowColorIndex_t idx, ewColor_t c);
embeddedartists 0:316c181e9b65 70 static void setDefaultTitleHeight(int32_t height);
embeddedartists 0:316c181e9b65 71
embeddedartists 0:316c181e9b65 72 private:
embeddedartists 0:316c181e9b65 73
embeddedartists 0:316c181e9b65 74 void init(int x, int y, int width, int height, const char* pTitle, EwWindow* parent);
embeddedartists 0:316c181e9b65 75
embeddedartists 0:316c181e9b65 76 };
embeddedartists 0:316c181e9b65 77
embeddedartists 0:316c181e9b65 78 #endif