Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dw::oof::OOFPositionedMgr Class Referenceabstract

#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::WidgetgetWidgetAtPoint (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::WidgetgetWidget (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

OOFAwareWidgetcontainer
 
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
 

Detailed Description

Definition at line 11 of file oofpositionedmgr.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NOT_ALLOCATED 
IN_ALLOCATION 
WAS_ALLOCATED 

Definition at line 28 of file oofpositionedmgr.hh.

Constructor & Destructor Documentation

◆ OOFPositionedMgr()

◆ ~OOFPositionedMgr()

dw::oof::OOFPositionedMgr::~OOFPositionedMgr ( )

Definition at line 71 of file oofpositionedmgr.cc.

References children, childrenByWidget, and DBG_OBJ_DELETE.

Member Function Documentation

◆ addWidgetInFlow()

void dw::oof::OOFPositionedMgr::addWidgetInFlow ( OOFAwareWidget widget,
OOFAwareWidget parent,
int  externalIndex 
)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 190 of file oofpositionedmgr.cc.

◆ addWidgetOOF()

int dw::oof::OOFPositionedMgr::addWidgetOOF ( core::Widget widget,
OOFAwareWidget generator,
int  externalIndex 
)
virtual

◆ affectsLeftBorder()

bool dw::oof::OOFPositionedMgr::affectsLeftBorder ( core::Widget widget)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 343 of file oofpositionedmgr.cc.

◆ affectsRightBorder()

bool dw::oof::OOFPositionedMgr::affectsRightBorder ( core::Widget widget)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 348 of file oofpositionedmgr.cc.

◆ allChildrenConsideredForExtremes()

bool dw::oof::OOFPositionedMgr::allChildrenConsideredForExtremes ( )
protected

Definition at line 395 of file oofpositionedmgr.cc.

References children.

Referenced by sizeAllocateEnd().

◆ allChildrenConsideredForSize()

bool dw::oof::OOFPositionedMgr::allChildrenConsideredForSize ( )
protected

Definition at line 387 of file oofpositionedmgr.cc.

References children.

Referenced by sizeAllocateEnd().

◆ containerMustAdjustExtraSpace()

bool dw::oof::OOFPositionedMgr::containerMustAdjustExtraSpace ( )
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 295 of file oofpositionedmgr.cc.

◆ containerSizeChangedForChildren()

void dw::oof::OOFPositionedMgr::containerSizeChangedForChildren ( )
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 161 of file oofpositionedmgr.cc.

References children, DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.

◆ dealingWithSizeOfChild()

bool dw::oof::OOFPositionedMgr::dealingWithSizeOfChild ( core::Widget child)
virtual

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

Definition at line 358 of file oofpositionedmgr.cc.

◆ doChildrenExceedContainer()

◆ draw()

◆ generatorPosDefined()

bool dw::oof::OOFPositionedMgr::generatorPosDefined ( Child child)
inlineprotected

◆ generatorPosX()

◆ generatorPosY()

◆ getClearPosition()

int dw::oof::OOFPositionedMgr::getClearPosition ( OOFAwareWidget widget)
virtual

Return value is relative to the calling generator (not container).

Implements dw::oof::OutOfFlowMgr.

Definition at line 338 of file oofpositionedmgr.cc.

◆ getLeftBorder()

int dw::oof::OOFPositionedMgr::getLeftBorder ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ getLeftFloatHeight()

int dw::oof::OOFPositionedMgr::getLeftFloatHeight ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ getNumWidgets()

int dw::oof::OOFPositionedMgr::getNumWidgets ( )
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 363 of file oofpositionedmgr.cc.

References children.

◆ getPosBorder()

bool dw::oof::OOFPositionedMgr::getPosBorder ( core::style::Length  cssValue,
int  refLength,
int *  result 
)
protected

◆ getPosBottom()

bool dw::oof::OOFPositionedMgr::getPosBottom ( core::Widget child,
int  availHeight,
int *  result 
)
inlineprotected

◆ getPosLeft()

bool dw::oof::OOFPositionedMgr::getPosLeft ( core::Widget child,
int  availWidth,
int *  result 
)
inlineprotected

◆ getPosRight()

bool dw::oof::OOFPositionedMgr::getPosRight ( core::Widget child,
int  availWidth,
int *  result 
)
inlineprotected

◆ getPosTop()

bool dw::oof::OOFPositionedMgr::getPosTop ( core::Widget child,
int  availHeight,
int *  result 
)
inlineprotected

◆ getRightBorder()

int dw::oof::OOFPositionedMgr::getRightBorder ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ getRightFloatHeight()

int dw::oof::OOFPositionedMgr::getRightFloatHeight ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ getWidget()

Widget * dw::oof::OOFPositionedMgr::getWidget ( int  i)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 368 of file oofpositionedmgr.cc.

References children.

◆ getWidgetAtPoint()

◆ hasFloatLeft()

bool dw::oof::OOFPositionedMgr::hasFloatLeft ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ hasFloatRight()

bool dw::oof::OOFPositionedMgr::hasFloatRight ( int  y,
int  h,
OOFAwareWidget lastGen,
int  lastExtIndex 
)
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.

◆ markExtremesChange()

void dw::oof::OOFPositionedMgr::markExtremesChange ( int  ref)
virtual

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

Definition at line 236 of file oofpositionedmgr.cc.

◆ markSizeChange()

void dw::oof::OOFPositionedMgr::markSizeChange ( int  ref)
virtual

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

Definition at line 231 of file oofpositionedmgr.cc.

◆ mayAffectBordersAtAll()

bool dw::oof::OOFPositionedMgr::mayAffectBordersAtAll ( )
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 353 of file oofpositionedmgr.cc.

◆ moveExternalIndices()

void dw::oof::OOFPositionedMgr::moveExternalIndices ( OOFAwareWidget generator,
int  oldStartIndex,
int  diff 
)
virtual

◆ posXAbsolute()

virtual bool dw::oof::OOFPositionedMgr::posXAbsolute ( Child child)
protectedpure virtual

Implemented in dw::oof::OOFPosAbsLikeMgr, and dw::oof::OOFPosRelMgr.

Referenced by posXDefined().

◆ posXDefined()

bool dw::oof::OOFPositionedMgr::posXDefined ( Child child)
inlineprotected

◆ posYAbsolute()

virtual bool dw::oof::OOFPositionedMgr::posYAbsolute ( Child child)
protectedpure virtual

Implemented in dw::oof::OOFPosAbsLikeMgr, and dw::oof::OOFPosRelMgr.

Referenced by posYDefined().

◆ posYDefined()

bool dw::oof::OOFPositionedMgr::posYDefined ( Child child)
inlineprotected

◆ sizeAllocateChildren()

virtual void dw::oof::OOFPositionedMgr::sizeAllocateChildren ( )
protectedpure virtual

◆ sizeAllocateEnd()

◆ sizeAllocateStart()

◆ tellIncompletePosition1()

void dw::oof::OOFPositionedMgr::tellIncompletePosition1 ( core::Widget generator,
core::Widget widget,
int  x,
int  y 
)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 283 of file oofpositionedmgr.cc.

◆ tellIncompletePosition2()

void dw::oof::OOFPositionedMgr::tellIncompletePosition2 ( core::Widget generator,
core::Widget widget,
int  x,
int  y 
)
virtual

Implements dw::oof::OutOfFlowMgr.

Definition at line 289 of file oofpositionedmgr.cc.

◆ tellPosition1()

void dw::oof::OOFPositionedMgr::tellPosition1 ( core::Widget widget,
int  x,
int  y 
)
virtual

Called before tellPosition2, see there for more.

Implements dw::oof::OutOfFlowMgr.

Definition at line 261 of file oofpositionedmgr.cc.

◆ tellPosition2()

void dw::oof::OOFPositionedMgr::tellPosition2 ( core::Widget widget,
int  x,
int  y 
)
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.

Member Data Documentation

◆ children

◆ childrenByWidget

lout::container::typed::HashTable<lout::object::TypedPointer <dw::core::Widget>, Child>* dw::oof::OOFPositionedMgr::childrenByWidget
protected

◆ container

◆ containerAllocation

◆ []

enum { ... } dw::oof::OOFPositionedMgr::containerAllocationState

The documentation for this class was generated from the following files: