InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLImportPreferences.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Will Lin
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 __IXMLImportPreferences__
25 #define __IXMLImportPreferences__
26 
27 
28 #include "IPMUnknown.h"
29 #include "XMLID.h"
30 
32 
37 {
38 public:
39  enum { kDefaultIID = IID_IXMLIMPORTPREFERENCES };
40 
45  enum kPrefType {
52 
69  virtual void Initialize(IXMLImportOptionsPool *pool) = 0;
70 
75  virtual void Uninitialize() = 0;
76 
81  virtual int32 GetPrefCount() const = 0;
82 
88  virtual kPrefType GetNthPrefType(int32 n) const = 0;
89 
95  virtual int32 GetNthPrefAsInt(int32 n) const = 0;
96 
102  virtual bool16 GetNthPrefAsBool(int32 n) const = 0;
103 
109  virtual WideString GetNthPrefAsString(int32 n) const = 0;
110 
116  virtual void SetNthPref(int32 n, const int32 &newVal) = 0;
117 
123  virtual void SetNthPref(int32 n, const bool16 &newVal) = 0;
124 
130  virtual void SetNthPref(int32 n, const WideString &newVal) = 0;
131 
138  virtual void CommitChanges() = 0;
139 };
140 
147 {
148 public:
150  : fPrefs(prefs)
151  {
152  if (fPrefs != nil)
153  fPrefs->Initialize(prefsPool);
154  }
155 
157  {
158  if (fPrefs != nil)
159  fPrefs->Uninitialize();
160  }
161 
162 private:
163  IXMLImportPreferences* fPrefs;
164 };
165 
166 #endif // __IXMLImportPreferences__
167