aboutsummaryrefslogtreecommitdiff
path: root/c/layout.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-09-02 20:16:04 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-09-02 20:16:18 +0200
commitbc4cef92d8efbf97a9215122abc2d7247c287f12 (patch)
treea5ca307281c4f143b5f172428c9fd2b629d6b426 /c/layout.h
parent5c1c2ce2bdbf9735ad8a4d162609a8c22a4f0954 (diff)
downloadEpisodeBrowser-bc4cef92d8efbf97a9215122abc2d7247c287f12.tar.gz
Improve Window object.
Diffstat (limited to 'c/layout.h')
-rw-r--r--c/layout.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/c/layout.h b/c/layout.h
deleted file mode 100644
index 4780821..0000000
--- a/c/layout.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef LAYOUT_H
-#define LAYOUT_H
-
-#include <windows.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,
- * such as the split between two list views. HandleLButtonDown and
- * HandleSetCursor are called by relevant window procedures upon
- * WM_(NC)LBUTTONDOWN and WM_SETCURSOR. */
-
-struct Window;
-
-struct Dragger
-{
- Window& parent;
- bool HandleLButtonDown();
- bool HandleSetCursor();
- inline Dragger(Window& parent) : parent(parent) {}
-protected:
- bool IsDown() const;
- bool IsDouble(const long time, const POINT& pt);
- virtual bool InDragArea(int x, int y) const = 0;
- /* Perform drag, resizing relevant windows. */
- virtual void Drag(int x, int y) const = 0;
- /* Reset dragger to automatic position. */
- virtual void Reset() const = 0;
- /* Called after drag, when mouse button is released. */
- virtual void Done() const = 0;
-private:
- bool m_bActive = false;
- long m_time0 = 0;
- POINT m_pt0 = {0, 0};
-};
-
-/* DlvDragger implements the draggable split between the data list
- * view and the episode list view. */
-
-struct DlvDragger : public Dragger
-{
- inline DlvDragger(Window& parent) : Dragger(parent) {}
-private:
- bool InDragArea(int x, int y) const override;
- void Drag(int x, int y) const override;
- void Reset() const override;
- void Done() const override;
-};
-
-#endif