InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableStylesFacade.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 ITABLESTYLESFACADE_H
25 #define ITABLESTYLESFACADE_H
26 
27 #include "IPMUnknown.h"
28 #include "TableTypes.h"
29 #include "TabStyID.h"
30 #include "keyboarddefs.h"
31 
33 class ITableModel;
34 class IWorkspace;
35 
36 class AttributeBossList;
37 class GlobalTime;
44 namespace Facade
45 {
47  {
48  public:
49  enum {kDefaultIID = IID_ITABLESTYLESFACADE};
50 
58  virtual UID GetBasicTableStyle(IDataBase* db) const = 0;
59 
70  virtual ErrorCode CopyStylesToGroup(const UIDRef& whichGroup,
71  const UIDList& whichStyles) const = 0;
72 
82  virtual UID GetRegionalStyle(const IPMUnknown* tableModelBoss,
83  const GridAddress& address,
84  GridArea* runArea = nil) const = 0;
85 
96  virtual ErrorCode GetRegionalStylesInArea(const UIDRef& tableModelRef,
97  const GridArea& whichArea,
98  UIDList& out_RegionalStyleSet) const = 0;
99 
112  virtual ErrorCode GetTableStyleAttrsResolved(const UIDRef& tableStyle,
113  AttributeBossList& out_ResolvedAttrs) const = 0;
114 
121  virtual UID GetRootTableStyle(IDataBase* db) const = 0;
122 
133  virtual ICommand* CreateEditTableStyleCmd(const UIDRef& tableStyleRef) const = 0;
134 
144  virtual ErrorCode SetDefaultStyle(const UIDRef& defaultStyle) const = 0;
145 
159  virtual ErrorCode CreateNewStyleGroup(IWorkspace* workspace,
160  const PMString& groupName,
161  const UID& parentUID,
162  const int32 position,
163  UID* out_NewGroup = nil) const = 0;
164 
174  virtual ErrorCode RenameTableStyle(const UIDRef& whichStyle,
175  const PMString& newName) const = 0;
176 
186  virtual ErrorCode DuplicateTableStyles(const UIDList& stylesToDuplicate) const = 0;
187 
197  virtual bool16 CanBreakLinkWithStyle(const UIDRef& tableModelRef) const = 0;
198 
210  virtual bool16 CanBreakLinkWithStyle(const ITableModel* tableModel) const = 0;
211 
222  virtual ErrorCode BreakLinkWithStyle(const UIDRef& tableModel) const = 0;
223 
239  virtual ErrorCode ApplyTableStyle(const UIDRef& whichStyle,
240  const UIDRef& tableModelRef,
241  const bool16 removeTableOverrides = kFalse,
242  const bool16 removeCellStyle = kFalse) const = 0;
243 
263  virtual ErrorCode EditTableStyle(const PMString& styleName,
264  const AttributeBossList* attrList,
265  IWorkspace* workspace,
266  const UID& styleUID,
267  const UID& basedOn,
268  const VirtualKey shortcutKey = kVirtualNullKey,
269  const int16 modifiers = 0,
270  const GlobalTime* shortcutTime = nil,
271  const bool16 preserveRegionalFormatting = kFalse) const = 0;
272 
293  virtual ErrorCode CreateTableStyle(IWorkspace* workspace,
294  const IStyleGroupHierarchy* parentHier,
295  const int32 position,
296  const PMString& styleName,
297  UIDRef& out_StyleRef,
298  const UID& basedOnStyle = kInvalidUID,
299  const AttributeBossList* attrList = nil,
300  const VirtualKey shortcut = kVirtualNullKey,
301  const int16 modifiers = 0,
302  const GlobalTime* shortcutTime = nil) const = 0;
303 
318  virtual ErrorCode CreateNewTableStyle(const UIDRef& tableModel,
319  const IStyleGroupHierarchy* parentHier = nil,
320  const int32 stylePosition = -1) const = 0;
321 
333  virtual ErrorCode DeleteTableStyle(const UIDRef& styleToDelete,
334  const UID& replacementStyle,
335  const bool16 preserveFormatting = kFalse) const = 0;
336 
345  virtual ErrorCode GetLocalOverrides(const UIDRef& tableModel,
346  AttributeBossList& out_LocalOverrides) const = 0;
347 
358  virtual ErrorCode ClearLocalOverrides(const UIDRef& tableModel,
359  const bool16 clearCellStyles = kFalse) const = 0;
360 
369  virtual ErrorCode GetTableStyle(const UIDRef& tableModel,
370  UID& out_TableStyle) const = 0;
371 
379  virtual bool16 HasLocalOverrides(const UIDRef& tableModel) const = 0;
380 
390  virtual bool16 CanRedefineTableStyle(const UIDRef& tableModelRef) const = 0;
391 
401  virtual bool16 CanRedefineTableStyle(const ITableModel* tableModel) const = 0;
402 
413  virtual ErrorCode RedefineTableStyle(const UIDRef& tableModel) const = 0;
414 
423  virtual ErrorCode DuplicateStyle(const UIDRef& styleToDup,
424  UIDRef& out_NewStyleRef) const = 0;
425  };
426 }
427 #endif