STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
DROPDOWN_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 : DROPDOWN_Private.h
30 Purpose : DROPDOWN private header file
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef DROPDOWN_PRIVATE_H
35 #define DROPDOWN_PRIVATE_H
36 
37 #include "DROPDOWN.h"
38 #include "WIDGET.h"
39 #include "GUI_ARRAY.h"
40 
41 #if GUI_WINSUPPORT
42 
43 /*********************************************************************
44 *
45 * Defines
46 *
47 **********************************************************************
48 */
49 #define DROPDOWN_SF_AUTOSCROLLBAR DROPDOWN_CF_AUTOSCROLLBAR
50 
51 /*********************************************************************
52 *
53 * Object definition
54 *
55 **********************************************************************
56 */
57 typedef struct {
58  WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
59 } DROPDOWN_SKIN_PRIVATE;
60 
61 typedef struct {
62  const GUI_FONT * pFont;
63  GUI_COLOR aBackColor[3];
64  GUI_COLOR aTextColor[3];
65  GUI_COLOR aColor[2];
66  GUI_COLOR aScrollbarColor[3];
67  DROPDOWN_SKIN_PRIVATE SkinPrivate;
68  I16 TextBorderSize;
69  I16 Align;
70 } DROPDOWN_PROPS;
71 
72 typedef struct {
73  WIDGET Widget;
74  I16 Sel; // Current selection
75  I16 ySizeLB; // ySize of assigned LISTBOX in expanded state
76  I16 TextHeight;
77  GUI_ARRAY Handles;
78  WM_SCROLL_STATE ScrollState;
79  DROPDOWN_PROPS Props;
80  WIDGET_SKIN const * pWidgetSkin;
81  WM_HWIN hListWin;
82  U8 Flags;
83  U16 ItemSpacing;
84  U8 ScrollbarWidth;
85  char IsPressed;
86  WM_HMEM hDisabled;
87 } DROPDOWN_Obj;
88 
89 /*********************************************************************
90 *
91 * Macros for internal use
92 *
93 **********************************************************************
94 */
95 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
96  #define DROPDOWN_INIT_ID(p) (p->Widget.DebugId = DROPDOWN_ID)
97 #else
98  #define DROPDOWN_INIT_ID(p)
99 #endif
100 
101 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
102  DROPDOWN_Obj * DROPDOWN_LockH(DROPDOWN_Handle h);
103  #define DROPDOWN_LOCK_H(h) DROPDOWN_LockH(h)
104 #else
105  #define DROPDOWN_LOCK_H(h) (DROPDOWN_Obj *)GUI_LOCK_H(h)
106 #endif
107 
108 /*********************************************************************
109 *
110 * Private (module internal) data
111 *
112 **********************************************************************
113 */
114 
115 extern DROPDOWN_PROPS DROPDOWN__DefaultProps;
116 
117 extern const WIDGET_SKIN DROPDOWN__SkinClassic;
118 extern WIDGET_SKIN DROPDOWN__Skin;
119 
120 extern WIDGET_SKIN const * DROPDOWN__pSkinDefault;
121 
122 /*********************************************************************
123 *
124 * Private functions
125 *
126 **********************************************************************
127 */
128 
129 void DROPDOWN__AdjustHeight(DROPDOWN_Handle hObj);
130 int DROPDOWN__GetNumItems (DROPDOWN_Obj * pObj);
131 const char * DROPDOWN__GetpItemLocked(DROPDOWN_Handle hObj, int Index);
132 
133 #endif // GUI_WINSUPPORT
134 #endif // DROPDOWN_PRIVATE_H
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define I16
Definition: Global.h:56
#define U16
Definition: Global.h:47
#define U8
Definition: Global.h:44