InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGradientAttributeSuite Class Referenceabstract

#include <IGradientAttributeSuite.h>

Inheritance diagram for IGradientAttributeSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGRADIENTATTRIBUTESUITE }
 
enum  AttributeType {
  kUnknownAttrType = -1, kFillAngle = 0, kFillLength, kFillCenter,
  kFIllRadius, kFIllHiliteAngle, kFIllHiliteLength, kStrokeAngle,
  kStrokeLength, kStrokeCenter, kStrokeRadius, kStrokeHiliteAngle,
  kStrokeHiliteLength, kMaxNumberAttrTypes
}
 

Public Member Functions

virtual uint16 GetAttributeCount (ClassID attributeClassID)=0
 
virtual uint16 GetAttributeValueCount (ClassID attributeClassID, uint32 index)=0
 
virtual uint16 GetAttributeCount (AttributeType attributeType)=0
 
virtual const IPMUnknownQueryAttribute (uint32 index, ClassID attributeClass, const PMIID &interfaceIID=IID_IUNKNOWN)=0
 
virtual IPMUnknownCreateAttributeCopy (uint32 index, ClassID attributeClass, const PMIID &interfaceIID=IID_IUNKNOWN)=0
 
virtual ErrorCode CopyIntoAttribute (uint32 index, IPMUnknown *iSourceAttribute)=0
 
virtual PMReal GetRealNumberAttributeValue (uint32 index, AttributeType attributeType)=0
 
virtual PMPoint GetPointAttributeValue (uint32 index, AttributeType attributeType)=0
 
virtual bool16 IsAttributeUnique (ClassID attributeClass)=0
 
virtual bool16 IsAttributeUnique (AttributeType attributeType)=0
 
virtual ErrorCode ApplyAttribute (ClassID attributeClass, const IPMUnknown *iAttribute)=0
 
virtual ErrorCode ApplyAttributes (IGraphicStyleAttributeBossList *iAttributeList)=0
 
virtual ErrorCode ApplyGradientVector (const PMPoint &startPoint, const PMPoint &endPoint)=0
 
virtual ErrorCode ApplyDefaultAttributes (GradientType gradientType)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

A selection related attribute suite interface for the gradient attributes. It provides get and set methods for accessing the gradient attributes. It works in conjunction with the IGraphicAttributeSuite.

See Also
also IGraphicAttributeSuite.h

Member Enumeration Documentation

Enumerator
kUnknownAttrType 

kUnknownAttrType indicates an unknown gradient attribute type.

kFillAngle 

kFillAngle indicates the gradient fill angle attribute.

kFillLength 

kFillLength indicates the gradient fill length attribute.

kFillCenter 

kFillCenter indicates the gradient fill center attribute if gradient type is a kRadial gradient. It indicates a gradient start point attribute if gradient type is a kAxial gradient.

kFIllRadius 

kFIllRadius indicates the gradient fill radius attribute.

kFIllHiliteAngle 

kFIllHiliteAngle indicates the gradient fill hilite angle attribute.

kFIllHiliteLength 

kFIllHiliteLength indicates the gradient fill hilite length attribute.

kStrokeAngle 

kFillAngle indicates the gradient stroke angle attribute.

kStrokeLength 

kFillLength indicates the gradient stroke length attribute.

kStrokeCenter 

kFillCenter indicates the gradient stroke center attribute if gradient type is a kRadial gradient. It indicates a gradient start point attribute if gradient type is a kAxial gradient.

kStrokeRadius 

kFIllRadius indicates the gradient stroke radius attribute.

kStrokeHiliteAngle 

kFIllHiliteAngle indicates the gradient stroke hilite angle attribute.

kStrokeHiliteLength 

kFIllHiliteLength indicates the gradient stroke hilite length attribute.

kMaxNumberAttrTypes 

kMaxNumberAttrTypes indicates the maximum number of gradient attribute types.

Member Function Documentation

virtual ErrorCode IGradientAttributeSuite::ApplyAttribute (ClassID attributeClass,
const IPMUnknowniAttribute 
)
pure virtual

Apply the specified attribute. If applying a angle attribute, other related gradient attributes will be adjusted relative to the left-bottom of the text/graphic frame which the angle attribute is being applied.

Parameters
attributeClassis the specified attribute class.
iAttributeis the attribute.
Returns
kSuccess if successful. Otherwise returns an error code.
virtual ErrorCode IGradientAttributeSuite::ApplyAttributes (IGraphicStyleAttributeBossListiAttributeList)
pure virtual

Apply the list of attributes. Attributes are applied as is without any modification.

Parameters
iAttributeListis the list of attributes to apply.
Returns
kSuccess if successful. Otherwise returns an error code.
virtual ErrorCode IGradientAttributeSuite::ApplyDefaultAttributes (GradientType gradientType)
pure virtual

Apply the default gradient attributes based on the gradient type. Attributes are applied relative to the frame geometry. All related attributes are reset to their original default values.

Parameters
gradientTypespecifies the gradient type. This is either kAxial or kRadial.
See Also
also GraphicTypes.h
Returns
kSuccess if successful. Otherwise returns an error code.
virtual ErrorCode IGradientAttributeSuite::ApplyGradientVector (const PMPointstartPoint,
const PMPointendPoint 
)
pure virtual

Apply the gradient vector to the current selection. If one or more item in the current current selection does not already have gradient fill rendering object applied, the current stroke or fill gradient rendering object will be applied to the entire selection first.

Parameters
startPointis the starting point of the vector in the pastboard coordinate.
endPointis the ending point of the vector in the pastboard coordinate.
Returns
kSuccess if successful. Otherwise returns an error code.
virtual ErrorCode IGradientAttributeSuite::CopyIntoAttribute (uint32 index,
IPMUnknowniSourceAttribute 
)
pure virtual

Copy the content of source attribute into the nth attribute of the same type.

Parameters
indexspecifies the nth attribute for this attribute class.
iSourceAttributespecifies the source attribute.
Returns
kSuccess if successful. Otherwise returns an error code.
virtual IPMUnknown* IGradientAttributeSuite::CreateAttributeCopy (uint32 index,
ClassID attributeClass,
const PMIIDinterfaceIID = IID_IUNKNOWN 
)
pure virtual

Create a copy of the nth attribute specified by the attribute class ID. The caller is responsible to release the object returned.

Parameters
indexspecifies the nth attribute for this attribute class.
attributeClassspecifies the attribute class.
interfaceIIDis the interested interface IID.
Returns
the interface pointer to the specified attribute copy.
virtual uint16 IGradientAttributeSuite::GetAttributeCount (ClassID attributeClassID)
pure virtual

Return the attribute count for the spcified attrribute class.

Parameters
ClassIDattributeClassID specifies the attribute class.
Returns
the number of count for this attribute class.
virtual uint16 IGradientAttributeSuite::GetAttributeCount (AttributeType attributeType)
pure virtual

Return the attribute count for the spcified attrribute type.

Parameters
attributeTypespecifies the attribute type.
Returns
the number of count for this attribute type.
virtual uint16 IGradientAttributeSuite::GetAttributeValueCount (ClassID attributeClassID,
uint32 index 
)
pure virtual

Return the attribute count for the spcified attrribute class and value.

Parameters
attributeClassIDspecifies the attribute class.
indexspecifies the nth attribute value.
Returns
the number of count for this attribute class and value.
virtual PMPoint IGradientAttributeSuite::GetPointAttributeValue (uint32 index,
AttributeType attributeType 
)
pure virtual

Returns the nth attribute value for the specified attribute type.

Parameters
indexspecifies the nth attribute for this attribute class.
attributeTypespecifies the attribute type.
Returns
a PMPoint for the specified attribute.
virtual PMReal IGradientAttributeSuite::GetRealNumberAttributeValue (uint32 index,
AttributeType attributeType 
)
pure virtual

Returns the nth attribute value for the specified attribute type.

Parameters
indexspecifies the nth attribute for this attribute class.
attributeTypespecifies the attribute type.
Returns
a PMReal for the specified attribute.
virtual bool16 IGradientAttributeSuite::IsAttributeUnique (ClassID attributeClass)
pure virtual

Return kTrue if the attribugte specified is unique.

Parameters
attributeClassspecifies the attribute class.
Returns
true if specified attribute is unique.
virtual bool16 IGradientAttributeSuite::IsAttributeUnique (AttributeType attributeType)
pure virtual

Return kTrue if the attribugte specified is unique.

Parameters
attributeTypespecifies the attribute type.
Returns
true if specified attribute is unique.
virtual const IPMUnknown* IGradientAttributeSuite::QueryAttribute (uint32 index,
ClassID attributeClass,
const PMIIDinterfaceIID = IID_IUNKNOWN 
)
pure virtual

Returns the nth attribute specified by the attribute class ID. The caller is responsible to release the object returned.

Parameters
indexspecifies the nth attribute for this attribute class.
attributeClassspecifies the attribute class.
interfaceIIDis the interested interface IID.
Returns
the interface pointer to the specified attribute.