- implemented simple column order array functionality
- implemented some virtual listview notifications
This commit is contained in:
parent
33910f17ff
commit
2b51c94674
|
@ -16,7 +16,7 @@
|
||||||
* LISTVIEW_Notify : most notifications from children (editbox and header)
|
* LISTVIEW_Notify : most notifications from children (editbox and header)
|
||||||
*
|
*
|
||||||
* Data structure:
|
* Data structure:
|
||||||
* LISTVIEW_SetItemCount : empty stub
|
* LISTVIEW_SetItemCount : not completed
|
||||||
*
|
*
|
||||||
* Unicode:
|
* Unicode:
|
||||||
* LISTVIEW_SetItemW : no unicode support
|
* LISTVIEW_SetItemW : no unicode support
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
* LISTVIEW_GetHoverTime : not implemented
|
* LISTVIEW_GetHoverTime : not implemented
|
||||||
* LISTVIEW_GetISearchString : not implemented
|
* LISTVIEW_GetISearchString : not implemented
|
||||||
* LISTVIEW_GetBkImage : not implemented
|
* LISTVIEW_GetBkImage : not implemented
|
||||||
* LISTVIEW_GetColumnOrderArray : not implemented
|
* LISTVIEW_GetColumnOrderArray : simple hack only
|
||||||
* LISTVIEW_SetColumnOrderArray : not implemented
|
* LISTVIEW_SetColumnOrderArray : simple hack only
|
||||||
* LISTVIEW_Arrange : empty stub
|
* LISTVIEW_Arrange : empty stub
|
||||||
* LISTVIEW_ApproximateViewRect : incomplete
|
* LISTVIEW_ApproximateViewRect : incomplete
|
||||||
* LISTVIEW_Scroll : not implemented
|
* LISTVIEW_Scroll : not implemented
|
||||||
|
@ -2034,6 +2034,22 @@ static VOID LISTVIEW_RefreshReport(HWND hwnd, HDC hdc)
|
||||||
/* add 1 for displaying a partial item at the bottom */
|
/* add 1 for displaying a partial item at the bottom */
|
||||||
nLast = nItem + LISTVIEW_GetCountPerColumn(hwnd) + 1;
|
nLast = nItem + LISTVIEW_GetCountPerColumn(hwnd) + 1;
|
||||||
nLast = min(nLast, GETITEMCOUNT(infoPtr));
|
nLast = min(nLast, GETITEMCOUNT(infoPtr));
|
||||||
|
|
||||||
|
/* send cache hint notification */
|
||||||
|
if (GetWindowLongA(hwnd,GWL_STYLE) & LVS_OWNERDATA)
|
||||||
|
{
|
||||||
|
NMLVCACHEHINT nmlv;
|
||||||
|
|
||||||
|
nmlv.hdr.hwndFrom = hwnd;
|
||||||
|
nmlv.hdr.idFrom = GetWindowLongA(hwnd,GWL_ID);
|
||||||
|
nmlv.hdr.code = LVN_ODCACHEHINT;
|
||||||
|
nmlv.iFrom = nItem;
|
||||||
|
nmlv.iTo = nLast;
|
||||||
|
|
||||||
|
SendMessageA(GetParent(hwnd), WM_NOTIFY, (WPARAM)nmlv.hdr.idFrom,
|
||||||
|
(LPARAM)&nmlv);
|
||||||
|
}
|
||||||
|
|
||||||
for (; nItem < nLast; nItem++)
|
for (; nItem < nLast; nItem++)
|
||||||
{
|
{
|
||||||
nColumnCount = Header_GetItemCount(infoPtr->hwndHeader);
|
nColumnCount = Header_GetItemCount(infoPtr->hwndHeader);
|
||||||
|
@ -3335,7 +3351,22 @@ static LRESULT LISTVIEW_GetColumnA(HWND hwnd, INT nItem, LPLVCOLUMNA lpColumn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LISTVIEW_GetColumnW */
|
/* LISTVIEW_GetColumnW */
|
||||||
/* LISTVIEW_GetColumnOrderArray */
|
|
||||||
|
|
||||||
|
static LRESULT LISTVIEW_GetColumnOrderArray(HWND hwnd, INT iCount, LPINT lpiArray)
|
||||||
|
{
|
||||||
|
/* LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); */
|
||||||
|
INT i;
|
||||||
|
|
||||||
|
if (!lpiArray)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* little hack */
|
||||||
|
for (i = 0; i < iCount; i++)
|
||||||
|
lpiArray[i] = i;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
|
@ -5144,7 +5175,32 @@ static LRESULT LISTVIEW_SetColumnA(HWND hwnd, INT nColumn,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LISTVIEW_SetColumnW */
|
/* LISTVIEW_SetColumnW */
|
||||||
/* LISTVIEW_SetColumnOrderArray */
|
|
||||||
|
/***
|
||||||
|
* DESCRIPTION:
|
||||||
|
* Sets the column order array
|
||||||
|
*
|
||||||
|
* PARAMETERS:
|
||||||
|
* [I] HWND : window handle
|
||||||
|
* [I] INT : number of elements in column order array
|
||||||
|
* [I] INT : pointer to column order array
|
||||||
|
*
|
||||||
|
* RETURN:
|
||||||
|
* SUCCESS : TRUE
|
||||||
|
* FAILURE : FALSE
|
||||||
|
*/
|
||||||
|
static LRESULT LISTVIEW_SetColumnOrderArray(HWND hwnd, INT iCount, LPINT lpiArray)
|
||||||
|
{
|
||||||
|
/* LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); */
|
||||||
|
|
||||||
|
FIXME("iCount %d lpiArray %p\n", iCount, lpiArray);
|
||||||
|
|
||||||
|
if (!lpiArray)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
|
@ -5346,7 +5402,7 @@ static LRESULT LISTVIEW_SetItemA(HWND hwnd, LPLVITEMA lpLVItem)
|
||||||
*
|
*
|
||||||
* PARAMETER(S):
|
* PARAMETER(S):
|
||||||
* [I] HWND : window handle
|
* [I] HWND : window handle
|
||||||
* [I] INT : item count (prjected number of items)
|
* [I] INT : item count (projected number of items)
|
||||||
* [I] DWORD : update flags
|
* [I] DWORD : update flags
|
||||||
*
|
*
|
||||||
* RETURN:
|
* RETURN:
|
||||||
|
@ -5362,6 +5418,12 @@ static BOOL LISTVIEW_SetItemCount(HWND hwnd, INT nItems, DWORD dwFlags)
|
||||||
if (nItems == 0)
|
if (nItems == 0)
|
||||||
return LISTVIEW_DeleteAllItems (hwnd);
|
return LISTVIEW_DeleteAllItems (hwnd);
|
||||||
|
|
||||||
|
if (GetWindowLongA(hwnd, GWL_STYLE) & LVS_OWNERDATA)
|
||||||
|
{
|
||||||
|
FIXME("LVS_OWNERDATA is set!\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (nItems > GETITEMCOUNT(infoPtr))
|
if (nItems > GETITEMCOUNT(infoPtr))
|
||||||
{
|
{
|
||||||
/* append items */
|
/* append items */
|
||||||
|
@ -5374,6 +5436,7 @@ static BOOL LISTVIEW_SetItemCount(HWND hwnd, INT nItems, DWORD dwFlags)
|
||||||
FIXME("remove items\n");
|
FIXME("remove items\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -5901,7 +5964,6 @@ static LRESULT LISTVIEW_VScroll(HWND hwnd, INT nScrollCode, SHORT nCurrentPos,
|
||||||
case SB_PAGEUP:
|
case SB_PAGEUP:
|
||||||
if (scrollInfo.nPos > scrollInfo.nMin)
|
if (scrollInfo.nPos > scrollInfo.nMin)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (scrollInfo.nPos >= scrollInfo.nPage)
|
if (scrollInfo.nPos >= scrollInfo.nPage)
|
||||||
{
|
{
|
||||||
scrollInfo.nPos -= scrollInfo.nPage;
|
scrollInfo.nPos -= scrollInfo.nPage;
|
||||||
|
@ -6989,8 +7051,7 @@ static LRESULT WINAPI LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
/* case LVM_GETCOLUMNW: */
|
/* case LVM_GETCOLUMNW: */
|
||||||
|
|
||||||
case LVM_GETCOLUMNORDERARRAY:
|
case LVM_GETCOLUMNORDERARRAY:
|
||||||
FIXME("Unimplemented msg LVM_GETCOLUMNORDERARRAY\n");
|
return LISTVIEW_GetColumnOrderArray(hwnd, (INT)wParam, (LPINT)lParam);
|
||||||
return 0;
|
|
||||||
|
|
||||||
case LVM_GETCOLUMNWIDTH:
|
case LVM_GETCOLUMNWIDTH:
|
||||||
return LISTVIEW_GetColumnWidth(hwnd, (INT)wParam);
|
return LISTVIEW_GetColumnWidth(hwnd, (INT)wParam);
|
||||||
|
@ -7120,8 +7181,7 @@ static LRESULT WINAPI LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case LVM_SETCOLUMNORDERARRAY:
|
case LVM_SETCOLUMNORDERARRAY:
|
||||||
FIXME("Unimplemented msg LVM_SETCOLUMNORDERARRAY\n");
|
return LISTVIEW_SetColumnOrderArray(hwnd, (INT)wParam, (LPINT)lParam);
|
||||||
return 0;
|
|
||||||
|
|
||||||
case LVM_SETCOLUMNWIDTH:
|
case LVM_SETCOLUMNWIDTH:
|
||||||
return LISTVIEW_SetColumnWidth(hwnd, (INT)wParam, (INT)lParam);
|
return LISTVIEW_SetColumnWidth(hwnd, (INT)wParam, (INT)lParam);
|
||||||
|
|
|
@ -26,6 +26,8 @@ typedef struct tagINITCOMMONCONTROLSEX {
|
||||||
|
|
||||||
BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
|
BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
|
||||||
|
|
||||||
|
#define COMCTL32_VERSION 5 /* dll version */
|
||||||
|
|
||||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||||
#define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
|
#define ICC_BAR_CLASSES 0x00000004 /* toolbar, statusbar, trackbar, tooltips */
|
||||||
|
@ -66,6 +68,9 @@ BOOL WINAPI InitCommonControlsEx (LPINITCOMMONCONTROLSEX);
|
||||||
#define CCM_GETDROPTARGET (CCM_FIRST+4)
|
#define CCM_GETDROPTARGET (CCM_FIRST+4)
|
||||||
#define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
|
#define CCM_SETUNICODEFORMAT (CCM_FIRST+5)
|
||||||
#define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
|
#define CCM_GETUNICODEFORMAT (CCM_FIRST+6)
|
||||||
|
#define CCM_SETVERSION (CCM_FIRST+7)
|
||||||
|
#define CCM_GETVERSION (CCM_FIRST+8)
|
||||||
|
#define CCM_SETNOTIFYWINDOW (CCM_FIRST+9) /* wParam = hwndParent */
|
||||||
|
|
||||||
|
|
||||||
/* common notification codes (WM_NOTIFY)*/
|
/* common notification codes (WM_NOTIFY)*/
|
||||||
|
@ -941,20 +946,13 @@ typedef struct _TBBUTTON {
|
||||||
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
|
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
|
||||||
typedef const TBBUTTON *LPCTBBUTTON;
|
typedef const TBBUTTON *LPCTBBUTTON;
|
||||||
|
|
||||||
typedef struct tagNMTOOLBAR {
|
|
||||||
NMHDR hdr;
|
|
||||||
int iItem;
|
|
||||||
TBBUTTON tbButton;
|
|
||||||
int cchText;
|
|
||||||
LPWSTR pszText;
|
|
||||||
RECT rcButton; /*Version 5.80*/
|
|
||||||
} NMTOOLBARW, * LPNMTOOLBARW;
|
|
||||||
|
|
||||||
typedef struct _COLORMAP {
|
typedef struct _COLORMAP {
|
||||||
COLORREF from;
|
COLORREF from;
|
||||||
COLORREF to;
|
COLORREF to;
|
||||||
} COLORMAP, *LPCOLORMAP;
|
} COLORMAP, *LPCOLORMAP;
|
||||||
|
|
||||||
|
|
||||||
typedef struct tagTBADDBITMAP {
|
typedef struct tagTBADDBITMAP {
|
||||||
HINSTANCE hInst;
|
HINSTANCE hInst;
|
||||||
UINT nID;
|
UINT nID;
|
||||||
|
@ -1064,6 +1062,29 @@ typedef struct tagNMTBGETINFOTIPW
|
||||||
#define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
|
#define NMTBGETINFOTIP WINELIB_NAME_AW(NMTBGETINFOFTIP)
|
||||||
#define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
|
#define LPNMTBGETINFOTIP WINELIB_NAME_AW(LPNMTBGETINFOTIP)
|
||||||
|
|
||||||
|
typedef struct tagNMTOOLBARA
|
||||||
|
{
|
||||||
|
NMHDR hdr;
|
||||||
|
INT iItem;
|
||||||
|
TBBUTTON tbButton;
|
||||||
|
INT cchText;
|
||||||
|
LPSTR pszText;
|
||||||
|
RECT rcButton; /* Version 5.80 */
|
||||||
|
} NMTOOLBARA, *LPNMTOOLBARA;
|
||||||
|
|
||||||
|
typedef struct tagNMTOOLBARW
|
||||||
|
{
|
||||||
|
NMHDR hdr;
|
||||||
|
INT iItem;
|
||||||
|
TBBUTTON tbButton;
|
||||||
|
INT cchText;
|
||||||
|
LPWSTR pszText;
|
||||||
|
RECT rcButton; /* Version 5.80 */
|
||||||
|
} NMTOOLBARW, *LPNMTOOLBARW;
|
||||||
|
|
||||||
|
#define NMTOOLBAR WINELIB_NAME_AW(NMTOOLBAR)
|
||||||
|
#define LPNMTOOLBAR WINELIB_NAME_AW(LPNMTOOLBAR)
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
HINSTANCE hInstOld;
|
HINSTANCE hInstOld;
|
||||||
|
@ -2379,18 +2400,19 @@ typedef struct tagNMTVGETINFOTIPW
|
||||||
#define LVN_BEGINDRAG (LVN_FIRST-9)
|
#define LVN_BEGINDRAG (LVN_FIRST-9)
|
||||||
#define LVN_BEGINRDRAG (LVN_FIRST-11)
|
#define LVN_BEGINRDRAG (LVN_FIRST-11)
|
||||||
#define LVN_ODCACHEHINT (LVN_FIRST-13)
|
#define LVN_ODCACHEHINT (LVN_FIRST-13)
|
||||||
#define LVN_ODFINDITEMA (LVN_FIRST-52)
|
|
||||||
#define LVN_ODFINDITEMW (LVN_FIRST-79)
|
|
||||||
#define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
|
|
||||||
#define LVN_ITEMACTIVATE (LVN_FIRST-14)
|
#define LVN_ITEMACTIVATE (LVN_FIRST-14)
|
||||||
#define LVN_ODSTATECHANGED (LVN_FIRST-15)
|
#define LVN_ODSTATECHANGED (LVN_FIRST-15)
|
||||||
#define LVN_HOTTRACK (LVN_FIRST-21)
|
#define LVN_HOTTRACK (LVN_FIRST-21)
|
||||||
|
#define LVN_ODFINDITEMA (LVN_FIRST-52)
|
||||||
|
#define LVN_ODFINDITEMW (LVN_FIRST-79)
|
||||||
|
#define LVN_ODFINDITEM WINELIB_NAME_AW(LVN_ODFINDITEM)
|
||||||
#define LVN_GETDISPINFOA (LVN_FIRST-50)
|
#define LVN_GETDISPINFOA (LVN_FIRST-50)
|
||||||
#define LVN_GETDISPINFOW (LVN_FIRST-77)
|
#define LVN_GETDISPINFOW (LVN_FIRST-77)
|
||||||
#define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
|
#define LVN_GETDISPINFO WINELIB_NAME_AW(LVN_GETDISPINFO)
|
||||||
#define LVN_SETDISPINFOA (LVN_FIRST-51)
|
#define LVN_SETDISPINFOA (LVN_FIRST-51)
|
||||||
#define LVN_SETDISPINFOW (LVN_FIRST-78)
|
#define LVN_SETDISPINFOW (LVN_FIRST-78)
|
||||||
#define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
|
#define LVN_SETDISPINFO WINELIB_NAME_AW(LVN_SETDISPINFO)
|
||||||
|
#define LVN_KEYDOWN (LVN_FIRST-55)
|
||||||
|
|
||||||
#define LVA_ALIGNLEFT 0x0000
|
#define LVA_ALIGNLEFT 0x0000
|
||||||
#define LVA_DEFAULT 0x0001
|
#define LVA_DEFAULT 0x0001
|
||||||
|
@ -2501,8 +2523,6 @@ typedef struct tagLVDISPINFOW
|
||||||
|
|
||||||
#define LV_DISPINFO NMLVDISPINFO
|
#define LV_DISPINFO NMLVDISPINFO
|
||||||
|
|
||||||
#define LVN_KEYDOWN (LVN_FIRST-55)
|
|
||||||
|
|
||||||
typedef struct tagLVKEYDOWN
|
typedef struct tagLVKEYDOWN
|
||||||
{
|
{
|
||||||
NMHDR hdr;
|
NMHDR hdr;
|
||||||
|
@ -2545,6 +2565,17 @@ typedef struct tagTCHITTESTINFO
|
||||||
|
|
||||||
typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
|
typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
|
||||||
|
|
||||||
|
typedef struct tagNMLVCACHEHINT
|
||||||
|
{
|
||||||
|
NMHDR hdr;
|
||||||
|
INT iFrom;
|
||||||
|
INT iTo;
|
||||||
|
} NMLVCACHEHINT, *LPNMLVCACHEHINT;
|
||||||
|
|
||||||
|
#define LPNM_CACHEHINT LPNMLVCACHEHINT
|
||||||
|
#define PNM_CACHEHINT LPNMLVCACHEHINT
|
||||||
|
#define NM_CACHEHINT NMLVCACHEHINT
|
||||||
|
|
||||||
#define ListView_GetNextItem(hwnd,nItem,flags) \
|
#define ListView_GetNextItem(hwnd,nItem,flags) \
|
||||||
(INT)SendMessageA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
|
(INT)SendMessageA((hwnd),LVM_GETNEXTITEM,(WPARAM)(INT)(nItem),(LPARAM)(MAKELPARAM(flags,0)))
|
||||||
#define ListView_FindItem(hwnd,nItem,plvfi) \
|
#define ListView_FindItem(hwnd,nItem,plvfi) \
|
||||||
|
|
Loading…
Reference in New Issue