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.
MENU_Private.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - 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 Cypress Semiconductor Corporation, 00019 whose registered office is situated at 198 Champion Ct. San Jose, CA 00020 95134 USA solely for the purposes of creating libraries for Cypress 00021 PSoC3 and PSoC5 processor-based devices, sublicensed and distributed 00022 under the terms and conditions of the Cypress 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 Licensor: SEGGER Microcontroller Systems LLC 00030 Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA 00031 Licensed SEGGER software: emWin 00032 License number: GUI-00319 00033 License model: Services and License Agreement, signed June 10th, 2009 00034 Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) 00035 ---------------------------------------------------------------------- 00036 Support and Update Agreement (SUA) 00037 SUA period: 2009-06-12 - 2022-07-27 00038 Contact to extend SUA: sales@segger.com 00039 ---------------------------------------------------------------------- 00040 File : MENU_Private.h 00041 Purpose : Internal header file 00042 ---------------------------END-OF-HEADER------------------------------ 00043 */ 00044 00045 #ifndef MENU_PRIVATE_H 00046 #define MENU_PRIVATE_H 00047 00048 #include "WIDGET.h" 00049 #include "MENU.h" 00050 #include "GUI_ARRAY.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 /********************************************************************* 00055 * 00056 * Defines 00057 * 00058 ********************************************************************** 00059 */ 00060 /********************************************************************* 00061 * 00062 * Status flags 00063 */ 00064 #define MENU_SF_HORIZONTAL MENU_CF_HORIZONTAL 00065 #define MENU_SF_VERTICAL MENU_CF_VERTICAL 00066 #define MENU_SF_OPEN_ON_POINTEROVER MENU_CF_OPEN_ON_POINTEROVER 00067 #define MENU_SF_CLOSE_ON_SECOND_CLICK MENU_CF_CLOSE_ON_SECOND_CLICK 00068 #define MENU_SF_HIDE_DISABLED_SEL MENU_CF_HIDE_DISABLED_SEL 00069 00070 #define MENU_SF_ACTIVE (1 << 6) // Internal flag only 00071 #define MENU_SF_POPUP (1 << 7) // Internal flag only 00072 #define MENU_SF_ARROW (1 << 8) // Internal flag only 00073 00074 /********************************************************************* 00075 * 00076 * Types 00077 * 00078 ********************************************************************** 00079 */ 00080 // 00081 // MENU_SKIN_PRIVATE 00082 // 00083 typedef struct { 00084 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00085 } MENU_SKIN_PRIVATE; 00086 00087 // 00088 // MENU_ITEM 00089 // 00090 typedef struct { 00091 MENU_Handle hSubmenu; 00092 U16 Id; 00093 U16 Flags; 00094 int TextWidth; 00095 char acText[1]; 00096 } MENU_ITEM; 00097 00098 // 00099 // MENU_PROPS 00100 // 00101 typedef struct { 00102 GUI_COLOR aTextColor[5]; 00103 GUI_COLOR aBkColor[5]; 00104 U8 aBorder[4]; 00105 const GUI_FONT * pFont; 00106 MENU_SKIN_PRIVATE SkinPrivate; 00107 } MENU_PROPS; 00108 00109 // 00110 // MENU_Obj 00111 // 00112 typedef struct { 00113 WIDGET Widget; 00114 MENU_PROPS Props; 00115 GUI_ARRAY ItemArray; 00116 WM_HWIN hOwner; 00117 U16 Flags; 00118 char IsSubmenuActive; 00119 int Width; 00120 int Height; 00121 int Sel; 00122 unsigned ArrowAreaWidth; 00123 WIDGET_SKIN const * pWidgetSkin; 00124 } MENU_Obj; 00125 00126 /********************************************************************* 00127 * 00128 * Macros for internal use 00129 * 00130 ********************************************************************** 00131 */ 00132 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00133 #define MENU_INIT_ID(pObj) (pObj->Widget.DebugId = MENU_ID) 00134 #else 00135 #define MENU_INIT_ID(pObj) 00136 #endif 00137 00138 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00139 MENU_Obj * MENU_LockH(MENU_Handle hObj); 00140 #define MENU_LOCK_H(hObj) MENU_LockH(hObj) 00141 #else 00142 #define MENU_LOCK_H(hObj) (MENU_Obj *)GUI_LOCK_H(hObj) 00143 #endif 00144 00145 /********************************************************************* 00146 * 00147 * Public data (internal defaults) 00148 * 00149 ********************************************************************** 00150 */ 00151 00152 extern MENU_PROPS MENU__DefaultProps; 00153 extern const WIDGET_EFFECT * MENU__pDefaultEffect; 00154 00155 extern const WIDGET_SKIN MENU__SkinClassic; 00156 extern WIDGET_SKIN MENU__Skin; 00157 00158 extern WIDGET_SKIN const * MENU__pSkinDefault; 00159 00160 /********************************************************************* 00161 * 00162 * Private functions 00163 * 00164 ********************************************************************** 00165 */ 00166 int MENU__CalcMenuSizeX (MENU_Handle hObj); 00167 int MENU__CalcMenuSizeY (MENU_Handle hObj); 00168 int MENU__FindItem (MENU_Handle hObj, U16 ItemId, MENU_Handle* phMenu); 00169 int MENU__GetEffectSize (MENU_Handle hObj); 00170 int MENU__GetItemHeight (MENU_Handle hObj, unsigned Index); 00171 int MENU__GetItemWidth (MENU_Handle hObj, unsigned Index); 00172 unsigned MENU__GetNumItems (MENU_Obj * pObj); 00173 int MENU__HasEffect (MENU_Handle hObj, MENU_Obj * pObj); 00174 void MENU__InvalidateItem (MENU_Handle hObj, unsigned Index); 00175 void MENU__RecalcTextWidthOfItems(MENU_Obj * pObj); 00176 void MENU__ResizeMenu (MENU_Handle hObj); 00177 int MENU__SendMenuMessage (MENU_Handle hObj, WM_HWIN hDestWin, U16 MsgType, U16 ItemId); 00178 char MENU__SetItem (MENU_Handle hObj, unsigned Index, const MENU_ITEM_DATA* pItemData); 00179 void MENU__SetItemFlags (MENU_Obj * pObj, unsigned Index, U16 Mask, U16 Flags); 00180 00181 #endif // GUI_WINSUPPORT 00182 #endif // MENU_PRIVATE_H 00183 00184 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:42 by
