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


Methods Index

Protected Data Members
Public Methods
Internal Methods
Protected Methods



Superclass: CTableInterpreter (internal class)

Subclasses: None


This class provides an interpreter for displaying and editing text in table cells. The class supports multi-line compass justification and in-cell editing.


Table interpreters handle the display of data within a table cell and user interaction with the cell and its data. By default, the table installs a text interpreter. To associate a different type of display (such as a control) to a cell or set of cells, you must create the appropriate interpreter and set it as an attribute on the desired cell, row, column, or table as a whole.

The CTableTextInterpreter displays single and multi-line text in cells and allows the user to edit the text read/write cells.

	CTableAttributes anAttributesSet;
new CTableTextInterpreter(
myTable->GetTableView(), // Owner
TX_BORDER, // Flags to NTextEdit
32, // Right margin
32, // Character limit
NULLcmd, // Enter command
TRUE, // Single line
TRUE // notify of all changes
anAttributesSet.Interpreter( anInterpreter );

Protected Data Members

static const int kTextLeftMargin; Text margins in pixels from left inside
static const int kTextTopMargin; Text margins in pixels from top
unsigned int itsAttributes; Attributes passed to the NTextEdit constructor
UNITS itsRightMargin; Margin passed to the NTextEdit constructor
int itsCharacterLimit; Character limit passed to the NTextEdit constructor
long itsCommand; Command number passed to the NTextEdit constructor
CStringRW itsInitialString; To reliably detect changes
CNativeTextEdit* itsEdit; Its NTextEdit during in cell editing
BOOLEAN itsSingleLine; TRUE if cells only contain single line text
BOOLEAN itsNotifyAllChanges; TRUE if to notify during typing of cell changes in addition to normal focus changes/enter change notification.

Public Methods

CTableView* theTable,
unsigned int theAttributes = TX_BORDER,
UNITS theRightMargin = 1000,
int theCharacterLimit = 1000,
long theCommand NULLcmd,
BOOLEAN singleLin = TRUE,
BOOLEAN notifyAllChanges = FALSE);
unsigned int GetAttributes() const;
UNITS GetRightMargin() const;
int GetCharacterLimit() const;
long GetCommand() const;
void SetAttributes(unsigned int theAttributes);
void SetRightMargin(UNITS theRightMargin);
void SetCharacterLimit(int theCharacterLimit);
void SetCommand(long theCommand);

Internal Methods

These methods are not for public use.

virtual void Draw(const CTableInterpreterParameters& theParameters);
virtual BOOLEAN CanFocus(
const CTableInterpreterParameters& theParameters);
virtual void FocusIn(
const CTableInterpreterParameters& theParameters);
virtual void FocusOut(
const CTableInterpreterParameters& theParameters);
virtual BOOLEAN Key(
const CTableInterpreterParameters& theParameters,
const CKey& theKey);
virtual void Scroll(const CPoint& theOffset);

Protected Methods

virtual ~CTableTextInterpreter();
UNITS TextHeight(const CFont& theFont, 
const CStringRW& theString);

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


Visit our online help desk for tech support

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