InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableModel Class Referenceabstract

#include <ITableModel.h>

Inheritance diagram for ITableModel:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITABLEMODEL }
 kDefaultIID
 

Public Member Functions

Table Dimensions
virtual RowRange GetHeaderRows () const =0
 
virtual GridArea GetHeaderArea () const =0
 
virtual RowRange GetBodyRows () const =0
 
virtual GridArea GetBodyArea () const =0
 
virtual RowRange GetFooterRows () const =0
 
virtual GridArea GetFooterArea () const =0
 
virtual RowRange GetTotalRows () const =0
 
virtual ColRange GetTotalCols () const =0
 
virtual GridArea GetTotalArea () const =0
 
Cell spans
virtual bool16 IsAnchor (const GridAddress &element) const =0
 
virtual GridSpan GetCellSpan (const GridAddress &anchor) const =0
 
virtual GridArea GetCellArea (const GridAddress &anchor) const =0
 
virtual GridAddress FindCellAnchor (const GridAddress &element) const =0
 
Validators
virtual bool16 IsValid (const GridAddress &element) const =0
 
virtual bool16 IsValidRow (int32 row) const =0
 
virtual bool16 IsValidColumn (int32 col) const =0
 
virtual bool16 ContainsCompleteCells (const GridArea &cells) const =0
 
GridID to GridAddress conversion
Every element in a table has a unique GridID associated with it that does not

change for the lifetime of the table.

virtual GridID GetGridID (const GridAddress &element) const =0
 
virtual GridAddress GetGridAddress (GridID gridID) const =0
 
Cell Content
virtual boost::shared_ptr
< ContentBossAccessor
CreateContentBossAccessor (void) const =0
 
virtual ICellContentQueryCellContentBoss (const GridAddress &anchor) const =0
 
virtual ICellContentMgrQueryContentMgr (CellType type) const =0
 
Create segments
virtual void CreateRowSegment (const PMReal &distanceFromTableTopEdge, const ColRange &segmentCols)=0
 
virtual void CreateRowSegment (const PMReal &distanceFromTableTopEdge, const K2Vector< ColRange > &segmentCols)=0
 
virtual void CreateColSegment (const PMReal &distanceFromTableLeftEdge, const RowRange &segmentRows)=0
 
Convert to header & footer
virtual void ConvertToHeaderRows (const RowRange &rows)=0
 
virtual bool16 CanConvertToHeaderRows (const RowRange &rows) const =0
 
virtual void ConvertToFooterRows (const RowRange &rows)=0
 
virtual bool16 CanConvertToFooterRows (const RowRange &rows) const =0
 
virtual void ConvertToBodyRows (const RowRange &rows)=0
 
virtual bool16 CanConvertToBodyRows (const RowRange &rows) const =0
 
virtual void ConvertToHeaderRowsButNoAnchors (const RowRange &rows)=0
 
virtual void ConvertToFooterRowsButNoAnchors (const RowRange &rows)=0
 
virtual Tables::EDirection GetTableDirection () const =0
 
virtual void ChangeTableDirection (const Tables::EDirection directionRTL)=0
 
virtual void ConvertCellsType (const GridArea &cells, const CellType destType, bool16 tryToPreserveData=kFalse)=0
 
virtual bool16 CanConvertCellsType (const GridArea &cells, const CellType destType) const =0
 
virtual CellType GetCellType (const GridAddress &cell) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Grid and span modifiers.

enum  ESplitDirection { eVerticalSplit, eHorizontalSplit }
 
enum  EDeleteState { eNotDeleting, eTableInitiatedDelete, eTextInitiatedDelete }
 
enum  EInsertState { eNotInserting, eTableInitiatedInsert, eTextInitiatedInsert }
 
virtual void InsertRows (const RowRange &rows, const Tables::ERelativePosition pos, const PMReal &height, const Tables::EContinuation continuation=Tables::eStructureAllAttrs)=0
 
virtual void InsertRowsButNotAnchors (const RowRange &rows, const Tables::ERelativePosition pos, const PMReal &height, const Tables::EContinuation continuation=Tables::eStructureAllAttrs)=0
 
virtual void InsertColumns (const ColRange &cols, const Tables::ERelativePosition pos, const PMReal &width, const Tables::EContinuation continuation=Tables::eStructureAllAttrs)=0
 
virtual void DeleteRows (const RowRange &rows)=0
 
virtual void DeleteRowsButNotAnchors (const RowRange &rows)=0
 
virtual void DeleteColumns (const ColRange &cols)=0
 
virtual void MergeCells (const GridArea &area)=0
 
virtual bool16 CanMergeCells (const GridArea &area) const =0
 
virtual void UnmergeCell (const GridAddress &anchor)=0
 
virtual void SplitCells (const GridArea &cells, ESplitDirection direction)=0
 
virtual bool16 CanSplitCells (const GridArea &cells, ESplitDirection direction) const =0
 
virtual EDeleteState DeleteState () const =0
 
virtual EInsertState InsertState () const =0
 

Iteration

typedef CellIterator< ITableModelconst_iterator
 
typedef CellIterator< ITableModeliterator
 
typedef ReverseCellIterator
< ITableModel
reverse_iterator
 
typedef ReverseCellIterator
< ITableModel
const_reverse_iterator
 
virtual const_iterator begin () const =0
 
virtual const_iterator begin (const GridArea &area) const =0
 
virtual const_iterator end () const =0
 
virtual const_iterator end (const GridArea &area) const =0
 
virtual const_iterator make_iterator (const GridAddress &gridRef) const =0
 
virtual const_reverse_iterator rbegin () const =0
 
virtual const_reverse_iterator rbegin (const GridArea &area) const =0
 
virtual const_reverse_iterator rend () const =0
 
virtual const_reverse_iterator rend (const GridArea &area) const =0
 
virtual const_reverse_iterator rmake_iterator (const GridAddress &gridRef) const =0
 

Copy-paste

enum  EWhatState {
  eTableAttrsStyle = 0x01, eRowAttrs = 0x02, eColAttrs = 0x04, eCellAttrs = 0x08,
  eCellContent = 0x10, eCells = 0x18, eAll = 0x1f
}
 
virtual bool16 CanCopy (const GridArea &cells) const =0
 
virtual TableMemento * Copy (const GridArea &cells) const =0
 
virtual bool16 CanClear (const GridArea &cells) const =0
 
virtual void Clear (const GridArea &cells)=0
 
virtual void Paste (const GridAddress &atAnchor, EWhatState what, TableMemento *toAdopt)=0
 
virtual void Paste (const GridAddress &atAnchor, EWhatState what, TableMemento *toAdopt, bool16 clearRedundantRows)=0
 
virtual bool16 CanPaste (const GridAddress &atAnchor, const GridSpan &mementoSpan, const ITableModel *sourceTable, const GridAddress &fromAnchor) const =0
 

Detailed Description

Public interface exposing the table model.

The table model allows content to be arranged into rows and columns of cells. The rows and columns in the table form a grid which is used for addressing. Each element in the grid is addressed by a GridAddress(row, column).

For instance, a GridAddress (1, 2) refers to the grid element in row 1, column 2. A table has a set of header, body and footer rows. The rows in a table are grouped in this order. Header rows, then body rows followed by footer rows. There should be at least one body rows. Header and footer rows may have a count of zero. Valid row values are in the row range represented by GetTotalRows. Valid column values are in the column range represented by GetTotalCols.

One or more elements can be grouped together to form a "cell". Cells have content and may span multiple rows and columns, i.e. multiple elements in the grid. The extent of a cell is represented by its GridSpan.

A "trivial cell" has a (row, column) span of (1, 1). Every element in the grid maps to at most one cell. The topLeft element of a cell is called an anchor. A cell is addressed by the GridAddress of it's anchor.

Also see ITableAttrModifier and ITableAttrAccessor.

Author
Joe Shankar

Member Typedef Documentation

Used to traverse through the GridAddress locations within a table model

Used to traverse (in reverse direction) through the GridAddress locations within a table model

Used to traverse through the GridAddress locations within a table model

Used to traverse (in reverse direction) through the GridAddress locations within a table model

Member Enumeration Documentation

Used to specify different states relating to table deletion.

Used to specify different states relating to table insertion.

Specifies what aspect to Paste These are the various aspects of a table that may be affected by Paste. Only eAll & eCells is currently supported.
Enumerator
eCells 

cell attributes and content

eAll 

table, row, column, cell attr and content

Member Function Documentation

virtual const_iterator ITableModel::begin () const
pure virtual

Use to acquire an iterator that refers to the cell at the start of the table structure, i.e. GridAddress(0,0).

virtual const_iterator ITableModel::begin (const GridAreaarea) const
pure virtual

Use to acquire an iterator that refers to cell at the start of the GridArea specified.

Parameters
areaspecifies dimension of grid-elements covered of interest
virtual bool16 ITableModel::CanClear (const GridAreacells) const
pure virtual

Precondition for self.Clear

Parameters
cells
virtual bool16 ITableModel::CanConvertCellsType (const GridAreacells,
const CellType destType 
) const
pure virtual

Returns kTrue if ConvertCellsType() can be called, kFalse otherwise.

Parameters
cellsGridArea of cells to be converted
destTypecell type to be converted into
virtual bool16 ITableModel::CanConvertToBodyRows (const RowRangerows) const
pure virtual

Determine if the given rows can be converted to body rows. All body rows are maintained in one contiguous range after all header rows and before all footer rows.

Parameters
rowsspecifies the header or footer rows to be converted to body rows.
Precondition
self.GetTotalRows().Contains(rows)
Returns
kTrue if rows can be passed to CanConvertToBodyRows if self.GetHeaderRows().Contains(rows) or self.GetFooterRows().Contains(rows)
virtual bool16 ITableModel::CanConvertToFooterRows (const RowRangerows) const
pure virtual

Determine if the given rows can be converted to footer rows. All footer rows are maintained in a contiguous range after all body rows.

Parameters
rowsspecifies the body rows to be converted to footer rows.
Returns
kTrue if rows can be passed to ConvertToFooterRows or ConvertToFooterRowsButNoAnchors.
virtual bool16 ITableModel::CanConvertToHeaderRows (const RowRangerows) const
pure virtual

Determine if the given rows can be converted to header rows. All header rows are maintained in a contiguous range before all body rows.

Parameters
rowsspecifies the body rows to be converted to header rows.
Returns
kTrue if rows can be passed to ConvertToHeaderRows or ConvertToHeaderRowsButNoAnchors.
virtual bool16 ITableModel::CanCopy (const GridAreacells) const
pure virtual

Determine if a given area within the table can be copied.

Precondition
self.GetTableArea().Contains(cells)
Parameters
cellsspecifies the dimension of the area containing cells of interest
Returns
kTrue if it is valid to call self.Copy(cells), kFalse otherwise
virtual bool16 ITableModel::CanMergeCells (const GridAreaarea) const
pure virtual

Determine if the given area is appropriate for a merge-cells operation.

Parameters
areaspecifies dimension of area containing cells of interest
Returns
kTrue if area can be passed to the MergeCells call
virtual bool16 ITableModel::CanPaste (const GridAddressatAnchor,
const GridSpanmementoSpan,
const ITableModelsourceTable,
const GridAddressfromAnchor 
) const
pure virtual

Determine if a memento of mementoSpan can be pasted location specified by atAnchor.

Parameters
atAnchorspecifies location of interest
mementoSpangives the dimension (height,width) of cell to be pasted
mementogive the structure to ensure complete cells in sets to paste into
Returns
kTrue if a memento of mementoSpan can be pasted at location atAnchor
virtual bool16 ITableModel::CanSplitCells (const GridAreacells,
ESplitDirection direction 
) const
pure virtual

This method is obsolete. Please use CanSplitCells. Determine whether a particular cell can be split.

Precondition
direction == eVerticalSplit or direction == eHorizontalSplit
Parameters
anchorlocation of the cell
directionspecify whether vertical or horizontal split of interest
Returns
kTrue if the cell with specified anchor can be split in given direction, kFalse if this can't be done, or if the location does not represent the anchor point of a cellDetermine whether cells with anchors in a particular area can be split.
Precondition
direction == eVerticalSplit or direction == eHorizontalSplit
Parameters
cellsarea of cells to split, does not need to contain complete cells
directionspecify whether vertical or horizontal split of interest
Returns
kTrue if all of the cells can be split in given direction, kFalse if this can't be done, or if the area does not contain any anchors
virtual void ITableModel::ChangeTableDirection (const Tables::EDirection directionRTL)
pure virtual

Changes the table direction.

Parameters
directionRTLDirection to change table.
virtual void ITableModel::Clear (const GridAreacells)
pure virtual

Clears the content in cells.

Precondition
self.CanClear
Parameters
cells
virtual bool16 ITableModel::ContainsCompleteCells (const GridAreacells) const
pure virtual

Determine if the specified area can be decomposed into a set of complete cells. The cells will be complete iff all the grid-elements that compose a cell are contained within the area. See the documentation for GridAddress for more material on distinction between grid-elements and cells.

Returns
kTrue if cells are a complete rectangular, selectable area, kFalse otherwise
virtual void ITableModel::ConvertCellsType (const GridAreacells,
const CellType destType,
bool16 tryToPreserveData = kFalse 
)
pure virtual

Method to convert the type of cells

Parameters
cellsGridArea of cells to be converted
destTypecell type to be converted into
tryToPreserveDataif true, the data is preserved into the cell after converion, if possible.
virtual void ITableModel::ConvertToBodyRows (const RowRangerows)
pure virtual

Converts header or footer rows to body rows.

Parameters
rowsto convert to body rows.
Precondition
self.CanConvertToBodyRows(rows)
Postcondition
self.GetBodyRows.Contains(rows)
self.GetHeaderRows().Contains(rows) == false
self.GetFooterRows().Contains(rows) == false
virtual void ITableModel::ConvertToFooterRows (const RowRangerows)
pure virtual

Converts body rows to footer rows.

Precondition
self.CanConvertToFooterRows()
Postcondition
let preFooterRows = self.GetFooterRows()
self.GetFooterRows == RowRange(rows.start, preFooterRows.count + rows.count)
virtual void ITableModel::ConvertToFooterRowsButNoAnchors (const RowRangerows)
pure virtual

For Internal use.

virtual void ITableModel::ConvertToHeaderRows (const RowRangerows)
pure virtual

Converts body rows to header rows.

Parameters
rowsto be converted to headers.
Precondition
self.CanConvertToHeaderRows()
Postcondition
let preHeaderRows = self.GetHeaderRows()
self.GetHeaderRows == RowRange(preHeaderRows.start, preHeaderRows.count + rows.count)
virtual void ITableModel::ConvertToHeaderRowsButNoAnchors (const RowRangerows)
pure virtual

For Internal use.

virtual TableMemento* ITableModel::Copy (const GridAreacells) const
pure virtual

Returns a TableMemento representing the internal state of the cells.

This may be restored with a corresponding Paste call. Caller is responsible for deleting storage of the returned memento.

Precondition
CanCopy() == kTrue
Parameters
cellsspecifies the dimension of the area containing cells to copy
Returns
a memento that can be used in subsequent paste operations
virtual void ITableModel::CreateColSegment (const PMRealdistanceFromTableLeftEdge,
const RowRangesegmentRows 
)
pure virtual

Creates col segment.

Parameters
distanceFromTableLeftEdgespecifies segment pos, relative to left edge of the table
segmentRowsspecifies the range of rows within the table for the new segment
virtual boost::shared_ptr<ContentBossAccessor> ITableModel::CreateContentBossAccessor (void ) const
pure virtual
                Efficient access to content bosses. Typical usage:

                <pre>

boost::shared_ptr<ContentBossAccessor> cbAccessor(table->CreateContentBossAccessor()); cbAccessor->QueryCellContentBoss(anchor); The returned ContentBossAccessor cannot be used across structure changes specifically row and column insertion or deletion. The following sequence would be illegal.

  1. cb = table.CreateContentBossAccessor
  2. table.insert/delete rows/columnns.
  3. cb.QueryCellContentBoss
virtual void ITableModel::CreateRowSegment (const PMRealdistanceFromTableTopEdge,
const ColRangesegmentCols 
)
pure virtual

Creates row segment.

Parameters
distanceFromTableTopEdgespecifies segment pos, relative to top edge of the table
segmentColsspecifies the range of columns within the table for the new segment
virtual void ITableModel::CreateRowSegment (const PMRealdistanceFromTableTopEdge,
const K2Vector< ColRange > & segmentCols 
)
pure virtual

Creates row segment.

Parameters
distanceFromTableTopEdgespecifies segment pos, relative to top edge of the table
segmentColsspecifies the vector of the range of columns within the table for the new segment(s)
virtual void ITableModel::DeleteColumns (const ColRangecols)
pure virtual

Delete (cols&#46;count) columns starting from the column at (cols&#46;start).

Parameters
colsgives range of columns to remove from table
virtual void ITableModel::DeleteRows (const RowRangerows)
pure virtual

Delete the number (rows&#46;count) rows starting from the position (rows&#46;start).

Parameters
rowsspecifies the range of rows to remove from this table
virtual void ITableModel::DeleteRowsButNotAnchors (const RowRangerows)
pure virtual

Delete the number (rows&#46;count) rows starting from the row given by (rows&#46;start), leaving the anchor characters behind.

This is meant to be called when deleting a table via a text deletion. In this case it is undesirable for the table to delete the anchor characters.

Parameters
rowsspecifies the range of rows to remove from the table
virtual EDeleteState ITableModel::DeleteState () const
pure virtual

Find out if who intitiated the delete of the table. Might be in states such as: not-deleting, text-deleting or table-deletnig.

Returns
the current state relating to the ongoing deletion
virtual const_iterator ITableModel::end () const
pure virtual

Use to acquire an iterator that refers to cell just off the end of the whole table. Use this when the iteration should end at the last cell.

virtual const_iterator ITableModel::end (const GridAreaarea) const
pure virtual

Use to acquire an iterator that refers to the last cell for traversal through specified GridArea.

Parameters
areaspecifies dimension of grid-elements covered of interest
Returns
iterator that refers to the specified location.
virtual GridAddress ITableModel::FindCellAnchor (const GridAddresselement) const
pure virtual

Returns the anchor (top-left location) of the cell this element is in.

Parameters
elementspecifies the grid-element for this query
Returns
the location of the anchor (top-left) for the given grid-element
virtual GridArea ITableModel::GetBodyArea () const
pure virtual

Accessor for the area covered by the body rows.

Returns
the area of body rows in a GridArea object.
virtual RowRange ITableModel::GetBodyRows () const
pure virtual

Accessor for the range of body rows in the underlying table structure.

Returns
the body rows in a RowRange object
virtual GridArea ITableModel::GetCellArea (const GridAddressanchor) const
pure virtual

Returns the absolute location of the elements the cell consists of. i.e.

GridArea(anchor, this->GetCellSpan()) 
Parameters
anchorspecifies the location for the cell query is about
virtual GridSpan ITableModel::GetCellSpan (const GridAddressanchor) const
pure virtual

Accessor to determine the number of elements the cell consists of, i.e. the number of rows and columns the cell spans.

Parameters
anchorspecifies the location for the cell this query is about
Returns
a GridSpan object that represents the cell-span (height,width) of the cell.
virtual CellType ITableModel::GetCellType (const GridAddresscell) const
pure virtual

Get the type of cell (kTextContentType, kPageItemContentType etc.)

Parameters
cellsGridArea of cells to be converted
virtual GridArea ITableModel::GetFooterArea () const
pure virtual

Accessor for the area covered by the footer rows.

Returns
the area of footer rows in a GridArea object.
virtual RowRange ITableModel::GetFooterRows () const
pure virtual

Accessor for the range of footer rows in the underlying table structure.

Returns
the footer rows in a RowRange object
virtual GridAddress ITableModel::GetGridAddress (GridID gridID) const
pure virtual

The gridID should have been obtained by a previous call to GetGridID.

Returns
the GridAddress represented by the gridID.
virtual GridID ITableModel::GetGridID (const GridAddresselement) const
pure virtual

Accessor to find the GridID for a particular location. This

Precondition
location should be within the table
Returns
the persistent GridID that identifies element, or kInvalidGridID if the element is invalid.
virtual GridArea ITableModel::GetHeaderArea () const
pure virtual

Accessor for the area covered by the header rows.

Returns
the area of header rows in a GridArea object.
virtual RowRange ITableModel::GetHeaderRows () const
pure virtual

Accessor for the range of header rows in the underlying table structure.

Returns
the header rows in a RowRange object
virtual Tables::EDirection ITableModel::GetTableDirection () const
pure virtual

Accessor for the table direction.

Returns
the direction of the table.
virtual GridArea ITableModel::GetTotalArea () const
pure virtual

Accessor for the area covered by the whole table model.

Returns
the whole table area in a GridArea object.
virtual ColRange ITableModel::GetTotalCols () const
pure virtual

Accessor for the total columns in the underlying table structure.

Returns
total columns in a ColRange object
virtual RowRange ITableModel::GetTotalRows () const
pure virtual

Accessor for the total rows including headers, body and footers in the underlying table structure.

Returns
total rows in a RowRange object
virtual void ITableModel::InsertColumns (const ColRangecols,
const Tables::ERelativePosition pos,
const PMRealwidth,
const Tables::EContinuation continuation = Tables::eStructureAllAttrs 
)
pure virtual

Inserts cols&#46;count columns before or after cols&#46;start depending on pos.

Width is in points. If colWidth is 0.0 then the new width is determined from the column relative to which the insertion is being made. A non zero value of width will result in all inserted columns having that width.

[Documentation note for width semantics: Update ITableSuite.h & ITableCommands.h to reflect changes.]

Precondition
EContinuation should include attributes if width = 0
Parameters
colsspecifies the range of columns within the table for the insertion, if this is not an empty range then the rows will be replaced
posSpecifies the relative position, before or after the given range in the table
heightdesired column height in points
continuationone of enumerated constants specifying how existing table properties should apply to these new rows
virtual void ITableModel::InsertRows (const RowRangerows,
const Tables::ERelativePosition pos,
const PMRealheight,
const Tables::EContinuation continuation = Tables::eStructureAllAttrs 
)
pure virtual

Inserts rows&#46;count rows before or after rows&#46;start depending on pos.

Height is in points. If rowHeight is 0.0 then the row height is determined by the auto-grow and minimum row height attribute of the row relative to which the insertion is being made. A non zero value of height will result in all inserted rows having that minimum height.

[Documentation note for height semantics: Update ITableSuite.h & ITableCommands.h and ITableUtils.h to reflect changes.]

Parameters
rowsspecifies the range of rows within table for the insertion, if this is not an empty range then the rows will be replaced
posSpecifies the relative position, before or after the given range in the table
heightdesired row height in points
continuationone of enumerated constants specifying how existing table properties should apply to these new rows
virtual void ITableModel::InsertRowsButNotAnchors (const RowRangerows,
const Tables::ERelativePosition pos,
const PMRealheight,
const Tables::EContinuation continuation = Tables::eStructureAllAttrs 
)
pure virtual

Inserts rows&#46;count rows before or after rows&#46;start depending on pos.

This is meant to be called when we already have anchors for the rows we are adding, such as the case where we are coping a text frame containing part of a table

Parameters
rowsspecifies the range of rows within table for the insertion, if this is not an empty range then the rows will be replaced
posSpecifies the relative position, before or after the given range in the table
heightdesired row height in points
continuationone of enumerated constants specifying how existing table properties should apply to these new rows
virtual EInsertState ITableModel::InsertState () const
pure virtual

Whether we should insert anchors with these rows or not

Returns
the current state relating to the ongoing deletion
virtual bool16 ITableModel::IsAnchor (const GridAddresselement) const
pure virtual

Accessor to determine if a given location is an anchor cell.

Parameters
elementIdentifies the grid element to be tested.
Returns
kTrue if gridRef is the top-left element in a cell.
virtual bool16 ITableModel::IsValid (const GridAddresselement) const
pure virtual

Determine if element at the given location is within the range of elements in the underlying table grid.

Postcondition
result = self.GetTableArea().Contains(element)
Returns
kTrue if the location is within the table bounds, kFalse otherwise
virtual bool16 ITableModel::IsValidColumn (int32 col) const
pure virtual

Determine if given column lies within columns spanned by this table.

Returns
kTrue if col is within the table models range of rows
virtual bool16 ITableModel::IsValidRow (int32 row) const
pure virtual

Determine if a given row lies within the range of rows spanned by this table.

Returns
kTrue if row is within the table models range of rows
virtual const_iterator ITableModel::make_iterator (const GridAddressgridRef) const
pure virtual

Acquire a forward iterator.

Returns
iterator referring to the given GridAddress
virtual void ITableModel::MergeCells (const GridAreaarea)
pure virtual

Merges the elements specified by area. This function makes the anchor identified by (area.TopLeft) span all elements in 'area'.

Parameters
areaSpecifies a rectangle of elements in the grid to be merged.
Precondition
self.CanMergeCells(area) = kTrue
virtual void ITableModel::Paste (const GridAddressatAnchor,
EWhatState what,
TableMemento * toAdopt 
)
pure virtual

Accepts the TableMemento created by a previous call to Copy and applies into the model at atAnchor.

Ownership of storage is transferred from the caller to the implementation of Paste.

Parameters
atAnchorlocation at which to paste
whatspecifies what properties to transfer
toAdopt
Precondition
self.GetTableArea().Contains(GridArea(atAnchor, memento.GetSpan())
virtual ICellContent* ITableModel::QueryCellContentBoss (const GridAddressanchor) const
pure virtual

Use ContentBossAccessor for accessing a range of cells. QueryCellContentBoss is not as efficient as the ContentBossAccessor.

Parameters
anchorrefers to location of cell for which content boss object is sought
virtual ICellContentMgr* ITableModel::QueryContentMgr (CellType type) const
pure virtual

Access to content managers.

Parameters
typeThe type of cell you wish the manager for
Returns
a reference-incremented ptr to the cell content manager for the specified cell type
virtual const_reverse_iterator ITableModel::rbegin () const
pure virtual

Acquire a (reverse) iterator that can be used for a traversal of cells in reverse order via ++ starting at the specified location.

Returns
(reverse) iterator referring to given location
virtual const_reverse_iterator ITableModel::rbegin (const GridAreaarea) const
pure virtual

Acquire a (reverse) iterator for delimiting end of traversal of cells in reverse order (via ++). This will normally be the beginning of the collection.

Returns
(reverse) iterator that will mark end of iteration
virtual const_reverse_iterator ITableModel::rend () const
pure virtual

Acquire a (reverse) iterator for delimiting end of traversal of cells in reverse order (via ++). This will normally be the beginning of the collection.

Returns
(reverse) iterator that will mark end of iteration
virtual const_reverse_iterator ITableModel::rend (const GridAreaarea) const
pure virtual

Acquire a (reverse) iterator for delimiting the end of an iteration that ends at the given location.

Returns
(reverse) iterator to refer to mark the given location in the collection
virtual const_reverse_iterator ITableModel::rmake_iterator (const GridAddressgridRef) const
pure virtual

Acquire a (reverse) iterator.

Returns
(reverse) iterator referring to the given GridAddress
virtual void ITableModel::SplitCells (const GridAreacells,
ESplitDirection direction 
)
pure virtual

This method is obsolete. Please use SplitCells. Split the cell in half vertically or horizontally.

Precondition
self.CanSplitCellSplit the cells with anchors in the area in half vertically or horizontally.
self.CanSplitCells
virtual void ITableModel::UnmergeCell (const GridAddressanchor)
pure virtual

Anchor specifies a non-trivial cell to be unmerged. This function will make all elements spanned by the anchor trivial cells.