MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
listview.h
Go to the documentation of this file.
1 
43 /*
44  * $Id: listview.h 11677 2009-05-23 08:07:19Z dongjunjie $
45  *
46  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
47  * pSOS, ThreadX, NuCleus, OSE, and Win32.
48  */
49 
50 #ifndef EXT_LISTVIEW_H
51 #define EXT_LISTVIEW_H
52 
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
72 #define CTRL_LISTVIEW ("ListView")
73 
75 #define LV_OKAY 0
76 
77 #define LV_ERR (-1)
78 
79 #define LV_ERRSPACE (-2)
80 
85 typedef GHANDLE HLVITEM;
86 
91 #define LVIF_FOLD 0x0001L
92 
97 typedef struct _LVITEM
98 {
102  int nItem;
107 
118 
119 } LVITEM;
120 
122 typedef LVITEM *PLVITEM;
123 
125 #define LVFLAG_BITMAP 0x0001
126 
127 #define LVFLAG_ICON 0x0002
128 
133 typedef struct _LVSUBITEM
134 {
144  int nItem;
146  int subItem;
148  char *pszText;
150  int nTextMax;
155 } LVSUBITEM;
158 
160 typedef struct _LVSORTDATA
161 {
163  int ncol;
165  int losorted;
168 } LVSORTDATA;
171 
173 typedef int (*PFNLVCOMPARE) (HLVITEM nItem1, HLVITEM nItem2, PLVSORTDATA sortData);
174 
175 typedef GHANDLE HLVHDR;
176 typedef GHANDLE HLVHDRITEM;
177 
179 /* hlvhdr is reserved for extension */
180 typedef void (*PFN_LVHDR_BKDRAWFUNC) (HWND hWnd, HLVHDR hlvhdr, HDC hdc, RECT *rcDraw);
182 typedef void (*PFN_LVHDR_ITEMDRAWFUNC) (HWND hWnd, int idx, HDC hdc, RECT *rcDraw);
183 
184 
186 typedef struct _LVCUSTOMDRAWFUNCS
187 {
193 
194 
197 #define LVCF_LEFTALIGN 0x0000
198 
199 #define LVCF_RIGHTALIGN 0x0001
200 
201 #define LVCF_CENTERALIGN 0x0002
202 
203 #define LVCF_TREEVIEW 0x0004
204 
207 #define LVHF_LEFTALIGN 0x0000
208 
209 #define LVHF_RIGHTALIGN 0x0004
210 
211 #define LVHF_CENTERALIGN 0x0008
212 
217 typedef struct _LVCOLUMN
218 {
220  int nCols;
222  int width;
224  char *pszHeadText;
226  int nTextMax;
233 } LVCOLUMN;
236 
239 #define LVFF_TEXT 0x0001
240 
241 #define LVFF_ADDDATA 0x0002
242 
244 typedef struct _LVFINDINFO
245 {
256  int iStart;
258  int nCols;
260  char **pszInfo;
263 
265  int nItem;
267  int nSubitem;
268 
269 } LVFINDINFO;
272 
274 typedef struct _LVNM_NORMAL
275 {
280 } LVNM_NORMAL;
283 
287 typedef LVNM_KEYDOWN *PLVNM_KEYDOWN;
288 
292 typedef LVNM_HEADRDOWN *PLVNM_HEADRDOWN;
293 
297 typedef LVNM_HEADRUP *PLVNM_HEADUP;
298 
302 typedef LVNM_ITEMRDOWN *PLVNM_ITEMRDOWN;
303 
307 typedef LVNM_ITEMRUP *PLVNM_ITEMRUP;
308 
321 #define LVS_UPNOTIFY 0x0001L /* must be the same with SVS_UPNOTIFY */
322 #define LVS_NOTIFY LVS_UPNOTIFY
323 
330 #define LVS_SORT 0x0002L
331 
336 #define LVS_MULTIPLESEL 0x0008L /* reserved */
337 
342 #define LVS_CHECKBOX 0x1000L /* reserved */
343 
350 #define LVS_AUTOCHECK 0x2000L /* reserved */
351 
356 #define LVS_AUTOCHECKBOX (LVS_CHECKBOX | LVS_AUTOCHECK) /* reserved */
357 
362 #define LVS_TREEVIEW 0x4000L
363 
364 #define LVS_WITHGRID 0x8000L
365 
394 #define LVM_ADDITEM 0xF110
395 
418 #define LVM_FILLSUBITEM 0xF111
419 
435 #define LVM_ADDCOLUMN 0xF112
436 
455 #define LVM_DELITEM 0xF113
456 
479 #define LVM_CLEARSUBITEM 0xF114
480 
496 #define LVM_DELCOLUMN 0xF115
497 
513 #define LVM_COLSORT 0xF116
514 
537 #define LVM_SETSUBITEMCOLOR 0xF117
538 
556 #define LVM_FINDITEM 0xF118
557 
582 #define LVM_GETSUBITEMTEXT 0xF119
583 
597 #define LVM_GETITEMCOUNT 0xF11A
598 
612 #define LVM_GETCOLUMNCOUNT 0xF11B
613 
627 #define LVM_GETSELECTEDITEM 0xF11C
628 
642 #define LVM_DELALLITEM 0xF11D
643 
659 #define LVM_MODIFYHEAD 0xF11E
660 
679 #define LVM_SELECTITEM 0xF11F
680 
681 
700 #define LVM_SHOWITEM 0xF120
701 
724 #define LVM_GETSUBITEMLEN 0xF121
725 
742 #define LVM_SETCOLUMN 0xF122
743 
766 #define LVM_SETSUBITEMTEXT 0xF123
767 
790 #define LVM_SETSUBITEM 0xF124
791 
811 #define LVM_GETCOLUMN 0xF125
812 
829 #define LVM_GETCOLUMNWIDTH 0xF126
830 
851 #define LVM_GETITEM 0xF127
852 
872 #define LVM_GETITEMSTATE 0xF128
873 
887 #define LVM_GETSELECTEDCOLUMN 0xF129
888 
902 #define LVM_GETSELECTEDCOUNT 0xF130
903 
917 #define LVM_GETTOPVISIBLE 0xF131
918 
923 #define LVM_NULL 0xF132
924 
929 #define LVM_SETITEMSTATE 0xF133
930 
965 #define LVM_SORTITEMS 0xF134
966 
985 #define LVM_SETITEMHEIGHT 0xF135
986 
1002 #define LVM_SETHEADHEIGHT 0xF136
1003 
1029 #define LVM_GETITEMADDDATA 0xF137
1030 
1055 #define LVM_SETITEMADDDATA 0xF138
1056 
1075 #define LVM_CHOOSEITEM 0xF139
1076 
1106 #define LVM_SETSTRCMPFUNC 0xF140
1107 
1108 #define LVIR_PARENT 1
1109 #define LVIR_FIRSTCHILD 2
1110 #define LVIR_NEXTSIBLING 3
1111 #define LVIR_PREVSIBLING 4
1112 
1141 #define LVM_GETRELATEDITEM 0xF141
1142 
1161 #define LVM_FOLDITEM 0xF142
1162 
1179 #define LVM_SETCUSTOMDRAW 0xF143
1180 
1197 #define LVM_GETSELECTEDITEMRECT 0xF144
1198 
1199 
1200 
1211 #define LVN_CLICKED 1 /* must be the same as SVN_CLICKED */
1212 
1218 #define LVN_SELCHANGE 2 /* must be the same as SVN_SELCHANGED */
1219 
1225 #define LVN_ITEMRDOWN 4
1226 
1232 #define LVN_ITEMRUP 5
1233 
1239 #define LVN_HEADRDOWN 6
1240 
1246 #define LVN_HEADRUP 7
1247 
1252 #define LVN_KEYDOWN 8
1253 
1260 #define LVN_ITEMDBCLK 9
1261 
1267 #define LVN_ITEMCLK 10
1268 
1274 #define LVN_COLCHANGE 11
1275 
1281 #define LVN_FOLDED 12
1282 
1288 #define LVN_UNFOLDED 13
1289 
1295 #ifdef __cplusplus
1296 }
1297 #endif
1298 
1299 #endif /* EXT_LISTVIEW_H */
1300 
struct _LVFINDINFO LVFINDINFO
DWORD image
Definition: listview.h:228
LVNM_NORMAL LVNM_HEADRUP
Definition: listview.h:295
DWORD flags
Definition: listview.h:254
PFN_LVHDR_BKDRAWFUNC pfnDrawHdrBk
Definition: listview.h:189
LVCOLUMN * PLVCOLUMN
Definition: listview.h:235
struct _LVSUBITEM LVSUBITEM
struct _LVNM_NORMAL LVNM_NORMAL
void(* PFN_LVHDR_ITEMDRAWFUNC)(HWND hWnd, int idx, HDC hdc, RECT *rcDraw)
Definition: listview.h:182
LVSORTDATA * PLVSORTDATA
Definition: listview.h:170
int nCols
Definition: listview.h:220
LVNM_HEADRUP * PLVNM_HEADUP
Definition: listview.h:297
int nTextMax
Definition: listview.h:150
LPARAM lParam
Definition: listview.h:279
LVNM_ITEMRDOWN * PLVNM_ITEMRDOWN
Definition: listview.h:302
char ** pszInfo
Definition: listview.h:260
LVNM_ITEMRUP * PLVNM_ITEMRUP
Definition: listview.h:307
struct _LVITEM LVITEM
int(* PFNLVCOMPARE)(HLVITEM nItem1, HLVITEM nItem2, PLVSORTDATA sortData)
Definition: listview.h:173
int losorted
Definition: listview.h:165
Definition: common.h:843
void(* PFN_LVHDR_BKDRAWFUNC)(HWND hWnd, HLVHDR hlvhdr, HDC hdc, RECT *rcDraw)
Definition: listview.h:180
WPARAM wParam
Definition: listview.h:277
LVSUBITEM * PLVSUBITEM
Definition: listview.h:157
char * pszHeadText
Definition: listview.h:224
int nItem
Definition: listview.h:102
int subItem
Definition: listview.h:146
struct _LVCOLUMN LVCOLUMN
int nTextColor
Definition: listview.h:152
GHANDLE HDC
Handle to device context.
Definition: common.h:363
int nTextMax
Definition: listview.h:226
LVNM_NORMAL LVNM_ITEMRUP
Definition: listview.h:305
DWORD dwFlags
Definition: listview.h:117
struct _LVCUSTOMDRAWFUNCS LVCUSTOMDRAWFUNCS
LVNM_KEYDOWN * PLVNM_KEYDOWN
Definition: listview.h:287
LVFINDINFO * PLVFINDINFO
Definition: listview.h:271
GHANDLE HWND
Handle to main window or control.
Definition: common.h:358
LVITEM * PLVITEM
Definition: listview.h:122
LVNM_HEADRDOWN * PLVNM_HEADRDOWN
Definition: listview.h:292
int nItem
Definition: listview.h:144
char * pszText
Definition: listview.h:148
PVOID GHANDLE
General handle.
Definition: common.h:353
LVNM_NORMAL LVNM_HEADRDOWN
Definition: listview.h:290
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:642
int nItemHeight
Definition: listview.h:104
LVNM_NORMAL LVNM_ITEMRDOWN
Definition: listview.h:300
int iStart
Definition: listview.h:256
LVNM_NORMAL LVNM_KEYDOWN
Definition: listview.h:285
DWORD image
Definition: listview.h:154
int nSubitem
Definition: listview.h:267
DWORD colFlags
Definition: listview.h:232
PFNLVCOMPARE pfnCompare
Definition: listview.h:230
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:636
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:555
struct _LVSORTDATA LVSORTDATA
PFN_LVHDR_ITEMDRAWFUNC pfnDrawHdrItem
Definition: listview.h:191
DWORD flags
Definition: listview.h:142
GHANDLE HLVITEM
List view item handle.
Definition: listview.h:85
int width
Definition: listview.h:222
DWORD itemData
Definition: listview.h:106
HWND hLV
Definition: listview.h:167
LVNM_NORMAL * PLVNM_NORMAL
Definition: listview.h:282
DWORD addData
Definition: listview.h:262