aboutsummaryrefslogtreecommitdiff
path: root/c/listview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-04 16:26:27 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-04 17:25:01 +0200
commit2ac7d06a503b256b290678f5bba158bf7d219bdd (patch)
tree86abdf303f8a3059efbd040c6eae95accf5b432c /c/listview.cpp
parent407b6cab4093b3c0ee23412ac07cf83fd9f03b82 (diff)
downloadEpisodeBrowser-2ac7d06a503b256b290678f5bba158bf7d219bdd.tar.gz
Add comments.
Diffstat (limited to 'c/listview.cpp')
-rw-r--r--c/listview.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/c/listview.cpp b/c/listview.cpp
index bd92246..82c6df6 100644
--- a/c/listview.cpp
+++ b/c/listview.cpp
@@ -5,11 +5,14 @@
#include "layout.h"
#include "win.h"
-extern HFONT g_hfNormal;
+/* Actual window procedure for all list views, which calls the
+ * appropriate WndProc member function. */
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle)
{
+ extern HFONT g_hfNormal;
+
m_hWndParent = hWndParent;
hWnd = Require(CreateWindowEx(
WS_EX_CLIENTEDGE,
@@ -25,15 +28,6 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle
SendMessage(hWnd, WM_SETFONT, (WPARAM)g_hfNormal, MAKELPARAM(FALSE, 0));
}
-/* Retrieve next matching list view item. */
-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);
-}
-
-/* Naively calculate height of list view. */
int ListView::Height()
{
const int cItem = ListView_GetItemCount(hWnd);