aboutsummaryrefslogtreecommitdiff
path: root/c/layout.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-03 19:22:40 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-03 19:22:40 +0200
commitdee3a413f072e5779fc5ba80692f895ba43815c6 (patch)
treead1a8274626ccfaf15ed064e1e3d2af6ac0ffd4d /c/layout.cpp
parent5fb8df682831045c4619b65403c4a24d7583d2e9 (diff)
downloadEpisodeBrowser-dee3a413f072e5779fc5ba80692f895ba43815c6.tar.gz
Clean up Dragger.
Diffstat (limited to 'c/layout.cpp')
-rw-r--r--c/layout.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/c/layout.cpp b/c/layout.cpp
index 4da7cd8..94978bb 100644
--- a/c/layout.cpp
+++ b/c/layout.cpp
@@ -38,7 +38,7 @@ void UpdateLayout(int w, int h)
RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN);
}
-bool Dragger::InDragArea(const int x, const int y)
+bool DlvDragger::InDragArea(const int x, const int y)
{
RECT rrDlv;
require(GetRelativeRect(g_dlv->hWnd, &rrDlv));
@@ -50,7 +50,7 @@ bool Dragger::InDragArea(const int x, const int y)
return true;
}
-void Dragger::Drag(const int, const int y)
+void DlvDragger::Drag(const int, const int y)
{
RECT rrDlv;
require(GetRelativeRect(g_dlv->hWnd, &rrDlv));
@@ -64,3 +64,15 @@ void Dragger::Drag(const int, const int y)
RedrawWindow(g_hWnd, NULL, NULL,
RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_ALLCHILDREN|RDW_UPDATENOW);
}
+
+void DlvDragger::Reset()
+{
+ g_dlv->SetHeight(0);
+ Pl("cfg","set_dlv_height",0);
+ UpdateLayout();
+}
+
+void DlvDragger::Done()
+{
+ Pl("cfg","set_dlv_height",g_dlv->Height());
+}