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

#include <ITableSelectionSuite.h>

Inheritance diagram for ITableSelectionSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITABLESELECTION_SUITE }
 
enum  SelectAction { kReplace, kAddTo, kExtend }
 

Public Member Functions

virtual void Select (const ITableModel *table, const GridArea &cells, const SelectAction selectionAction, const bool16 autoScroll)=0
 
virtual void Select (IPMUnknown *targetingBoss, const SelectAction selectionAction, const bool16 autoScroll)=0
 
virtual void SelectAll (void)=0
 
virtual void SelectAll (const ITableModel *model)=0
 
virtual void DeselectAll (void)=0
 
virtual void SelectRows (const int32 startRowNum, const int32 rowsToSelect, const ITableModel *model, const bool16 useTopRowAsAnchor, const bool16 autoScroll)=0
 
virtual void SelectRows (const int32 startRowNum, const int32 rowsToSelect, const bool16 useTopRowAsAnchor, const bool16 autoScroll)=0
 
virtual void SelectColumns (const int32 startColNum, const int32 colsToSelect, const ITableModel *model, const bool16 useLeftColumnAsAnchor, const bool16 autoScroll)=0
 
virtual void SelectColumns (const int32 startColNum, const int32 colsToSelect, const bool16 useLeftColumnAsAnchor, const bool16 autoScroll)=0
 
virtual void SelectBodyColumns (const int32 startColNum, const int32 colsToSelect, const ITableModel *model, const bool16 useLeftColumnAsAnchor, const bool16 autoScroll)=0
 
virtual void SelectAllBodyRows (const ITableModel *tableModel, const bool16 autoScroll=kTrue)=0
 
virtual void SelectAllHeaderRows (const ITableModel *tableModel, const bool16 autoScroll=kTrue)=0
 
virtual void SelectAllFooterRows (const ITableModel *tableModel, const bool16 autoScroll=kTrue)=0
 
virtual void SetSavedIndex (TextIndex index)=0
 
virtual GridArea GetSelection () const =0
 
virtual GridSpan GetTableSpan () const =0
 
virtual TextIndex GetSavedIndex () const =0
 
virtual GridAddress GetAnchor () const =0
 
virtual GridArea GetNewTableSelection (const ITableModel *tableModel, const GridArea newSelection, const GridAddress anchorAddr, const SelectAction selectionAction=kReplace)=0
 
virtual void ScrollViewToSelection (const ITableModel *model, const GridArea newSelection)=0
 
virtual void ScrollViewToSelection (const GridArea newSelection)=0
 
virtual void CenterViewToSelection ()=0
 
virtual bool16 CanShiftExtendSelection (const ITableModel *trackerFramesTableModel) const =0
 
virtual ITableModelQuerySelectedTableModel (void) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface to manipulate the table selection.

Member Enumeration Documentation

kReplace recents the anchor pt to the top left of the new area and sets the selection to the new area.

kAddTo gives the behavior that the anchorPt is the center of the selection and all selections are made around it.

kExtend ignores the anchor pt and adds to the selection – sets the anchor pt to the top left or the extended selection.

Member Function Documentation

virtual bool16 ITableSelectionSuite::CanShiftExtendSelection (const ITableModeltrackerFramesTableModel) const
pure virtual

USED ONLY BY THE TRACKER CODE Figures out if we are in the same table mode and can there for extend the selection

virtual void ITableSelectionSuite::CenterViewToSelection ()
pure virtual

Sets the current selection to be in the centre of view.

For instance a sequence of method calls on this interface to GetSelection() and ScrollViewToSelection() with resulting GridArea would have same net effect as this method.

virtual void ITableSelectionSuite::DeselectAll (void )
pure virtual

Method to unselect entire table targeted by selection

virtual GridAddress ITableSelectionSuite::GetAnchor () const
pure virtual

Accessor for the top-left of the area selected.

Returns
the location represented by a GridAddress
virtual GridArea ITableSelectionSuite::GetNewTableSelection (const ITableModeltableModel,
const GridArea newSelection,
const GridAddress anchorAddr,
const SelectAction selectionAction = kReplace 
)
pure virtual

Determine what the new table selection would be if you selected given the passed in criteria. NOTE: this doesn't change any state, if you are calling it you have to know that kExtend and kReplace change the anchor to the top left of the selection returned

Parameters
tableModelmodel of selection
newSelectionthe new selection
anchorAddranchor of the selection
selectionActionwhat selection action are we doing
GridAreathe new selection
virtual TextIndex ITableSelectionSuite::GetSavedIndex () const
pure virtual

Accessor for the saved TextIndex.

Returns
the saved index
virtual GridArea ITableSelectionSuite::GetSelection () const
pure virtual

Accessor for the area selected in table that is target of the selection.

For instance, there is a text selection in the table, would expect this to be area to span one cell for InDesign 2.0. If there are cells selected, this can span more than one cell.

Returns
return the dimension of the area selected in the table targeted by the selection
virtual GridSpan ITableSelectionSuite::GetTableSpan () const
pure virtual

Accessor for the extent of table selected. If none selected GridSpan(0, 0) would be returned.

Returns
a GridSpan object representing the span of table selected.
virtual ITableModel* ITableSelectionSuite::QuerySelectedTableModel (void ) const
pure virtual

USED ONLY BY THE TABLES CODE return the table model of current selection

virtual void ITableSelectionSuite::ScrollViewToSelection (const ITableModelmodel,
const GridArea newSelection 
)
pure virtual

Scrolls the view to the given selection. Passes in a table model so that you can scroll the view even if the selection is not set like in the case of tracking.

Parameters
modelspecifies table to work with
newSelectionspecifies an area within this table to scroll into view
Precondition
model not nil
newSelection not kZeroGridArea
virtual void ITableSelectionSuite::ScrollViewToSelection (const GridArea newSelection)
pure virtual

Same as above, but it doesn't take an ITableModel This is the first step to deprecating the above function

Parameters
newSelectionspecifies an area within this table to scroll into view
virtual void ITableSelectionSuite::Select (const ITableModeltable,
const GridAreacells,
const SelectAction selectionAction,
const bool16 autoScroll 
)
pure virtual

Sets the table selection according to the selection action and the scrolls the view

Parameters
tableModelmodel of selection
cellsthe new selection
selectionActionwhat selection action are we doing
autoScrollscroll selection
virtual void ITableSelectionSuite::Select (IPMUnknowntargetingBoss,
const SelectAction selectionAction,
const bool16 autoScroll 
)
pure virtual

Sets the table selection according to the selection action and the scrolls the view

virtual void ITableSelectionSuite::SelectAll (void )
pure virtual

Method to select an entire table.

virtual void ITableSelectionSuite::SelectAll (const ITableModelmodel)
pure virtual

Method to select an entire table.

Precondition
table model is not nil
Parameters
modeltable model
virtual void ITableSelectionSuite::SelectAllBodyRows (const ITableModeltableModel,
const bool16 autoScroll = kTrue 
)
pure virtual

Selects all of the body rows in the table

Parameters
tableModelmodel of selection
autoScrollscroll selection
virtual void ITableSelectionSuite::SelectAllFooterRows (const ITableModeltableModel,
const bool16 autoScroll = kTrue 
)
pure virtual

Selects all of the footer rows in the table

Parameters
tableModelmodel of selection
autoScrollscroll selection
virtual void ITableSelectionSuite::SelectAllHeaderRows (const ITableModeltableModel,
const bool16 autoScroll = kTrue 
)
pure virtual

Selects all of the header rows in the table

Parameters
tableModelmodel of selection
autoScrollscroll selection
virtual void ITableSelectionSuite::SelectBodyColumns (const int32 startColNum,
const int32 colsToSelect,
const ITableModelmodel,
const bool16 useLeftColumnAsAnchor,
const bool16 autoScroll 
)
pure virtual

Selects all the cells which intersect with the given column and the body area of the table

Parameters
startColNumthe first column in selection
colsToSelectthe number of columns in the selection
modelthe model of the selection
useLeftColumnAsAnchoruse the left most column as the anchor
autoScrollscroll to selection
virtual void ITableSelectionSuite::SelectColumns (const int32 startColNum,
const int32 colsToSelect,
const ITableModelmodel,
const bool16 useLeftColumnAsAnchor,
const bool16 autoScroll 
)
pure virtual

Sets a new selection at the given column. Shrinks the selection so it is equal to how it appears to the user.

For example if the last row is merged and the second column is selected it will shrink the selection to not include the last cell in that column.

Precondition
table model is not nil
the column range specified by the ColRange(startColNum,colssToSelect) is valid, i.e. within table
Parameters
startColNumbegin selection from this column
colsToSelectcount of columns to select
modelrefers to table model in which to select (One version of this function tables a model and the other uses the existing on in the selection)
useLeftColumnAsAnchorwhen kTrue sets the anchor to the top cell in the left column, and when false sets the anchor to the top cell in the right column
autoScrollkTrue if view should scroll
virtual void ITableSelectionSuite::SelectColumns (const int32 startColNum,
const int32 colsToSelect,
const bool16 useLeftColumnAsAnchor,
const bool16 autoScroll 
)
pure virtual

Differs from the above function because this one doesn't take a model as a parameter and it uses the exisiting on in the selection

See Also
SelectColumns
virtual void ITableSelectionSuite::SelectRows (const int32 startRowNum,
const int32 rowsToSelect,
const ITableModelmodel,
const bool16 useTopRowAsAnchor,
const bool16 autoScroll 
)
pure virtual

Sets a new selection at the given row. Shrinks the selection so it is equal to how it appears to the user.

Precondition
table model is not nil
the row range specified by the RowRange(startRowNum,rowsToSelect) is valid, i.e. within table
Parameters
startRowNumbegin selection from this row
rowsToSelectspecifies count of rows to select
modelrefers to table model in which to select (One version of this function tables a model and the other uses the existing on in the selection)
useTopRowAsAnchorwhen kTrue sets the anchor to the left cell in the top row, and when false sets the anchor to the left cell in the bottom row
autoScrollkTrue if view should scroll
virtual void ITableSelectionSuite::SelectRows (const int32 startRowNum,
const int32 rowsToSelect,
const bool16 useTopRowAsAnchor,
const bool16 autoScroll 
)
pure virtual

Differs from the above function because this one doesn't take a model as a parameter and it uses the exisiting on in the selection

See Also
SelectRows
virtual void ITableSelectionSuite::SetSavedIndex (TextIndex index)
pure virtual

Used when moving around in the table

Parameters
indexspecifies text index to cache