InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
INumberConverter.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Anurag Wahi
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 // The INumberConverter interface allows installable numbering styles. The styles may be
24 // aggregated on different services such as the page numbering service, the paragraph
25 // numbering service etc., which would allow each type of numbering to support different
26 // subsets of numbering styles.
27 // Given a number, this interface will convert that number into a string that will
28 // be used to display the number in the document. The earlier IPageNumberConverter interface
29 // could implement multiple styles, but this interface implements only a single style.
30 //
31 //========================================================================================
32 
33 #ifndef __INUMBERCONVERTER__
34 #define __INUMBERCONVERTER__
35 
36 #include "IPMUnknown.h"
37 #include "SectionID.h"
38 
39 class PMString;
40 
44 {
45 public:
46  enum { kDefaultIID = IID_INUMBERCONVERTER };
47 
51  void GetStyleName(PMString &styleName) const
52  { return GetNumberingStyleName(styleName); }
56  void GetStyleNameBase(PMString &styleName) const
57  { return GetStyleName(styleName); }
58 
65  virtual bool16 IncludeStyleChoiceInUI() const = 0;
66 
70  void Convert(const int32& number, PMString &numString) const
71  { return NumberToString(number, numString); }
72 
77  virtual void GetNumberingStyleName(PMString &styleName) const = 0;
78 
84  virtual void NumberToString(int32 number, PMString &numString) const = 0;
85 };
86 
87 
88 #endif // __INUMBERCONVERTER__