STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
LISTVIEW.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 : LISTVIEW.h
30 Purpose : LISTVIEW include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef LISTVIEW_H
35 #define LISTVIEW_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" // Req. for Create indirect data structure
39 #include "ICONVIEW.h"
40 #include "HEADER.h"
41 
42 #if GUI_WINSUPPORT
43 
44 #if defined(__cplusplus)
45  extern "C" { /* Make sure we have C-declarations in C++ programs */
46 #endif
47 
48 /*********************************************************************
49 *
50 * Defines
51 */
52 #define LISTVIEW_ALL_ITEMS -1
53 
54 /*********************************************************************
55 *
56 * Color indices
57 */
58 #define LISTVIEW_CI_UNSEL 0
59 #define LISTVIEW_CI_SEL 1
60 #define LISTVIEW_CI_SELFOCUS 2
61 #define LISTVIEW_CI_DISABLED 3
62 
63 /************************************************************
64 *
65 * Create / Status flags
66 */
67 #define LISTVIEW_CF_AUTOSCROLLBAR_H (1 << 0)
68 #define LISTVIEW_CF_AUTOSCROLLBAR_V (1 << 1)
69 #define LISTVIEW_CF_CELL_SELECT (1 << 2) // Create Flag used to enable cell selection
70 #define LISTVIEW_SF_AUTOSCROLLBAR_H LISTVIEW_CF_AUTOSCROLLBAR_H
71 #define LISTVIEW_SF_AUTOSCROLLBAR_V LISTVIEW_CF_AUTOSCROLLBAR_V
72 
73 /*********************************************************************
74 *
75 * Public Types
76 *
77 **********************************************************************
78 */
79 typedef WM_HMEM LISTVIEW_Handle;
80 
81 /*********************************************************************
82 *
83 * Create functions
84 *
85 **********************************************************************
86 */
87 LISTVIEW_Handle LISTVIEW_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags);
88 LISTVIEW_Handle LISTVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
89 LISTVIEW_Handle LISTVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
90 LISTVIEW_Handle LISTVIEW_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags);
91 LISTVIEW_Handle LISTVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
92 
93 /*********************************************************************
94 *
95 * The callback ...
96 *
97 * Do not call it directly ! It is only to be used from within an
98 * overwritten callback.
99 */
100 void LISTVIEW_Callback(WM_MESSAGE * pMsg);
101 
102 /*********************************************************************
103 *
104 * Standard member functions
105 *
106 **********************************************************************
107 */
108 #define LISTVIEW_Delete(hObj) WM_DeleteWindow (hObj)
109 #define LISTVIEW_DisableMemdev(hObj) WM_DisableMemdev (hObj)
110 #define LISTVIEW_EnableMemdev(hObj) WM_EnableMemdev (hObj)
111 #define LISTVIEW_Invalidate(hObj) WM_InvalidateWindow(hObj)
112 #define LISTVIEW_Paint(hObj) WM_Paint (hObj)
113 
114 /*********************************************************************
115 *
116 * Member functions
117 *
118 **********************************************************************
119 */
120 int LISTVIEW_AddColumn (LISTVIEW_Handle hObj, int Width, const char * s, int Align);
121 int LISTVIEW_AddRow (LISTVIEW_Handle hObj, const GUI_ConstString * ppText);
122 int LISTVIEW_CompareText (const void * p0, const void * p1);
123 int LISTVIEW_CompareDec (const void * p0, const void * p1);
124 void LISTVIEW_DecSel (LISTVIEW_Handle hObj);
125 void LISTVIEW_DeleteAllRows (LISTVIEW_Handle hObj);
126 void LISTVIEW_DeleteColumn (LISTVIEW_Handle hObj, unsigned Index);
127 void LISTVIEW_DeleteRow (LISTVIEW_Handle hObj, unsigned Index);
128 void LISTVIEW_DeleteRowSorted (LISTVIEW_Handle hObj, int Row);
129 void LISTVIEW_DisableRow (LISTVIEW_Handle hObj, unsigned Row);
130 void LISTVIEW_DisableSort (LISTVIEW_Handle hObj);
131 void LISTVIEW_EnableCellSelect (LISTVIEW_Handle hObj, unsigned OnOff); // Enables/disables cell selection
132 void LISTVIEW_EnableRow (LISTVIEW_Handle hObj, unsigned Row);
133 void LISTVIEW_EnableSort (LISTVIEW_Handle hObj);
134 GUI_COLOR LISTVIEW_GetBkColor (LISTVIEW_Handle hObj, unsigned Index);
135 const GUI_FONT * LISTVIEW_GetFont (LISTVIEW_Handle hObj);
136 HEADER_Handle LISTVIEW_GetHeader (LISTVIEW_Handle hObj);
137 void LISTVIEW_GetItemRect (LISTVIEW_Handle hObj, U32 Col, U32 Row, GUI_RECT * pRect);
138 void LISTVIEW_GetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize);
139 unsigned LISTVIEW_GetItemTextLen (LISTVIEW_Handle hObj, unsigned Column, unsigned Row);
140 void LISTVIEW_GetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, char * pBuffer, unsigned MaxSize);
141 unsigned LISTVIEW_GetLBorder (LISTVIEW_Handle hObj);
142 unsigned LISTVIEW_GetNumColumns (LISTVIEW_Handle hObj);
143 unsigned LISTVIEW_GetNumRows (LISTVIEW_Handle hObj);
144 unsigned LISTVIEW_GetRBorder (LISTVIEW_Handle hObj);
145 int LISTVIEW_GetSel (LISTVIEW_Handle hObj);
146 int LISTVIEW_GetSelCol (LISTVIEW_Handle hObj);
147 int LISTVIEW_GetSelUnsorted (LISTVIEW_Handle hObj);
148 int LISTVIEW_GetTextAlign (LISTVIEW_Handle hObj, unsigned ColIndex);
149 GUI_COLOR LISTVIEW_GetTextColor (LISTVIEW_Handle hObj, unsigned Index);
150 int LISTVIEW_GetUserData (LISTVIEW_Handle hObj, void * pDest, int NumBytes);
151 U32 LISTVIEW_GetUserDataRow (LISTVIEW_Handle hObj, unsigned Row);
152 GUI_WRAPMODE LISTVIEW_GetWrapMode (LISTVIEW_Handle hObj);
153 void LISTVIEW_IncSel (LISTVIEW_Handle hObj);
154 int LISTVIEW_InsertRow (LISTVIEW_Handle hObj, unsigned Index, const GUI_ConstString * ppText);
155 int LISTVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
156 unsigned LISTVIEW_RowIsDisabled (LISTVIEW_Handle hObj, unsigned Row);
157 void LISTVIEW_SetAutoScrollH (LISTVIEW_Handle hObj, int OnOff);
158 void LISTVIEW_SetAutoScrollV (LISTVIEW_Handle hObj, int OnOff);
159 void LISTVIEW_SetItemBitmap (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, int xOff, int yOff, const GUI_BITMAP * pBitmap);
160 void LISTVIEW_SetBkColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color);
161 void LISTVIEW_SetColumnWidth (LISTVIEW_Handle hObj, unsigned int Index, int Width);
162 void LISTVIEW_SetCompareFunc (LISTVIEW_Handle hObj, unsigned Column, int (* fpCompare)(const void * p0, const void * p1));
163 unsigned LISTVIEW_SetFixed (LISTVIEW_Handle hObj, unsigned Fixed);
164 void LISTVIEW_SetFont (LISTVIEW_Handle hObj, const GUI_FONT * pFont);
165 int LISTVIEW_SetGridVis (LISTVIEW_Handle hObj, int Show);
166 void LISTVIEW_SetHeaderHeight (LISTVIEW_Handle hObj, unsigned HeaderHeight);
167 void LISTVIEW_SetItemBkColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color);
168 void LISTVIEW_SetItemText (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * s);
169 void LISTVIEW_SetItemTextColor (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, unsigned int Index, GUI_COLOR Color);
170 void LISTVIEW_SetItemTextSorted (LISTVIEW_Handle hObj, unsigned Column, unsigned Row, const char * pText);
171 void LISTVIEW_SetLBorder (LISTVIEW_Handle hObj, unsigned BorderSize);
172 void LISTVIEW_SetOwnerDraw (LISTVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem);
173 void LISTVIEW_SetRBorder (LISTVIEW_Handle hObj, unsigned BorderSize);
174 unsigned LISTVIEW_SetRowHeight (LISTVIEW_Handle hObj, unsigned RowHeight);
175 void LISTVIEW_SetSel (LISTVIEW_Handle hObj, int Sel);
176 void LISTVIEW_SetSelUnsorted (LISTVIEW_Handle hObj, int Sel);
177 unsigned LISTVIEW_SetSort (LISTVIEW_Handle hObj, unsigned Column, unsigned Reverse);
178 void LISTVIEW_SetTextAlign (LISTVIEW_Handle hObj, unsigned int Index, int Align);
179 void LISTVIEW_SetTextColor (LISTVIEW_Handle hObj, unsigned int Index, GUI_COLOR Color);
180 int LISTVIEW_SetUserData (LISTVIEW_Handle hObj, const void * pSrc, int NumBytes);
181 void LISTVIEW_SetUserDataRow (LISTVIEW_Handle hObj, unsigned Row, U32 UserData);
182 void LISTVIEW_SetWrapMode (LISTVIEW_Handle hObj, GUI_WRAPMODE WrapMode);
183 
184 /*********************************************************************
185 *
186 * Global functions
187 *
188 **********************************************************************
189 */
190 
191 GUI_COLOR LISTVIEW_SetDefaultBkColor (unsigned Index, GUI_COLOR Color);
192 const GUI_FONT * LISTVIEW_SetDefaultFont (const GUI_FONT * pFont);
193 GUI_COLOR LISTVIEW_SetDefaultGridColor(GUI_COLOR Color);
194 GUI_COLOR LISTVIEW_SetDefaultTextColor(unsigned Index, GUI_COLOR Color);
195 
196 #if defined(__cplusplus)
197  }
198 #endif
199 
200 #endif // GUI_WINSUPPORT
201 #endif // LISTVIEW_H
202 
203 /*************************** End of file ****************************/
#define U32
Definition: Global.h:50
Definition: LCD.h:102
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
const char * GUI_ConstString
Definition: GUI_Type.h:48
GUI_WRAPMODE
Definition: GUI.h:696