aboutsummaryrefslogtreecommitdiff
path: root/c/layout.h
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/layout.h
parent407b6cab4093b3c0ee23412ac07cf83fd9f03b82 (diff)
downloadEpisodeBrowser-2ac7d06a503b256b290678f5bba158bf7d219bdd.tar.gz
Add comments.
Diffstat (limited to 'c/layout.h')
-rw-r--r--c/layout.h8
1 files changed, 7 insertions, 1 deletions
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();