InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICellStylesFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Danielle Darling
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 ICELLSTYLESFACADE_H
25 #define ICELLSTYLESFACADE_H
26 
27 #include "IPMUnknown.h"
28 
29 #include "CelStyID.h"
30 #include "TableTypes.h"
31 #include "keyboarddefs.h"
32 
34 class ITableModel;
35 class IWorkspace;
36 
37 class AttributeBossList;
38 class GlobalTime;
39 
40 namespace Facade
41 {
49  {
50  public:
51  enum {kDefaultIID = IID_ICELLSTYLESFACADE};
52 
63  virtual ErrorCode CopyStylesToGroup(const UIDRef& whichGroup,
64  const UIDList& whichStyles) const = 0;
65 
79  virtual const IPMUnknown* QueryCellStyleHier(IDataBase* db,
80  const UID& startingStyle,
81  const ClassID& whichAttr,
82  const PMIID& iid
83  /* const PMIID& cellAttrType = IID_ITABLEATTRIBUTES or IID_IVERTICALCELLSTYLEATTRIBUTES*/) const = 0;
84 
100  virtual ErrorCode GetCellStyleAttrsResolved(const UIDRef& cellStyle,
101  AttributeBossList& resolvedAttrs,
102  const PMIID& attributeType) const = 0;
103 
113  virtual UID GetCellStyleParagraphStyle(const UIDRef& styleRef) const = 0;
114 
133  virtual ErrorCode GetOverridingParagraphStyles(const ITableModel* tableModel,
134  const GridAddress& cellAnchor,
135  UIDList& out_OverridingParaStyles,
136  const UIDRef& styleToCheck = UIDRef::gNull) const = 0;
137 
156  virtual ErrorCode GetCellOverrides(const ITableModel* tableModel,
157  const GridAddress& whichCell,
158  AttributeBossList& out_Overrides,
159  const UIDRef& styleToCheck = UIDRef::gNull) const = 0;
160 
173  virtual ErrorCode GetAllCellOverrides(const ITableModel* tableModel,
174  const GridAddress& whichCell,
175  AttributeBossList& out_Overrides) const = 0;
176 
190  virtual ErrorCode CreateNewStyleGroup(IWorkspace* workspace,
191  const PMString& groupName,
192  const UID& parentUID,
193  const int32 position,
194  UID* out_NewGroup = nil) const = 0;
195 
202  virtual UID GetRootCellStyle(IDataBase* db) const = 0;
203 
214  virtual ICommand* CreateEditCellStyleCmd(const UIDRef& cellStyleRef) const = 0;
215 
225  virtual ErrorCode RenameCellStyle(const UIDRef& whichStyle,
226  const PMString& newName) const = 0;
227 
236  virtual ErrorCode DuplicateCellStyle(const UIDRef& whichStyle,
237  UIDRef& out_NewStyle) const = 0;
238 
248  virtual ErrorCode DuplicateCellStyles(const UIDList& stylesToDuplicate) const = 0;
249 
258  virtual ErrorCode SetDefaultStyle(const UIDRef& defaultStyle) const = 0;
259 
276  virtual ErrorCode ApplyCellStyle(const UIDRef& whichStyle,
277  const UIDRef& tableModelRef,
278  const GridArea& whichArea,
279  const bool16 removeOverrides = kFalse,
280  const bool16 applyParaStyle = kTrue) const = 0;
281 
293  virtual ErrorCode ApplyCellStyleAndClearAll(const UIDRef& whichStyle,
294  const UIDRef& tableModelRef,
295  const GridArea& whichArea) const = 0;
296 
312  virtual ErrorCode EditCellStyle(const PMString& styleName,
313  const AttributeBossList* styleAttrList,
314  IWorkspace* workspace,
315  const UID& styleUID,
316  const UID& basedOnStyleUID,
317  const VirtualKey shortcutKey = kVirtualNullKey,
318  const int16 modifiers = 0,
319  const GlobalTime* shortcutTime = nil) const = 0;
320 
337  virtual ErrorCode DeleteCellStyle(const UIDRef& styleToDelete,
338  const UID& replacementStyle = kInvalidUID,
339  const bool16 preserveFormatting = kFalse) const = 0;
340 
366  virtual ErrorCode CreateCellStyle(IWorkspace* workspace,
367  const IStyleGroupHierarchy* parentHier,
368  const int32 position,
369  const PMString& syleName,
370  UIDRef& outStyleRef,
371  const UID& basedOnStyle = kInvalidUID,
372  const AttributeBossList* styleAttrs = nil,
373  const VirtualKey shortcutKey = kVirtualNullKey,
374  const int16 modifiers = 0,
375  const GlobalTime* shortcutTime = nil) const = 0;
376 
391  virtual ErrorCode CreateCellStyle(const UIDRef& tableModelRef,
392  const GridAddress& selectedAddress,
393  const IStyleGroupHierarchy* parentHier = nil,
394  const int32 stylePosition = -1) const = 0;
395 
407  virtual bool16 CanBreakLinkWithCellStyle(const ITableModel* tableModel,
408  const GridArea& whichArea) const = 0;
409 
425  virtual ErrorCode BreakLinkWithStyle(const UIDRef& tableModelRef,
426  const GridArea& whichArea) const = 0;
427 
441  virtual bool16 CanRedefineCellStyle(const ITableModel* tableModel,
442  const GridAddress& whichAddress) const = 0;
443 
457  virtual ErrorCode RedefineStyle(const UIDRef& tableModelRef,
458  const GridAddress& whichAddress) const = 0;
459 
475  virtual ErrorCode ClearCellStyleOverrides(const UIDRef& tableModelRef,
476  const GridArea& whichArea) const = 0;
477 
478 
488  virtual ErrorCode ClearAllCellOverrides(const UIDRef& tableModelRef,
489  const GridArea& whichArea) const = 0;
503  virtual ErrorCode GetSelectedCellStyles(const UIDRef& tableModelRef,
504  const GridArea& whichArea,
505  UIDList& out_SelectedStyles) const = 0;
506 
516  virtual bool16 ClearParaStyleOverride(const ITableModel* tableModel,
517  const GridAddress& whichCell) const = 0;
518  };
519 }
520 #endif