InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IRulerSettings.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 __IRulerSettings__
25 #define __IRulerSettings__
26 
27 #include "IPMUnknown.h"
28 #include "PMPoint.h"
29 
30 //---------------------------------------------------------------
31 // Interface IRulerSettings
32 //---------------------------------------------------------------
33 
34 class IRulerSettings : public IPMUnknown
35 {
36 public:
37  enum Orientation { kHorizontal, kVertical };
38 
39  virtual void SetOrientation( Orientation nOrientation ) = 0;
40  // sets the ruler's orientation, default is kHorizontal.
41  virtual Orientation GetOrientation() const = 0;
42  // returns the ruler's orientation, default is kHorizontal.
43  virtual ClassID GetUnitOfMeasure() const = 0;
44  // returns XUnitOfMeasure on kHorizontal and YUnitOfMeasure on kVertical
45  virtual PMPoint GetZeroPoint() const = 0;
46  // returns the zero point
47  virtual void SetZeroPoint( const PMPoint &rPoint ) = 0;
48  // sets the zero point -- allowed only for the text ruler
49  inline bool16 IsHorizontal() const { return this->GetOrientation() == kHorizontal; }
50  // returns whether the ruler is in horizontal mode or not (=vertical).
51 };
52 
53 #endif