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

#include <TranFxUtils.h>

Public Types

enum  AttrState { eNoValue, eCommonValue, eMixedValue }
 

Public Member Functions

 TranFxUtils ()
 
virtual ~TranFxUtils ()
 
AttrState HasAdornment (const UIDList &itemList)
 
AttrState HasXOffset (const UIDList &itemList, PMReal &value)
 
AttrState HasYOffset (const UIDList &itemList, PMReal &value)
 
AttrState HasUseBlackAsOpaque (const UIDList &itemList, bool16 &value)
 
AttrState HasUseAlpha (const UIDList &itemList, bool16 &value)
 
AttrState HasUseBlur (const UIDList &itemList, bool16 &value)
 
bool16 CanApplyAdornment (const UIDList &itemList) const
 
bool16 CanApplyXOffset (const UIDList &itemList) const
 
bool16 CanApplyYOffset (const UIDList &itemList) const
 
bool16 CanApplyUseBlackAsOpaque (const UIDList &itemList) const
 
bool16 CanApplyUseAlpha (const UIDList &itemList) const
 
bool16 CanApplyUseBlur (const UIDList &itemList) const
 
ErrorCode ApplyAdornment (const UIDList &itemList, const bool16 isAdd)
 
ErrorCode ApplyXOffset (const UIDList &itemList, const PMReal &value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse)
 
ErrorCode ApplyYOffset (const UIDList &itemList, const PMReal &value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse)
 
ErrorCode ApplyUseBlackAsOpaque (const UIDList &itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse)
 
ErrorCode ApplyUseAlpha (const UIDList &itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse)
 
ErrorCode ApplyUseBlur (const UIDList &itemList, const bool16 value, bool16 doPrePost=kFalse, bool16 enableDoNotify=kFalse)
 

Detailed Description

Facade that wraps the commands needed to manage this plug-in's adornment and the custom graphic attributes that control it.

The implementation techniques shown in this class allow client suites to be called from a previewable dialog. See the TransparencyEffectUI plug-in.

Since all access to the custom graphic attributes that control this plug-in's transparency effect funnel through this class, their default value get applied here. This plug-in's graphic attributes are only added to a page item when the user overrides their value using the UI i.e. the custom graphic attributes are not applied to all new page items, they are only applied as required to plug-in's that have the effect.

See Also
kTranFxAdornmentBoss
kTranFxOffsetXAttrBoss
kTranFxOffsetYAttrBoss
kTranFxUseBlackAsOpaqueAttrBoss
kTranFxUseAlphaAttrBoss
kTranFxUseBlurAttrBoss
kAddPageItemAdornmentCmdBoss
kRemovePageItemAdornmentCmdBoss
IGraphicStateUtils
kXPItemXPPrePostCmdBoss

Member Enumeration Documentation

Enumeration indicating whether all the selected objects have no value, a common value or a mixed number of different values for a given attribute.

Constructor & Destructor Documentation

TranFxUtils::TranFxUtils ()
inline

Constructor.

virtual TranFxUtils::~TranFxUtils ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode TranFxUtils::ApplyAdornment (const UIDListitemList,
const bool16 isAdd 
)

Add or remove kTranFxAdornmentBoss.

Parameters
itemListIN references the objects to be affected.
isAddIN kTrue to add adornment, kFalse to remove.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode TranFxUtils::ApplyUseAlpha (const UIDListitemList,
const bool16 value,
bool16 doPrePost = kFalse,
bool16 enableDoNotify = kFalse 
)

Change the value of kTranFxUseAlphaAttrBoss.

Parameters
itemListIN references the objects to be affected.
valueIN the value to be applied.
doPrePostIN see IGraphicStateUtils::CreateAttributeCommand.
enableDoNotifyIN see IGraphicStateUtils::CreateAttributeCommand.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode TranFxUtils::ApplyUseBlackAsOpaque (const UIDListitemList,
const bool16 value,
bool16 doPrePost = kFalse,
bool16 enableDoNotify = kFalse 
)

Change the value of kTranFxUseBlackAsOpaqueAttrBoss.

Parameters
itemListIN references the objects to be affected.
valueIN the value to be applied.
doPrePostIN see IGraphicStateUtils::CreateAttributeCommand.
enableDoNotifyIN see IGraphicStateUtils::CreateAttributeCommand.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode TranFxUtils::ApplyUseBlur (const UIDListitemList,
const bool16 value,
bool16 doPrePost = kFalse,
bool16 enableDoNotify = kFalse 
)

Change the value of kTranFxUseBlurAttrBoss.

Parameters
itemListIN references the objects to be affected.
valueIN the value to be applied.
doPrePostIN see IGraphicStateUtils::CreateAttributeCommand.
enableDoNotifyIN see IGraphicStateUtils::CreateAttributeCommand.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode TranFxUtils::ApplyXOffset (const UIDListitemList,
const PMRealvalue,
bool16 doPrePost = kFalse,
bool16 enableDoNotify = kFalse 
)

Change the value of kTranFxOffsetXAttrBoss.

Parameters
itemListIN references the objects to be affected.
valueIN the value to be applied.
doPrePostIN see IGraphicStateUtils::CreateAttributeCommand.
enableDoNotifyIN see IGraphicStateUtils::CreateAttributeCommand.
Returns
kSuccess on success, other ErrorCode otherwise.
ErrorCode TranFxUtils::ApplyYOffset (const UIDListitemList,
const PMRealvalue,
bool16 doPrePost = kFalse,
bool16 enableDoNotify = kFalse 
)

Change the value of kTranFxOffsetYAttrBoss.

Parameters
itemListIN references the objects to be affected.
valueIN the value to be applied.
doPrePostIN see IGraphicStateUtils::CreateAttributeCommand.
enableDoNotifyIN see IGraphicStateUtils::CreateAttributeCommand.
Returns
kSuccess on success, other ErrorCode otherwise.
bool16 TranFxUtils::CanApplyAdornment (const UIDListitemList) const

Return kTrue if adornment can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if adornment can be applied, kFalse otherwise.
bool16 TranFxUtils::CanApplyUseAlpha (const UIDListitemList) const

Return kTrue if attribute can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if attribute can be applied, kFalse otherwise.
bool16 TranFxUtils::CanApplyUseBlackAsOpaque (const UIDListitemList) const

Return kTrue if attribute can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if attribute can be applied, kFalse otherwise.
bool16 TranFxUtils::CanApplyUseBlur (const UIDListitemList) const

Return kTrue if attribute can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if attribute can be applied, kFalse otherwise.
bool16 TranFxUtils::CanApplyXOffset (const UIDListitemList) const

Return kTrue if attribute can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if attribute can be applied, kFalse otherwise.
bool16 TranFxUtils::CanApplyYOffset (const UIDListitemList) const

Return kTrue if attribute can be applied, kFalse otherwise.

Parameters
itemListlist of objects to be checked.
Returns
kTrue if attribute can be applied, kFalse otherwise.
TranFxUtils::AttrState TranFxUtils::HasAdornment (const UIDListitemList)

Indicate whether the given objects have kTranFxAdornmentBoss applied.

Parameters
itemListIN list of objects to be checked.
Returns
eCommonValue all objects have the adornment, eMixedValue some objects have the adornment, eNoValue none of the objects have the adornment.
TranFxUtils::AttrState TranFxUtils::HasUseAlpha (const UIDListitemList,
bool16 & value 
)

Indicate state of kTranFxUseAlphaAttrBoss value across the given objects.

Parameters
itemListIN list of objects to be checked.
valueOUT kTrue if alpha channel should be used, kFalse if not (default value kTrue).
Returns
enum indicating state of the attribute value.
TranFxUtils::AttrState TranFxUtils::HasUseBlackAsOpaque (const UIDListitemList,
bool16 & value 
)

Indicate state of kTranFxUseBlackAsOpaqueAttrBoss value across the given objects.

Parameters
itemListIN list of objects to be checked.
valueOUT kTrue if black pixels in the page item should be opaque in the effect, kFalse if transparent (default value kTrue).
Returns
enum indicating state of the attribute value.
TranFxUtils::AttrState TranFxUtils::HasUseBlur (const UIDListitemList,
bool16 & value 
)

Indicate state of kTranFxUseBlurAttrBoss value across the given objects.

Parameters
itemListIN list of objects to be checked.
valueOUT kTrue if blur should be applied and intensity reduced, kFalse if not (default value kTrue).
Returns
enum indicating state of the attribute value.
TranFxUtils::AttrState TranFxUtils::HasXOffset (const UIDListitemList,
PMRealvalue 
)

Indicate state of kTranFxOffsetXAttrBoss value across the given objects.

Parameters
itemListIN list of objects to be checked.
valueOUT x offset (default value 7.0 points).
Returns
enum indicating state of the attribute value.
TranFxUtils::AttrState TranFxUtils::HasYOffset (const UIDListitemList,
PMRealvalue 
)

Indicate state of kTranFxOffsetYAttrBoss value across the given objects.

Parameters
itemListIN list of objects to be checked.
valueOUT y offset (default value 7.0 points).
Returns
enum indicating state of the attribute value.