Public Member Functions

glv::Table Class Reference

Table class for doing rectangular layouts. More...

#include <glv_layout.h>

Inheritance diagram for glv::Table:
glv::Group glv::View glv::DataModel glv::Notifier glv::SmartObject< View >

List of all members.

Public Member Functions

 Table (const char *arrangement, space_t padX=4, space_t padY=4, const Rect &r=Rect(0))
Tablearrange ()
 Arrange child Views according to cell arrangement specification.
Tablearrangement (const char *v)
 Set table cell arrangement.
const std::string & arrangement () const
 Get arrangement string.
virtual const char * className () const
 Get class name.
virtual void onDraw (GLV &g)
 Drawing callback.

Detailed Description

Table class for doing rectangular layouts.


Constructor & Destructor Documentation

glv::Table::Table ( const char *  arrangement,
space_t  padX = 4,
space_t  padY = 4,
const Rect r = Rect(0) 
)
Parameters:
[in] arrangement Arrangement string (see arrangement())
[in] padX Padding in x-direction between cells
[in] padY Padding in y-direction between cells
[in] r Geometry

Member Function Documentation

Table & glv::Table::arrange (  ) 

Arrange child Views according to cell arrangement specification.

If there are more children than the arrangement accounts for, then the arrangement string will copied the appropriate number of times.

Table & glv::Table::arrangement ( const char *  v  ) 

Set table cell arrangement.

The arrangement string specifies where Views will lie in the table, the alignment within each cell, and how cells should span multiple columns and/or rows. The string cell alignment characters are:

	///	p ^ q     top-left     top-center     top-right
	///	< x >     center-left  center-center  center-right
	///	b v d     bottom-left  bottom-center  bottom-right 

The string layout characters are:

	/// .         empty region
	/// -         span first leftward neighboring element rightward
	/// |         span first upward neighboring element downward
	/// ,         end of row 

Views added as children will fill in the cells with an alignment specification starting at the top-left cell and then proceeding column-by-column, row-by-row.

The alignment code will set the View's anchor factors.


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