diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-12 14:42:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-12 14:46:14 +0100 |
commit | f1bdd56b4f983282619a4c1fdc4222f25215ca46 (patch) | |
tree | 71b3cd766e542f8f77126882375843f53fd7bd6f /vcl | |
parent | 0557453a35863310f34e6c10facbac63bc89837d (diff) |
document VclContainer a bit
Change-Id: Ib00a0ab1c2e382547041137c11f8955140b8113d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/layout.hxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/vcl/inc/vcl/layout.hxx b/vcl/inc/vcl/layout.hxx index cd06ae6476f7..c6b6a1274fa7 100644 --- a/vcl/inc/vcl/layout.hxx +++ b/vcl/inc/vcl/layout.hxx @@ -21,15 +21,6 @@ class VCL_DLLPUBLIC VclContainer : public Window { public: VclContainer(Window *pParent, WinBits nStyle = WB_HIDE); - virtual Size GetOptimalSize() const; - virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize); - virtual void SetPosPixel(const Point& rAllocPos); - virtual void SetSizePixel(const Size& rAllocation); - - void markLayoutDirty() - { - m_bLayoutDirty = true; - } //These take into account the external margins of the rWindow widget //while GetOptimalSize/get_preferred_size and SetPosSizePixel are @@ -41,10 +32,24 @@ public: //the rWindows alignment desires within that allocation static void setLayoutAllocation(Window &rWindow, const Point &rPos, const Size &rSize); + void markLayoutDirty() + { + m_bLayoutDirty = true; + } protected: + //these are the two that need to be implemented by + //containers, figure out how much space you want... virtual Size calculateRequisition() const = 0; + //..and decide what to do when set to this size virtual void setAllocation(const Size &rAllocation) = 0; + virtual sal_uInt16 getDefaultAccessibleRole() const; +public: + //you don't want to override these + virtual Size GetOptimalSize() const; + virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize); + virtual void SetPosPixel(const Point& rAllocPos); + virtual void SetSizePixel(const Size& rAllocation); private: bool m_bLayoutDirty; }; |