InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITabRulerData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
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 __ITabRulerData__
25 #define __ITabRulerData__
26 
27 #include "IPMUnknown.h"
28 #include "TabStop.h"
29 #include "K2Vector.h"
30 #include "ICompositionStyle.h"
31 
32 //---------------------------------------------------------------
33 // Interface ITabRulerData
34 //---------------------------------------------------------------
35 
36 class PMPoint;
37 class PMMatrix;
38 class TabStopTable;
39 class TabRulerItem; // ##rk: This class is not public.
40 class TabRulerItemTable; // ##rk: This class is not public.
41 
42 const PMReal kTabRulerUnclearIndent = -1.0;
43 
44 
45 // @see TabRulerItem, TabRulerItemTable
50 class ITabRulerData : public IPMUnknown
51 {
52 public:
54  enum TabState { kOff, kOn, kMulti, kDragged, kSelected };
55  virtual void SetTabStopTable( const TabStopTable &rTable ) = 0;
56  virtual bool16 GetTabStopTable( TabStopTable *pTable ) const = 0;
57 
59  virtual void SelectItem( const TabRulerItem *pItem ) = 0;
61  virtual const TabRulerItem* GetSelectedItem() const = 0;
63  virtual const TabRulerItem * GetSelectedTabStop() const = 0;
65  virtual const TabRulerItem* GetTabRulerItem( const PMPoint &rPoint ) const = 0;
66 
67  // sets a new (already initialized) tabstop. A nil clears the new tabstop. */
68  // returns kFalse if the new tabstop does not keep the kMinTabDistance to its neighbors. */
69  virtual bool16 SetNewTabStop( const TabRulerItem &rNewTabStop, bool16 bSelect = kTrue, TabStopTable *pDeleted = nil ) = 0;
71  virtual const TabRulerItem * GetTabStopAt( PMReal nPosition ) const = 0;
73  virtual bool16 MoveTabRulerItem( const TabRulerItem &rItem, PMReal nNewPosition, bool16 bDraw = kTrue, TabStopTable *pDeleted = 0, bool16 bConstrainLeftIndent = kTrue ) = 0;
74  virtual bool16 RemoveTabStop( const TabRulerItem &rStop ) = 0;
75  virtual void SetDefaultTabAlignment( TabStop::TabAlignment nAlignment ) = 0;
76  virtual TabStop::TabAlignment GetDefaultTabAlignment() const = 0;
78  virtual void SetDefaultTabAlignChar( textchar c ) = 0;
80  virtual textchar GetDefaultTabAlignChar() const = 0;
82  virtual void SetDefaultTabLeader(PMString string) = 0;
83  virtual PMString GetDefaultTabLeader() const = 0;
85  virtual bool16 IsNewTabPosition( PMReal nPosition ) const = 0;
86 
87  virtual bool16 SetFirstIndent( PMReal nNewFirst, bool16 bConstrainedByLeftIndent = kTrue ) = 0;
88  virtual PMReal GetFirstIndent() const = 0;
89  virtual bool16 SetLeftIndent( PMReal nNew, bool16 bConstrainLeftIndent = kTrue ) = 0;
90  virtual PMReal GetLeftIndent() const = 0;
91  virtual bool16 SetRightIndent( PMReal nNew ) = 0;
92  virtual PMReal GetRightIndent() const = 0;
93  virtual bool16 SetLeftMargin( PMReal nNew ) = 0;
94  virtual PMReal GetLeftMargin() const = 0;
95  virtual bool16 SetRightMargin( PMReal nNew ) = 0;
96  virtual PMReal GetRightMargin() const = 0;
97 
100  virtual void SetScale( PMReal nScale ) = 0;
101  virtual PMReal GetScale() const = 0;
102 
104  virtual const PMMatrix & GetTabRulerItemMatrix( PMMatrix *pMatrix ) const = 0;
106  virtual bool16 RepeatTab() = 0;
107 
109  virtual void SetDragItem( const TabRulerItem *pItem ) = 0;
110  virtual const TabRulerItem * GetDragItem() const = 0;
111 
113  virtual void SetTabRulerItemTable( const TabRulerItemTable &rTable ) = 0;
115  virtual const TabRulerItemTable &GetTabRulerItemTable() const = 0;
116 
119  virtual const TabRulerItem * GetTabStopAfter( PMReal nPosition ) const = 0;
120 
127 
128  virtual void SetDiffFrames(PMReal diff) = 0;
129  virtual PMReal GetDiffFrames() const = 0;
130 
131  virtual void SetFrameBoxWidth(PMReal width) = 0;
132  virtual PMReal GetFrameBoxWidth() const = 0;
133 
134 };
135 
136 DECLARE_BASE_TYPE(ITabRulerData::TabState);
137 
138 const PMReal kTabRulerDefaultRightMargin = 216.0;
139 
140 #endif