[Classes] [Prev] [Next] [Methods]

CTableView

Methods Index

Heritage
Description
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Overridden Methods
Table Methods
Row Methods
Column Methods
Cell Methods
Focus Methods
Refresh Methods
Advanced Access Methods
Data Connection Pip Methods
Protected Methods

CTableView


Heritage

Superclass: CSubview

Subclass: None


Description

CTableView is a view for displaying rows and columns of cells. It uses two helper classes: CTableCoordinates (internal) for performing transformations between cell space and screen space, and CTableAttributes for storing attributes on cells, rows, columns, and the table itself. CTableView is not intended to be used by itself (it provides no mouse or keyboard interaction), but to be incorporated in a higher level class such as CTable.


Protected Data Members

CCell* itsFocus; Cell that currently has focus
CCell itsCellOrigin; Top left cell
BOOLEAN itsOverRanRight; Display right bounds flush
BOOLEAN itsOverRanBottom; Display bottom bounds flush
CBounds itsCellBounds; Virtual cell bounds. Used only for scroll bar range setting
BOOLEAN itsCellClipping; Force cell to clip drawing to cell bounds
CTableAttributeArray itsAttributes;
CTableCoordinates itsCoordinates;
NScrollBar* itsVScrollBar;
NScrollBar* itsHScrollBar;
CTableSource* itsSource; Possible data connection


Public Methods

Constructor, Destructor, and Initializer Methods

CTableView(
CSubview* theEnclosure,
const CRect& theRegion,
const CFont& theTableFont = STDFont,
UNITS theDefaultRowHeight = kNoHeight,
UNITS theDefaultColumnWidth = kNoWidth,
long theChunkRows = 128,
long theChunkColumns = 32);
virtual ~CTableView();
virtual BOOLEAN ITableView(
BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY,
const CFont& theFont = STDFont);

Overridden Methods

virtual void Draw(const CRect& theClip);
virtual void Size(const CRect& theNewSize);
virtual void VScroll(SCROLL_CONTROL theEventType, 
UNITS thePos);
virtual void HScroll(SCROLL_CONTROL theEventType, 
UNITS thePos);
virtual void MouseDouble(
CPoint theLocation,
short theButton = 0,
BOOLEAN isShiftKey = FALSE,
BOOLEAN isControlKey = FALSE);
virtual void MouseDown(
CPoint theLocation,
short theButton = 0,
BOOLEAN isShiftKey = FALSE,
BOOLEAN isControlKey = FALSE);

Table Methods

Note: Attributes will be deleted, scrollbars will not. Cell bounds have no effect on the table other than for scrollbar range. The top left corner of theBounds should generally be (0,0)

virtual void SetTable(
CTableAttributes& theAttributes,
BOOLEAN thePropagate= FALSE);
virtual void AssociateScrollBars(
NScrollBar* theVScrollBar,
NScrollBar* theHScrollBar);
virtual void SetCellOrigin(const CCell& theCell);
virtual CCell GetCellOrigin() const;
virtual void SetPixelOrigin(const CPoint& thePoint);
virtual CPoint GetPixelOrigin() const;
virtual void SetCellBounds(const CBounds& theBounds);
virtual CBounds GetCellBounds() const;
virtual void SetCellClipping(BOOLEAN theClip);
virtual BOOLEAN GetCellClipping();

Row Methods

virtual void SetRow(long theRow, UNITS theHeight);
virtual void SetRow(
long theRow,
CTableAttributes& theAttributes,
BOOLEAN thePropagate = FALSE);
virtual void InsertRows(long theRow, long theCount = 1);
virtual void DeleteRows(long theRow, long theCount = 1);

Column Methods

virtual void SetColumn(long theColumn, UNITS theWidth);
virtual void SetColumn(
long theColumn,
CTableAttributes& theAttributes,
BOOLEAN thePropagate= FALSE);
virtual void InsertColumns(long theColumn, 
long theCount = 1);
virtual void DeleteColumns(long theColumn, 
long theCount = 1);

Cell Methods

virtual void SetCell(
const CCell& theCell,
CTableAttributes& theAttributes);

Focus Methods

virtual void SetFocus(const CCell* theCell);
virtual const CCell* GetFocus() const;

Refresh Methods

virtual void InvalidateRow(long theRow);
virtual void InvalidateColumn(long theColumn);
virtual void InvalidateCell(const CCell& theCell);
virtual void InvalidateBounds(const CBounds& theBounds);
virtual void InvalidateRegion(const CRegion& theRegion);
virtual void InvalidateSelection();
virtual void CellToParameters(
const CCell& theCell,
CTableInterpreterParameters* theParameters);
virtual void CellToAttributes(
const CCell& theCell,
CTableAttributes* theAttributes);

Advanced Access Methods

const CTableAttributeArray& GetAttributes() const;
CTableAttributeArray& GetAttributes();
const CTableCoordinates 	GetCoordinates() const;
CTableCoordinates& GetCoordinates();

Data Connection Pipe Methods

These methods are typically used only by interpreters.

virtual void SetSource(CTableSource* theSource);
virtual CTableSource* GetSource();
virtual const CTableSource* GetSource() const;
virtual const CTdiValue* GetData(const CCell& theCell);
virtual BOOLEAN PutData(
const CCell& theCell,
const CTdiValue* theData);
BOOLEAN IsFlushRight() const;
BOOLEAN IsFlushBottom() const;

Protected Methods

virtual void ChangeDrawingContext(
CDrawingContext* theDrawingContext,
CTableAttributes& theAttributes);
virtual void DrawColumnBackground(
long theColumn,
long theFirstRow,
long theLastRow,
CTableAttributes* theAttributes);
virtual void DrawRowBackground(
long theRow,
long theFirstColumn,
long theLastColumn,
CTableAttributes* theAttributes);
virtual void DrawColumn(
const CRect& theClip,
long theColumn,
long theFirstRow,
long theLastRow,
CTableAttributes* theColumnAttributes,
CTableAttributes* theRowAttributes);
virtual CCell OriginWithinBounds(
const CCell& aProposedOrigin,
CPoint* theOffset = NULL);
virtual void AdjustVScrollBar();
virtual void AdjustHScrollBar();
CTableView(const CTableView& theTable);
CTableView& operator=(const CTableView& theTable);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.