aboutsummaryrefslogtreecommitdiff
path: root/dw/outofflowmgr.hh
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-04-09 23:21:09 +0200
committerSebastian Geerken <devnull@localhost>2014-04-09 23:21:09 +0200
commitb7b6cb6dbe45ae258e19595c805cdf317865674c (patch)
tree1e113d200019118da74fdf5231116aa3603b4740 /dw/outofflowmgr.hh
parent7a45186914fd6a805127e430d13e51601fcf47b6 (diff)
Finished refactoring.
Diffstat (limited to 'dw/outofflowmgr.hh')
-rw-r--r--dw/outofflowmgr.hh41
1 files changed, 27 insertions, 14 deletions
diff --git a/dw/outofflowmgr.hh b/dw/outofflowmgr.hh
index 109351d5..1a72f6dc 100644
--- a/dw/outofflowmgr.hh
+++ b/dw/outofflowmgr.hh
@@ -46,17 +46,8 @@ private:
inline int getOldWidth () { return width; }
inline int getOldHeight () { return height; }
- inline bool isNowAllocated () { return widget->wasAllocated (); }
- inline int getNewXCB () { return widget->getAllocation()->x -
- oofm->containingBlockAllocation.x; }
- inline int getNewYCB () { return widget->getAllocation()->y -
- oofm->containingBlockAllocation.y; }
- inline int getNewWidth () { return widget->getAllocation()->width; }
- inline int getNewHeight () { return widget->getAllocation()->ascent +
- widget->getAllocation()->descent; }
-
+
void update (bool wasAllocated, int xCB, int yCB, int width, int height);
- void updateAllocation ();
inline core::Widget *getWidget () { return widget; }
};
@@ -114,6 +105,16 @@ private:
Float (OutOfFlowMgr *oofm, core::Widget *widget,
Textblock *generatingBlock, int externalIndex);
+ inline bool isNowAllocated () { return getWidget()->wasAllocated (); }
+ inline int getNewXCB () { return getWidget()->getAllocation()->x -
+ getOutOfFlowMgr()->containingBlockAllocation.x; }
+ inline int getNewYCB () { return getWidget()->getAllocation()->y -
+ getOutOfFlowMgr()->containingBlockAllocation.y; }
+ inline int getNewWidth () { return getWidget()->getAllocation()->width; }
+ inline int getNewHeight () { return getWidget()->getAllocation()->ascent +
+ getWidget()->getAllocation()->descent; }
+ void updateAllocation ();
+
void intoStringBuffer(lout::misc::StringBuffer *sb);
bool covers (Textblock *textblock, int y, int h);
@@ -188,11 +189,23 @@ private:
TBInfo *parent, int parentExtIndex);
~TBInfo ();
+ inline bool isNowAllocated () {
+ return getOutOfFlowMgr()->wasAllocated (getTextblock ()); }
+ inline int getNewXCB () {
+ return getOutOfFlowMgr()->getAllocation (getTextblock ())->x -
+ getOutOfFlowMgr()->containingBlockAllocation.x; }
+ inline int getNewYCB () {
+ return getOutOfFlowMgr()->getAllocation (getTextblock ())->y -
+ getOutOfFlowMgr()->containingBlockAllocation.y; }
+ inline int getNewWidth () {
+ return getOutOfFlowMgr()->getAllocation (getTextblock ())->width; }
+ inline int getNewHeight () {
+ core::Allocation *allocation =
+ getOutOfFlowMgr()->getAllocation (getTextblock ());
+ return allocation->ascent + allocation->descent; }
+ void updateAllocation ();
+
inline Textblock *getTextblock () { return (Textblock*)getWidget (); }
- inline void updateAllocation () {
- wasAllocated = getWidget()->wasAllocated ();
- allocation = *(getWidget()->getAllocation ());
- }
};
class AbsolutelyPositioned: public lout::object::Object