![]() |
Public API Reference |
#include <cslayout.h>
Inheritance diagram for csLayout:
Public Methods | |
virtual csLayoutConstraint * | AddLayoutComponent (csComponent *comp) |
A components is added to a layout by creating it and passing the layout component as its parent component. More... | |
virtual void | RemoveLayoutComponent (csComponent *comp) |
remove a component from the layout. More... | |
virtual void | SuggestSize (int &sugw, int &sugh)=0 |
return best size for this layout. More... | |
virtual void | LayoutContainer ()=0 |
recalc positions and sizes of components. More... | |
virtual void | InvalidateLayout () |
make sure next time the layout is drawn the components are layed out first. More... | |
virtual int | GetLayoutingPhase () |
return current phase of layouting. More... | |
virtual void | SetLayoutingPhase (int phase) |
set current phase of layouting. More... | |
virtual csPoint | GetPhase0Size () |
save size of first phase for later reference. More... | |
virtual bool | TwoPhaseLayoutingEnabled () |
is the two phase layouting enabled ? More... | |
virtual void | Insert (csComponent *child) |
new impl. for csComponent. More... | |
virtual bool | HandleEvent (iEvent &Event) |
Handle input events. More... | |
virtual void | Draw () |
Draw the component (only dirty rectangle should be redrawn). More... | |
virtual bool | SetRect (int xmin, int ymin, int xmax, int ymax) |
Do auto-placement work if enabled. More... | |
virtual void | FixSize (int &newWidth, int &newHeight) |
Fix dialog size when resizing. More... | |
Static Public Methods | |
void | SetTwoPhaseLayoutingGlobally (bool on) |
enable or disable 2 phase layouting. More... | |
Public Attributes | |
csRect | insets |
preserve space at the 4 borders of a layout. More... | |
csLayoutConstraint | c |
Here we have the constraint a components will be layout with. More... | |
Protected Attributes | |
bool | bRecalcLayout |
do we need to recalc the positions and sizes of placed components ? More... | |
csConstraintVector | vConstraints |
collect all constraints here. More... | |
csLayoutConstraint * | lc |
a pointer to the current constraint. More... | |
Static Protected Attributes | |
bool | mUseTwoPhaseLayoutingGlobally |
A shortcoming of the original java layouts is that components are asked for its preferred size without knowing at what size its parent component will be layout in the end. More... |
Definition at line 110 of file cslayout.h.
|
A components is added to a layout by creating it and passing the layout component as its parent component. If you insist of doing some voodoo you should use AddLayoutComponent to add it to the layout. IN: the component to add OUT: the constraint that is used to layout the component (a copy of variable c see above) Reimplemented in csBorderLayout. |
|
Draw the component (only dirty rectangle should be redrawn).
Reimplemented from csComponent. |
|
Fix dialog size when resizing.
Reimplemented from csDialog. |
|
return current phase of layouting.
|
|
save size of first phase for later reference.
|
|
Handle input events.
Reimplemented from csDialog. |
|
new impl. for csComponent.
Reimplemented from csComponent. |
|
make sure next time the layout is drawn the components are layed out first.
|
|
recalc positions and sizes of components.
Implemented in csAbsoluteLayout. |
|
remove a component from the layout.
Reimplemented in csGridBagLayout. |
|
set current phase of layouting.
|
|
Do auto-placement work if enabled.
Reimplemented from csDialog. |
|
enable or disable 2 phase layouting.
|
|
return best size for this layout.
Reimplemented from csDialog. Implemented in csAbsoluteLayout. |
|
is the two phase layouting enabled ?
|
|
do we need to recalc the positions and sizes of placed components ?
Definition at line 122 of file cslayout.h. |
|
Here we have the constraint a components will be layout with. When a component is added a copy of this will be made and attached to the component. Reimplemented in csGridBagLayout. Definition at line 137 of file cslayout.h. |
|
preserve space at the 4 borders of a layout.
Definition at line 130 of file cslayout.h. |
|
a pointer to the current constraint.
Definition at line 126 of file cslayout.h. |
|
A shortcoming of the original java layouts is that components are asked for its preferred size without knowing at what size its parent component will be layout in the end. So the two phase layout is an attempt to overcome this. Currently only FlowLayout uses this. Definition at line 119 of file cslayout.h. |
|
collect all constraints here.
Definition at line 124 of file cslayout.h. |