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.
MULTIPAGE_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 : MULTIPAGE_Private.h 00041 Purpose : Private MULTIPAGE include 00042 --------------------END-OF-HEADER------------------------------------- 00043 */ 00044 00045 #ifndef MULTIPAGE_PRIVATE_H 00046 #define MULTIPAGE_PRIVATE_H 00047 00048 #include "GUI_Debug.h" 00049 #include "GUI_ARRAY.h" 00050 #include "MULTIPAGE.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 /********************************************************************* 00055 * 00056 * Defines 00057 * 00058 ********************************************************************** 00059 */ 00060 #define MULTIPAGE_STATE_ENABLED (1 << 0) 00061 #define MULTIPAGE_STATE_SCROLLMODE WIDGET_STATE_USER0 00062 00063 #define MULTIPAGE_NUMCOLORS 2 00064 00065 /********************************************************************* 00066 * 00067 * Object definition 00068 * 00069 ********************************************************************** 00070 */ 00071 // 00072 // MULTIPAGE_PAGE 00073 // 00074 typedef struct { 00075 WM_HWIN hWin; 00076 U8 Status; 00077 int ItemWidth; 00078 WM_HMEM hDrawObj[3]; 00079 char acText; 00080 } MULTIPAGE_PAGE; 00081 00082 // 00083 // MULTIPAGE_SKIN_PRIVATE 00084 // 00085 typedef struct { 00086 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00087 } MULTIPAGE_SKIN_PRIVATE; 00088 00089 // 00090 // MULTIPAGE_PROPS 00091 // 00092 typedef struct { 00093 const GUI_FONT * pFont; 00094 unsigned Align; 00095 GUI_COLOR aBkColor[MULTIPAGE_NUMCOLORS]; 00096 GUI_COLOR aTextColor[MULTIPAGE_NUMCOLORS]; 00097 MULTIPAGE_SKIN_PRIVATE SkinPrivate; 00098 int BorderSize0; 00099 int BorderSize1; 00100 unsigned TextAlign; 00101 unsigned Scrollbar; 00102 int (* pfGetTouchedPage)(MULTIPAGE_Handle hObj, int x, int y); 00103 int (* pfGetTabBarWidth)(MULTIPAGE_Handle hObj); 00104 } MULTIPAGE_PROPS; 00105 00106 // 00107 // MULTIPAGE_Obj 00108 // 00109 typedef struct MULTIPAGE_Obj MULTIPAGE_Obj; 00110 00111 struct MULTIPAGE_Obj { 00112 WIDGET Widget; 00113 void (* pfDrawTextItem)(MULTIPAGE_Obj * pObj, const char * pText, unsigned Index, const GUI_RECT * pRect, int x0, int xSize, int ColorIndex); 00114 WM_HWIN hClient; 00115 GUI_ARRAY hPageArray; 00116 unsigned Selection; 00117 int ScrollState; 00118 MULTIPAGE_PROPS Props; 00119 WIDGET_SKIN const * pWidgetSkin; 00120 MULTIPAGE_SKIN_PROPS SkinProps; 00121 int ItemHeight; 00122 int MaxHeight; 00123 }; 00124 00125 /********************************************************************* 00126 * 00127 * Macros for internal use 00128 * 00129 ********************************************************************** 00130 */ 00131 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00132 #define MULTIPAGE_INIT_ID(p) (p->Widget.DebugId = MULTIPAGE_ID) 00133 #else 00134 #define MULTIPAGE_INIT_ID(p) 00135 #endif 00136 00137 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00138 MULTIPAGE_Obj * MULTIPAGE_LockH(MULTIPAGE_Handle h); 00139 #define MULTIPAGE_LOCK_H(h) MULTIPAGE_LockH(h) 00140 #else 00141 #define MULTIPAGE_LOCK_H(h) (MULTIPAGE_Obj *)GUI_LOCK_H(h) 00142 #endif 00143 00144 /********************************************************************* 00145 * 00146 * Externals 00147 * 00148 ********************************************************************** 00149 */ 00150 extern GUI_COLOR MULTIPAGE__aEffectColor[2]; 00151 extern MULTIPAGE_PROPS MULTIPAGE__DefaultProps; 00152 00153 extern const WIDGET_SKIN MULTIPAGE__SkinClassic; 00154 extern WIDGET_SKIN MULTIPAGE__Skin; 00155 00156 extern WIDGET_SKIN const * MULTIPAGE__pSkinDefault; 00157 00158 /********************************************************************* 00159 * 00160 * Private functions 00161 * 00162 ********************************************************************** 00163 */ 00164 void MULTIPAGE__CalcBorderRect (MULTIPAGE_Obj * pObj, GUI_RECT * pRect); 00165 void MULTIPAGE__CalcClientRect (MULTIPAGE_Handle hObj, GUI_RECT * pRect); 00166 void MULTIPAGE__DeleteScrollbar(MULTIPAGE_Handle hObj); 00167 void MULTIPAGE__DrawTextItemH (MULTIPAGE_Obj * pObj, const char * pText, unsigned Index, const GUI_RECT * pRect, int x0, int w, int ColorIndex); 00168 int MULTIPAGE__GetPagePos (MULTIPAGE_Handle hObj, unsigned Index); 00169 int MULTIPAGE__GetPageWidth (MULTIPAGE_Handle hObj, unsigned Index); 00170 void MULTIPAGE__GetTabBarRect (MULTIPAGE_Handle hObj, GUI_RECT * pRect); 00171 void MULTIPAGE__UpdatePositions(MULTIPAGE_Handle hObj); 00172 00173 /********************************************************************* 00174 * 00175 * Private Skinning functions 00176 * 00177 ********************************************************************** 00178 */ 00179 int MULTIPAGE_SKIN__GetPagePos (MULTIPAGE_Handle hObj, unsigned Index); 00180 int MULTIPAGE_SKIN__GetTabBarWidth(MULTIPAGE_Handle hObj); 00181 int MULTIPAGE_SKIN__GetTouchedPage(MULTIPAGE_Handle hObj, int TouchX, int TouchY); 00182 00183 #endif // GUI_WINSUPPORT 00184 #endif // MULTIPAGE_PRIVATE_H 00185 00186 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:43 by
