1 /** 2 * 3 */ 4 package org.sirius.server.win32.classes.controls; 5 6 /** 7 * @author Myk Kolisnyk 8 * 9 */ 10 public class ListView { 11 12 /** 13 * 14 */ 15 public ListView() { 16 // TODO Auto-generated constructor stub 17 } 18 19 /* 20 * #define ListView_GetBkColor(w) (COLORREF)SNDMSG((w),LVM_GETBKCOLOR,0,0) 21 * #define ListView_GetImageList(w,i) 22 * (HIMAGELIST)SNDMSG((w),LVM_GETIMAGELIST,(i),0) #define 23 * ListView_GetItemCount(w) (int)SNDMSG((w),LVM_GETITEMCOUNT,0,0) #define 24 * ListView_GetItem(w,i) (BOOL)SNDMSG((w),LVM_GETITEM,0,(LPARAM)(i)) #define 25 * ListView_SetBkColor(w,c) (BOOL)SNDMSG((w),LVM_SETBKCOLOR,0,(LPARAM)c) 26 * #define ListView_SetImageList(w,h,i) 27 * (HIMAGELIST)(UINT)SNDMSG((w),LVM_SETIMAGELIST,(i),(LPARAM)(h)) #define 28 * ListView_SetItem(w,i) (BOOL)SNDMSG((w),LVM_SETITEM,0,(LPARAM)(const 29 * LV_ITEM*)(i)) #define ListView_InsertItem(w,i) 30 * (int)SNDMSG((w),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM*)(i)) #define 31 * ListView_DeleteItem(w,i) (BOOL)SNDMSG((w),LVM_DELETEITEM,i,0) #define 32 * ListView_DeleteAllItems(w) (BOOL)SNDMSG((w),LVM_DELETEALLITEMS,0,0) 33 * #define ListView_GetCallbackMask(w) 34 * (UINT)SNDMSG((w),LVM_GETCALLBACKMASK,0,0) #define 35 * ListView_SetCallbackMask(w,m) (BOOL)SNDMSG((w),LVM_SETCALLBACKMASK,m,0) 36 * #define ListView_GetNextItem(w,i,f) 37 * (int)SNDMSG((w),LVM_GETNEXTITEM,i,MAKELPARAM((f),0)) #define 38 * ListView_FindItem(w,i,p) (int)SNDMSG((w), 39 * LVM_FINDITEM,(WPARAM)i,(LPARAM)(const LV_FINDINFO*)(p)) #define 40 * ListView_GetItemRect(w,i,p,c) 41 * (BOOL)SNDMSG((w),LVM_GETITEMRECT,i,((p)?(((LPRECT 42 * )(p))->left=(c),(LPARAM)(LPRECT)(p)):0)) #define 43 * ListView_SetItemPosition(w,i,x,y) 44 * (BOOL)SNDMSG((w),LVM_SETITEMPOSITION,i,MAKELPARAM(x,y)) #define 45 * ListView_GetItemPosition(w,i,p) 46 * (BOOL)SNDMSG((w),LVM_GETITEMPOSITION,i,(LPARAM)p) #define 47 * ListView_GetItemSpacing(w,f) (DWORD)SNDMSG((w),LVM_GETITEMSPACING,f,0) 48 * #define ListView_GetStringWidth(w,s) 49 * (int)SNDMSG((w),LVM_GETSTRINGWIDTH,0,(LPARAM)s) #define 50 * ListView_HitTest(w,p) 51 * (int)SNDMSG((w),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO*)(p)) #define 52 * ListView_EnsureVisible(w,i,f) 53 * (BOOL)SNDMSG((w),LVM_ENSUREVISIBLE,i,MAKELPARAM((f),0)) #define 54 * ListView_Scroll(w,x,y) (BOOL)SNDMSG((w),LVM_SCROLL,x,y) #define 55 * ListView_RedrawItems(w,f,l) (BOOL)SNDMSG((w),LVM_REDRAWITEMS,f,l) #define 56 * ListView_Arrange(w,c) (BOOL)SNDMSG((w),LVM_ARRANGE,c,0) #define 57 * ListView_EditLabel(w,i) (HWND)SNDMSG((w),LVM_EDITLABEL,i,0) #define 58 * ListView_GetEditControl(w) (HWND)SNDMSG((w),LVM_GETEDITCONTROL,0,0) 59 * #define ListView_GetColumn(w,i,p) 60 * (BOOL)SNDMSG((w),LVM_GETCOLUMN,i,(LPARAM)(LV_COLUMN*)(p)) #define 61 * ListView_SetColumn(w,i,p) (BOOL)SNDMSG((w),LVM_SETCOLUMN,i,(LPARAM)(const 62 * LV_COLUMN*)(p)) #define ListView_InsertColumn(w,i,p) 63 * (int)SNDMSG((w),LVM_INSERTCOLUMN,i,(LPARAM)(const LV_COLUMN*)(p)) #define 64 * ListView_DeleteColumn(w,i) (BOOL)SNDMSG((w),LVM_DELETECOLUMN,i,0) #define 65 * ListView_GetColumnWidth(w,i) (int)SNDMSG((w),LVM_GETCOLUMNWIDTH,i,0) 66 * #define ListView_SetColumnWidth(w,i,x) 67 * (BOOL)SNDMSG((w),LVM_SETCOLUMNWIDTH,i,MAKELPARAM((x),0)) #define 68 * ListView_CreateDragImage(w,i,p) 69 * (HIMAGELIST)SNDMSG((w),LVM_CREATEDRAGIMAGE,i,(LPARAM)(LPPOINT)(p)) 70 * #define ListView_GetViewRect(w,p) 71 * (BOOL)SNDMSG((w),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(p)) #define 72 * ListView_GetTextColor(w) (COLORREF)SNDMSG((w),LVM_GETTEXTCOLOR,0,0) 73 * #define ListView_SetTextColor(w,c) 74 * (BOOL)SNDMSG((w),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(c)) #define 75 * ListView_GetTextBkColor(w) (COLORREF)SNDMSG((w),LVM_GETTEXTBKCOLOR,0,0) 76 * #define ListView_SetTextBkColor(w,c) 77 * (BOOL)SNDMSG((w),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(c)) #define 78 * ListView_GetTopIndex(w) (int)SNDMSG((w),LVM_GETTOPINDEX,0,0) #define 79 * ListView_GetCountPerPage(w) (int)SNDMSG((w),LVM_GETCOUNTPERPAGE,0,0) 80 * #define ListView_GetOrigin(w,p) 81 * (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p)) #define 82 * ListView_GetOrigin(w,p) 83 * (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p)) #define 84 * ListView_Update(w,i) (BOOL)SNDMSG((w),LVM_UPDATE,(WPARAM)(i),0) #define 85 * ListView_SetItemState(w,i,d,m) \ { \ LV_ITEM _lvi;\ _lvi.stateMask=m;\ 86 * _lvi.state=d;\ SNDMSG((w),LVM_SETITEMSTATE,i,(LPARAM)(LV_ITEM*)&_lvi);\ } 87 * #define ListView_GetItemState(w,i,m) 88 * (UINT)SNDMSG((w),LVM_GETITEMSTATE,i,m) #define 89 * ListView_GetItemText(w,i,iS,s,n) \ { \ LV_ITEM _lvi;\ _lvi.iSubItem=iS;\ 90 * _lvi.cchTextMax=n;\ _lvi.pszText=s;\ 91 * SNDMSG((w),LVM_GETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\ } #define 92 * ListView_SetItemText(w,i,iS,s) \ { \ LV_ITEM _lvi;\ _lvi.iSubItem=iS;\ 93 * _lvi.pszText=s;\ SNDMSG((w),LVM_SETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\ 94 * } #define ListView_SetItemCount(w,n) 95 * (void)SNDMSG((w),LVM_SETITEMCOUNT,n,0) #define ListView_SortItems(w,f,l) 96 * (BOOL)SNDMSG((w),LVM_SORTITEMS,l,(LPARAM)f) #define 97 * ListView_SetItemPosition32(w,i,x,y) \ { \ POINT p={x,y}; \ 98 * SNDMSG((w),LVM_SETITEMPOSITION32,i,(LPARAM)&p);\ } #define 99 * ListView_GetSelectedCount(w) (UINT)SNDMSG((w),LVM_GETSELECTEDCOUNT,0,0) 100 * #define ListView_GetCheckState(w,i) 101 * ((((UINT)(SNDMSG((w),LVM_GETITEMSTATE, 102 * (WPARAM)(i),LVIS_STATEIMAGEMASK)))>>12)-1) #define 103 * ListView_SetCheckState(w,i,f) 104 * ListView_SetItemState(w,i,INDEXTOSTATEIMAGEMASK 105 * ((f)+1),LVIS_STATEIMAGEMASK) #define ListView_GetISearchString(w,lpsz) 106 * (BOOL)SNDMSG((w),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz)) #define 107 * ListView_CancelEditLabel(w) (VOID)SNDMSG((w),LVM_CANCELEDITLABEL,0,0) 108 * #define ListView_EnableGroupView(w,i) 109 * (int)SNDMSG((w),LVM_ENABLEGROUPVIEW,(WPARAM)(i),0) #define 110 * ListView_GetGroupInfo(w,i,p) 111 * (int)SNDMSG((w),LVM_GETGROUPINFO,(WPARAM)(i),(LPARAM)(p)) #define 112 * ListView_GetGroupMetrics(w,p) 113 * SNDMSG((w),LVM_GETGROUPMETRICS,0,(LPARAM)(p)) #define 114 * ListView_GetInsertMark(w,p) 115 * (BOOL)SNDMSG((w),LVM_GETINSERTMARK,0,(LPARAM)(p)) #define 116 * ListView_GetInsertMarkColor(w) 117 * (COLORREF)SNDMSG((w),LVM_GETINSERTMARKCOLOR,0,0) #define 118 * ListView_GetInsertMarkRect(w,p) 119 * (int)SNDMSG((w),LVM_GETINSERTMARKRECT,0,(LPARAM)(p)) #define 120 * ListView_GetOutlineColor(w) (COLORREF)SNDMSG((w),LVM_GETOUTLINECOLOR,0,0) 121 * #define ListView_GetSelectedColumn(w) 122 * (UINT)SNDMSG((w),LVM_GETSELECTEDCOLUMN,0,0) #define 123 * ListView_GetTileInfo(w,p) SNDMSG((w),LVM_GETTILEINFO,0,(LPARAM)(p)) 124 * #define ListView_GetTileViewInfo(w,p) 125 * SNDMSG((w),LVM_GETTILEVIEWINFO,0,(LPARAM)(p)) #define ListView_GetView(w) 126 * (DWORD)SNDMSG((w),LVM_GETVIEW,0,0) #define ListView_HasGroup(w,i) 127 * (BOOL)SNDMSG((w),LVM_HASGROUP,(WPARAM)(i),0) #define 128 * ListView_InsertGroup(w,i,p) 129 * (int)SNDMSG((w),LVM_INSERTGROUP,(WPARAM)(i),(LPARAM)(p)) #define 130 * ListView_InsertGroupSorted(w,p) 131 * SNDMSG((w),LVM_INSERTGROUPSORTED,(WPARAM)(p),0) #define 132 * ListView_InsertMarkHitTest(w,p,t) 133 * (BOOL)SNDMSG((w),LVM_INSERTMARKHITTEST,(WPARAM)(p),(LPARAM)(t)) #define 134 * ListView_IsGroupViewEnabled(w) 135 * (BOOL)SNDMSG((w),LVM_ISGROUPVIEWENABLED,0,0) #define 136 * ListView_MapIDToIndex(w,i) 137 * (UINT)SNDMSG((w),LVM_MAPIDTOINDEX,(WPARAM)(i),0) #define 138 * ListView_MoveGroup(w,i,t) 139 * SNDMSG((w),LVM_MOVEGROUP,(WPARAM)(i),(LPARAM)(t)) #define 140 * ListView_RemoveAllGroups(w) SNDMSG((w),LVM_REMOVEALLGROUPS,0,0) #define 141 * ListView_RemoveGroup(w,i) (int)SNDMSG((w),LVM_REMOVEGROUP,(WPARAM)(i),0) 142 * #define ListView_SetGroupInfo(w,i,p) 143 * (int)SNDMSG((w),LVM_SETGROUPINFO,(WPARAM)(i),(LPARAM)(p)) #define 144 * ListView_SetGroupMetrics(w,p) 145 * SNDMSG((w),LVM_SETGROUPMETRICS,0,(LPARAM)(p)) #define 146 * ListView_SetInfoTip(w,p) (BOOL)SNDMSG((w),LVM_SETINFOTIP,0,(LPARAM)(p)) 147 * #define ListView_SetInsertMark(w,p) 148 * (BOOL)SNDMSG((w),LVM_SETINSERTMARK,0,(LPARAM)(p)) #define 149 * ListView_SetInsertMarkColor(w,c) 150 * (COLORREF)SNDMSG((w),LVM_SETINSERTMARKCOLOR,0,(LPARAM)(c)) #define 151 * ListView_SetOutlineColor(w,c) 152 * (COLORREF)SNDMSG((w),LVM_SETOUTLINECOLOR,0,(LPARAM)(c)) #if (_WIN32_WINNT 153 * >= 0x0501) #define ListView_SetSelectedColumn(w,i) 154 * SNDMSG((w),LVM_SETSELECTEDCOLUMN,(WPARAM)i,0) #endif #define 155 * ListView_SetTileInfo(w,p) (BOOL)SNDMSG((w),LVM_SETTILEINFO,0,(LPARAM)(p)) 156 * #define ListView_SetTileViewInfo(w,p) 157 * (BOOL)SNDMSG((w),LVM_SETTILEVIEWINFO,0,(LPARAM)(p)) #define 158 * ListView_SetView(w,i) (int)SNDMSG((w),LVM_SETVIEW,(WPARAM)(i),0) #define 159 * ListView_SortGroups(w,c,p) 160 * (int)SNDMSG((w),LVM_SORTGROUPS,(WPARAM)(c),(LPARAM)(p)) #define 161 * ListView_SortItemsEx(w,c,p) 162 * (BOOL)SNDMSG((w),LVM_SORTITEMSEX,(WPARAM)(p),(LPARAM)(c)) 163 * 164 * #define ListView_ApproximateViewRect(w,iw,ih,i) 165 * (DWORD)SNDMSG((w),LVM_APPROXIMATEVIEWRECT,(i),MAKELPARAM((iw),(ih))) 166 * #define ListView_SetExtendedListViewStyle(w,s) 167 * (DWORD)SNDMSG((w),LVM_SETEXTENDEDLISTVIEWSTYLE,0,(s)) #define 168 * ListView_GetExtendedListViewStyle(w) 169 * (DWORD)SNDMSG((w),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0) #define 170 * ListView_SetColumnOrderArray(w,i,a) 171 * (BOOL)SNDMSG((w),LVM_SETCOLUMNORDERARRAY,(WPARAM)(i),(LPARAM)(LPINT)(a)) 172 * #define ListView_GetColumnOrderArray(w,i,a) 173 * (BOOL)SNDMSG((w),LVM_GETCOLUMNORDERARRAY,(WPARAM)(i),(LPARAM)(LPINT)(a)) 174 * #define ListView_GetHeader(w) (HWND)SNDMSG((w),LVM_GETHEADER,0,0) #define 175 * ListView_GetHotCursor(w) (HCURSOR)SNDMSG((w),LVM_GETHOTCURSOR,0,0) 176 * #define ListView_GetHotItem(w) (INT)SNDMSG((w),LVM_GETHOTITEM,0,0) 177 * #define ListView_GetSubItemRect(w,i,is,c,p) 178 * (BOOL)SNDMSG((w),LVM_GETSUBITEMRECT 179 * ,(WPARAM)(int)(i),((p)?(((LPRECT)(p))-> 180 * left=(c),(((LPRECT)(p))->top=(is)),(LPARAM)(LPRECT)(p)):0)) #define 181 * ListView_SetHotCursor(w,c) 182 * (HCURSOR)SNDMSG((w),LVM_SETHOTCURSOR,0,(LPARAM)(c)) #define 183 * ListView_SetHotItem(w,i) (int)SNDMSG((w),LVM_SETHOTITEM,(WPARAM)(i),0) 184 * #define ListView_SetIconSpacing(w,x,y) 185 * (DWORD)SNDMSG((w),LVM_SETICONSPACING,0,MAKELONG(x,y)) #define 186 * ListView_SubItemHitTest(w,p) 187 * (INT)SNDMSG((w),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(p)) 188 * #define ListView_SetItemCountEx(w,i,f) 189 * (void)SNDMSG((w),LVM_SETITEMCOUNT,(WPARAM)(i),(LPARAM)(f)) 190 */ 191 }