diff options
author | Sebastian Geerken <devnull@localhost> | 2014-09-22 14:42:07 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-09-22 14:42:07 +0200 |
commit | 473610dbc053c39ff9d94476b23ea6a51ff07e1f (patch) | |
tree | 35a007f10f77d8197b8c046e865eccf0c53228ed /dw/oofpositionedmgr.hh | |
parent | ed66235f15f5098750586fb1b5b12990d4e0d668 (diff) |
New structure for managing positioned widgets.
Diffstat (limited to 'dw/oofpositionedmgr.hh')
-rw-r--r-- | dw/oofpositionedmgr.hh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/dw/oofpositionedmgr.hh b/dw/oofpositionedmgr.hh index c5db0c6f..ff24a194 100644 --- a/dw/oofpositionedmgr.hh +++ b/dw/oofpositionedmgr.hh @@ -10,6 +10,16 @@ namespace oof { class OOFPositionedMgr: public OutOfFlowMgr { protected: + class Child: public lout::object::Object + { + public: + core::Widget *widget, *generator; + int x, y; + + inline Child (core::Widget *widget, core::Widget *generator) + { this->widget = widget; this->generator = generator; x = y = 0; } + }; + virtual int containerBoxOffsetX () = 0; virtual int containerBoxOffsetY () = 0; virtual int containerBoxRestWidth () = 0; @@ -23,7 +33,7 @@ protected: OOFAwareWidget *container; core::Allocation containerAllocation; - lout::container::typed::Vector<core::Widget> *children; + lout::container::typed::Vector<Child> *children; bool doChildrenExceedContainer (); bool haveExtremesChanged (); @@ -39,9 +49,9 @@ protected: { return getPosBorder (child->getStyle()->bottom, availHeight); } int getPosBorder (core::style::Length cssValue, int refLength); - void calcPosAndSizeChildOfChild (core::Widget *child, int refWidth, - int refHeight, int *x, int *y, int *width, - int *ascent, int *descent); + void calcPosAndSizeChildOfChild (Child *child, int refWidth, int refHeight, + int *x, int *y, int *width, int *ascent, + int *descent); public: OOFPositionedMgr (OOFAwareWidget *container); |