From dee3a413f072e5779fc5ba80692f895ba43815c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 3 Aug 2022 19:22:40 +0200 Subject: Clean up Dragger. --- c/layout.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'c/layout.cpp') 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()); +} -- cgit v1.2.3