Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2009-08-17 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:00 +0300
commitc99f3ebdd639c2adb03d8b44001b10af18516504 (patch)
tree92aaf34e5edbd7287c3f55037190da75ab0a8000 /CPP/Windows/Control/ListView.h
parent829409452d85cd6dd9dfc9151f109d6e13a2bb1c (diff)
9.06 beta
Diffstat (limited to 'CPP/Windows/Control/ListView.h')
-rwxr-xr-xCPP/Windows/Control/ListView.h105
1 files changed, 37 insertions, 68 deletions
diff --git a/CPP/Windows/Control/ListView.h b/CPP/Windows/Control/ListView.h
index 0daf65f3..1258ec93 100755
--- a/CPP/Windows/Control/ListView.h
+++ b/CPP/Windows/Control/ListView.h
@@ -4,7 +4,6 @@
#define __WINDOWS_CONTROL_LISTVIEW_H
#include "Windows/Window.h"
-#include "Windows/Defs.h"
#include <commctrl.h>
@@ -19,17 +18,14 @@ public:
HWND parentWindow, HMENU idOrHMenu,
HINSTANCE instance, LPVOID createParam);
- bool SetUnicodeFormat(bool fUnicode)
- { return BOOLToBool(ListView_SetUnicodeFormat(_window, BOOLToBool(fUnicode))); }
+ #ifndef UNDER_CE
+ bool SetUnicodeFormat(bool fUnicode) { return BOOLToBool(ListView_SetUnicodeFormat(_window, BOOLToBool(fUnicode))); }
+ #endif
- bool DeleteAllItems()
- { return BOOLToBool(ListView_DeleteAllItems(_window)); }
-
- bool DeleteColumn(int columnIndex)
- { return BOOLToBool(ListView_DeleteColumn(_window, columnIndex)); }
+ bool DeleteAllItems() { return BOOLToBool(ListView_DeleteAllItems(_window)); }
+ bool DeleteColumn(int columnIndex) { return BOOLToBool(ListView_DeleteColumn(_window, columnIndex)); }
- int InsertColumn(int columnIndex, const LVCOLUMN *columnInfo)
- { return ListView_InsertColumn(_window, columnIndex, columnInfo); }
+ int InsertColumn(int columnIndex, const LVCOLUMN *columnInfo) { return ListView_InsertColumn(_window, columnIndex, columnInfo); }
int InsertColumn(int columnIndex, LPCTSTR text, int width);
int InsertItem(const LVITEM* item) { return ListView_InsertItem(_window, item); }
int InsertItem(int index, LPCTSTR text);
@@ -38,8 +34,7 @@ public:
#ifndef _UNICODE
- int InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo)
- { return (int)SendMessage(LVM_INSERTCOLUMNW, (WPARAM)columnIndex, (LPARAM)columnInfo); }
+ int InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo) { return (int)SendMessage(LVM_INSERTCOLUMNW, (WPARAM)columnIndex, (LPARAM)columnInfo); }
int InsertColumn(int columnIndex, LPCWSTR text, int width);
int InsertItem(const LV_ITEMW* item) { return (int)SendMessage(LVM_INSERTITEMW, 0, (LPARAM)item); }
int InsertItem(int index, LPCWSTR text);
@@ -48,41 +43,30 @@ public:
#endif
- bool DeleteItem(int itemIndex)
- { return BOOLToBool(ListView_DeleteItem(_window, itemIndex)); }
+ bool DeleteItem(int itemIndex) { return BOOLToBool(ListView_DeleteItem(_window, itemIndex)); }
- UINT GetSelectedCount() const
- { return ListView_GetSelectedCount(_window); }
- int GetItemCount() const
- { return ListView_GetItemCount(_window); }
+ UINT GetSelectedCount() const { return ListView_GetSelectedCount(_window); }
+ int GetItemCount() const { return ListView_GetItemCount(_window); }
- INT GetSelectionMark() const
- { return ListView_GetSelectionMark(_window); }
+ INT GetSelectionMark() const { return ListView_GetSelectionMark(_window); }
- void SetItemCount(int numItems)
- { ListView_SetItemCount(_window, numItems); }
- void SetItemCountEx(int numItems, DWORD flags)
- { ListView_SetItemCountEx(_window, numItems, flags); }
+ void SetItemCount(int numItems) { ListView_SetItemCount(_window, numItems); }
+ void SetItemCountEx(int numItems, DWORD flags) { ListView_SetItemCountEx(_window, numItems, flags); }
- int GetNextItem(int startIndex, UINT flags) const
- { return ListView_GetNextItem(_window, startIndex, flags); }
- int GetNextSelectedItem(int startIndex) const
- { return GetNextItem(startIndex, LVNI_SELECTED); }
- int GetFocusedItem() const
- { return GetNextItem(-1, LVNI_FOCUSED); }
+ int GetNextItem(int startIndex, UINT flags) const { return ListView_GetNextItem(_window, startIndex, flags); }
+ int GetNextSelectedItem(int startIndex) const { return GetNextItem(startIndex, LVNI_SELECTED); }
+ int GetFocusedItem() const { return GetNextItem(-1, LVNI_FOCUSED); }
- bool GetItem(LVITEM* item) const
- { return BOOLToBool(ListView_GetItem(_window, item)); }
+ bool GetItem(LVITEM* item) const { return BOOLToBool(ListView_GetItem(_window, item)); }
bool GetItemParam(int itemIndex, LPARAM &param) const;
- void GetItemText(int itemIndex, int aSubItemIndex, LPTSTR aText, int aTextSizeMax) const
- { ListView_GetItemText(_window, itemIndex, aSubItemIndex, aText, aTextSizeMax); }
+ void GetItemText(int itemIndex, int subItemIndex, LPTSTR text, int textSizeMax) const
+ { ListView_GetItemText(_window, itemIndex, subItemIndex, text, textSizeMax); }
bool SortItems(PFNLVCOMPARE compareFunction, LPARAM dataParam)
{ return BOOLToBool(ListView_SortItems(_window, compareFunction, dataParam)); }
- void SetItemState(int index, UINT state, UINT mask)
- { ListView_SetItemState(_window, index, state, mask); }
- UINT GetItemState(int index, UINT mask) const
- { return ListView_GetItemState(_window, index, mask); }
+ void SetItemState(int index, UINT state, UINT mask) { ListView_SetItemState(_window, index, state, mask); }
+ void SetItemState_FocusedSelected(int index) { SetItemState(index, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED); }
+ UINT GetItemState(int index, UINT mask) const { return ListView_GetItemState(_window, index, mask); }
bool GetColumn(int columnIndex, LVCOLUMN* columnInfo) const
{ return BOOLToBool(ListView_GetColumn(_window, columnIndex, columnInfo)); }
@@ -91,48 +75,33 @@ public:
{ return ListView_SetImageList(_window, imageList, imageListType); }
// version 4.70: NT5 | (NT4 + ie3) | w98 | (w95 + ie3)
- DWORD GetExtendedListViewStyle()
- { return ListView_GetExtendedListViewStyle(_window); }
- void SetExtendedListViewStyle(DWORD exStyle)
- { ListView_SetExtendedListViewStyle(_window, exStyle); }
- void SetExtendedListViewStyle(DWORD exMask, DWORD exStyle)
- { ListView_SetExtendedListViewStyleEx(_window, exMask, exStyle); }
-
- #ifndef _WIN32_WCE
- void SetCheckState(UINT index, bool checkState)
- { ListView_SetCheckState(_window, index, BoolToBOOL(checkState)); }
- #endif
- bool GetCheckState(UINT index)
- { return BOOLToBool(ListView_GetCheckState(_window, index)); }
+ DWORD GetExtendedListViewStyle() { return ListView_GetExtendedListViewStyle(_window); }
+ void SetExtendedListViewStyle(DWORD exStyle) { ListView_SetExtendedListViewStyle(_window, exStyle); }
+ void SetExtendedListViewStyle(DWORD exMask, DWORD exStyle) { ListView_SetExtendedListViewStyleEx(_window, exMask, exStyle); }
+ void SetCheckState(UINT index, bool checkState) { ListView_SetCheckState(_window, index, BoolToBOOL(checkState)); }
+ bool GetCheckState(UINT index) { return BOOLToBool(ListView_GetCheckState(_window, index)); }
- bool EnsureVisible(int index, bool partialOK)
- { return BOOLToBool(ListView_EnsureVisible(_window, index, BoolToBOOL(partialOK))); }
+ bool EnsureVisible(int index, bool partialOK) { return BOOLToBool(ListView_EnsureVisible(_window, index, BoolToBOOL(partialOK))); }
- bool GetItemRect(int index, RECT *rect, int code)
- { return BOOLToBool(ListView_GetItemRect(_window, index, rect, code)); }
+ bool GetItemRect(int index, RECT *rect, int code) { return BOOLToBool(ListView_GetItemRect(_window, index, rect, code)); }
- HWND GetEditControl()
- { return ListView_GetEditControl(_window) ; }
- HWND EditLabel(int itemIndex)
- { return ListView_EditLabel(_window, itemIndex) ; }
+ HWND GetEditControl() { return ListView_GetEditControl(_window) ; }
+ HWND EditLabel(int itemIndex) { return ListView_EditLabel(_window, itemIndex) ; }
- bool RedrawItems(int firstIndex, int lastIndex)
- { return BOOLToBool(ListView_RedrawItems(_window, firstIndex, lastIndex)); }
+ bool RedrawItems(int firstIndex, int lastIndex) { return BOOLToBool(ListView_RedrawItems(_window, firstIndex, lastIndex)); }
bool RedrawAllItems()
{
if (GetItemCount() > 0)
return RedrawItems(0, GetItemCount() - 1);
return true;
}
- bool RedrawItem(int index)
- { return RedrawItems(index, index); }
+ bool RedrawItem(int index) { return RedrawItems(index, index); }
- int HitTest(LPLVHITTESTINFO info)
- { return ListView_HitTest(_window, info); }
-
- COLORREF GetBkColor()
- { return ListView_GetBkColor(_window); }
+ int HitTest(LPLVHITTESTINFO info) { return ListView_HitTest(_window, info); }
+ COLORREF GetBkColor() { return ListView_GetBkColor(_window); }
+ bool SetColumnWidth(int iCol, int cx) { return BOOLToBool(ListView_SetColumnWidth(_window, iCol, cx)); }
+ bool SetColumnWidthAuto(int iCol) { return SetColumnWidth(iCol, LVSCW_AUTOSIZE); }
};
}}