csFlowLayout Class Reference
[Layouting]
In a flow layout components are displayed in a row and wraped at parents boundaries.
More...
#include <csflwlay.h>
Inheritance diagram for csFlowLayout:

Public Types | |
enum | ALIGNMNET_ENUM { CENTER = 0 } |
Public Methods | |
csFlowLayout (csComponent *pParent) | |
Create a flow layout. | |
int | GetAlignment () |
Get the aligning of components that dont fill the canvas width. | |
int | GetHgap () |
Get the horizontal gap between components. | |
int | GetVgap () |
Get the vertical gap between components. | |
void | SetAlignment (int align) |
Set the aligning of components that dont fill the canvas width. | |
void | SetHgap (int hgap) |
Set the horizontal gap between components. | |
void | SetVgap (int vgap) |
Set the vertical gap between components. | |
virtual void | SuggestSize (int &sugw, int &sugh) |
return best size for this layout | |
virtual void | LayoutContainer () |
recalc positions and sizes of components |
Detailed Description
In a flow layout components are displayed in a row and wraped at parents boundaries.Sample:
csFlowLayout *flow = new csFlowLayout (wnd); wnd->SendCommand (cscmdWindowSetClient, (void*)flow); for (int k=0; k<10; k++) { char tt[20]; sprintf (tt, "t d", k); csButton *b= new csButton (flow, 7000+k); b->SetPos (k*20, 20); b->SetSuggestedSize (0, 0); b->SetText (tt); } csWindow *wnd = new csWindow (theApp, "FlowLayout", CSWS_DEFAULTVALUE & ~CSWS_MENUBAR); wnd->SetSize (400, 300); wnd->Center (); wnd->Select ();
Definition at line 59 of file csflwlay.h.
Member Enumeration Documentation
|
Definition at line 98 of file csflwlay.h. |
Constructor & Destructor Documentation
|
Create a flow layout. The default aligning is CENTER. The default horizontal and vertical gap between components is 0. |
Member Function Documentation
|
Get the aligning of components that dont fill the canvas width.
|
|
Get the horizontal gap between components.
|
|
Get the vertical gap between components.
|
|
recalc positions and sizes of components
Implements csLayout. |
|
Set the aligning of components that dont fill the canvas width.
|
|
Set the horizontal gap between components.
|
|
Set the vertical gap between components.
|
|
return best size for this layout
Implements csLayout. |
The documentation for this class was generated from the following file:
- csws/csflwlay.h
Generated for Crystal Space by doxygen 1.2.18