Dillo
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
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. More...
 
void tellPosition2 (core::Widget *widget, int x, int y)
 Called after tellPosition1. More...
 
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)
 
int getRightBorder (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)
 
bool hasFloatLeft (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)
 
bool hasFloatRight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)
 
int getLeftFloatHeight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)
 
int getRightFloatHeight (int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)
 
int getClearPosition (OOFAwareWidget *widget)
 
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
 

Member Enumeration Documentation

anonymous enum
protected
Enumerator
NOT_ALLOCATED 
IN_ALLOCATION 
WAS_ALLOCATED 

Constructor & Destructor Documentation

dw::oof::OOFPositionedMgr::OOFPositionedMgr ( OOFAwareWidget container)
dw::oof::OOFPositionedMgr::~OOFPositionedMgr ( )

References DBG_OBJ_DELETE.

Member Function Documentation

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

Implements dw::oof::OutOfFlowMgr.

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

Implements dw::oof::OutOfFlowMgr.

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

Implements dw::oof::OutOfFlowMgr.

bool dw::oof::OOFPositionedMgr::allChildrenConsideredForExtremes ( )
protected
bool dw::oof::OOFPositionedMgr::allChildrenConsideredForSize ( )
protected
bool dw::oof::OOFPositionedMgr::containerMustAdjustExtraSpace ( )
virtual

Implements dw::oof::OutOfFlowMgr.

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

Implements dw::oof::OutOfFlowMgr.

References DBG_OBJ_ENTER0, and DBG_OBJ_LEAVE.

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

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

bool dw::oof::OOFPositionedMgr::doChildrenExceedContainer ( )
protected
void dw::oof::OOFPositionedMgr::draw ( core::View view,
core::Rectangle area,
core::DrawingContext context 
)
virtual
bool dw::oof::OOFPositionedMgr::generatorPosDefined ( Child child)
inlineprotected
int dw::oof::OOFPositionedMgr::generatorPosX ( Child child)
inlineprotected
int dw::oof::OOFPositionedMgr::generatorPosY ( Child child)
inlineprotected
int dw::oof::OOFPositionedMgr::getClearPosition ( OOFAwareWidget widget)
virtual

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

Implements dw::oof::OutOfFlowMgr.

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.

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.

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

Implements dw::oof::OutOfFlowMgr.

bool dw::oof::OOFPositionedMgr::getPosBorder ( core::style::Length  cssValue,
int  refLength,
int *  result 
)
protected
bool dw::oof::OOFPositionedMgr::getPosBottom ( core::Widget child,
int  availHeight,
int *  result 
)
inlineprotected
bool dw::oof::OOFPositionedMgr::getPosLeft ( core::Widget child,
int  availWidth,
int *  result 
)
inlineprotected
bool dw::oof::OOFPositionedMgr::getPosRight ( core::Widget child,
int  availWidth,
int *  result 
)
inlineprotected
bool dw::oof::OOFPositionedMgr::getPosTop ( core::Widget child,
int  availHeight,
int *  result 
)
inlineprotected
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.

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.

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

Implements dw::oof::OutOfFlowMgr.

Widget * dw::oof::OOFPositionedMgr::getWidgetAtPoint ( int  x,
int  y,
core::GettingWidgetAtPointContext context 
)
virtual
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.

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.

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

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

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

Implements dw::oof::OutOfFlowMgr.

Reimplemented in dw::oof::OOFPosRelMgr.

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

Implements dw::oof::OutOfFlowMgr.

void dw::oof::OOFPositionedMgr::moveExternalIndices ( OOFAwareWidget generator,
int  oldStartIndex,
int  diff 
)
virtual
virtual bool dw::oof::OOFPositionedMgr::posXAbsolute ( Child child)
protectedpure virtual

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

Referenced by posXDefined().

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

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

Referenced by posYDefined().

bool dw::oof::OOFPositionedMgr::posYDefined ( Child child)
inlineprotected
virtual void dw::oof::OOFPositionedMgr::sizeAllocateChildren ( )
protectedpure virtual
void dw::oof::OOFPositionedMgr::sizeAllocateEnd ( OOFAwareWidget caller)
virtual

Implements dw::oof::OutOfFlowMgr.

References DBG_OBJ_ENTER, and DBG_OBJ_LEAVE.

void dw::oof::OOFPositionedMgr::sizeAllocateStart ( OOFAwareWidget caller,
core::Allocation allocation 
)
virtual
void dw::oof::OOFPositionedMgr::tellIncompletePosition1 ( core::Widget generator,
core::Widget widget,
int  x,
int  y 
)
virtual

Implements dw::oof::OutOfFlowMgr.

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

Implements dw::oof::OutOfFlowMgr.

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

Called before tellPosition2, see there for more.

Implements dw::oof::OutOfFlowMgr.

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.

References 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

lout::container::typed::Vector<Child>* dw::oof::OOFPositionedMgr::children
protected
lout::container::typed::HashTable<lout::object::TypedPointer <dw::core::Widget>, Child>* dw::oof::OOFPositionedMgr::childrenByWidget
protected
OOFAwareWidget* dw::oof::OOFPositionedMgr::container
protected
core::Allocation dw::oof::OOFPositionedMgr::containerAllocation
protected
enum { ... } dw::oof::OOFPositionedMgr::containerAllocationState

Referenced by generatorPosDefined().


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