listview.h

Go to the documentation of this file.
00001 
00019 /*
00020  * $Id: listview.h 12044 2009-08-13 03:08:06Z houhuihua $
00021  *
00022  *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 
00023  *                     pSOS, ThreadX, NuCleus, OSE, and Win32.
00024  *
00025  *             Copyright (C) 2002-2008 Feynman Software.
00026  *             Copyright (C) 1998-2002 Wei Yongming.
00027  */
00028 
00029 #ifndef EXT_LISTVIEW_H
00030 #define EXT_LISTVIEW_H
00031 
00032 
00033 #ifdef  __cplusplus
00034 extern "C" {
00035 #endif
00036 
00051 #define CTRL_LISTVIEW       ("ListView")
00052 
00054 #define LV_OKAY                 0
00055 
00056 #define LV_ERR                  (-1)
00057 
00058 #define LV_ERRSPACE             (-2)
00059 
00064 typedef GHANDLE HLVITEM;
00065 
00070 #define LVIF_FOLD               0x0001L
00071 
00076 typedef struct _LVITEM
00077 {
00081     int nItem;
00083     int nItemHeight;
00085     DWORD itemData;
00086 
00096     DWORD dwFlags;
00097 
00098 } LVITEM;
00099 
00101 typedef LVITEM *PLVITEM;
00102 
00104 #define LVFLAG_BITMAP   0x0001
00105 
00106 #define LVFLAG_ICON         0x0002
00107 
00112 typedef struct _LVSUBITEM
00113 {
00121     DWORD flags;
00123     int nItem;
00125     int subItem;
00127     char *pszText;
00129     int nTextMax;
00131     int nTextColor;
00133     DWORD image; 
00134 } LVSUBITEM;
00136 typedef LVSUBITEM *PLVSUBITEM;
00137 
00139 typedef struct _LVSORTDATA
00140 {
00142     int ncol;
00144     int losorted;
00146     HWND hLV;
00147 } LVSORTDATA;
00149 typedef LVSORTDATA *PLVSORTDATA;
00150 
00152 typedef int (*PFNLVCOMPARE) (HLVITEM nItem1, HLVITEM nItem2, PLVSORTDATA sortData);
00153 
00154 typedef GHANDLE HLVHDR;
00155 typedef GHANDLE HLVHDRITEM;
00156 
00158 /* hlvhdr is reserved for extension */
00159 typedef void (*PFN_LVHDR_BKDRAWFUNC)   (HWND hWnd, HLVHDR hlvhdr, HDC hdc, RECT *rcDraw);
00161 typedef void (*PFN_LVHDR_ITEMDRAWFUNC) (HWND hWnd, int idx, HDC hdc, RECT *rcDraw);
00162 
00163 
00165 typedef struct _LVCUSTOMDRAWFUNCS
00166 {
00168     PFN_LVHDR_BKDRAWFUNC   pfnDrawHdrBk;
00170     PFN_LVHDR_ITEMDRAWFUNC pfnDrawHdrItem;
00171 } LVCUSTOMDRAWFUNCS;
00172 
00173 
00176 #define LVCF_LEFTALIGN          0x0000
00177 
00178 #define LVCF_RIGHTALIGN         0x0001
00179 
00180 #define LVCF_CENTERALIGN        0x0002
00181 
00182 #define LVCF_TREEVIEW           0x0004
00183 
00186 #define LVHF_LEFTALIGN          0x0000
00187 
00188 #define LVHF_RIGHTALIGN         0x0004
00189 
00190 #define LVHF_CENTERALIGN        0x0008
00191 
00196 typedef struct _LVCOLUMN
00197 {
00199     int nCols;
00201     int width;
00203     char *pszHeadText;
00205     int nTextMax;
00207     DWORD image; 
00209     PFNLVCOMPARE pfnCompare;
00211     DWORD colFlags;
00212 } LVCOLUMN;
00214 typedef LVCOLUMN *PLVCOLUMN;
00215 
00218 #define LVFF_TEXT       0x0001
00219 
00220 #define LVFF_ADDDATA    0x0002
00221 
00223 typedef struct _LVFINDINFO
00224 {
00233     DWORD flags;
00235     int iStart;
00237     int nCols;
00239     char **pszInfo;
00241     DWORD addData;
00242 
00244     int nItem;
00246     int nSubitem;
00247 
00248 } LVFINDINFO;
00250 typedef LVFINDINFO *PLVFINDINFO;
00251 
00253 typedef struct _LVNM_NORMAL
00254 {
00256     WPARAM wParam;
00258     LPARAM lParam;
00259 } LVNM_NORMAL;
00261 typedef LVNM_NORMAL *PLVNM_NORMAL;
00262 
00264 typedef LVNM_NORMAL LVNM_KEYDOWN;
00266 typedef LVNM_KEYDOWN *PLVNM_KEYDOWN;
00267 
00269 typedef LVNM_NORMAL LVNM_HEADRDOWN;
00271 typedef LVNM_HEADRDOWN *PLVNM_HEADRDOWN;
00272 
00274 typedef LVNM_NORMAL LVNM_HEADRUP;
00276 typedef LVNM_HEADRUP *PLVNM_HEADUP;
00277 
00279 typedef LVNM_NORMAL LVNM_ITEMRDOWN;
00281 typedef LVNM_ITEMRDOWN *PLVNM_ITEMRDOWN;
00282 
00284 typedef LVNM_NORMAL LVNM_ITEMRUP;
00286 typedef LVNM_ITEMRUP *PLVNM_ITEMRUP;
00287 
00300 #define LVS_UPNOTIFY            0x0001L             /* must be the same with SVS_UPNOTIFY */
00301 #define LVS_NOTIFY              LVS_UPNOTIFY
00302 
00309 #define LVS_SORT                0x0002L
00310 
00315 #define LVS_MULTIPLESEL         0x0008L              /* reserved */
00316 
00321 #define LVS_CHECKBOX            0x1000L              /* reserved */
00322 
00329 #define LVS_AUTOCHECK           0x2000L              /* reserved */
00330 
00335 #define LVS_AUTOCHECKBOX        (LVS_CHECKBOX | LVS_AUTOCHECK)    /* reserved */
00336 
00341 #define LVS_TREEVIEW            0x4000L
00342 
00343 #define LVS_WITHGRID            0x8000L
00344 
00373 #define LVM_ADDITEM            0xF110
00374 
00397 #define LVM_FILLSUBITEM        0xF111
00398 
00414 #define LVM_ADDCOLUMN          0xF112
00415 
00434 #define LVM_DELITEM            0xF113
00435 
00458 #define LVM_CLEARSUBITEM       0xF114
00459 
00475 #define LVM_DELCOLUMN          0xF115
00476 
00492 #define LVM_COLSORT            0xF116
00493 
00516 #define LVM_SETSUBITEMCOLOR       0xF117
00517 
00535 #define LVM_FINDITEM           0xF118
00536 
00561 #define LVM_GETSUBITEMTEXT         0xF119
00562 
00576 #define LVM_GETITEMCOUNT       0xF11A
00577 
00591 #define LVM_GETCOLUMNCOUNT     0xF11B
00592 
00606 #define LVM_GETSELECTEDITEM    0xF11C
00607 
00621 #define LVM_DELALLITEM           0xF11D
00622 
00638 #define LVM_MODIFYHEAD           0xF11E
00639 
00658 #define LVM_SELECTITEM          0xF11F 
00659 
00660 
00679 #define LVM_SHOWITEM            0xF120 
00680 
00703 #define LVM_GETSUBITEMLEN       0xF121
00704 
00721 #define LVM_SETCOLUMN           0xF122
00722 
00745 #define LVM_SETSUBITEMTEXT      0xF123
00746 
00769 #define LVM_SETSUBITEM          0xF124
00770 
00790 #define LVM_GETCOLUMN           0xF125 
00791 
00808 #define LVM_GETCOLUMNWIDTH      0xF126 
00809 
00830 #define LVM_GETITEM             0xF127 
00831 
00851 #define LVM_GETITEMSTATE        0xF128 
00852 
00866 #define LVM_GETSELECTEDCOLUMN   0xF129 
00867 
00881 #define LVM_GETSELECTEDCOUNT    0xF130 
00882 
00896 #define LVM_GETTOPVISIBLE       0xF131 
00897 
00902 #define LVM_NULL                0xF132 
00903 
00908 #define LVM_SETITEMSTATE        0xF133 
00909 
00944 #define LVM_SORTITEMS           0xF134 
00945 
00964 #define LVM_SETITEMHEIGHT       0xF135 
00965 
00981 #define LVM_SETHEADHEIGHT       0xF136 
00982 
01008 #define LVM_GETITEMADDDATA       0xF137
01009 
01034 #define LVM_SETITEMADDDATA       0xF138
01035 
01054 #define LVM_CHOOSEITEM          0xF139
01055 
01085 #define LVM_SETSTRCMPFUNC       0xF140
01086 
01087 #define LVIR_PARENT             1
01088 #define LVIR_FIRSTCHILD         2
01089 #define LVIR_NEXTSIBLING        3
01090 #define LVIR_PREVSIBLING        4
01091 
01120 #define LVM_GETRELATEDITEM      0xF141
01121 
01140 #define LVM_FOLDITEM            0xF142
01141 
01158 #define LVM_SETCUSTOMDRAW       0xF143
01159 
01176 #define LVM_GETSELECTEDITEMRECT  0xF144
01177 
01178 
01179 
01190 #define LVN_CLICKED            1    /* must be the same as SVN_CLICKED */
01191 
01197 #define LVN_SELCHANGE          2    /* must be the same as SVN_SELCHANGED */
01198 
01204 #define LVN_ITEMRDOWN          4
01205 
01211 #define LVN_ITEMRUP            5
01212 
01218 #define LVN_HEADRDOWN          6
01219 
01225 #define LVN_HEADRUP            7
01226 
01231 #define LVN_KEYDOWN            8
01232 
01239 #define LVN_ITEMDBCLK          9
01240 
01246 #define LVN_ITEMCLK            10
01247 
01253 #define LVN_COLCHANGE          11
01254 
01260 #define LVN_FOLDED             12
01261 
01267 #define LVN_UNFOLDED           13
01268 
01274 #ifdef  __cplusplus
01275 }
01276 #endif
01277 
01278 #endif /* EXT_LISTVIEW_H */
01279 
Generated on Thu Apr 7 16:01:41 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3