aboutsummaryrefslogtreecommitdiff
path: root/c/listview.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/listview.h')
-rw-r--r--c/listview.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/c/listview.h b/c/listview.h
index 1de6cc1..008f995 100644
--- a/c/listview.h
+++ b/c/listview.h
@@ -9,9 +9,14 @@ struct ListView
HWND hWnd;
ListView(HWND hWndParent, HMENU hMenu, DWORD dwStyle);
+ /* Retrieve next matching list view item. */
bool FindNextItem(LVITEM* lvi, LPARAM lParam);
+ /* Naively calculate height appropriate for number of items. */
virtual int Height();
+ /* Update column widths on window size change (unimplemented
+ * by default). */
virtual void ResizeColumns(int w);
+ /* Enable/disable "modern" theme. */
virtual void UpdateTheme(BOOL bThemeActive);
virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
protected:
@@ -19,4 +24,11 @@ protected:
HWND m_hWndParent;
};
+inline bool ListView::FindNextItem(LVITEM* const lvi, const LPARAM lParam)
+{
+ if ((lvi->iItem = ListView_GetNextItem(hWnd, lvi->iItem, lParam)) == -1)
+ return false;
+ return ListView_GetItem(hWnd, lvi);
+}
+
#endif