diff options
author | falkTX <falktx@gmail.com> | 2013-12-25 07:33:55 +0000 |
---|---|---|
committer | falkTX <falktx@gmail.com> | 2013-12-25 07:33:55 +0000 |
commit | 8aad566744c5f26663510ddeaf2dea4b2db63a60 (patch) | |
tree | 2ddc545b0287b1d7f753fdff62ede2ffcb38f3ff /dgl/Widget.hpp | |
parent | e076d574a95ed438be7fe0ff19611c9052387c26 (diff) |
CairoWidget fixes; add cairo example (needs a little more work)
Diffstat (limited to 'dgl/Widget.hpp')
-rw-r--r-- | dgl/Widget.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/dgl/Widget.hpp b/dgl/Widget.hpp index 477a5bd3..f6287941 100644 --- a/dgl/Widget.hpp +++ b/dgl/Widget.hpp @@ -60,10 +60,15 @@ public: int getHeight() const noexcept; const Size<int>& getSize() const noexcept; - void setWidth(int width); - void setHeight(int height); - void setSize(int width, int height); - void setSize(const Size<int>& size); + // virtual needed by cairo + virtual void setWidth(int width); + virtual void setHeight(int height); + virtual void setSize(const Size<int>& size); + + void setSize(int width, int height) + { + setSize(Size<int>(width, height)); + } const Rectangle<int>& getArea() const noexcept; @@ -90,6 +95,7 @@ private: bool fVisible; Rectangle<int> fArea; + friend class CairoWidget; friend class Window; }; |