1#ifndef __DW_OOFFLOATSMGR_HH__
2#define __DW_OOFFLOATSMGR_HH__
66 { this->oofm =
oofm; }
83 bool covers (
int y,
int h);
106 bool ownerOfObjects) :
108 { this->oofm =
oofm; this->side =
side; }
111 int find (
int y,
int start,
int end);
171 int oldStartIndex,
int diff);
215 {
return (index << 1) | 1; }
218 {
return ref != -1 && (ref & 1) == 0; }
220 {
return ref != -1 && (ref & 1) == 1; }
223 {
return ref == -1 ? ref : (ref >> 1); }
259 int *oofMinWidth,
int *oofMaxWidth);
Set at the top when drawing.
Set at the top when getting the widget at the point.
dw::core::Shape implemtation for simple rectangles.
An interface to encapsulate platform dependent drawing.
int compare(Object *o1, Object *o2)
Compare two objects o1 and o2.
CompareGBAndExtIndex(OOFFloatsMgr *oofm)
int compare(Object *o1, Object *o2)
Compare two objects o1 and o2.
int compare(Object *o1, Object *o2)
Compare two objects o1 and o2.
void intoStringBuffer(lout::misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
OOFAwareWidget * generator
bool covers(int y, int h)
y is given relative to the container.
This list is kept sorted.
int findFloatIndex(OOFAwareWidget *lastGB, int lastExtIndex)
SortedFloatsVector(OOFFloatsMgr *oofm, Side side, bool ownerOfObjects)
int findLastBeforeSideSpanningIndex(int sideSpanningIndex)
int find(int y, int start, int end)
y is given relative to the container.
lout::container::typed::Iterator< Float > iterator()
int findFirst(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex, int *lastReturn)
ComparePosition(int oofmIndex)
int compare(Object *o1, Object *o2)
Compare two objects o1 and o2.
lout::container::typed::Vector< Float > * rightFloats
OOFAwareWidget * getOOFAwareWidget()
lout::container::typed::Vector< Float > * leftFloats
OutOfFlowMgr implementation dealing with floats.
void getFloatsListsAndSide(Float *vloat, SortedFloatsVector **listSame, SortedFloatsVector **listOpp, Side *side)
core::Widget * getWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
bool hasFloat(Side side, int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
void moveExternalIndices(lout::container::typed::Vector< Float > *list, int oldStartIndex, int diff)
bool dealingWithSizeOfChild(core::Widget *child)
bool collidesV(Float *vloat, Float *other, int *yReal)
int getAvailHeightOfChild(core::Widget *child, bool forceValue)
static int getFloatIndexFromSubRef(int ref)
void getFloatsSize(core::Requisition *cbReq, Side side, int *width, int *height)
int getAvailWidthOfChild(core::Widget *child, bool forceValue)
int findTBInfo(int y)
y is given relative to the container.
core::Widget * getFloatWidgetAtPoint(SortedFloatsVector *list, int x, int y, core::GettingWidgetAtPointContext *context)
void tellIncompletePosition2(core::Widget *generator, core::Widget *widget, int x, int y)
int getRightFloatHeight(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Assuming there is a float on the right side, return the rest height of it.
bool isOOFAwareWidgetRegistered(OOFAwareWidget *widget)
void ensureFloatSize(Float *vloat)
void updateGenerators(Float *vloat)
Update all generators which are affected by a given float.
int getLeftBorder(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Get the left border for the vertical position of y, for a height of h", based on floats; relative to ...
bool collidesH(Float *vloat, Float *other)
void containerSizeChangedForChildren()
int getBorder(Side side, int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
core::Allocation containerAllocation
TBInfo * getOOFAwareWidget(OOFAwareWidget *widget)
lout::container::typed::Vector< TBInfo > * tbInfos
void tellPosition1(core::Widget *widget, int x, int y)
Called before tellPosition2, see there for more.
core::Widget * getWidget(int i)
bool containerMustAdjustExtraSpace()
bool hasFloatRight(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Return whether there is a float on the right side.
int getGBWidthForAllocation(Float *vloat)
void getExtremes(core::Extremes *cbExtr, int *oofMinWidth, int *oofMaxWidth)
bool affectsLeftBorder(core::Widget *widget)
static int createSubRefLeftFloat(int index)
void getFloatsExtremes(core::Extremes *cbExtr, Side side, int *minWidth, int *maxWidth)
void sizeAllocateEnd(OOFAwareWidget *caller)
void addWidgetInFlow(OOFAwareWidget *textblock, OOFAwareWidget *parentBlock, int externalIndex)
void calcWidgetRefSize(core::Widget *widget, core::Requisition *size)
static bool isSubRefLeftFloat(int ref)
void tellPosition2(core::Widget *widget, int x, int y)
Called after tellPosition1.
void draw(core::View *view, core::Rectangle *area, core::DrawingContext *context)
OOFAwareWidget * container
static int createSubRefRightFloat(int index)
lout::container::typed::HashTable< lout::object::TypedPointer< OOFAwareWidget >, TBInfo > * tbInfosByOOFAwareWidget
bool affectsRightBorder(core::Widget *widget)
void markSizeChange(int ref)
int calcFloatX(Float *vloat)
Return position of a float relative to the container.
int getRightBorder(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Get the right border for the vertical position of y, for a height of h, based on floats; relative to ...
void sizeAllocateFloats(Side side)
int getLeftFloatHeight(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Assuming there is a float on the left side, return the rest height of it.
Float * findFloatByWidget(core::Widget *widget)
int getClearPosition(OOFAwareWidget *widget, Side side)
lout::container::typed::HashTable< lout::object::TypedPointer< dw::core::Widget >, Float > * floatsByWidget
static bool isSubRefRightFloat(int ref)
TBInfo * getOOFAwareWidgetWhenRegistered(OOFAwareWidget *widget)
bool hasFloatLeft(int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
Return whether there is a float on the left side.
void markExtremesChange(int ref)
void getSize(core::Requisition *cbReq, int *oofWidth, int *oofHeight)
int getFloatHeight(Side side, int y, int h, OOFAwareWidget *lastGB, int lastExtIndex)
void tellIncompletePosition1(core::Widget *generator, core::Widget *widget, int x, int y)
int addWidgetOOF(core::Widget *widget, OOFAwareWidget *generatingBlock, int externalIndex)
void drawFloats(SortedFloatsVector *list, core::View *view, core::Rectangle *area, core::DrawingContext *context)
bool mayAffectBordersAtAll()
void sizeAllocateStart(OOFAwareWidget *caller, core::Allocation *allocation)
SortedFloatsVector * rightFloats
SortedFloatsVector * leftFloats
Represents additional data for OOF containers.
Typed version of container::untyped::HashTable.
Typed version of container::untyped::Iterator.
Typed version of container::untyped::Vector.
Vector(int initSize, bool ownerOfObjects)
A class for fast concatenation of a large number of strings.
Used for other orders as the one defined by Comparable.
This is the base class for many other classes, which defines very common virtual methods.
A typed version of object::Pointer.
Dw is in this namespace, or sub namespaces of this one.
Represents the allocation, i.e.