|
Main Page Class Hierarchy Compound List File List Compound Members
csFlowLayout Class ReferenceIn a flow layout components are displayed in a row and wraped at parents boundaries.
More...
#include <csflwlay.h>
Inheritance diagram for csFlowLayout:
List of all members.
Public Types |
enum | ALIGNMNET_ENUM {
CENTER = 0,
LEFT = 1,
RIGHT = 2,
LEADING = LEFT,
TRAILING = RIGHT
} |
Public Methods |
| csFlowLayout (csComponent *pParent) |
| Create a flow layout. More...
|
| csFlowLayout (csComponent *pParent, int align) |
| csFlowLayout (csComponent *pParent, int align, int hgap, int vgap) |
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.
|
Protected Attributes |
int | mAlign |
int | mHgap |
int | mVgap |
csPoint | mPrefDimOfPhase1 |
Detailed Description
In a flow layout components are displayed in a row and wraped at parents boundaries.
Sample:
csWindow *wnd = new csWindow (theApp, "FlowLayout", CSWS_DEFAULTVALUE & ~CSWS_MENUBAR); wnd->SetSize (400, 300); wnd->Center (); wnd->Select ();
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); }
Member Enumeration Documentation
enum csFlowLayout::ALIGNMNET_ENUM
|
|
|
-
Enumeration values:
-
CENTER
|
If the last row of components do not fill the entire width of the layout then they are aligned either left or right or they are centered. |
|
Constructor & Destructor Documentation
|
Create a flow layout.
The default aligning is CENTER. The default horizontal and vertical gap between components is 0. |
The documentation for this class was generated from the following file:
Generated for Crystal Space by
doxygen
1.2.5 written by
Dimitri van Heesch,
©1997-2000
|