Select one of the symbols to view example projects that use it.
 
Outline
#define TREEVIEW_H
#include "WM.h"
#include "DIALOG_Intern.h"
#include "WIDGET.h"
#define TREEVIEW_CF_HIDELINES
#define TREEVIEW_CF_ROWSELECT
#define TREEVIEW_CF_AUTOSCROLLBAR_H
#define TREEVIEW_CF_AUTOSCROLLBAR_V
#define TREEVIEW_SF_HIDELINES
#define TREEVIEW_SF_ROWSELECT
#define TREEVIEW_SF_AUTOSCROLLBAR_H
#define TREEVIEW_SF_AUTOSCROLLBAR_V
#define TREEVIEW_BI_CLOSED
#define TREEVIEW_BI_OPEN
#define TREEVIEW_BI_LEAF
#define TREEVIEW_BI_PLUS
#define TREEVIEW_BI_MINUS
#define TREEVIEW_BI_PM
#define TREEVIEW_CI_UNSEL
#define TREEVIEW_CI_SEL
#define TREEVIEW_CI_DISABLED
#define TREEVIEW_INSERT_ABOVE
#define TREEVIEW_INSERT_BELOW
#define TREEVIEW_INSERT_FIRST_CHILD
#define TREEVIEW_GET_FIRST
#define TREEVIEW_GET_LAST
#define TREEVIEW_GET_NEXT_SIBLING
#define TREEVIEW_GET_PREV_SIBLING
#define TREEVIEW_GET_FIRST_CHILD
#define TREEVIEW_GET_PARENT
#define TREEVIEW_ITEM_TYPE_LEAF
#define TREEVIEW_ITEM_TYPE_NODE
#define TREEVIEW_SELMODE_ROW
#define TREEVIEW_SELMODE_TEXT
TREEVIEW_Handle
TREEVIEW_ITEM_Handle
TREEVIEW_ITEM_INFO
TREEVIEW_ITEM_DRAW_INFO
TREEVIEW_CreateEx(int, int, int, int, GUI_HWIN, int, int, int);
TREEVIEW_CreateUser(int, int, int, int, GUI_HWIN, int, int, int, int);
TREEVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO *, GUI_HWIN, int, int, WM_CALLBACK *);
TREEVIEW_Callback(WM_MESSAGE *);
TREEVIEW_AttachItem(TREEVIEW_Handle, TREEVIEW_ITEM_Handle, TREEVIEW_ITEM_Handle, int);
TREEVIEW_DecSel(TREEVIEW_Handle);
TREEVIEW_GetItem(TREEVIEW_Handle, TREEVIEW_ITEM_Handle, int);
TREEVIEW_GetSel(TREEVIEW_Handle);
TREEVIEW_GetUserData(TREEVIEW_Handle, void *, int);
TREEVIEW_IncSel(TREEVIEW_Handle);
TREEVIEW_InsertItem(TREEVIEW_Handle, int, TREEVIEW_ITEM_Handle, int, const char *);
TREEVIEW_OwnerDraw(const WIDGET_ITEM_DRAW_INFO *);
TREEVIEW_ScrollToSel(TREEVIEW_Handle);
TREEVIEW_SetAutoScrollH(TREEVIEW_Handle, int);
TREEVIEW_SetAutoScrollV(TREEVIEW_Handle, int);
TREEVIEW_SetBitmapOffset(TREEVIEW_Handle, int, int, int);
TREEVIEW_SetBkColor(TREEVIEW_Handle, int, GUI_COLOR);
TREEVIEW_SetFont(TREEVIEW_Handle, const GUI_FONT *);
TREEVIEW_SetHasLines(TREEVIEW_Handle, int);
TREEVIEW_SetImage(TREEVIEW_Handle, int, const GUI_BITMAP *);
TREEVIEW_SetIndent(TREEVIEW_Handle, int);
TREEVIEW_SetLineColor(TREEVIEW_Handle, int, GUI_COLOR);
TREEVIEW_SetOwnerDraw(TREEVIEW_Handle, WIDGET_DRAW_ITEM_FUNC *);
TREEVIEW_SetSel(TREEVIEW_Handle, TREEVIEW_ITEM_Handle);
TREEVIEW_SetSelMode(TREEVIEW_Handle, int);
TREEVIEW_SetTextColor(TREEVIEW_Handle, int, GUI_COLOR);
TREEVIEW_SetTextIndent(TREEVIEW_Handle, int);
TREEVIEW_SetUserData(TREEVIEW_Handle, const void *, int);
TREEVIEW_ITEM_Collapse(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_CollapseAll(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_Create(int, const char *, unsigned long);
TREEVIEW_ITEM_Delete(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_Detach(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_Expand(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_ExpandAll(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_GetInfo(TREEVIEW_ITEM_Handle, TREEVIEW_ITEM_INFO *);
TREEVIEW_ITEM_GetText(TREEVIEW_ITEM_Handle, unsigned char *, int);
TREEVIEW_ITEM_GetUserData(TREEVIEW_ITEM_Handle);
TREEVIEW_ITEM_SetImage(TREEVIEW_ITEM_Handle, int, const GUI_BITMAP *);
TREEVIEW_ITEM_SetText(TREEVIEW_ITEM_Handle, const char *);
TREEVIEW_ITEM_SetUserData(TREEVIEW_ITEM_Handle, unsigned long);
TREEVIEW_GetDefaultBkColor(int);
TREEVIEW_GetDefaultFont();
TREEVIEW_GetDefaultLineColor(int);
TREEVIEW_GetDefaultTextColor(int);
TREEVIEW_SetDefaultBkColor(int, GUI_COLOR);
TREEVIEW_SetDefaultFont(const GUI_FONT *);
TREEVIEW_SetDefaultLineColor(int, GUI_COLOR);
TREEVIEW_SetDefaultTextColor(int, GUI_COLOR);
Files
loading...
CodeScopeSTM32 Libraries and SamplesSTemWininc/TREEVIEW.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/********************************************************************* * SEGGER Microcontroller GmbH & Co. KG * * Solutions for real time microcontroller applications * ********************************************************************** * * * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** ** emWin V5.44 - Graphical user interface for embedded applications ** All Intellectual Property rights in the Software belongs to SEGGER. emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may only be used in accordance with the following terms: The software has been licensed to STMicroelectronics International N.V. a Dutch company with a Swiss branch and its headquarters in Plan- les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ troller products commercialized by Licensee only, sublicensed and dis_ tributed under the terms and conditions of the End User License Agree_ ment supplied by STMicroelectronics International N.V. Full source code is available at: www.segger.com We appreciate your understanding and fairness. ---------------------------------------------------------------------- ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Liberty license SLA0044, * the "License"; You may not use this file except in compliance with the License. * You may obtain a copy of the License at: * http://www.st.com/SLA0044 * ****************************************************************************** ---------------------------------------------------------------------- File : TREEVIEW.h Purpose : TREEVIEW include --------------------END-OF-HEADER------------------------------------- *//* ... */ #ifndef TREEVIEW_H #define TREEVIEW_H #include "WM.h" #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ #include "WIDGET.h" #if GUI_WINSUPPORT #if defined(__cplusplus) extern "C" { /* Make sure we have C-declarations in C++ programs */ #endif /********************************************************************* * * Defines * ********************************************************************** *//* ... */ /* Status- and create flags */ #define TREEVIEW_CF_HIDELINES (1 << 0) #define TREEVIEW_CF_ROWSELECT (1 << 1) #define TREEVIEW_CF_AUTOSCROLLBAR_H (1 << 2) #define TREEVIEW_CF_AUTOSCROLLBAR_V (1 << 3) #define TREEVIEW_SF_HIDELINES TREEVIEW_CF_HIDELINES #define TREEVIEW_SF_ROWSELECT TREEVIEW_CF_ROWSELECT #define TREEVIEW_SF_AUTOSCROLLBAR_H TREEVIEW_CF_AUTOSCROLLBAR_H #define TREEVIEW_SF_AUTOSCROLLBAR_V TREEVIEW_CF_AUTOSCROLLBAR_V /* Bitmap indices */ #define TREEVIEW_BI_CLOSED 0 #define TREEVIEW_BI_OPEN 1 #define TREEVIEW_BI_LEAF 2 #define TREEVIEW_BI_PLUS 3 #define TREEVIEW_BI_MINUS 4 #define TREEVIEW_BI_PM 5 /* Color indices */ #define TREEVIEW_CI_UNSEL 0 #define TREEVIEW_CI_SEL 1 #define TREEVIEW_CI_DISABLED 2 /* Relative positions (create) */ #define TREEVIEW_INSERT_ABOVE 0 #define TREEVIEW_INSERT_BELOW 1 #define TREEVIEW_INSERT_FIRST_CHILD 2 /* Relative positions (retrieve) */ #define TREEVIEW_GET_FIRST 0 #define TREEVIEW_GET_LAST 1 #define TREEVIEW_GET_NEXT_SIBLING 2 #define TREEVIEW_GET_PREV_SIBLING 3 #define TREEVIEW_GET_FIRST_CHILD 4 #define TREEVIEW_GET_PARENT 5 /* Item flags */ #define TREEVIEW_ITEM_TYPE_LEAF (0 << 0) #define TREEVIEW_ITEM_TYPE_NODE (1 << 0) /* Selection mode */ #define TREEVIEW_SELMODE_ROW 1 #define TREEVIEW_SELMODE_TEXT 0 30 defines /************************************************************ * * Types * ************************************************************* *//* ... */ typedef WM_HMEM TREEVIEW_Handle; typedef WM_HMEM TREEVIEW_ITEM_Handle; typedef struct { int IsNode; int IsExpanded; int HasLines; int HasRowSelect; int Level; ...} TREEVIEW_ITEM_INFO; typedef struct { GUI_COLOR ColorBk; GUI_COLOR ColorText; GUI_COLOR ColorTextBk; GUI_COLOR ColorLines; GUI_RECT rText; TREEVIEW_ITEM_Handle hItem; const GUI_FONT * pFont; char * pText; U8 NumLines; I16 ax0[3]; I16 ay0[3]; I16 ax1[3]; I16 ay1[3]; U8 NumConnectors; I16 axc[16]; const GUI_BITMAP * pBmPM; const GUI_BITMAP * pBmOCL; I16 xPosPM, xPosOCL; U8 IndexPM; U8 IndexOCL; ...} TREEVIEW_ITEM_DRAW_INFO; /********************************************************************* * * Create functions * ********************************************************************** *//* ... */ TREEVIEW_Handle TREEVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); TREEVIEW_Handle TREEVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); TREEVIEW_Handle TREEVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); /********************************************************************* * * The callback ... * * Do not call it directly ! It is only to be used from within an * overwritten callback. *//* ... */ void TREEVIEW_Callback(WM_MESSAGE * pMsg); /********************************************************************* * * Common functions * ********************************************************************** *//* ... */ int TREEVIEW_AttachItem (TREEVIEW_Handle hObj, TREEVIEW_ITEM_Handle hItem, TREEVIEW_ITEM_Handle hItemAt, int Position); void TREEVIEW_DecSel (TREEVIEW_Handle hObj); TREEVIEW_ITEM_Handle TREEVIEW_GetItem (TREEVIEW_Handle hObj, TREEVIEW_ITEM_Handle hItem, int Flags); TREEVIEW_ITEM_Handle TREEVIEW_GetSel (TREEVIEW_Handle hObj); int TREEVIEW_GetUserData (TREEVIEW_Handle hObj, void * pDest, int NumBytes); void TREEVIEW_IncSel (TREEVIEW_Handle hObj); TREEVIEW_ITEM_Handle TREEVIEW_InsertItem (TREEVIEW_Handle hObj, int IsNode, TREEVIEW_ITEM_Handle hItemPrev, int Position, const char * s); int TREEVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); void TREEVIEW_ScrollToSel (TREEVIEW_Handle hObj); void TREEVIEW_SetAutoScrollH (TREEVIEW_Handle hObj, int State); void TREEVIEW_SetAutoScrollV (TREEVIEW_Handle hObj, int State); void TREEVIEW_SetBitmapOffset(TREEVIEW_Handle hObj, int Index, int xOff, int yOff); void TREEVIEW_SetBkColor (TREEVIEW_Handle hObj, int Index, GUI_COLOR Color); void TREEVIEW_SetFont (TREEVIEW_Handle hObj, const GUI_FONT * pFont); void TREEVIEW_SetHasLines (TREEVIEW_Handle hObj, int State); void TREEVIEW_SetImage (TREEVIEW_Handle hObj, int Index, const GUI_BITMAP * pBitmap); int TREEVIEW_SetIndent (TREEVIEW_Handle hObj, int Indent); void TREEVIEW_SetLineColor (TREEVIEW_Handle hObj, int Index, GUI_COLOR Color); void TREEVIEW_SetOwnerDraw (TREEVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem); void TREEVIEW_SetSel (TREEVIEW_Handle hObj, TREEVIEW_ITEM_Handle hItem); void TREEVIEW_SetSelMode (TREEVIEW_Handle hObj, int Mode); void TREEVIEW_SetTextColor (TREEVIEW_Handle hObj, int Index, GUI_COLOR Color); int TREEVIEW_SetTextIndent (TREEVIEW_Handle hObj, int TextIndent); int TREEVIEW_SetUserData (TREEVIEW_Handle hObj, const void * pSrc, int NumBytes); /********************************************************************* * * Treeview item related functions * ********************************************************************** *//* ... */ void TREEVIEW_ITEM_Collapse (TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_CollapseAll(TREEVIEW_ITEM_Handle hItem); TREEVIEW_ITEM_Handle TREEVIEW_ITEM_Create (int IsNode, const char * s, U32 UserData); void TREEVIEW_ITEM_Delete (TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_Detach (TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_Expand (TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_ExpandAll (TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_GetInfo (TREEVIEW_ITEM_Handle hItem, TREEVIEW_ITEM_INFO * pInfo); void TREEVIEW_ITEM_GetText (TREEVIEW_ITEM_Handle hItem, U8 * pBuffer, int MaxNumBytes); U32 TREEVIEW_ITEM_GetUserData(TREEVIEW_ITEM_Handle hItem); void TREEVIEW_ITEM_SetImage (TREEVIEW_ITEM_Handle hItem, int Index, const GUI_BITMAP * pBitmap); TREEVIEW_ITEM_Handle TREEVIEW_ITEM_SetText (TREEVIEW_ITEM_Handle hItem, const char * s); void TREEVIEW_ITEM_SetUserData(TREEVIEW_ITEM_Handle hItem, U32 UserData); /********************************************************************* * * Managing default values * ********************************************************************** *//* ... */ GUI_COLOR TREEVIEW_GetDefaultBkColor (int Index); const GUI_FONT * TREEVIEW_GetDefaultFont (void); GUI_COLOR TREEVIEW_GetDefaultLineColor(int Index); GUI_COLOR TREEVIEW_GetDefaultTextColor(int Index); void TREEVIEW_SetDefaultBkColor (int Index, GUI_COLOR Color); void TREEVIEW_SetDefaultFont (const GUI_FONT * pFont); void TREEVIEW_SetDefaultLineColor(int Index, GUI_COLOR Color); void TREEVIEW_SetDefaultTextColor(int Index, GUI_COLOR Color); #if defined(__cplusplus) }extern "C" { ... } #endif /* ... */ #endif // GUI_WINSUPPORT/* ... */ #endif // TREEVIEW_H /*************************** End of file ****************************/