Layout Class Reference

#include <layout.h>

Inheritance diagram for Layout:

LayoutCell

List of all members.


Detailed Description

This class is an helper for setting the position of widgets.

They are positioned along the cells of some rectangular tables. The layout may either be a single table or a tree of nested tables.

The size of a given table column can either be set manually or be chosen from the widest widget of the column. An empty column has a AUTO_DEF width, which means it will be extended so that the layout fits its minimum width.

The process is similar for table rows. By default, there is a spacing of 4 pixels between rows and between columns, and a margin of 6 pixels around the whole layout.

Definition at line 286 of file layout.h.


Public Types

enum  { AUTO_DEF = -42, AUTO_SET = -43, AUTO_ADD = -44 }
 When the minimum size of the layout is less than the available size, the remaining pixels are equally split amongst the FILL items. More...

Public Member Functions

 Layout ()
void setMargin (int m)
 Sets the margin around the layout.
void reflow (int &nW, int &nH)
 Sets the positions of all the widgets.

Private Attributes

bool mComputed

Member Enumeration Documentation

anonymous enum

When the minimum size of the layout is less than the available size, the remaining pixels are equally split amongst the FILL items.

Enumerator:
AUTO_DEF  Default value, behaves like AUTO_ADD.

AUTO_SET  Uses the share as the new size.

AUTO_ADD  Adds the share to the current size.

Definition at line 308 of file layout.h.


Constructor & Destructor Documentation

Layout::Layout (  ) 

Definition at line 310 of file layout.cpp.


Member Function Documentation

void Layout::setMargin ( int  m  )  [inline]

Sets the margin around the layout.

Definition at line 295 of file layout.h.

void Layout::reflow ( int &  nW,
int &  nH 
)

Sets the positions of all the widgets.

See also:
LayoutArray::reflow

Definition at line 316 of file layout.cpp.


Member Data Documentation

bool Layout::mComputed [private]

Definition at line 317 of file layout.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5