NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
Embed:
(wiki syntax)
Show/hide line numbers
FRAMEWIN_Private.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH & Co. KG * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.38 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed to NXP Semiconductors USA, Inc. whose 00019 registered office is situated at 411 E. Plumeria Drive, San Jose, 00020 CA 95134, USA solely for the purposes of creating libraries for 00021 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and 00022 distributed under the terms and conditions of the NXP End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 00030 Licensor: SEGGER Microcontroller Systems LLC 00031 Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA 00032 Licensed SEGGER software: emWin 00033 License number: GUI-00186 00034 License model: emWin License Agreement, dated August 20th 2011 00035 Licensed product: - 00036 Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 00037 Licensed number of seats: - 00038 ---------------------------------------------------------------------- 00039 File : FRAMEWIN_Private.h 00040 Purpose : FRAMEWIN private header file 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef FRAMEWIN_PRIVATE_H 00045 #define FRAMEWIN_PRIVATE_H 00046 00047 #include "WM.h" 00048 #include "FRAMEWIN.h" 00049 #include "WIDGET.h" 00050 #include "GUI_HOOK.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 /****************************************************************** 00055 * 00056 * Config defaults 00057 * 00058 ******************************************************************* 00059 */ 00060 // 00061 //Support for 3D effects 00062 // 00063 #ifndef FRAMEWIN_CLIENTCOLOR_DEFAULT 00064 #if WIDGET_USE_FLEX_SKIN 00065 #define FRAMEWIN_CLIENTCOLOR_DEFAULT GUI_WHITE 00066 #else 00067 #define FRAMEWIN_CLIENTCOLOR_DEFAULT GUI_GRAY_C0 00068 #endif 00069 #endif 00070 00071 // 00072 // Default for top frame size 00073 // 00074 #ifndef FRAMEWIN_TITLEHEIGHT_DEFAULT 00075 #define FRAMEWIN_TITLEHEIGHT_DEFAULT 0 00076 #endif 00077 00078 // 00079 // Default for left/right/top/bottom frame size 00080 // 00081 #ifndef FRAMEWIN_BORDER_DEFAULT 00082 #define FRAMEWIN_BORDER_DEFAULT 3 00083 #endif 00084 00085 // 00086 // Default for inner frame size 00087 // 00088 #ifndef FRAMEWIN_IBORDER_DEFAULT 00089 #define FRAMEWIN_IBORDER_DEFAULT 1 00090 #endif 00091 00092 // 00093 // Default font 00094 // 00095 #ifndef FRAMEWIN_DEFAULT_FONT 00096 #if WIDGET_USE_FLEX_SKIN 00097 #if WIDGET_USE_SCHEME_SMALL 00098 #define FRAMEWIN_DEFAULT_FONT &GUI_Font13_1 00099 #elif WIDGET_USE_SCHEME_MEDIUM 00100 #define FRAMEWIN_DEFAULT_FONT &GUI_Font16_1 00101 #elif WIDGET_USE_SCHEME_LARGE 00102 #define FRAMEWIN_DEFAULT_FONT &GUI_Font24_1 00103 #endif 00104 #else 00105 #if WIDGET_USE_SCHEME_SMALL 00106 #define FRAMEWIN_DEFAULT_FONT &GUI_Font8_1 00107 #elif WIDGET_USE_SCHEME_MEDIUM 00108 #define FRAMEWIN_DEFAULT_FONT &GUI_Font13_1 00109 #elif WIDGET_USE_SCHEME_LARGE 00110 #define FRAMEWIN_DEFAULT_FONT &GUI_Font16_1 00111 #endif 00112 #endif 00113 #endif 00114 00115 // 00116 // Default bar color when framewin is active 00117 // 00118 #ifndef FRAMEWIN_BARCOLOR_ACTIVE_DEFAULT 00119 #define FRAMEWIN_BARCOLOR_ACTIVE_DEFAULT GUI_BLUE 00120 #endif 00121 00122 // 00123 // Default bar color when framewin is inactive 00124 // 00125 #ifndef FRAMEWIN_BARCOLOR_INACTIVE_DEFAULT 00126 #define FRAMEWIN_BARCOLOR_INACTIVE_DEFAULT GUI_DARKGRAY 00127 #endif 00128 00129 // 00130 // Default frame color 00131 // 00132 #ifndef FRAMEWIN_FRAMECOLOR_DEFAULT 00133 #define FRAMEWIN_FRAMECOLOR_DEFAULT GUI_GRAY_AA 00134 #endif 00135 00136 // 00137 // Default text color when framewin is active 00138 // 00139 #ifndef FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT 00140 #if WIDGET_USE_FLEX_SKIN 00141 #define FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT GUI_BLACK 00142 #else 00143 #define FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT GUI_WHITE 00144 #endif 00145 #endif 00146 00147 // 00148 // Default text color when framewin is inactive 00149 // 00150 #ifndef FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT 00151 #if WIDGET_USE_FLEX_SKIN 00152 #define FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT GUI_BLACK 00153 #else 00154 #define FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT GUI_WHITE 00155 #endif 00156 #endif 00157 00158 // 00159 // Default text alignment 00160 // 00161 #ifndef FRAMEWIN_TEXTALIGN_DEFAULT 00162 #define FRAMEWIN_TEXTALIGN_DEFAULT GUI_TA_LEFT 00163 #endif 00164 00165 /********************************************************************* 00166 * 00167 * Object definition 00168 * 00169 ********************************************************************** 00170 */ 00171 typedef struct { 00172 unsigned (* pfGetBordersize)(FRAMEWIN_Handle hObj, unsigned Index); 00173 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00174 } FRAMEWIN_SKIN_PRIVATE; 00175 00176 typedef struct { 00177 const GUI_FONT * pFont; 00178 GUI_COLOR aBarColor[2]; 00179 GUI_COLOR aTextColor[2]; 00180 GUI_COLOR ClientColor; 00181 FRAMEWIN_SKIN_PRIVATE SkinPrivate; 00182 I16 TitleHeight; 00183 I16 BorderSize; 00184 I16 IBorderSize; 00185 I16 TextAlign; 00186 } FRAMEWIN_PROPS; 00187 00188 typedef struct { 00189 WIDGET Widget; 00190 FRAMEWIN_PROPS Props; 00191 WIDGET_SKIN const * pWidgetSkin; 00192 WIDGET_DRAW_ITEM_FUNC * pfDrawItem; // Only for drawing the title bar... 00193 WM_CALLBACK * cb; 00194 WM_HWIN hClient; 00195 WM_HWIN hMenu; 00196 WM_HWIN hText; 00197 GUI_RECT rRestore; 00198 U16 Flags; 00199 WM_HWIN hFocussedChild; // Handle to focussed child .. default none (0) 00200 WM_DIALOG_STATUS * pDialogStatus; 00201 GUI_HOOK * pFirstHook; 00202 } FRAMEWIN_Obj; 00203 00204 typedef struct { 00205 I16 TitleHeight; 00206 I16 MenuHeight; 00207 GUI_RECT rClient; 00208 GUI_RECT rTitleText; 00209 } FRAMEWIN_POSITIONS; 00210 00211 /********************************************************************* 00212 * 00213 * Macros for internal use 00214 * 00215 ********************************************************************** 00216 */ 00217 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00218 #define FRAMEWIN_INIT_ID(p) (p->Widget.DebugId = FRAMEWIN_ID) 00219 #else 00220 #define FRAMEWIN_INIT_ID(p) 00221 #endif 00222 00223 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00224 FRAMEWIN_Obj * FRAMEWIN_LockH(FRAMEWIN_Handle h); 00225 #define FRAMEWIN_LOCK_H(h) FRAMEWIN_LockH(h) 00226 #else 00227 #define FRAMEWIN_LOCK_H(h) (FRAMEWIN_Obj *)GUI_LOCK_H(h) 00228 #endif 00229 00230 /********************************************************************* 00231 * 00232 * Public data (internal defaults) 00233 * 00234 ********************************************************************** 00235 */ 00236 extern FRAMEWIN_PROPS FRAMEWIN__DefaultProps; 00237 00238 extern const WIDGET_SKIN FRAMEWIN__SkinClassic; 00239 extern WIDGET_SKIN FRAMEWIN__Skin; 00240 00241 extern const WIDGET_SKIN * FRAMEWIN__pSkinDefault; 00242 00243 /********************************************************************* 00244 * 00245 * Private functions 00246 * 00247 ********************************************************************** 00248 */ 00249 void FRAMEWIN__CalcPositions (FRAMEWIN_Handle hObj, FRAMEWIN_POSITIONS * pPos); 00250 int FRAMEWIN__CalcTitleHeight(FRAMEWIN_Obj * pObj); 00251 void FRAMEWIN__UpdatePositions(FRAMEWIN_Handle hObj); 00252 void FRAMEWIN__UpdateButtons (FRAMEWIN_Handle hObj, int OldHeight, int OldBorderSizeL, int OldBorderSizeR, int OldBorderSizeT); 00253 void FRAMEWIN__GetTitleLimits (FRAMEWIN_Handle hObj, int * pxMin, int * pxMax); 00254 unsigned FRAMEWIN__GetBorderSize (FRAMEWIN_Handle hObj, unsigned Index); 00255 00256 #endif // GUI_WINSUPPORT 00257 #endif // FRAMEWIN_PRIVATE_H
Generated on Tue Jul 12 2022 19:43:35 by 1.7.2