Dillo
outofflowmgr.hh
Go to the documentation of this file.
1 #ifndef __DW_OUTOFFLOWMGR_HH__
2 #define __DW_OUTOFFLOWMGR_HH__
3 
4 #include "core.hh"
5 
6 namespace dw {
7 
11 namespace oof {
12 
13 class OOFAwareWidget;
14 
19 {
20 public:
21  OutOfFlowMgr ();
22  virtual ~OutOfFlowMgr ();
23 
24  virtual void sizeAllocateStart (OOFAwareWidget *caller,
25  core::Allocation *allocation) = 0;
26  virtual void sizeAllocateEnd (OOFAwareWidget *caller) = 0;
27  virtual void containerSizeChangedForChildren () = 0;
28  virtual void draw (core::View *view, core::Rectangle *area,
29  core::DrawingContext *context) = 0;
30 
31  virtual void markSizeChange (int ref) = 0;
32  virtual void markExtremesChange (int ref) = 0;
33  virtual core::Widget *getWidgetAtPoint (int x, int y,
35  *context) = 0;
36 
37  virtual void addWidgetInFlow (OOFAwareWidget *widget,
38  OOFAwareWidget *parent, int externalIndex) = 0;
39  virtual int addWidgetOOF (core::Widget *widget, OOFAwareWidget *generator,
40  int externalIndex) = 0;
41  virtual void calcWidgetRefSize (core::Widget *widget,
42  core::Requisition *size) = 0;
43  virtual void moveExternalIndices (OOFAwareWidget *generator,
44  int oldStartIndex, int diff) = 0;
45 
49  virtual void tellPosition1 (core::Widget *widget, int x, int y) = 0;
50 
57  virtual void tellPosition2 (core::Widget *widget, int x, int y) = 0;
58 
59  virtual void tellIncompletePosition1 (core::Widget *generator,
60  core::Widget *widget, int x, int y)
61  = 0;
62  virtual void tellIncompletePosition2 (core::Widget *generator,
63  core::Widget *widget, int x, int y)
64  = 0;
65 
66  virtual void getSize (core::Requisition *containerReq, int *oofWidth,
67  int *oofHeight) = 0;
68  virtual bool containerMustAdjustExtraSpace ()= 0;
69  virtual void getExtremes (core::Extremes *containerExtr, int *oofMinWidth,
70  int *oofMaxWidth) = 0;
71 
80  virtual int getLeftBorder (int y, int h, OOFAwareWidget *lastGen,
81  int lastExtIndex) = 0;
82 
89  virtual int getRightBorder (int y, int h, OOFAwareWidget *lastGen,
90  int lastExtIndex) = 0;
91 
98  virtual bool hasFloatLeft (int y, int h, OOFAwareWidget *lastGen,
99  int lastExtIndex) = 0;
100 
107  virtual bool hasFloatRight (int y, int h, OOFAwareWidget *lastGen,
108  int lastExtIndex) = 0;
109 
116  virtual int getLeftFloatHeight (int y, int h, OOFAwareWidget *lastGen,
117  int lastExtIndex) = 0;
118 
125  virtual int getRightFloatHeight (int y, int h, OOFAwareWidget *lastGen,
126  int lastExtIndex) = 0;
127 
128  virtual bool affectsLeftBorder (core::Widget *widget) = 0;
129  virtual bool affectsRightBorder (core::Widget *widget) = 0;
130  virtual bool mayAffectBordersAtAll () = 0;
131 
135  virtual int getClearPosition (OOFAwareWidget *widget) = 0;
136 
137  virtual bool dealingWithSizeOfChild (core::Widget *child) = 0;
138  virtual int getAvailWidthOfChild (core::Widget *child, bool forceValue) = 0;
139  virtual int getAvailHeightOfChild (core::Widget *child, bool forceValue) = 0;
140 
141  // for iterators
142  virtual int getNumWidgets () = 0;
143  virtual core::Widget *getWidget (int i) = 0;
144 };
145 
146 } // namespace oof
147 
148 } // namespace dw
149 
150 #endif // __DW_OUTOFFLOWMGR_HH__
virtual void markExtremesChange(int ref)=0
Set at the top when getting the widget at the point.
Definition: types.hh:312
virtual void containerSizeChangedForChildren()=0
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
virtual int addWidgetOOF(core::Widget *widget, OOFAwareWidget *generator, int externalIndex)=0
virtual bool affectsLeftBorder(core::Widget *widget)=0
virtual core::Widget * getWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)=0
virtual void tellPosition1(core::Widget *widget, int x, int y)=0
Called before tellPosition2, see there for more.
virtual int getRightFloatHeight(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
virtual bool mayAffectBordersAtAll()=0
virtual void getExtremes(core::Extremes *containerExtr, int *oofMinWidth, int *oofMaxWidth)=0
virtual ~OutOfFlowMgr()
Definition: outofflowmgr.cc:34
virtual bool containerMustAdjustExtraSpace()=0
virtual void sizeAllocateStart(OOFAwareWidget *caller, core::Allocation *allocation)=0
virtual int getClearPosition(OOFAwareWidget *widget)=0
virtual void tellIncompletePosition2(core::Widget *generator, core::Widget *widget, int x, int y)=0
virtual void addWidgetInFlow(OOFAwareWidget *widget, OOFAwareWidget *parent, int externalIndex)=0
Definition: types.hh:172
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
virtual bool hasFloatLeft(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
The base class of all dillo widgets.
Definition: widget.hh:23
Set at the top when drawing.
Definition: types.hh:294
Represents additional data for OOF containers.
Definition: outofflowmgr.hh:18
virtual void draw(core::View *view, core::Rectangle *area, core::DrawingContext *context)=0
virtual core::Widget * getWidget(int i)=0
virtual bool affectsRightBorder(core::Widget *widget)=0
Definition: types.hh:179
Base class for widgets which can act as container and generator for widgets out of flow...
Definition: oofawarewidget.hh:77
virtual int getAvailHeightOfChild(core::Widget *child, bool forceValue)=0
virtual void moveExternalIndices(OOFAwareWidget *generator, int oldStartIndex, int diff)=0
virtual void sizeAllocateEnd(OOFAwareWidget *caller)=0
virtual int getLeftBorder(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
virtual void markSizeChange(int ref)=0
virtual int getNumWidgets()=0
virtual void getSize(core::Requisition *containerReq, int *oofWidth, int *oofHeight)=0
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
virtual void calcWidgetRefSize(core::Widget *widget, core::Requisition *size)=0
OutOfFlowMgr()
Definition: outofflowmgr.cc:30
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
virtual void tellIncompletePosition1(core::Widget *generator, core::Widget *widget, int x, int y)=0
virtual int getAvailWidthOfChild(core::Widget *child, bool forceValue)=0
virtual void tellPosition2(core::Widget *widget, int x, int y)=0
Called after tellPosition1.
virtual bool hasFloatRight(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
virtual int getLeftFloatHeight(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
virtual int getRightBorder(int y, int h, OOFAwareWidget *lastGen, int lastExtIndex)=0
virtual bool dealingWithSizeOfChild(core::Widget *child)=0