Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: app_emwin1 app_emwin2_pos lpc4088_ebb_gui_emwin
EwWindow.h
00001 00002 #ifndef EWWINDOW_H 00003 #define EWWINDOW_H 00004 00005 #include "EwPainter.h" 00006 00007 #include "GUI.h" 00008 #include "WM.h" 00009 #include "FRAMEWIN.h" 00010 00011 enum EwTouchState_t { 00012 TouchStatePressed = 0, 00013 TouchStateReleased, 00014 TouchStateReleasedOutside 00015 }; 00016 00017 /** 00018 * This is base class for all EwGui wrapper classes. It is related to 00019 * the emwin WM interface. 00020 */ 00021 class EwWindow { 00022 public: 00023 00024 EwWindow(EwWindow* parent = 0); 00025 EwWindow(int x, int y, int width, int height, EwWindow* parent = 0); 00026 ~EwWindow(); 00027 00028 void setParent(EwWindow* parent); 00029 void bringToBottom(); 00030 void bringToTop(); 00031 void disable(); 00032 void enable(); 00033 bool hasTransparency(); 00034 int getX(); 00035 int getY(); 00036 int getWidth(); 00037 int getHeight(); 00038 bool hasInput(); 00039 bool hasFocus(); 00040 bool getStayOnTop(); 00041 00042 void hide(); 00043 void invalidate(); 00044 00045 bool isCompletelyCovered(); 00046 bool isCompletelyVisible(); 00047 bool isEnabled(); 00048 bool isVisible(); 00049 00050 void makeModal(); 00051 void moveTo(int x, int y); 00052 void moveToAbs(int x, int y); 00053 void move(int dx, int dy); 00054 00055 void repaint(); 00056 void repaintAll(); 00057 00058 void resize(int dx, int dy); 00059 void resizeTo(int width, int height); 00060 void setFocus(); 00061 void setHasTransparency(bool hasTrans); 00062 void setStayOnTop(bool onTop); 00063 00064 void show(); 00065 void update(); 00066 void updateAll(); 00067 00068 static ewColor_t setDesktopColor(ewColor_t c); 00069 00070 virtual bool paintEvent(); 00071 virtual bool touchEvent(int x, int y, EwTouchState_t state); 00072 virtual bool focusEvent(bool gotFocus); 00073 virtual bool resizedEvent(); 00074 00075 protected: 00076 GUI_HWIN _hWnd; 00077 static int _guiWidgetId; 00078 00079 00080 void _setNewHandle(GUI_HWIN hWnd, void (*callbackFunc)(WM_MESSAGE* pMsg, EwWindow* w)); 00081 GUI_HWIN _getHandle(EwWindow* w); 00082 00083 private: 00084 00085 00086 void init(int x, int y, int width, int height, EwWindow* parent); 00087 00088 }; 00089 00090 #endif
Generated on Tue Jul 12 2022 19:57:49 by
