InDesign SDK
20.5
InDesign SDK
Documentation
Bosses
Sample plug-ins
Class Index
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
IStyleMappings.h
1
//========================================================================================
2
//
3
// $File$
4
//
5
// Owner: Prakash Verma
6
//
7
// $Author$
8
//
9
// $DateTime$
10
//
11
// $Revision$
12
//
13
// $Change$
14
//
15
// ADOBE CONFIDENTIAL
16
//
17
// Copyright 2010 Adobe Systems Incorporated
18
// All Rights Reserved.
19
//
20
// NOTICE: All information contained herein is, and remains
21
// the property of Adobe Systems Incorporated and its suppliers,
22
// if any. The intellectual and technical concepts contained
23
// herein are proprietary to Adobe Systems Incorporated and its
24
// suppliers and are protected by trade secret or copyright law.
25
// Dissemination of this information or reproduction of this material
26
// is strictly forbidden unless prior written permission is obtained
27
// from Adobe Systems Incorporated.
28
//
29
//========================================================================================
30
31
#ifndef __IStyleMappings_h__
32
#define __IStyleMappings_h__
33
34
//interface includes
35
#include "IStyleInfo.h"
36
37
//project includes
38
#include "SharedContentID.h"
39
40
class
IStyleMappings
:
public
IPMUnknown
41
{
42
public
:
46
enum
{ kDefaultIID = IID_ISTYLEMAPPINGS };
47
51
enum
MappingStyleType
{
52
54
kParaStyleMapping
= 0,
55
57
kCharStyleMapping
,
58
60
kTableStyleMapping
,
61
63
kCellStyleMapping
,
64
66
kObjectStyleMapping
,
67
};
68
72
enum
MappingRuleType
{
73
75
kStyleMappingRule
= 0,
76
78
kGroupMappingRule
,
79
81
kStyleToGroupMappingRule
,
82
84
kGroupToStyleMappingRule
,
85
};
86
91
struct
MappingRule
{
92
94
PMString
fSrcString
;
95
97
PMString
fDestString
;
98
100
MappingRuleType
fRuleType
;
101
103
MappingRule
(
PMString
srcString,
PMString
destString,
MappingRuleType
ruleType):
fSrcString
(srcString),
fDestString
(destString),
fRuleType
(ruleType) {}
104
106
MappingRule
(
const
MappingRule
&mapRule):
fSrcString
(mapRule.
fSrcString
),
fDestString
(mapRule.
fDestString
),
fRuleType
(mapRule.
fRuleType
) {}
107
109
MappingRule
():
fSrcString
(
PMString
()),
fDestString
(
PMString
()),
fRuleType
(
kStyleMappingRule
) {}
110
112
bool
operator==
(
const
MappingRule
&other)
const
113
{
114
return
((this->
fSrcString
== other.
fSrcString
) && (this->fDestString == other.
fDestString
) && (this->fRuleType == other.
fRuleType
));
115
}
116
};
117
119
typedef
std::vector<MappingRule>
MappingRuleVector
;
120
126
virtual
void
SetStyleMappings
(
const
MappingRuleVector
& inStyleMap,
MappingStyleType
eInMappingType) = 0;
127
133
virtual
void
GetStyleMappings
(
MappingStyleType
eInMappingType,
MappingRuleVector
& outStyleMap)
const
= 0;
134
142
virtual
void
SetMapping
(
const
PMString
& inStrStyleName,
const
PMString
& inStrMappedTo,
MappingRuleType
eInMappingRuleType,
MappingStyleType
eInMappingStyleType) = 0;
143
152
virtual
int32
AddMapping
(
const
PMString
& inStrStyleName,
const
PMString
& inStrMappedTo,
MappingRuleType
eInMappingRuleType,
MappingStyleType
eInMappingStyleType) = 0;
153
159
virtual
void
AddMapping
(
MappingRule
&inMappingRule,
MappingStyleType
eInMappingStyleType) = 0;
160
169
virtual
MappingRuleType
FindMapping
(
const
PMString
& inStrStyleName,
MappingStyleType
eInMappingType,
PMString
& outStrMappedTo)
const
= 0;
170
179
virtual
MappingRuleType
GetNthMapping
(int32 n,
MappingStyleType
eInMappingStyleType,
PMString
& outStrStyleName,
PMString
& outStrMappedTo)
const
= 0;
180
188
virtual
bool16
GetNthMapping
(int32 n,
MappingStyleType
eInMappingStyleType,
MappingRule
&outMappingRule)
const
= 0;
189
198
virtual
void
SetNthMapping
(int32 n,
const
PMString
& inStrStyleName,
const
PMString
& inStrMappedTo,
MappingRuleType
eInMappingRuleType,
MappingStyleType
eInMappingStyleType) = 0;
199
208
virtual
int32
GetMappingIndex
(
MappingStyleType
eInMappingStyleType,
PMString
& inStrStyleName,
MappingRuleType
eInMappingRuleType,
PMString
& inStrMappedTo)
const
= 0;
209
215
virtual
int32
GetMappingRuleVectorSize
(
MappingStyleType
eInMappingStyleType)
const
= 0;
216
221
virtual
void
CopyFrom
(
const
IStyleMappings
*inStyleMap) = 0;
222
226
virtual
void
ClearMappings
() = 0;
227
233
virtual
MappingStyleType
GetMappingStyleType
(
const
IStyleInfo
* styleInfo)
const
= 0;
234
241
virtual
bool16
RemoveMapping
(int32 n,
MappingStyleType
mappingStyleType) = 0;
242
};
243
244
#endif //__IStyleMappings_h__
tmpdoxygeninput
IStyleMappings.h
Generated on Sat Jul 19 2025 02:54:15 for InDesign SDK by
1.8.3.1