STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
CHECKBOX_Private.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 : CHECKBOX_Private.h
30 Purpose : CHECKBOX private header file
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef CHECKBOX_PRIVATE_H
35 #define CHECKBOX_PRIVATE_H
36 
37 #include "WM.h"
38 #include "WIDGET.h"
39 #include "CHECKBOX.h"
40 
41 #if GUI_WINSUPPORT
42 
43 /*********************************************************************
44 *
45 * Defines
46 *
47 **********************************************************************
48 */
49 #ifndef CHECKBOX_BKCOLOR0_DEFAULT
50  #define CHECKBOX_BKCOLOR0_DEFAULT 0x808080 /* Inactive color */
51 #endif
52 
53 #ifndef CHECKBOX_BKCOLOR1_DEFAULT
54  #define CHECKBOX_BKCOLOR1_DEFAULT GUI_WHITE /* Active color */
55 #endif
56 
57 #ifndef CHECKBOX_FGCOLOR0_DEFAULT
58  #define CHECKBOX_FGCOLOR0_DEFAULT 0x101010
59 #endif
60 
61 #ifndef CHECKBOX_FGCOLOR1_DEFAULT
62  #define CHECKBOX_FGCOLOR1_DEFAULT GUI_BLACK
63 #endif
64 
65 #ifndef CHECKBOX_DEFAULT_SIZE
66  #define CHECKBOX_DEFAULT_SIZE 15
67 #endif
68 
69 /*********************************************************************
70 *
71 * Object definition
72 *
73 **********************************************************************
74 */
75 typedef struct {
76  unsigned (* pfGetButtonSize)(void);
77  WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
78 } CHECKBOX_SKIN_PRIVATE;
79 
80 typedef struct {
81  const GUI_FONT * pFont;
82  GUI_COLOR aBkColorBox[2]; /* Colors used to draw the box background */
83  GUI_COLOR BkColor; /* Widget background color */
84  GUI_COLOR TextColor;
85  GUI_COLOR FocusColor;
86  CHECKBOX_SKIN_PRIVATE SkinPrivate;
87  I16 Align;
88  U8 Spacing;
89  const GUI_BITMAP * apBm[6];
90 } CHECKBOX_PROPS;
91 
92 typedef struct {
93  WIDGET Widget;
94  CHECKBOX_PROPS Props;
95  WIDGET_SKIN const * pWidgetSkin;
96  U8 NumStates;
97  U8 CurrentState;
98  WM_HMEM hpText;
99  U32 ButtonSize;
100 } CHECKBOX_Obj;
101 
102 /*********************************************************************
103 *
104 * Macros for internal use
105 *
106 **********************************************************************
107 */
108 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
109  #define CHECKBOX_INIT_ID(p) (p->Widget.DebugId = CHECKBOX_ID)
110 #else
111  #define CHECKBOX_INIT_ID(p)
112 #endif
113 
114 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
115  CHECKBOX_Obj * CHECKBOX_LockH(CHECKBOX_Handle h);
116  #define CHECKBOX_LOCK_H(h) CHECKBOX_LockH(h)
117 #else
118  #define CHECKBOX_LOCK_H(h) (CHECKBOX_Obj *)GUI_LOCK_H(h)
119 #endif
120 
121 /*********************************************************************
122 *
123 * Private functions
124 *
125 **********************************************************************
126 */
127 unsigned CHECKBOX__GetButtonSize(void);
128 
129 /*********************************************************************
130 *
131 * Public data (internal defaults)
132 *
133 **********************************************************************
134 */
135 extern CHECKBOX_PROPS CHECKBOX__DefaultProps;
136 
137 extern const WIDGET_SKIN CHECKBOX__SkinClassic;
138 extern WIDGET_SKIN CHECKBOX__Skin;
139 
140 extern WIDGET_SKIN const * CHECKBOX__pSkinDefault;
141 
142 /*********************************************************************
143 *
144 * Extern data
145 *
146 **********************************************************************
147 */
148 extern const GUI_BITMAP CHECKBOX__abmCheck[2];
149 
150 #endif /* GUI_WINSUPPORT */
151 #endif /* CHECKBOX_PRIVATE_H */
152 
153 /*************************** End of file ****************************/
#define U32
Definition: Global.h:50
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define I16
Definition: Global.h:56
#define U8
Definition: Global.h:44