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

 

LTable



Overview:

LTable is a PowerPlant class that is used for display and managemnet of tabular data: rows and columns of rectangular cells in a two-dimensional grid.

Methods :

The methods in this class are:

 

LTable()  
~LTable()  
ActivateSelf()  
ClickCell()  
ClickSelf()  
DeactivateSelf()  
DrawCell()  
DrawSelf()  
EqualCell()  
FetchCellDataIndex()  
FetchCellHitBy()  
FetchLocalCellFrame()  
GetCellData()  
GetSelectedCell()  
GetTableSize()  
HiliteCell()  
InitTable()  
InsertCols()  
InsertRows()  
IsValidCell()  
RemoveCols()  
RemoveRows()  
SelectCell()  
SetCellData()  
SetCellDataSize()  
SetColWidth()  
SetRowHeight()  
UnhiliteCell()  

Data Members:

The data members in this class are:

 

mRows  
mCols  
mRowHeight  
mColWidth  
mCellData  
mSelectedCell  

Operation:

Refer to The PowerPlant Book for a detailed introduction to this class.

Source files:

(Pane Classes)

LTable.h

LTable.cp

See also:

LAttachable

LPane

LView

LTable()

Purpose:

The constructor creates the object.

Access :

Public

Prototype:

LTable();

LTable(

	const SPaneInfo	&inPaneInfo,

	const SViewInfo	&inViewInfo,

	SInt32			inNumberOfRows,

	SInt32			inNumberOfCols,

	SInt32			inRowHeight,

	SInt32			inColWidth,

	SInt32			inCellDataSize );

LTable( LStream	*inStream );

~LTable()

Purpose:

The destructor destroys the object.

Access :

Virtual, Public

Prototype:

virtual ~LTable();

ActivateSelf()

Purpose:

This is an override of ActivateSelf() in LPane().

ClickCell()

Purpose:

Respond to a click in the cell.

Access :

Virtual, Protected

Prototype:

virtual void ClickCell(

	const TableCellT		&inCell,

	const SMouseDownEvent&	 inMouseDown );
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  
const SMouseDownEvent&  
inMouseDown  
The mouse down event info.  

Return:

None

ClickSelf()

Purpose:

This is an override of ClickSelf() in LPane().

DeactivateSelf()

Purpose:

This is an override of DeactivateSelf() in LPane().

DrawCell()

Purpose:

Draw the contents of a cell.

Access :

VIrtual, Protected

Prototype:

virtual void DrawCell(const TableCellT	&inCell);
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  

Return:

None

DrawSelf()

Purpose:

This is an override of DrawSelf() in LPane().

EqualCell()

Purpose:

This method tests 2 cells for equality.

Access :

Public

Prototype:

Boolean EqualCell(

	const TableCellT	&inCellA,

	const TableCellT	&inCellB) const;
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCellA  
The first cell.  
const TableCellT&  
inCellB  
The other cell.  

Return:

Returns true if equal, else false.

FetchCellDataIndex()

Purpose:

Retrieves the index of a cell containing the data indicated.

Access :

Protected

Prototype:

SInt32 FetchCellDataIndex(

	const TableCellT	&inCell );
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  

Return:

Returns the cell index.

FetchCellHitBy()

Purpose:

Find a cell hit by a certain point.

Access :

Virtual, Protected

Prototype:

virtual void FetchCellHitBy(

	const SPoint32	&inImagePt,

	TableCellT		&outCell );
Parameters:

The parameters for this method are:

 

const SPoint32&  
inImagePt  
The point.  
const TableCellT&  
outCell  
The cell.  

Return:

None

FetchLocalCellFrame()

Purpose:

See if a cell intersects a given frame.

Access :

Virtual, Protected

Prototype:

virtual Boolean FetchLocalCellFrame(

	const TableCellT	&inCell,

	Rect				&outCellFrame);
Parameters:

The parameters for this method are:

 

Rect&  
outCellFrame  
The frame rect for the cell.  
const TableCellT&  
inCell  
The cell.  

Return:

Return true if there is an intersection, else return false.

GetCellData()

Purpose:

Retrieve the data from a cell.

Access :

Virtual, Public

Prototype:

virtual void GetCellData(

	const TableCellT	&inCell,

	void				*outData);
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  
void*  
outData  
The cell data.  

Return:

None

GetSelectedCell()

Purpose:

Retrieve the contents of a selected cell.

Access :

Public

Prototype:

void GetSelectedCell(TableCellT	&outCell) const;
Parameters:

The parameters for this method are:

 

TableCellT&  
outCell  
The cell.  

Return:

None

GetTableSize()

Purpose:

Retrieve the size of the table.

Access :

Public

Prototype:

void GetTableSize(

	TableIndexT	&outRows,

	TableIndexT	&outCols ) const;
Parameters:

The parameters for this method are:

 

TableCellT&  
outRows  
The rows.  
TableCellT&  
outCols  
The columns.  

Return:

None

HiliteCell()

Purpose:

Hilite a given cell.

Access :

Virtual, Protected

Prototype:

virtual void HiliteCell(

	const TableCellT&	 inCell);
Parameters:

The parameters for this method are:

 

TableCellT&  
inCell  
The cell.  

Return:

None

InitTable()

Purpose:

 

Access :

Private

Prototype:

void InitTable(

	SInt32			inNumberOfRows,

	SInt32			inNumberOfCols,

	SInt32			inRowHeight,

	SInt32			inColWidth,

	SInt32			inCellDataSize);
Parameters:

The parameters for this method are:

 

SInt32  
inNumberOfRows  
The number of rows.  
SInt32  
inNumberOfCols  
The number of columns  
SInt32  
inRowHeight  
The row height.  
SInt32  
inColWidth  
The column width.  
SInt32  
inCellDataSize  
The cell data size.  

Return:

None

InsertCols()

Purpose:

Insert columns after a specified column.

Access :

Virtual, Public

Prototype:

virtual void InsertCols(

	SInt32		inHowMany,

	TableIndexT	inAfterCol,

	void		*inCellData );
Parameters:

The parameters for this method are:

 

SInt32  
inHowMany  
The number of columns.  
TableIndexT  
inAfterCol  
The column to insert after.  
void*  
inCellData  
The cell data.  

Return:

None

InsertRows()

Purpose:

Insert rows after a specified row.

Access :

Virtual, Public

Prototype:

virtual void InsertRows(

	SInt32		inHowMany,

	TableIndexT	inAfterRow,

	void		*inCellData);
Parameters:

The parameters for this method are:

 

SInt32  
inHowMany  
The number of rows.  
TableIndexT  
inAfterRow  
The row to insert after.  
void*  
inCellData  
The cell data.  

Return:

None

IsValidCell()

Purpose:

Indicate whether a cell is valid or not.

Access :

Public

Prototype:

Boolean IsValidCell(

	const TableCellT	&inCell) const;
Parameters:

The parameters for this method are:

 

TableCellT&  
inCell  
The row to insert after.  

Return:

Returns true if valid, else returns false.

RemoveCols()

Purpose:

Remove columns starting after a given column.

Access :

Virtual, Public

Prototype:

virtual void RemoveCols(

	SInt32		inHowMany,

	TableIndexT	inFromCol );
Parameters:

The parameters for this method are:

 

SInt32  
inHowMany  
The number of columns to remove.  
TableIndexT  
inFromCol  
The starting column.  

Return:

None

RemoveRows()

Purpose:

Remove rows starting after a given row.

Access :

Virtual, Public

Prototype:

virtual void RemoveRows(

	SInt32		inHowMany,

	TableIndexT	inFromRow);
Parameters:

The parameters for this method are:

 

SInt32  
inHowMany  
The number of rows to remove.  
TableIndexT  
inFromRow  
The starting row.  

Return:

None

SelectCell()

Purpose:

Select a given cell.

Access :

Virtual, Public

Prototype:

virtual void SelectCell(

	const TableCellT	&inCell );
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  

Return:

None

SetCellData()

Purpose:

Set cell data.

Access :

Virtual, Public

Prototype:

virtual void SetCellData(

	const TableCellT	&inCell,

	void				*inData );
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  
void*  
inData  
The data to set.  

Return:

None

SetCellDataSize()

Purpose:

Set the cell data size.

Access :

Public

Prototype:

void SetCellDataSize( SInt32	inCellDataSize );
Parameters:

The parameters for this method are:

 

SInt32  
inCellDataSize  
The data to set.  

Return:

None

SetColWidth()

Purpose:

Set the column width.

Access :

Virtual, Public

Prototype:

virtual void SetColWidth(

	SInt16		inWidth,

	TableIndexT	 inFrom,

	TableIndexT	 inTo);
Parameters:

The parameters for this method are:

 

SInt16  
inWidth  
The width to set.  
TableIndexT  
inFrom  
The starting index.  
TableIndexT  
inTo  
The ending index.  

Return:

None

SetRowHeight()

Purpose:

Set the row height.

Access :

Virtual, Public

Prototype:

virtual void SetRowHeight(

	SInt16		inHeight,

	TableIndexT	 inFrom,

	TableIndexT	 inTo );
Parameters:

The parameters for this method are:

 

SInt16  
inHeight  
The height to set.  
TableIndexT  
inFrom  
The starting index.  
TableIndexT  
inTo  
The ending index.  

Return:

None

UnhiliteCell()

Purpose:

Unhilite a cell.

Access :

Virtual, Protected

Prototype:

virtual void UnhiliteCell(
   const TableCellT& inCell);
Parameters:

The parameters for this method are:

 

const TableCellT&  
inCell  
The cell.  

Return:

None

mRows

Purpose:

The number of rows.

Access :

Protected

Prototype:

TableIndexT mRows;

mCols

Purpose:

The number of columns.

Access :

Protected

Prototype:

TableIndexT mCols;

mRowHeight

Purpose:

The row height.

Access :

Protected

Prototype:

SInt32 mRowHeight;

mColWidth

Purpose:

The column width.

Access :

Protected

Prototype:

SInt32 mColWidth;

mCellData

Purpose:

The cell data array.

Access :

Protected

Prototype:

LArray *mCellData;

mSelectedCell

Purpose:

The selected cell.

Access :

Protected

Prototype:

TableCellT mSelectedCell;

 


[ 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