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
EwFrameWindow.h
00001 00002 #ifndef EWFRAMEWINDOW_H 00003 #define EWFRAMEWINDOW_H 00004 00005 #include "EwWindow.h" 00006 #include "EwPainter.h" 00007 00008 #include "FRAMEWIN.h" 00009 00010 enum ewFrameWindowButtonAlign_t { 00011 FrameWindowButtonLeft = FRAMEWIN_BUTTON_LEFT, 00012 FrameWindowButtonRight = FRAMEWIN_BUTTON_RIGHT, 00013 }; 00014 00015 enum ewFrameWindowColorIndex_t { 00016 FrameWindowColorIndexInactive = 0, 00017 FrameWindowColorIndexActive = 1 00018 }; 00019 00020 /** 00021 * This is a wrapper class for the emwin FRAMEWIN interface. 00022 */ 00023 class EwFrameWindow : public EwWindow { 00024 public: 00025 00026 EwFrameWindow(const char* pTitle, EwWindow* parent = 0); 00027 EwFrameWindow(int x, int y, int width, int height, const char* pTitle, EwWindow* parent = 0); 00028 00029 void addCloseButton(ewFrameWindowButtonAlign_t align, int32_t offset); 00030 void addMaxButton(ewFrameWindowButtonAlign_t align, int32_t offset); 00031 // TODO: addMenu(ewMenu* pMenu); 00032 void addMinButton(ewFrameWindowButtonAlign_t align, int32_t offset); 00033 bool isActive(); 00034 ewColor_t getBarColor(ewFrameWindowColorIndex_t idx); 00035 int32_t getBorderSize(); 00036 const ewFont_t* getFont(); 00037 void getText(char* pBuffer, int32_t maxLen); 00038 ewTextAlign_t getTextAlign(); 00039 int32_t getTitleHeight(); 00040 bool isMaximized(); 00041 bool isMinimized(); 00042 void maximize(); 00043 void minimize(); 00044 void restore(); 00045 void setActive(bool active); 00046 void setBarColor(ewFrameWindowColorIndex_t idx, ewColor_t c); 00047 void setBorderSize(uint32_t size); 00048 void setClientColor(ewColor_t c); 00049 void setFont(const ewFont_t* pFont); 00050 void setMoveable(bool moveable); 00051 void setResizeable(bool resizeable); 00052 void setText(const char* s); 00053 void setTextAlign(ewTextAlign_t align); 00054 void setTextColor(ewFrameWindowColorIndex_t idx, ewColor_t c); 00055 void setTitleHeight(int32_t height); 00056 void setTitleVisible(bool visible); 00057 00058 00059 static ewColor_t getDefaultBarColor(ewFrameWindowColorIndex_t idx); 00060 static int32_t getDefaultBorderSize(); 00061 static ewColor_t getDefaultClientColor(); 00062 static const ewFont_t* getDefaultFont(); 00063 static ewColor_t getDefaultTextColor(ewFrameWindowColorIndex_t idx); 00064 static int32_t getDefaultTitleHeight(); 00065 00066 static void setDefaultBarColor(ewFrameWindowColorIndex_t idx, ewColor_t c); 00067 static void setDefaultBorderSize(int32_t size); 00068 static void setDefaultClientColor(ewColor_t c); 00069 static void setDefaultTextColor(ewFrameWindowColorIndex_t idx, ewColor_t c); 00070 static void setDefaultTitleHeight(int32_t height); 00071 00072 private: 00073 00074 void init(int x, int y, int width, int height, const char* pTitle, EwWindow* parent); 00075 00076 }; 00077 00078 #endif
Generated on Tue Jul 12 2022 19:57:49 by
