From b9bafba382a9756cbedbb2008086208e24834139 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 19 Oct 2018 19:37:03 -0700 Subject: GLK: Remaining window rearrange code --- engines/gargoyle/windows.h | 48 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'engines/gargoyle/windows.h') diff --git a/engines/gargoyle/windows.h b/engines/gargoyle/windows.h index aad4969be2..64adf81450 100644 --- a/engines/gargoyle/windows.h +++ b/engines/gargoyle/windows.h @@ -210,6 +210,11 @@ public: * Rearranges the window */ virtual void rearrange(const Common::Rect &box) { bbox = box; } + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const { return 0; } }; typedef Window *winid_t; @@ -277,7 +282,15 @@ public: /** * Rearranges the window */ - virtual void rearrange(const Common::Rect &box); + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return vertical ? size * Windows::_cellW + Windows::_tMarginx * 2 : + size * Windows::_cellH + Windows::_tMarginy * 2; + } }; /** @@ -373,7 +386,14 @@ public: /** * Rearranges the window */ - virtual void rearrange(const Common::Rect &box); + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return (vertical) ? size * Windows::_cellW : size * Windows::_cellH; + } /** * Clear the window @@ -385,11 +405,30 @@ public: * Graphics window */ class GraphicsWindow : public Window { +private: + void touch(); +public: + unsigned char bgnd[3]; + bool dirty; + int w, h; + Graphics::ManagedSurface *_surface; public: /** * Constructor */ GraphicsWindow(Windows *windows, uint32 rock); + + /** + * Rearranges the window + */ + virtual void rearrange(const Common::Rect &box) override; + + /** + * Get window split size within parent pair window + */ + virtual glui32 getSplit(glui32 size, bool vertical) const override { + return size; + } }; /** @@ -412,6 +451,11 @@ public: * Constructor */ PairWindow(Windows *windows, glui32 method, Window *_key, glui32 _size); + + /** + * Rearranges the window + */ + virtual void rearrange(const Common::Rect &box) override; }; } // End of namespace Gargoyle -- cgit v1.2.3