Dillo v3.1.1-98-g318d1f14
|
#include <oofpositionedmgr.hh>
Classes | |
class | Child |
Public Member Functions | |
OOFPositionedMgr (OOFAwareWidget *container) | |
~OOFPositionedMgr () | |
void | sizeAllocateStart (OOFAwareWidget *caller, core::Allocation *allocation) |
void | sizeAllocateEnd (OOFAwareWidget *caller) |
void | containerSizeChangedForChildren () |
void | draw (core::View *view, core::Rectangle *area, core::DrawingContext *context) |
void | markSizeChange (int ref) |
void | markExtremesChange (int ref) |
core::Widget * | getWidgetAtPoint (int x, int y, core::GettingWidgetAtPointContext *context) |
void | addWidgetInFlow (OOFAwareWidget *widget, OOFAwareWidget *parent, int externalIndex) |
int | addWidgetOOF (core::Widget *widget, OOFAwareWidget *generator, int externalIndex) |
void | moveExternalIndices (OOFAwareWidget *generator, int oldStartIndex, int diff) |
void | tellPosition1 (core::Widget *widget, int x, int y) |
Called before tellPosition2, see there for more. | |
void | tellPosition2 (core::Widget *widget, int x, int y) |
Called after tellPosition1. | |
void | tellIncompletePosition1 (core::Widget *generator, core::Widget *widget, int x, int y) |
void | tellIncompletePosition2 (core::Widget *generator, core::Widget *widget, int x, int y) |
bool | containerMustAdjustExtraSpace () |
int | getLeftBorder (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Get the left border for the vertical position of y, for a height of h", based on floats; relative to the *container. | |
int | getRightBorder (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Get the right border for the vertical position of y, for a height of h, based on floats; relative to the container. | |
bool | hasFloatLeft (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Return whether there is a float on the left side. | |
bool | hasFloatRight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Return whether there is a float on the right side. | |
int | getLeftFloatHeight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Assuming there is a float on the left side, return the rest height of it. | |
int | getRightFloatHeight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex) |
Assuming there is a float on the right side, return the rest height of it. | |
int | getClearPosition (OOFAwareWidget *widget) |
Return value is relative to the calling generator (not container). | |
bool | affectsLeftBorder (core::Widget *widget) |
bool | affectsRightBorder (core::Widget *widget) |
bool | mayAffectBordersAtAll () |
bool | dealingWithSizeOfChild (core::Widget *child) |
int | getNumWidgets () |
core::Widget * | getWidget (int i) |
Public Member Functions inherited from dw::oof::OutOfFlowMgr | |
OutOfFlowMgr () | |
virtual | ~OutOfFlowMgr () |
virtual void | calcWidgetRefSize (core::Widget *widget, core::Requisition *size)=0 |
virtual void | getSize (core::Requisition *containerReq, int *oofWidth, int *oofHeight)=0 |
virtual void | getExtremes (core::Extremes *containerExtr, int *oofMinWidth, int *oofMaxWidth)=0 |
virtual int | getAvailWidthOfChild (core::Widget *child, bool forceValue)=0 |
virtual int | getAvailHeightOfChild (core::Widget *child, bool forceValue)=0 |
Protected Types | |
enum | { NOT_ALLOCATED , IN_ALLOCATION , WAS_ALLOCATED } |
Protected Member Functions | |
bool | getPosLeft (core::Widget *child, int availWidth, int *result) |
bool | getPosRight (core::Widget *child, int availWidth, int *result) |
bool | getPosTop (core::Widget *child, int availHeight, int *result) |
bool | getPosBottom (core::Widget *child, int availHeight, int *result) |
bool | getPosBorder (core::style::Length cssValue, int refLength, int *result) |
bool | allChildrenConsideredForSize () |
bool | allChildrenConsideredForExtremes () |
bool | doChildrenExceedContainer () |
virtual void | sizeAllocateChildren ()=0 |
virtual bool | posXAbsolute (Child *child)=0 |
virtual bool | posYAbsolute (Child *child)=0 |
bool | generatorPosDefined (Child *child) |
int | generatorPosX (Child *child) |
int | generatorPosY (Child *child) |
bool | posXDefined (Child *child) |
bool | posYDefined (Child *child) |
Protected Attributes | |
OOFAwareWidget * | container |
core::Allocation | containerAllocation |
enum dw::oof::OOFPositionedMgr:: { ... } | containerAllocationState |
lout::container::typed::Vector< Child > * | children |
lout::container::typed::HashTable< lout::object::TypedPointer< dw::core::Widget >, Child > * | childrenByWidget |
Definition at line 11 of file oofpositionedmgr.hh.
|
protected |
Enumerator | |
---|---|
NOT_ALLOCATED | |
IN_ALLOCATION | |
WAS_ALLOCATED |
Definition at line 28 of file oofpositionedmgr.hh.
dw::oof::OOFPositionedMgr::OOFPositionedMgr | ( | OOFAwareWidget * | container | ) |
Definition at line 48 of file oofpositionedmgr.cc.
References dw::core::Allocation::ascent, children, childrenByWidget, container, containerAllocation, containerAllocationState, DBG_OBJ_CREATE, DBG_OBJ_SET_NUM, dw::core::Allocation::descent, dw::core::Widget::getAllocation(), NOT_ALLOCATED, WAS_ALLOCATED, dw::core::Widget::wasAllocated(), dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
dw::oof::OOFPositionedMgr::~OOFPositionedMgr | ( | ) |
Definition at line 71 of file oofpositionedmgr.cc.
References children, childrenByWidget, and DBG_OBJ_DELETE.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 190 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 196 of file oofpositionedmgr.cc.
References children, childrenByWidget, DBG_OBJ_ARRSET_PTR, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, DBG_OBJ_SET_NUM, DBG_OBJ_SET_NUM_O, and DBG_OBJ_SET_PTR_O.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 343 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 348 of file oofpositionedmgr.cc.
|
protected |
Definition at line 395 of file oofpositionedmgr.cc.
References children.
Referenced by sizeAllocateEnd().
|
protected |
Definition at line 387 of file oofpositionedmgr.cc.
References children.
Referenced by sizeAllocateEnd().
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 295 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 161 of file oofpositionedmgr.cc.
References children, DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Reimplemented in dw::oof::OOFPosRelMgr.
Definition at line 358 of file oofpositionedmgr.cc.
|
protected |
Definition at line 115 of file oofpositionedmgr.cc.
References dw::core::Allocation::ascent, dw::core::Requisition::ascent, children, container, containerAllocation, DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, DBG_OBJ_MSGF, dw::core::Allocation::descent, dw::core::Requisition::descent, dw::core::Widget::getAllocation(), dw::core::Widget::sizeRequest(), dw::oof::OOFPositionedMgr::Child::widget, dw::core::Allocation::width, dw::core::Requisition::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by sizeAllocateEnd().
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 171 of file oofpositionedmgr.cc.
References children, container, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, dw::core::Widget::draw(), dw::core::StackingContextMgr::handledByStackingContextMgr(), dw::core::StackingProcessingContext::hasWidgetBeenProcessedAsInterruption(), dw::core::Rectangle::height, dw::core::Widget::intersects(), dw::oof::OOFPositionedMgr::Child::widget, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.
|
inlineprotected |
Definition at line 56 of file oofpositionedmgr.hh.
References container, containerAllocationState, dw::oof::OOFPositionedMgr::Child::generator, NOT_ALLOCATED, and dw::core::Widget::wasAllocated().
Referenced by generatorPosX(), generatorPosY(), posXDefined(), and posYDefined().
|
inlineprotected |
Definition at line 61 of file oofpositionedmgr.hh.
References container, containerAllocation, dw::oof::OOFPositionedMgr::Child::generator, generatorPosDefined(), dw::core::Widget::getAllocation(), and dw::core::Allocation::x.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), and dw::oof::OOFPosRelMgr::getChildPosX().
|
inlineprotected |
Definition at line 66 of file oofpositionedmgr.hh.
References container, containerAllocation, dw::oof::OOFPositionedMgr::Child::generator, generatorPosDefined(), dw::core::Widget::getAllocation(), and dw::core::Allocation::y.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), and dw::oof::OOFPosRelMgr::getChildPosY().
|
virtual |
Return value is relative to the calling generator (not container).
Implements dw::oof::OutOfFlowMgr.
Definition at line 338 of file oofpositionedmgr.cc.
|
virtual |
Get the left border for the vertical position of y, for a height of h", based on floats; relative to the *container.
The border includes marging/border/padding of the calling textblock but is 0 if there is no float, so a caller should also consider other borders.
Implements dw::oof::OutOfFlowMgr.
Definition at line 300 of file oofpositionedmgr.cc.
|
virtual |
Assuming there is a float on the left side, return the rest height of it.
y is relative to the container.
See also getLeftBorder().
Implements dw::oof::OutOfFlowMgr.
Definition at line 325 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 363 of file oofpositionedmgr.cc.
References children.
|
protected |
Definition at line 373 of file oofpositionedmgr.cc.
References dw::core::style::absLengthVal(), dw::core::style::isAbsLength(), dw::core::style::isPerLength(), and dw::core::style::multiplyWithPerLength().
Referenced by dw::oof::OOFPosRelMgr::getChildPosDim(), getPosBottom(), getPosLeft(), getPosRight(), and getPosTop().
|
inlineprotected |
Definition at line 42 of file oofpositionedmgr.hh.
References dw::core::style::StyleAttrs::bottom, getPosBorder(), and dw::core::Widget::getStyle().
Referenced by dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild().
|
inlineprotected |
Definition at line 36 of file oofpositionedmgr.hh.
References getPosBorder(), dw::core::Widget::getStyle(), and dw::core::style::StyleAttrs::left.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild().
|
inlineprotected |
Definition at line 38 of file oofpositionedmgr.hh.
References getPosBorder(), dw::core::Widget::getStyle(), and dw::core::style::StyleAttrs::right.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcHPosAndSizeChildOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild().
|
inlineprotected |
Definition at line 40 of file oofpositionedmgr.hh.
References getPosBorder(), dw::core::Widget::getStyle(), and dw::core::style::StyleAttrs::top.
Referenced by dw::oof::OOFPosAbsLikeMgr::calcVPosAndSizeChildOfChild(), and dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild().
|
virtual |
Get the right border for the vertical position of y, for a height of h, based on floats; relative to the container.
See also getLeftBorder().
Implements dw::oof::OutOfFlowMgr.
Definition at line 306 of file oofpositionedmgr.cc.
|
virtual |
Assuming there is a float on the right side, return the rest height of it.
y is relative to the container.
See also getLeftFloatHeight(), getLeftBorder().
Implements dw::oof::OutOfFlowMgr.
Definition at line 331 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 368 of file oofpositionedmgr.cc.
References children.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 240 of file oofpositionedmgr.cc.
References children, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, dw::core::Widget::getWidgetAtPoint(), dw::core::StackingContextMgr::handledByStackingContextMgr(), and dw::core::StackingProcessingContext::hasWidgetBeenProcessedAsInterruption().
|
virtual |
Return whether there is a float on the left side.
y is relative to the container.
See also getLeftBorder().
Implements dw::oof::OutOfFlowMgr.
Definition at line 312 of file oofpositionedmgr.cc.
|
virtual |
Return whether there is a float on the right side.
y is relative to the container.
See also hasFloatLeft(), getLeftBorder();
Implements dw::oof::OutOfFlowMgr.
Definition at line 318 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Reimplemented in dw::oof::OOFPosRelMgr.
Definition at line 236 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Reimplemented in dw::oof::OOFPosRelMgr.
Definition at line 231 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 353 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 218 of file oofpositionedmgr.cc.
References children, DBG_OBJ_SET_NUM_O, dw::oof::OOFPositionedMgr::Child::externalIndex, and dw::oof::OOFPositionedMgr::Child::widget.
|
protectedpure virtual |
Implemented in dw::oof::OOFPosAbsLikeMgr, and dw::oof::OOFPosRelMgr.
Referenced by posXDefined().
|
inlineprotected |
Definition at line 72 of file oofpositionedmgr.hh.
References generatorPosDefined(), and posXAbsolute().
Referenced by dw::oof::OOFPosAbsLikeMgr::getExtremes(), dw::oof::OOFPosRelMgr::getExtremes(), dw::oof::OOFPosAbsLikeMgr::getSize(), and dw::oof::OOFPosRelMgr::getSize().
|
protectedpure virtual |
Implemented in dw::oof::OOFPosAbsLikeMgr, and dw::oof::OOFPosRelMgr.
Referenced by posYDefined().
|
inlineprotected |
Definition at line 75 of file oofpositionedmgr.hh.
References generatorPosDefined(), and posYAbsolute().
Referenced by dw::oof::OOFPosAbsLikeMgr::getSize(), and dw::oof::OOFPosRelMgr::getSize().
|
protectedpure virtual |
Implemented in dw::oof::OOFPosAbsLikeMgr, and dw::oof::OOFPosRelMgr.
Referenced by sizeAllocateEnd().
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 97 of file oofpositionedmgr.cc.
References allChildrenConsideredForExtremes(), allChildrenConsideredForSize(), container, containerAllocationState, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, doChildrenExceedContainer(), dw::oof::OOFAwareWidget::oofSizeChanged(), sizeAllocateChildren(), and WAS_ALLOCATED.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 79 of file oofpositionedmgr.cc.
References dw::core::Allocation::ascent, container, containerAllocation, containerAllocationState, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, dw::core::Allocation::descent, IN_ALLOCATION, NOT_ALLOCATED, dw::core::Allocation::width, dw::core::Allocation::x, and dw::core::Allocation::y.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 283 of file oofpositionedmgr.cc.
|
virtual |
Implements dw::oof::OutOfFlowMgr.
Definition at line 289 of file oofpositionedmgr.cc.
|
virtual |
Called before tellPosition2, see there for more.
Implements dw::oof::OutOfFlowMgr.
Definition at line 261 of file oofpositionedmgr.cc.
|
virtual |
Called after tellPosition1.
An implementation should only implement either tellPosition1 or tellPosition2. Coordinates are relative to the container.
Implements dw::oof::OutOfFlowMgr.
Definition at line 265 of file oofpositionedmgr.cc.
References childrenByWidget, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM_O, dw::oof::OOFPositionedMgr::Child::widget, dw::oof::OOFPositionedMgr::Child::x, and dw::oof::OOFPositionedMgr::Child::y.
|
protected |
Definition at line 31 of file oofpositionedmgr.hh.
Referenced by addWidgetOOF(), allChildrenConsideredForExtremes(), allChildrenConsideredForSize(), containerSizeChangedForChildren(), doChildrenExceedContainer(), draw(), dw::oof::OOFPosAbsLikeMgr::getExtremes(), dw::oof::OOFPosRelMgr::getExtremes(), getNumWidgets(), dw::oof::OOFPosAbsLikeMgr::getSize(), dw::oof::OOFPosRelMgr::getSize(), getWidget(), getWidgetAtPoint(), dw::oof::OOFPosRelMgr::markSizeChange(), moveExternalIndices(), OOFPositionedMgr(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), dw::oof::OOFPosRelMgr::sizeAllocateChildren(), and ~OOFPositionedMgr().
|
protected |
Definition at line 34 of file oofpositionedmgr.hh.
Referenced by addWidgetOOF(), OOFPositionedMgr(), tellPosition2(), and ~OOFPositionedMgr().
|
protected |
Definition at line 26 of file oofpositionedmgr.hh.
Referenced by dw::oof::OOFPosAbsMgr::containerBoxOffsetX(), dw::oof::OOFPosAbsMgr::containerBoxOffsetY(), dw::oof::OOFPosAbsMgr::containerBoxRestHeight(), dw::oof::OOFPosAbsMgr::containerBoxRestWidth(), doChildrenExceedContainer(), draw(), generatorPosDefined(), generatorPosX(), generatorPosY(), dw::oof::OOFPosAbsLikeMgr::getAvailHeightOfChild(), dw::oof::OOFPosAbsLikeMgr::getAvailWidthOfChild(), dw::oof::OOFPosRelMgr::getChildPosX(), dw::oof::OOFPosRelMgr::getChildPosY(), dw::oof::OOFPosAbsLikeMgr::getSize(), OOFPositionedMgr(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), sizeAllocateEnd(), and sizeAllocateStart().
|
protected |
Definition at line 27 of file oofpositionedmgr.hh.
Referenced by doChildrenExceedContainer(), generatorPosX(), generatorPosY(), OOFPositionedMgr(), dw::oof::OOFPosAbsLikeMgr::sizeAllocateChildren(), dw::oof::OOFPosRelMgr::sizeAllocateChildren(), and sizeAllocateStart().
enum { ... } dw::oof::OOFPositionedMgr::containerAllocationState |
Referenced by generatorPosDefined(), OOFPositionedMgr(), sizeAllocateEnd(), and sizeAllocateStart().