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.
PROGBAR.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 : PROGBAR.h 00041 Purpose : Progressbar include 00042 --------------------END-OF-HEADER------------------------------------- 00043 */ 00044 00045 #ifndef PROGBAR_H /* Avoid multiple inclusion */ 00046 #define PROGBAR_H 00047 00048 #include "WM.h" 00049 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00050 #include "WIDGET.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 #if defined(__cplusplus) 00055 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00056 #endif 00057 00058 /********************************************************************* 00059 * 00060 * Defines 00061 * 00062 ********************************************************************** 00063 */ 00064 /********************************************************************* 00065 * 00066 * Create flags 00067 */ 00068 #define PROGBAR_CF_HORIZONTAL (0 << 0) 00069 #define PROGBAR_CF_VERTICAL (1 << 0) 00070 #define PROGBAR_CF_USER (1 << 1) 00071 00072 /********************************************************************* 00073 * 00074 * Skinning constants 00075 */ 00076 #define PROGBAR_SKINFLEX_L 0 00077 #define PROGBAR_SKINFLEX_R 1 00078 00079 /********************************************************************* 00080 * 00081 * Types 00082 * 00083 ********************************************************************** 00084 */ 00085 typedef WM_HMEM PROGBAR_Handle; 00086 00087 typedef struct { 00088 GUI_COLOR aColorUpperL[2]; 00089 GUI_COLOR aColorLowerL[2]; 00090 GUI_COLOR aColorUpperR[2]; 00091 GUI_COLOR aColorLowerR[2]; 00092 GUI_COLOR ColorFrame; 00093 GUI_COLOR ColorText; 00094 } PROGBAR_SKINFLEX_PROPS; 00095 00096 typedef struct { 00097 int IsVertical; 00098 int Index; 00099 const char * pText; 00100 } PROGBAR_SKINFLEX_INFO; 00101 00102 /********************************************************************* 00103 * 00104 * Create functions 00105 * 00106 ********************************************************************** 00107 */ 00108 00109 PROGBAR_Handle PROGBAR_Create (int x0, int y0, int xSize, int ySize, int Flags); 00110 PROGBAR_Handle PROGBAR_CreateAsChild (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags); 00111 PROGBAR_Handle PROGBAR_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00112 PROGBAR_Handle PROGBAR_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00113 PROGBAR_Handle PROGBAR_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00114 00115 /********************************************************************* 00116 * 00117 * The callback ... 00118 * 00119 * Do not call it directly ! It is only to be used from within an 00120 * overwritten callback. 00121 */ 00122 void PROGBAR_Callback(WM_MESSAGE * pMsg); 00123 00124 /********************************************************************* 00125 * 00126 * Individual member functions 00127 * 00128 ********************************************************************** 00129 */ 00130 GUI_COLOR PROGBAR_GetBarColor(PROGBAR_Handle hObj, unsigned int Index); 00131 const GUI_FONT * PROGBAR_GetFont (PROGBAR_Handle hObj); 00132 void PROGBAR_GetMinMax (PROGBAR_Handle hObj, int * pMin, int * pMax); 00133 int PROGBAR_GetUserData (PROGBAR_Handle hObj, void * pDest, int NumBytes); 00134 GUI_COLOR PROGBAR_GetTextColor(PROGBAR_Handle hObj, unsigned int Index); 00135 int PROGBAR_GetValue (PROGBAR_Handle hObj); 00136 void PROGBAR_SetBarColor (PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color); 00137 void PROGBAR_SetFont (PROGBAR_Handle hObj, const GUI_FONT * pfont); 00138 void PROGBAR_SetMinMax (PROGBAR_Handle hObj, int Min, int Max); 00139 void PROGBAR_SetText (PROGBAR_Handle hObj, const char* s); 00140 void PROGBAR_SetTextAlign(PROGBAR_Handle hObj, int Align); 00141 void PROGBAR_SetTextColor(PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color); 00142 void PROGBAR_SetTextPos (PROGBAR_Handle hObj, int XOff, int YOff); 00143 void PROGBAR_SetValue (PROGBAR_Handle hObj, int v); 00144 int PROGBAR_SetUserData (PROGBAR_Handle hObj, const void * pSrc, int NumBytes); 00145 00146 /********************************************************************* 00147 * 00148 * Member functions: Skinning 00149 * 00150 ********************************************************************** 00151 */ 00152 void PROGBAR_GetSkinFlexProps (PROGBAR_SKINFLEX_PROPS * pProps, int Index); 00153 void PROGBAR_SetSkinClassic (PROGBAR_Handle hObj); 00154 void PROGBAR_SetSkin (PROGBAR_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00155 int PROGBAR_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00156 void PROGBAR_SetSkinFlexProps (const PROGBAR_SKINFLEX_PROPS * pProps, int Index); 00157 void PROGBAR_SetDefaultSkinClassic(void); 00158 WIDGET_DRAW_ITEM_FUNC * PROGBAR_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00159 00160 #define PROGBAR_SKIN_FLEX PROGBAR_DrawSkinFlex 00161 00162 #if defined(__cplusplus) 00163 } 00164 #endif 00165 00166 #endif // GUI_WINSUPPORT 00167 #endif // PROGBAR_H 00168 00169 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:43 by
