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

#include <ITableTextSelection.h>

Inheritance diagram for ITableTextSelection:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITABLETEXTSELECTION }
 
enum  WhatToSelect {
  kStart, kEnd, kAll, kIndex,
  kToIndex, kFromIndex
}
 

Public Member Functions

virtual void SelectTextInCell (const ITableModel *tableModel, const GridAddress &cell, WhatToSelect whatToSelect=kStart, int32 index=-1)=0
 
virtual bool16 IsTableSelection () const =0
 
virtual GridArea GetSelection () const =0
 
virtual TextIndex GetIndexOfLastCharInCell () const =0
 
virtual TextIndex GetIndexOfFirstCharInCell () const =0
 
virtual TextIndex GetFirstSelectedTextIndex (void) const =0
 
virtual TextIndex GetLastSelectedTextIndex (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

Abstract interface for accessing and manipulating text-selection in a table.

See Also
kTextSuiteBoss
kTextSelectionBoss

Member Enumeration Documentation

Enumerated type defining how to perform selection of text within table cell
Enumerator
kStart 

sets selection to the beginning of the cell

kEnd 

sets the selection to the end of the cell

kAll 

sets the selection to all the text in the cell

kIndex 

sets the selection to a given index + start index of the cell

kToIndex 

sets the selection from start to the given index + start index of the cell

kFromIndex 

sets the selection from the given index + start index of the cell to the end

Member Function Documentation

virtual TextIndex ITableTextSelection::GetFirstSelectedTextIndex (void ) const
pure virtual

Determine the text index of the character at the first position in the text selection

Returns
text index of the first character in the text selection
virtual TextIndex ITableTextSelection::GetIndexOfFirstCharInCell () const
pure virtual

Determine the the text index of the first position in the cell

Returns
the the text index of the first character in cell
virtual TextIndex ITableTextSelection::GetIndexOfLastCharInCell () const
pure virtual

Determine the the text index of the last position in the cell

Returns
the text index of last position in the cell
virtual TextIndex ITableTextSelection::GetLastSelectedTextIndex (void ) const
pure virtual

Determine the text index of the character in last position in the text selection

Returns
text index of the last character in the text selection
virtual GridArea ITableTextSelection::GetSelection () const
pure virtual

Accessor for the GridArea where the text selection is located. Can be used to get the grid id of the cell the text selection is in by using e.g.ITableModel::GetGridID

Returns
the GridArea the text insertion point is in
virtual bool16 ITableTextSelection::IsTableSelection () const
pure virtual

Checks and sees if the text selection is in a table

Returns
kTrue if the text selection is within a table, kFalse otherwise
virtual void ITableTextSelection::SelectTextInCell (const ITableModeltableModel,
const GridAddresscell,
WhatToSelect whatToSelect = kStart,
int32 index = -1 
)
pure virtual

Selects text in the cell passed in. Assumes an existing selection in a table Selection is based on the choices in WhatToSelect.

Parameters
tableModelthe table model the cell is in
cellcell specifies the cell in which to select the text
whatToSelectone of the enumerated type defined in WhatToSelect
indexthe index used for kIndex, kToIndex, and kFromIndex; this parameter will be used in the manner indicated by the whatToSelect parameter