InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableSelectionSuite.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Joe Shankar
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ITableSelectionSuite__
25 #define __ITableSelectionSuite__
26 
27 #include "ITableTarget.h"
28 #include "TablesUIID.h"
29 #include "TableTypes.h"
30 
31 class ITableModel;
32 
33 
38 {
39 public:
40  enum { kDefaultIID = IID_ITABLESELECTION_SUITE };
49  enum SelectAction { kReplace, kAddTo, kExtend };
50 
51 //----- Setters -----
59  virtual void Select(const ITableModel* table, const GridArea& cells, const SelectAction selectionAction, const bool16 autoScroll) = 0;
60 
64  virtual void Select(IPMUnknown* targetingBoss, const SelectAction selectionAction, const bool16 autoScroll) = 0;
65 
68  virtual void SelectAll(void) = 0;
73  virtual void SelectAll(const ITableModel *model) = 0;
74 
77  virtual void DeselectAll(void) = 0;
78 
89  virtual void SelectRows(const int32 startRowNum, const int32 rowsToSelect, const ITableModel *model,
90  const bool16 useTopRowAsAnchor, const bool16 autoScroll) = 0;
95  virtual void SelectRows(const int32 startRowNum, const int32 rowsToSelect, const bool16 useTopRowAsAnchor,
96  const bool16 autoScroll) = 0;
111  virtual void SelectColumns(const int32 startColNum, const int32 colsToSelect, const ITableModel *model,
112  const bool16 useLeftColumnAsAnchor, const bool16 autoScroll) = 0;
117  virtual void SelectColumns(const int32 startColNum, const int32 colsToSelect,
118  const bool16 useLeftColumnAsAnchor, const bool16 autoScroll) = 0;
119 
128  virtual void SelectBodyColumns(const int32 startColNum, const int32 colsToSelect, const ITableModel *model,
129  const bool16 useLeftColumnAsAnchor, const bool16 autoScroll) = 0;
130 
136  virtual void SelectAllBodyRows(const ITableModel *tableModel, const bool16 autoScroll = kTrue) = 0;
142  virtual void SelectAllHeaderRows(const ITableModel *tableModel, const bool16 autoScroll = kTrue) = 0;
143 
149  virtual void SelectAllFooterRows(const ITableModel *tableModel, const bool16 autoScroll = kTrue) = 0;
150 
151 
155  virtual void SetSavedIndex(TextIndex index) = 0;
156 
157 //----- Getters -----
166  virtual GridArea GetSelection() const = 0;
167 
171  virtual GridSpan GetTableSpan() const = 0;
172 
176  virtual TextIndex GetSavedIndex() const = 0;
177 
181  virtual GridAddress GetAnchor() const = 0;
182 
192  virtual GridArea GetNewTableSelection(const ITableModel *tableModel, const GridArea newSelection, const GridAddress anchorAddr, const SelectAction selectionAction = kReplace) = 0;
193 
194 
195 //----- Scrolling -----
206  virtual void ScrollViewToSelection(const ITableModel *model, const GridArea newSelection) = 0;
207 
213  virtual void ScrollViewToSelection(const GridArea newSelection) = 0;
214 
221  virtual void CenterViewToSelection() = 0;
222 
223 //------ For Internal Use ONLY --------
224 
229  virtual bool16 CanShiftExtendSelection(const ITableModel* trackerFramesTableModel) const = 0;
230 
235  virtual ITableModel* QuerySelectedTableModel(void) const = 0;
236 };
237 
238 
239 #endif //__ITableSelectionSuite__