[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LTableGeometry



Overview:

LTableGeometry is an abstract PowerPlant class that specifies the interface for the geometry helper objects. These functions provide behaviors to maintain the location, width, and height of each cell in a table.

Methods :

The methods in this class are:

 

LTableGeometry()  
~LTableGeometry()  
GetColHitBy()  
GetColWidth()  
GetImageCellBounds()  
GetRowHeight()  
GetRowHitBy()  
GetTableDimensions()  
InsertCols()  
InsertRows()  
RemoveCols()  
RemoveRows()  
SetColWidth()  
SetRowHeight()  

Data Members:

The data members in this class are:

 

mTableView  
 

Operation:

All the methods in this class are either pure virtual or empty. These methods form the basis for interacting with a table's geometry in PowerPlant. Most of the time you will not need to concern yourself with these methods. The PowerPlant table classes call these methods to get or set required data. In general, you should call the table methods, not the related geometry methods.

Source files:

(Table Classes)

UTableHelpers.h

LTableGeometry()

Purpose:

The constructor creates an object.

Access :

Public

Prototype:

LTableGeometry();

~LTableGeometry()

Purpose:

The destructor destroys the object.

Access :

Virtual, Public

Prototype:

virtual			~LTableGeometry();

GetColHitBy()

Purpose:

Returns the index of a column that contains a point.

Access :

Pure Virtual, Public

Prototype:

virtual TableIndexT	GetColHitBy(

	const SPoint32	&inImagePt )

	const = 0;
Parameters:

This method has the following parameters:

 

SPoint32&  
inImagePt  
A reference to the point.  

Return:

Returns the index for the table column containing the point.

GetColWidth()

Purpose:

Retrieve the column width for a specified column.

Access :

Pure Virtual, Public

Prototype:

virtual UInt16		GetColWidth(

	TableIndexT	inCol ) const = 0;
Parameters:

This method has the following parameters:

 

TableIndexT&  
inCol  
A reference to the column.  

Return:

The column.

GetImageCellBounds()

Purpose:

Provides bounds of cell in image coordinates.

Access :

Pure Virtual, Public

Prototype:

virtual void		GetImageCellBounds(

	const STableCell	&inCell,

	SInt32				&outLeft,

	SInt32				&outTop,

	SInt32				&outRight,

	SInt32				&outBottom ) const = 0;
Parameters:

This method has the following parameters:

 

STableCell&  
inCell  
A reference to the cell.  
SInt32  
outLeft  
The left coordinate.  
SInt32  
outTop  
The top coordinate.  
SInt32  
outRight  
The right coordinate.  
SInt32  
outBottom  
The bottom coordinate.  

Return:

None

GetRowHeight()

Purpose:

Determine the row height.

Access :

Pure Virtual, Public

Prototype:

virtual UInt16		GetRowHeight(

	TableIndexT	inRow ) const = 0;
Parameters:

This method has the following parameters:

 

TableIndexT&  
inRow  
A reference to the row.  

Return:

The row height.

GetRowHitBy()

Purpose:

Returns the index of a row that contains a point.

Access :

Pure Virtual, Public

Prototype:

virtual TableIndexT	GetRowHitBy(

	const SPoint32	&inImagePt) const = 0;
Parameters:

This method has the following parameters:

 

SPoint32&  
inImagePt  
A reference to the point.  

Return:

The row index.

GetTableDimensions()

Purpose:

Determine the dimensions of the table.

Access :

Pure Virtual, Public

Prototype:

virtual void		GetTableDimensions(

	UInt32		&outWidth,

	UInt32		&outHeight ) const = 0;
Parameters:

This method has the following parameters:

 

UInt32&  
outWidth  
A reference to the width.  
UInt32&  
outHeight  
A reference to the height.  

Return:

None

InsertCols()

Purpose:

Insert columns after a specified column.

Access :

Pure Virtual, Public

Prototype:

virtual void		InsertCols(

	UInt32		 inHowMany,

	TableIndexT	 inAfterCol);
Parameters:

This method has the following parameters:

 

UInt32  
inHowMany  
The number of columns.  
TableIndexT  
inAfterCol  
The column index to insert after.  

Return:

None

InsertRows()

Purpose:

Insert rows after a given row.

Access :

Pure Virtual, Public

Prototype:

virtual void		InsertRows(

	UInt32		 inHowMany,

	TableIndexT	 inAfterRow );
Parameters:

This method has the following parameters:

 

UInt32  
inHowMany  
The number of columns.  
TableIndexT  
inAfterRow  
The row index to insert after.  

Return:

None

RemoveCols()

Purpose:

Remove columns after a specified starting column.

Access :

Pure Virtual, Public

Prototype:

virtual void		RemoveCols(

	UInt32		inHowMany,

	TableIndexT	inFromCol);
Parameters:

This method has the following parameters:

 

UInt32  
inHowMany  
The number of columns.  
TableIndexT  
inFromCol  
The column index to start removal after.  

Return:

None

RemoveRows()

Purpose:

The row to start removal at.

Access :

Pure Virtual, Public

Prototype:

virtual void		RemoveRows(

	UInt32		inHowMany,

	TableIndexT	inFromRow);
Parameters:

This method has the following parameters:

 

UInt32  
inHowMany  
The number of columns.  
TableIndexT  
inFromRow  
The row index to start removal after.  

Return:

None

SetColWidth()

Purpose:

Set the width of a range of columns.

Access :

Pure Virtual, Public

Prototype:

virtual void		SetColWidth(

	UInt16		inWidth,

	TableIndexT inFromCol,

	TableIndexT	inToCol) = 0;
Parameters:

This method has the following parameters:

 

UInt16  
inWidth  
The width of the columns.  
TableIndexT  
inFromCol  
The starting column.  
TableIndexT  
inToCol  
The ending column.  

Return:

None

SetRowHeight()

Purpose:

Set the height on a range of rows.

Access :

Pure Virtual, Public

Prototype:

virtual void		SetRowHeight(

	UInt16		inHeight,

	TableIndexT	inFromRow,

	TableIndexT	inToRow) = 0;
Parameters:

This method has the following parameters:

 

UInt16  
inWidth  
The height of the rows.  
TableIndexT  
inFromRow  
The starting row.  
TableIndexT  
inToRow  
The ending row.  

Return:

None

mTableView

Purpose:

The pointer to the table that owns this helper object.

Access :

Protected

Prototype:

LTableView *mTableView;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000