STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
PROGBAR.h
Go to the documentation of this file.
1 /*********************************************************************
2 * SEGGER Microcontroller GmbH & Co. KG *
3 * Solutions for real time microcontroller applications *
4 **********************************************************************
5 * *
6 * (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
7 * *
8 * Internet: www.segger.com Support: support@segger.com *
9 * *
10 **********************************************************************
11 
12 ** emWin V5.28 - Graphical user interface for embedded applications **
13 All Intellectual Property rights in the Software belongs to SEGGER.
14 emWin is protected by international copyright laws. Knowledge of the
15 source code may not be used to write a similar product. This file may
16 only be used in accordance with the following terms:
17 
18 The software has been licensed to STMicroelectronics International
19 N.V. a Dutch company with a Swiss branch and its headquarters in Plan-
20 les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the
21 purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_
22 troller products commercialized by Licensee only, sublicensed and dis_
23 tributed under the terms and conditions of the End User License Agree_
24 ment supplied by STMicroelectronics International N.V.
25 Full source code is available at: www.segger.com
26 
27 We appreciate your understanding and fairness.
28 ----------------------------------------------------------------------
29 File : PROGBAR.h
30 Purpose : Progressbar include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef PROGBAR_H /* Avoid multiple inclusion */
35 #define PROGBAR_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */
39 #include "WIDGET.h"
40 
41 #if GUI_WINSUPPORT
42 
43 #if defined(__cplusplus)
44  extern "C" { /* Make sure we have C-declarations in C++ programs */
45 #endif
46 
47 /*********************************************************************
48 *
49 * Defines
50 *
51 **********************************************************************
52 */
53 /*********************************************************************
54 *
55 * Create flags
56 */
57 #define PROGBAR_CF_HORIZONTAL (0 << 0)
58 #define PROGBAR_CF_VERTICAL (1 << 0)
59 #define PROGBAR_CF_USER (1 << 1)
60 
61 /*********************************************************************
62 *
63 * Skinning constants
64 */
65 #define PROGBAR_SKINFLEX_L 0
66 #define PROGBAR_SKINFLEX_R 1
67 
68 /*********************************************************************
69 *
70 * Types
71 *
72 **********************************************************************
73 */
74 typedef WM_HMEM PROGBAR_Handle;
75 
76 typedef struct {
77  GUI_COLOR aColorUpperL[2];
78  GUI_COLOR aColorLowerL[2];
79  GUI_COLOR aColorUpperR[2];
80  GUI_COLOR aColorLowerR[2];
81  GUI_COLOR ColorFrame;
82  GUI_COLOR ColorText;
83 } PROGBAR_SKINFLEX_PROPS;
84 
85 typedef struct {
86  int IsVertical;
87  int Index;
88  const char * pText;
89 } PROGBAR_SKINFLEX_INFO;
90 
91 /*********************************************************************
92 *
93 * Create functions
94 *
95 **********************************************************************
96 */
97 
98 PROGBAR_Handle PROGBAR_Create (int x0, int y0, int xSize, int ySize, int Flags);
99 PROGBAR_Handle PROGBAR_CreateAsChild (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags);
100 PROGBAR_Handle PROGBAR_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
101 PROGBAR_Handle PROGBAR_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
102 PROGBAR_Handle PROGBAR_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
103 
104 /*********************************************************************
105 *
106 * The callback ...
107 *
108 * Do not call it directly ! It is only to be used from within an
109 * overwritten callback.
110 */
111 void PROGBAR_Callback(WM_MESSAGE * pMsg);
112 
113 /*********************************************************************
114 *
115 * Standard member functions
116 *
117 **********************************************************************
118 */
119 
120 #define PROGBAR_EnableMemdev(hObj) WM_EnableMemdev(hObj)
121 #define PROGBAR_DisableMemdev(hObj) WM_DisableMemdev(hObj)
122 #define PROGBAR_Delete(hObj) WM_DeleteWindow(hObj)
123 #define PROGBAR_Paint(hObj) WM_Paint(hObj)
124 
125 /*********************************************************************
126 *
127 * Individual member functions
128 *
129 **********************************************************************
130 */
131 
132 int PROGBAR_GetUserData (PROGBAR_Handle hObj, void * pDest, int NumBytes);
133 void PROGBAR_SetBarColor (PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color);
134 void PROGBAR_SetFont (PROGBAR_Handle hObj, const GUI_FONT * pfont);
135 void PROGBAR_SetMinMax (PROGBAR_Handle hObj, int Min, int Max);
136 void PROGBAR_SetText (PROGBAR_Handle hObj, const char* s);
137 void PROGBAR_SetTextAlign(PROGBAR_Handle hObj, int Align);
138 void PROGBAR_SetTextColor(PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color);
139 void PROGBAR_SetTextPos (PROGBAR_Handle hObj, int XOff, int YOff);
140 void PROGBAR_SetValue (PROGBAR_Handle hObj, int v);
141 int PROGBAR_SetUserData (PROGBAR_Handle hObj, const void * pSrc, int NumBytes);
142 
143 /*********************************************************************
144 *
145 * Member functions: Skinning
146 *
147 **********************************************************************
148 */
149 void PROGBAR_GetSkinFlexProps (PROGBAR_SKINFLEX_PROPS * pProps, int Index);
150 void PROGBAR_SetSkinClassic (PROGBAR_Handle hObj);
151 void PROGBAR_SetSkin (PROGBAR_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
152 int PROGBAR_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
153 void PROGBAR_SetSkinFlexProps (const PROGBAR_SKINFLEX_PROPS * pProps, int Index);
154 void PROGBAR_SetDefaultSkinClassic(void);
155 WIDGET_DRAW_ITEM_FUNC * PROGBAR_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
156 
157 #define PROGBAR_SKIN_FLEX PROGBAR_DrawSkinFlex
158 
159 #if defined(__cplusplus)
160  }
161 #endif
162 
163 #endif // GUI_WINSUPPORT
164 #endif // PROGBAR_H
165 
166 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50