Mana
|
This class describes the formatting of a widget in the cell of a layout table. More...
#include <layout.h>
Public Types | |
enum | Alignment { LEFT , RIGHT , CENTER , FILL } |
Public Member Functions | |
LayoutCell ()=default | |
~LayoutCell () | |
LayoutCell (LayoutCell const &)=delete | |
LayoutCell & | operator= (LayoutCell const &)=delete |
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 | |
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 = NONE | |
Friends | |
class | Layout |
class | LayoutArray |
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.
|
default |
LayoutCell::~LayoutCell | ( | ) |
Definition at line 38 of file layout.cpp.
|
delete |
|
inline |
void LayoutCell::computeSizes | ( | ) |
Sets the minimum widths and heights of this cell and of all the inner cells.
Definition at line 72 of file layout.cpp.
|
inline |
|
private |
Returns the embedded array.
Creates it if the cell does not contain anything yet. Aborts if it contains a widget.
Definition at line 44 of file layout.cpp.
|
inline |
|
delete |
|
inline |
|
private |
Definition at line 59 of file layout.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
union { ... } LayoutCell |
LayoutArray* LayoutCell::mArray |