InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISummaryUtils.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 __ISummaryUtils__
25 #define __ISummaryUtils__
26 
27 #include "GenericSettingsID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 
31 class IGenericSettings;
33 #include "IGenericSettingsAttribute.h"
34 #include "IGenericSettingsOutput.h"
35 
36 
40 class ISummaryUtils : public IPMUnknown
41 {
42 public:
43  enum { kDefaultIID = IID_ISUMMARYUTILS };
44 
49  virtual void GenerateHumanTextSummary( IGenericSettings* pSettings, PMString& strResult ) = 0;
50 
58  virtual void ExportHumanTextSummary( IGenericSettings* pSettings,
59  const PMString& strDefaultFilename,
60  const PMString& strExportDialogTitle,
61  const PMString& strFileType,
62  const PMString& strFileExtension ) = 0;
63 
70  virtual void WriteToFile( IGenericSettings* pSettings, IGenericSettingsOutputStrategy* pStrategy, IDFile& fileTarget ) = 0;
71 
72  //________________________________________________________________________________________
73  // Followings are methods for Building Generic Settings Objects
74  //________________________________________________________________________________________
75 
84  virtual IGenericSettingsAttribute* AddNumber( IGenericSettingsGroup* pGroup, const char* pszName, int32 nValue, bool16 bRelevant = kTrue ) = 0;
85 
97  virtual IGenericSettingsAttribute* AddNumber( IGenericSettingsGroup* pGroup, const char* pszName, const PMReal& nValue, int32 nDigits = -1, bool16 bRound = kFalse, bool16 bEliminateZeros = kFalse, bool16 bRelevant = kTrue ) = 0;
98 
112  virtual IGenericSettingsAttribute* AddNumberUnit( IGenericSettingsGroup* pGroup, const char* pszName, const PMString& unitString, const PMReal& nValue, int32 nDigits = -1, bool16 bRound = kFalse, bool16 bEliminateZeros = kFalse, bool16 bRelevant = kTrue ) = 0;
113 
122  virtual IGenericSettingsAttribute* AddOnOff( IGenericSettingsGroup* pGroup, const char* pszName, bool16 bOn, bool16 bRelevant = kTrue ) = 0;
123 
132  virtual IGenericSettingsAttribute* AddYesNo( IGenericSettingsGroup* pGroup, const char* pszName, bool16 bYes, bool16 bRelevant = kTrue ) = 0;
133 
143  virtual IGenericSettingsAttribute* AddString( IGenericSettingsGroup* pGroup, const PMString& pszName, bool16 bFirst, const PMString& pszStr1, const PMString& pszStr2 ) = 0;
144 
154  virtual IGenericSettingsAttribute* AddString( IGenericSettingsGroup* pGroup, const PMString& pszName, const PMString& pszValue, bool16 bRelevant = kTrue ) = 0;
155 
166  virtual IGenericSettingsAttribute* AddStringDefault( IGenericSettingsGroup* pGroup, const PMString& pszName, const PMString& strValue, const PMString& pszDefault, bool16 bRelevant = kTrue, bool16 bTranslateNonDefault = kTrue ) = 0;
167 
178  virtual IGenericSettingsAttribute* AddRealUnit( IGenericSettingsGroup* pGroup, const char* pszName, const PMReal& nValue, ClassID nWidgetBoss, bool16 bRelevant = kTrue ) = 0;
179 
188  virtual IGenericSettingsAttribute* AddPercent( IGenericSettingsGroup* pGroup, const char* pszName, const PMReal& nValue, bool16 bRelevant = kTrue ) = 0;
189 
195  virtual PMString ValueToUnitString(ClassID widgetBoss, const PMReal& value) = 0;
196 
197  //________________________________________________________________________________________
198  // Higher-level summarization utilties.
199  //________________________________________________________________________________________
200 
208  virtual IGenericSettingsAttribute* AddMarkWeight( IGenericSettingsGroup* pGroup, const char* pszLabel, const PMReal& nWeight ) = 0;
209 
221  virtual void AddBleeds( IGenericSettingsGroup* pGroup, bool16 bSpreads, const PMReal& nTop, const PMReal& nBottom, const PMReal& nLeft, const PMReal& nRight, bool16 bRelevant = kTrue ) = 0;
222 
229  virtual IGenericSettingsAttribute* AddFlattenerStyle(IGenericSettingsGroup* pGroup, UID& flattenerStyleUID ) = 0;
230 
236  virtual int32 QualityFromCompression( int32 nCompression, bool16 bUsingMono = kFalse ) = 0;
237 
243  virtual int32 TypeFromCompression( int32 nCompression, bool16 bUsingMono = kFalse ) = 0;
244 };
245 
246 
247 #endif // __ISummaryUtils__