Adobe.com
Contents Suites Classes Class Index Member Index

ATE::ICharStyle Class Reference

This class encapsulates a named character style, which can be applied to a set of characters. More...

#include <IText.h>

List of all members.

Public Member Functions

 ICharStyle ()
 Constructor.
 ICharStyle (const ICharStyle &src)
 Copy constructor.
ICharStyleoperator= (const ICharStyle &rhs)
 Assignment operator.
bool operator== (const ICharStyle &rhs) const
 Comparison operator tests for equality.
bool operator!= (const ICharStyle &rhs) const
 Comparison operator tests for inequality.
 ICharStyle (CharStyleRef charstyle)
 Constructs this C++ object from the corresponding C object returned by an ATE suite function.
virtual ~ICharStyle ()
 Destructor.
CharStyleRef GetRef () const
 Retrieves a reference to this object.
bool IsNull () const
 Reports whether this is a null object.
ATETextDOM::Int32 GetName (ATETextDOM::Unicode *pName, ATETextDOM::Int32 maxLength) const
 Retrieves the name of this style.
bool SetName (const ATETextDOM::Unicode *pName)
 Sets the name of this style.
ICharStyle GetParent () const
 Retrieves the parent style of this style.
bool SetParent (const ICharStyle pStyle)
 Sets the parent style of this style.
bool HasParent () const
 Reports whether this style has a parent.
ICharFeatures GetFeatures () const
 Retrieves the features defined for this style.
void SetFeatures (ICharFeatures pFeatures)
 Sets the features defined for this style.
void ReplaceOrAddFeatures (ICharFeatures pFeatures)
 Sets attribute values of this style's feature set to those values that are specifically assigned in the replacement feature set.

Detailed Description

This class encapsulates a named character style, which can be applied to a set of characters.

It contains an ICharFeatures object, which defines the character attributes for this style.

Attribute values are inherited from the Normal style, and can be overridden in a named style associated with a text run or text range, or at the local character level.

A style or character can partially define attributes. Only those values that are assigned override the inherited values. The constructor creates an empty object, in which all attribute values are unassigned. Setting a value causes it to be assigned, and clearing it causes it to be unassigned. When you retrieve an attribute value, a boolean return value, isAssigned, reports whether that attribute has a local value in the queried object.


Constructor & Destructor Documentation

ATE::ICharStyle::ICharStyle (  ) 

Constructor.

The object is empty; that is, all attribute values are unassigned.

Returns:
The new object.

Referenced by GetParent().

ATE::ICharStyle::ICharStyle ( const ICharStyle src  ) 

Copy constructor.

Parameters:
src The object to copy.
Returns:
The new object.

References ATE::sCharStyle.

ATE::ICharStyle::ICharStyle ( CharStyleRef  charstyle  )  [explicit]

Constructs this C++ object from the corresponding C object returned by an ATE suite function.

The C++ object manages reference counting.

Parameters:
charstyle The C object.
Returns:
The new C++ object.
ATE::ICharStyle::~ICharStyle (  )  [virtual]

Destructor.

References ATE::sCharStyle.


Member Function Documentation

ICharFeatures ATE::ICharStyle::GetFeatures (  )  const

Retrieves the features defined for this style.

Returns:
The character features object.

References ATE::sCharStyle, and ATE::Throw_ATE_Exception().

ATETextDOM::Int32 ATE::ICharStyle::GetName ( ATETextDOM::Unicode pName,
ATETextDOM::Int32  maxLength 
) const

Retrieves the name of this style.

Parameters:
pName [out] A buffer in which to return the name string.
maxLength [in, out] The number of characters in the buffer.
Returns:
The length of the returned string, or 0 if an error occurred.

References ATE::sCharStyle, and ATE::Throw_ATE_Exception().

ICharStyle ATE::ICharStyle::GetParent (  )  const

Retrieves the parent style of this style.

Returns:
The style object, or a NULL object for the Normal (root) style.

References ICharStyle(), ATE::sCharStyle, and ATE::Throw_ATE_Exception().

CharStyleRef ATE::ICharStyle::GetRef (  )  const

Retrieves a reference to this object.

Returns:
The object reference.

Referenced by ATE::ICharStyles::MoveStyleTo(), and SetParent().

bool ATE::ICharStyle::HasParent (  )  const

Reports whether this style has a parent.

Returns:
True if this style has a parent, false if this is the Normal (root) style.

References ATE::sCharStyle, and ATE::Throw_ATE_Exception().

bool ATE::ICharStyle::IsNull (  )  const

Reports whether this is a null object.

Returns:
True if this is a null object.

References ATE::sCharStyle.

bool ATE::ICharStyle::operator!= ( const ICharStyle rhs  )  const

Comparison operator tests for inequality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are not the same.
ICharStyle & ATE::ICharStyle::operator= ( const ICharStyle rhs  ) 

Assignment operator.

Parameters:
rhs The object to assign to this one.
Returns:
A reference to this object.

References ATE::sCharStyle.

bool ATE::ICharStyle::operator== ( const ICharStyle rhs  )  const

Comparison operator tests for equality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are the same.

References ATE::sCharStyle, and ATE::Throw_ATE_Exception().

void ATE::ICharStyle::ReplaceOrAddFeatures ( ICharFeatures  pFeatures  ) 

Sets attribute values of this style's feature set to those values that are specifically assigned in the replacement feature set.

Those values that are unassigned in the replacement set remain unchanged in this style.

Parameters:
pFeatures The replacement character features object.
Returns:
Nothing.

References ATE::ICharFeatures::GetRef(), ATE::sCharStyle, and ATE::Throw_ATE_Exception().

void ATE::ICharStyle::SetFeatures ( ICharFeatures  pFeatures  ) 

Sets the features defined for this style.

For the Normal (root) style, this is the same as ReplaceOrAddFeatures(). For all other styles, the new feature set completely replaces the old feature set.

Parameters:
pFeatures The new character features object.
Returns:
Nothing.

References ATE::ICharFeatures::GetRef(), ATE::sCharStyle, and ATE::Throw_ATE_Exception().

bool ATE::ICharStyle::SetName ( const ATETextDOM::Unicode pName  ) 

Sets the name of this style.

Parameters:
pName The new, NULL terminated name string.
Returns:
True if the name was set successfully, false if a style already has the specified name or if the name string is empty.

References ATE::sCharStyle, and ATE::Throw_ATE_Exception().

bool ATE::ICharStyle::SetParent ( const ICharStyle  pStyle  ) 

Sets the parent style of this style.

Parameters:
pStyle The new parent style object,
Returns:
True if the parent was set successfully, false if this is the Normal (root) style.

References GetRef(), ATE::sCharStyle, and ATE::Throw_ATE_Exception().


The documentation for this class was generated from the following files:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks