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