From 2ac7d06a503b256b290678f5bba158bf7d219bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 4 Aug 2022 16:26:27 +0200 Subject: Add comments. --- c/layout.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'c/layout.h') diff --git a/c/layout.h b/c/layout.h index da29d25..3c616b7 100644 --- a/c/layout.h +++ b/c/layout.h @@ -7,6 +7,8 @@ #include "pl.h" #include "win.h" +/* Given main window's width and height, set appropriate positions and + * sizes for child windows. */ void UpdateLayout(int w = 0, int h = 0); /* Dragger objects implement draggable portions of the client area, @@ -22,9 +24,10 @@ protected: bool IsDown(); bool IsDouble(); virtual bool InDragArea(int x, int y); + /* Perform drag, resizing relevant windows. */ virtual void Drag(int x, int y); + /* Called after drag, when mouse button is released. */ virtual void Done(); - /* Reset dragger to automatic position. */ virtual void Reset(); private: @@ -44,6 +47,9 @@ private: void Done() override; }; +/* Below follows the implementation of the non-virtual member + * functions of Dragger, on which derived objects rely. */ + inline bool Dragger::IsDouble() { const long time = GetMessageTime(); -- cgit v1.2.3