diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-04 16:26:27 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-04 17:25:01 +0200 |
commit | 2ac7d06a503b256b290678f5bba158bf7d219bdd (patch) | |
tree | 86abdf303f8a3059efbd040c6eae95accf5b432c /c/listview.h | |
parent | 407b6cab4093b3c0ee23412ac07cf83fd9f03b82 (diff) | |
download | EpisodeBrowser-2ac7d06a503b256b290678f5bba158bf7d219bdd.tar.gz |
Add comments.
Diffstat (limited to 'c/listview.h')
-rw-r--r-- | c/listview.h | 12 |
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 |