LayoutCell Class Reference
#include <layout.h>
List of all members.
Detailed Description
This class describes the formatting of a widget in the cell of a layout table.
Horizontally, a widget can either fill the width of the cell (minus the cell padding), or it can retain its size and be flushed left, or flush right, or centered in the cell. The process is similar for the vertical alignment, except that top is represented by LEFT and bottom by RIGHT.
Definition at line 161 of file layout.h.
|
Public Types |
enum | Alignment { LEFT,
RIGHT,
CENTER,
FILL
} |
Public Member Functions |
| LayoutCell () |
| ~LayoutCell () |
LayoutCell & | setPadding (int p) |
| Sets the padding around the cell content.
|
LayoutCell & | setHAlign (Alignment a) |
| Sets the horizontal alignment of the cell content.
|
LayoutCell & | setVAlign (Alignment a) |
| Sets the vertical alignment of the cell content.
|
LayoutCell & | at (int x, int y) |
LayoutCell & | place (gcn::Widget *wg, int x, int y, int w=1, int h=1) |
void | matchColWidth (int n1, int n2) |
void | setColWidth (int n, int w) |
void | setRowHeight (int n, int h) |
void | extend (int x, int y, int w, int h) |
void | computeSizes () |
| Sets the minimum widths and heights of this cell and of all the inner cells.
|
Private Types |
enum | { NONE,
WIDGET,
ARRAY
} |
Private Member Functions |
| LayoutCell (LayoutCell const &) |
LayoutCell & | operator= (LayoutCell const &) |
LayoutArray & | getArray () |
| Returns the embedded array.
|
void | reflow (int nx, int ny, int nw, int nh) |
Private Attributes |
union { |
gcn::Widget * mWidget |
LayoutArray * mArray |
}; | |
short | mSize [2] |
char | mPadding |
char | mExtent [2] |
char | mAlign [2] |
char | mNbFill [2] |
char | mType |
Friends |
class | Layout |
class | LayoutArray |
Member Enumeration Documentation
Constructor & Destructor Documentation
LayoutCell::LayoutCell |
( |
|
) |
[inline] |
LayoutCell::~LayoutCell |
( |
|
) |
|
LayoutCell::LayoutCell |
( |
LayoutCell const & |
|
) |
[private] |
Member Function Documentation
LayoutCell& LayoutCell::setPadding |
( |
int |
p |
) |
[inline] |
Sets the padding around the cell content.
Definition at line 180 of file layout.h.
Sets the horizontal alignment of the cell content.
Definition at line 186 of file layout.h.
Sets the vertical alignment of the cell content.
Definition at line 192 of file layout.h.
LayoutCell& LayoutCell::at |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [inline] |
LayoutCell& LayoutCell::place |
( |
gcn::Widget * |
wg, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w = 1 , |
|
|
int |
h = 1 | |
|
) |
| | [inline] |
void LayoutCell::matchColWidth |
( |
int |
n1, |
|
|
int |
n2 | |
|
) |
| | [inline] |
void LayoutCell::setColWidth |
( |
int |
n, |
|
|
int |
w | |
|
) |
| | [inline] |
void LayoutCell::setRowHeight |
( |
int |
n, |
|
|
int |
h | |
|
) |
| | [inline] |
void LayoutCell::extend |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h | |
|
) |
| | [inline] |
void LayoutCell::computeSizes |
( |
|
) |
|
Sets the minimum widths and heights of this cell and of all the inner cells.
Definition at line 70 of file layout.cpp.
Returns the embedded array.
Creates it if the cell does not contain anything yet. Aborts if it contains a widget.
Definition at line 43 of file layout.cpp.
void LayoutCell::reflow |
( |
int |
nx, |
|
|
int |
ny, |
|
|
int |
nw, |
|
|
int |
nh | |
|
) |
| | [private] |
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files: