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.
HEADER.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 : HEADER.h 00040 Purpose : HEADER include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef HEADER_H 00045 #define HEADER_H 00046 00047 #include "WM.h" 00048 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00049 #include "WIDGET.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 #if defined(__cplusplus) 00054 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00055 #endif 00056 00057 /********************************************************************* 00058 * 00059 * Public Types 00060 * 00061 ********************************************************************** 00062 */ 00063 00064 typedef WM_HMEM HEADER_Handle; 00065 00066 typedef struct { 00067 GUI_COLOR aColorFrame[2]; 00068 GUI_COLOR aColorUpper[2]; 00069 GUI_COLOR aColorLower[2]; 00070 GUI_COLOR ColorArrow; 00071 } HEADER_SKINFLEX_PROPS; 00072 00073 /********************************************************************* 00074 * 00075 * Create functions 00076 * 00077 ********************************************************************** 00078 */ 00079 00080 HEADER_Handle HEADER_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags); 00081 HEADER_Handle HEADER_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags); 00082 HEADER_Handle HEADER_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00083 HEADER_Handle HEADER_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00084 HEADER_Handle HEADER_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00085 00086 /********************************************************************* 00087 * 00088 * The callback ... 00089 * 00090 * Do not call it directly ! It is only to be used from within an 00091 * overwritten callback. 00092 */ 00093 void HEADER_Callback(WM_MESSAGE * pMsg); 00094 00095 /********************************************************************* 00096 * 00097 * Managing default values 00098 * 00099 ********************************************************************** 00100 */ 00101 /* Set defaults */ 00102 GUI_COLOR HEADER_SetDefaultArrowColor(GUI_COLOR Color); 00103 GUI_COLOR HEADER_SetDefaultBkColor (GUI_COLOR Color); 00104 const GUI_CURSOR * HEADER_SetDefaultCursor (const GUI_CURSOR * pCursor); 00105 const GUI_FONT * HEADER_SetDefaultFont (const GUI_FONT * pFont); 00106 int HEADER_SetDefaultBorderH (int Spacing); 00107 int HEADER_SetDefaultBorderV (int Spacing); 00108 GUI_COLOR HEADER_SetDefaultTextColor (GUI_COLOR Color); 00109 00110 /* Get defaults */ 00111 GUI_COLOR HEADER_GetDefaultArrowColor(void); 00112 GUI_COLOR HEADER_GetDefaultBkColor (void); 00113 const GUI_CURSOR * HEADER_GetDefaultCursor (void); 00114 const GUI_FONT * HEADER_GetDefaultFont (void); 00115 int HEADER_GetDefaultBorderH (void); 00116 int HEADER_GetDefaultBorderV (void); 00117 GUI_COLOR HEADER_GetDefaultTextColor (void); 00118 00119 /********************************************************************* 00120 * 00121 * Member functions 00122 * 00123 ********************************************************************** 00124 */ 00125 void HEADER_AddItem (HEADER_Handle hObj, int Width, const char * s, int Align); 00126 void HEADER_DeleteItem (HEADER_Handle hObj, unsigned Index); 00127 GUI_COLOR HEADER_GetArrowColor (HEADER_Handle hObj); 00128 GUI_COLOR HEADER_GetBkColor (HEADER_Handle hObj); 00129 int HEADER_GetHeight (HEADER_Handle hObj); 00130 int HEADER_GetItemWidth (HEADER_Handle hObj, unsigned int Index); 00131 int HEADER_GetNumItems (HEADER_Handle hObj); 00132 int HEADER_GetSel (HEADER_Handle hObj); 00133 GUI_COLOR HEADER_GetTextColor (HEADER_Handle hObj); 00134 int HEADER_GetUserData (HEADER_Handle hObj, void * pDest, int NumBytes); 00135 void HEADER_SetArrowColor (HEADER_Handle hObj, GUI_COLOR Color); 00136 void HEADER_SetBitmap (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP * pBitmap); 00137 void HEADER_SetBitmapEx (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP * pBitmap, int x, int y); 00138 void HEADER_SetBkColor (HEADER_Handle hObj, GUI_COLOR Color); 00139 void HEADER_SetBMP (HEADER_Handle hObj, unsigned int Index, const void * pBitmap); 00140 void HEADER_SetBMPEx (HEADER_Handle hObj, unsigned int Index, const void * pBitmap, int x, int y); 00141 void HEADER_SetDirIndicator (HEADER_Handle hObj, int Column, int Reverse); /* !!!Not to be documented!!! */ 00142 void HEADER_SetDragLimit (HEADER_Handle hObj, unsigned DragLimit); 00143 unsigned HEADER_SetFixed (HEADER_Handle hObj, unsigned Fixed); 00144 void HEADER_SetFont (HEADER_Handle hObj, const GUI_FONT * pFont); 00145 void HEADER_SetHeight (HEADER_Handle hObj, int Height); 00146 void HEADER_SetTextAlign (HEADER_Handle hObj, unsigned int Index, int Align); 00147 void HEADER_SetItemText (HEADER_Handle hObj, unsigned int Index, const char * s); 00148 void HEADER_SetItemWidth (HEADER_Handle hObj, unsigned int Index, int Width); 00149 void HEADER_SetScrollPos (HEADER_Handle hObj, int ScrollPos); 00150 void HEADER_SetStreamedBitmap (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP_STREAM * pBitmap); 00151 void HEADER_SetStreamedBitmapEx(HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP_STREAM * pBitmap, int x, int y); 00152 void HEADER_SetTextColor (HEADER_Handle hObj, GUI_COLOR Color); 00153 int HEADER_SetUserData (HEADER_Handle hObj, const void * pSrc, int NumBytes); 00154 00155 /********************************************************************* 00156 * 00157 * Member functions: Skinning 00158 * 00159 ********************************************************************** 00160 */ 00161 void HEADER_GetSkinFlexProps (HEADER_SKINFLEX_PROPS * pProps, int Index); 00162 void HEADER_SetSkinClassic (HEADER_Handle hObj); 00163 void HEADER_SetSkin (HEADER_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00164 int HEADER_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00165 void HEADER_SetSkinFlexProps (const HEADER_SKINFLEX_PROPS * pProps, int Index); 00166 void HEADER_SetDefaultSkinClassic(void); 00167 WIDGET_DRAW_ITEM_FUNC * HEADER_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00168 00169 #define HEADER_SKIN_FLEX HEADER_DrawSkinFlex 00170 00171 /********************************************************************* 00172 * 00173 * Macros for compatibility with older versions 00174 * 00175 ********************************************************************** 00176 */ 00177 00178 #ifdef HEADER_SPACING_H 00179 #define HEADER_BORDER_H_DEFAULT HEADER_SPACING_H 00180 #endif 00181 #ifdef HEADER_SPACING_V 00182 #define HEADER_BORDER_V_DEFAULT HEADER_SPACING_V 00183 #endif 00184 #define HEADER_SetDefaultSpacingH(Value) HEADER_SetDefaultBorderH(Value) 00185 #define HEADER_SetDefaultSpacingV(Value) HEADER_SetDefaultBorderV(Value) 00186 #define HEADER_GetDefaultSpacingH() HEADER_GetDefaultBorderH() 00187 #define HEADER_GetDefaultSpacingV() HEADER_GetDefaultBorderV() 00188 00189 #if defined(__cplusplus) 00190 } 00191 #endif 00192 00193 #endif // GUI_WINSUPPORT 00194 #endif // HEADER_H 00195 00196 /*************************** End of file ****************************/
Generated on Wed Jul 20 2022 15:03:44 by
