InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXPAttributeSuite::PartialADXY Class Reference

#include <IXPAttributeSuite.h>

Public Types

enum  WhichParameter {
  kInvalid, kAngle, kDistance, kXOffset,
  kYOffset
}
 
typedef object_type data_type
 

Public Member Functions

 PartialADXY (IXPAttributeSuite::AttributeTarget target, IXPAttributeSuite::AttributeGroup group, WhichParameter param1, const PMReal &value1, WhichParameter param2=kInvalid, const PMReal &value2=0)
 
 PartialADXY (IXPAttributeSuite::AttributeTarget target, IXPAttributeSuite::AttributeGroup group)
 
 PartialADXY (const PartialADXY &rhs)
 
bool32 Validate (bool32 assert=kFalse)
 
PartialADXYoperator= (const PartialADXY &rhs)
 
bool32 IsSingleParameter () const
 

Public Attributes

IXPAttributeSuite::AttributeTarget fTarget
 
IXPAttributeSuite::AttributeGroup fGroup
 
WhichParameter fParamXY
 
WhichParameter fParamAD
 
PMReal fValueXY
 
PMReal fValueAD
 

Detailed Description

A partial angle, distance, xoffset, yoffset record. The purpose of this class is to record the application of a single pseudo-attribute which doesn't match the attribute arrangement of the effect. For example, it's possible in the UI to specify only a new angle value for drop shadow, without specifying the distance. But drop shadows don't measure their offset in terms of angle in distance; they measure in terms of X and Y offsets. So you can't set up a set-attributes command the way you need to. This class permits this kind of partial angle/distance/x/y (ADXY) setup.

Constructor & Destructor Documentation

IXPAttributeSuite::PartialADXY::PartialADXY (IXPAttributeSuite::AttributeTarget target,
IXPAttributeSuite::AttributeGroup group,
WhichParameter param1,
const PMRealvalue1,
WhichParameter param2 = kInvalid,
const PMRealvalue2 = 0 
)
inline

Basic constructor.

Parameters
targetIN The target (object vs stroke vs fill vs content).
groupIN The effect group: must be drop shadow, inner shadow.
param1IN Which of the four parameters to set. Must be an "opposing" parameter from the "natural" attributes the effect supports (eg angle for drop shadow, which has a natural x/y offset attribute).
value1IN The value of the parameter to set.
param2IN Optional second parameter, for the unusual cases where the user has specified one attribute from column A and one from column B.
value2IN The value of the second parameter to set.
IXPAttributeSuite::PartialADXY::PartialADXY (const PartialADXYrhs)
inline

Copy-constructor.

Parameters
rhsIN The right hand side.

Member Function Documentation

PartialADXY& IXPAttributeSuite::PartialADXY::operator= (const PartialADXYrhs)
inline

Assignment operator.

Parameters
rhsIN The right hand side.
Returns
A reference to the lhs.
bool32 IXPAttributeSuite::PartialADXY::Validate (bool32 assert = kFalse)
inline

Checks a completed partial for sanity.

Parameters
assertIN True to assert on an invalid configuration (debug only).
Returns
kTrue if it's OK, kFalse otherwise. Invalid partials won't be applied.