1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
#ifndef __DW_OOFPOSITIONEDMGR_HH__
#define __DW_OOFPOSITIONEDMGR_HH__
#include "outofflowmgr.hh"
namespace dw {
class OOFPositionedMgr: public OutOfFlowMgr
{
private:
Textblock *containingBlock;
core::Allocation containingBlockAllocation;
lout::container::typed::Vector<core::Widget> *children;
bool doChildrenExceedCB ();
bool haveExtremesChanged ();
void sizeAllocateChildren ();
inline int getPosLeft (core::Widget *child, int availWidth)
{ return getPosBorder (child->getStyle()->left, availWidth); }
inline int getPosRight (core::Widget *child, int availWidth)
{ return getPosBorder (child->getStyle()->right, availWidth); }
inline int getPosTop (core::Widget *child, int availHeight)
{ return getPosBorder (child->getStyle()->top, availHeight); }
inline int getPosBottom (core::Widget *child, int availHeight)
{ return getPosBorder (child->getStyle()->bottom, availHeight); }
int getPosBorder (core::style::Length cssValue, int refLength);
void calcPosAndSizeChildOfChild (core::Widget *child, int refWidth,
int refHeight, int *x, int *y, int *width,
int *ascent, int *descent);
public:
OOFPositionedMgr (Textblock *containingBlock);
~OOFPositionedMgr ();
void sizeAllocateStart (Textblock *caller, core::Allocation *allocation);
void sizeAllocateEnd (Textblock *caller);
void containerSizeChangedForChildren ();
void draw (core::View *view, core::Rectangle *area);
void markSizeChange (int ref);
void markExtremesChange (int ref);
core::Widget *getWidgetAtPoint (int x, int y, int level);
void addWidgetInFlow (Textblock *textblock, Textblock *parentBlock,
int externalIndex);
int addWidgetOOF (core::Widget *widget, Textblock *generatingBlock,
int externalIndex);
void moveExternalIndices (Textblock *generatingBlock, int oldStartIndex,
int diff);
void tellPosition (core::Widget *widget, int yReq);
void getSize (core::Requisition *cbReq, int *oofWidth, int *oofHeight);
void getExtremes (core::Extremes *cbExtr,
int *oofMinWidth, int *oofMaxWidth);
int getLeftBorder (Textblock *textblock, int y, int h, Textblock *lastGB,
int lastExtIndex);
int getRightBorder (Textblock *textblock, int y, int h, Textblock *lastGB,
int lastExtIndex);
bool hasFloatLeft (Textblock *textblock, int y, int h, Textblock *lastGB,
int lastExtIndex);
bool hasFloatRight (Textblock *textblock, int y, int h, Textblock *lastGB,
int lastExtIndex);
int getLeftFloatHeight (Textblock *textblock, int y, int h,
Textblock *lastGB, int lastExtIndex);
int getRightFloatHeight (Textblock *textblock, int y, int h,
Textblock *lastGB, int lastExtIndex);
int getClearPosition (Textblock *textblock);
bool affectsLeftBorder (core::Widget *widget);
bool affectsRightBorder (core::Widget *widget);
bool dealingWithSizeOfChild (core::Widget *child);
int getAvailWidthOfChild (core::Widget *child, bool forceValue);
int getAvailHeightOfChild (core::Widget *child, bool forceValue);
int getNumWidgets ();
core::Widget *getWidget (int i);
};
} // namespace dw
#endif // __DW_OOFPOSITIONEDMGR_HH__
|