![]() |
Public API Reference |
#include <csflwlay.h>
Inheritance diagram for csFlowLayout:
Public Types | |
enum | ALIGNMNET_ENUM { CENTER = 0 } |
Public Methods | |
csFlowLayout (csComponent *pParent) | |
Create a flow layout. More... | |
int | GetAlignment () |
Get the aligning of components that dont fill the canvas width. More... | |
int | GetHgap () |
Get the horizontal gap between components. More... | |
int | GetVgap () |
Get the vertical gap between components. More... | |
void | SetAlignment (int align) |
Set the aligning of components that dont fill the canvas width. More... | |
void | SetHgap (int hgap) |
Set the horizontal gap between components. More... | |
void | SetVgap (int vgap) |
Set the vertical gap between components. More... | |
virtual void | SuggestSize (int &sugw, int &sugh) |
return best size for this layout. More... | |
virtual void | LayoutContainer () |
recalc positions and sizes of components. More... |
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 57 of file csflwlay.h.
|
Definition at line 96 of file csflwlay.h. |
|
Create a flow layout. The default aligning is CENTER. The default horizontal and vertical gap between components is 0. |
|
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. |