STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
TREEVIEW_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 : TREEVIEW_Private.h
30 Purpose : TREEVIEW private header file
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef TREEVIEW_PRIVATE_H
35 #define TREEVIEW_PRIVATE_H
36 
37 #include "WM.h"
38 #include "TREEVIEW.h"
39 
40 #if GUI_WINSUPPORT
41 
42 /*********************************************************************
43 *
44 * Defines
45 *
46 **********************************************************************
47 */
48 #define TREEVIEW_ITEM_STATE_EXPANDED (1 << 1)
49 #define TREEVIEW_ITEM_STATE_ISLAST (1 << 2)
50 
51 #define TREEVIEW_STATE_HASLINES (1 << 0)
52 
53 #define TREEVIEW_COLORS_BK 0
54 #define TREEVIEW_COLORS_TEXT 1
55 #define TREEVIEW_COLORS_LINE 2
56 
57 /*********************************************************************
58 *
59 * Types
60 *
61 **********************************************************************
62 */
63 typedef struct {
64  const GUI_BITMAP * apBm[3]; /* Closed, Open, Leaf */
65 } TREEVIEW_ITEM_DATA;
66 
67 typedef struct {
68  WM_HMEM hParent; /* Handle to treeview object */
69  TREEVIEW_ITEM_Handle hNext;
70  TREEVIEW_ITEM_Handle hPrev;
71  U32 UserData;
72  WM_HMEM hData; /* Handle of TREEVIEW_ITEM_DATA structure */
73  U16 xSize;
74  U16 ySize;
75  U16 Flags;
76  U16 Connectors;
77  U8 Level; /* 0...15 */
78  char acText[1];
79 } TREEVIEW_ITEM_OBJ;
80 
81 typedef struct {
82  const GUI_FONT * pFont;
83  GUI_COLOR aBkColor[3];
84  GUI_COLOR aTextColor[3];
85  GUI_COLOR aLineColor[3];
86  GUI_COLOR FocusColor;
87  const GUI_BITMAP * apBm[5]; /* Closed, Open, Leaf, Plus, Minus */
88  int Indent;
89  int TextIndent;
90  int MinItemHeight;
91 } TREEVIEW_PROPS;
92 
93 typedef struct {
94  WIDGET Widget;
95  WIDGET_DRAW_ITEM_FUNC * pfDrawItem;
96  WM_SCROLL_STATE ScrollStateV;
97  WM_SCROLL_STATE ScrollStateH;
98  TREEVIEW_PROPS Props;
99  U16 Flags;
100  TREEVIEW_ITEM_Handle hFirst;
101  TREEVIEW_ITEM_Handle hLast;
102  TREEVIEW_ITEM_Handle hSel;
103  GUI_TIMER_HANDLE hTimer;
104  /* Cache variables */
105  int NumItems;
106  int NumVisItems;
107  int xSizeItems; /* xSize in pixel used for all visible items */
108  int ySizeItems; /* ySize in pixel used for all visible items */
109  I16 xOffPM, yOffPM; /* x/y offset of PM bitmap */
110  U16 xOverlapHLine;
111 } TREEVIEW_OBJ;
112 
113 /*********************************************************************
114 *
115 * Macros for internal use
116 *
117 **********************************************************************
118 */
119 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
120  #define TREEVIEW_INIT_ID(p) p->Widget.DebugId = TREEVIEW_ID
121 #else
122  #define TREEVIEW_INIT_ID(p)
123 #endif
124 
125 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
126  TREEVIEW_OBJ * TREEVIEW_LockH(TREEVIEW_Handle h);
127  #define TREEVIEW_LOCK_H(h) TREEVIEW_LockH(h)
128 #else
129  #define TREEVIEW_LOCK_H(h) (TREEVIEW_OBJ *)GUI_LOCK_H(h)
130 #endif
131 
132 /*********************************************************************
133 *
134 * Module internal data
135 *
136 **********************************************************************
137 */
138 extern TREEVIEW_PROPS TREEVIEW__DefaultProps;
139 extern GUI_CONST_STORAGE GUI_BITMAP TREEVIEW__bmOpen;
140 extern GUI_CONST_STORAGE GUI_BITMAP TREEVIEW__bmClosed;
141 extern GUI_CONST_STORAGE GUI_BITMAP TREEVIEW__bmLeaf;
142 extern GUI_CONST_STORAGE GUI_BITMAP TREEVIEW__bmPlus;
143 extern GUI_CONST_STORAGE GUI_BITMAP TREEVIEW__bmMinus;
144 
145 #endif /* GUI_WINSUPPORT */
146 #endif /* TREEVIEW_H */
147 
148 /*************************** End of file ****************************/
GUI_HMEM GUI_TIMER_HANDLE
Definition: GUI.h:1184
#define U32
Definition: Global.h:50
#define GUI_CONST_STORAGE
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