Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Friends | List of all members
hdi::core::TextStory Class Reference

Public Types

typedef std::vector< TextArt * > TextArtVector
 
typedef std::vector< TextPara * > TextParaVector
 
typedef std::vector< TextRange * > TextRangeVector
 
typedef std::vector< TextWord * > TextWordVector
 

Public Member Functions

 TextStory ()
 Creates a new TextStory object. More...
 
 TextStory (const TextStory &s_)
 TextStory copy constructor. More...
 
virtual ~TextStory ()
 Destructs a TextStory object. More...
 
virtual TextStoryoperator= (const TextStory &rhs_)
 Overloaded assignment operator for TextStory objects. More...
 
virtual bool operator== (const TextStory &rhs_) const
 Tests whether a given TextStory object is the same as another. More...
 
virtual bool operator!= (const TextStory &rhs_) const
 Tests whether a given TextStory object is not the same as another. More...
 
virtual std::auto_ptr< ATE::IStory > ateStory () const
 Gets the ATE story ref around which the target object is wrapped. More...
 
virtual bool isEmpty () const
 Gets whether the target TextStory object is empty. More...
 
virtual std::auto_ptr< TextStoryduplicate ()
 Duplicates the target object. More...
 
virtual int32_t index () const
 Retrieves the index position of the target story in its collection. More...
 
virtual int32_t charCount () const
 Retrieves the number of characters in the target story. More...
 
virtual std::auto_ptr< TextRangetextRange () const
 Retrieves the text range that contains the entire text of the target story. More...
 
virtual std::auto_ptr< TextRangetextRange (const int32_t start_, const int32_t end_) const
 Retrieves an arbitrary text range from this story. More...
 
virtual std::auto_ptr< TextRangeSetselections () const
 Retrieves the set of text ranges that contains the selected text of the target story. More...
 
virtual std::auto_ptr< TextStorySetstories () const
 Retrieves the story collection that contains the target story. More...
 
virtual TextArtVector textFrames () const
 Retrieves a vector of text frames contained in the target story. More...
 
virtual TextParaVector paragraphs () const
 Retrieves a vector of paragraphs contained in the target story. More...
 
virtual TextWordVector words () const
 Retrieves a vector of words contained in the target story. More...
 
virtual TextRangeVector runs () const
 Retrieves a vector of runs contained in the target story. More...
 
virtual std::auto_ptr< TextArttextFrame (const int32_t index_) const
 Retrieves a specific text frame from the target story. More...
 
virtual bool kerningForRange (const TextRange &range_, AutoKernType &type__, int32_t &kerning__) const
 Retrieves the kerning type and value for a text range in the target story. More...
 
virtual void setAutoKerningForRange (const TextRange &range_, const AutoKernType type_)
 Sets automatic or optical kerning for a text range in the target story. More...
 
virtual bool kerningForChar (const int32_t index_, AutoKernType &type__, int32_t &kerning__) const
 Retrieves the kerning type and value for a character in the target story. More...
 
virtual void setKerningForChar (const int32_t index_, const int32_t kerning_)
 Sets a specific kern value in the target story. More...
 
virtual void suspendReflow ()
 Suspends reflow calculation for the target story. Speeds up calls that cause reflow, such as TextRange insertion methods. More...
 
virtual void resumeReflow ()
 Resumes normal reflow calculation after a call to suspendReflow() More...
 

Friends

plugin::TextStory * __accessImpl (const TextStory &)
 
TextStory __accessCtor (const plugin::TextStory &)
 

Constructor & Destructor Documentation

hdi::core::TextStory::TextStory ( )

Creates a new TextStory object.

Author
GW
Date
08/2014
Note
Empty TextStory objects do not relate to any text story on the Illustrator artboard; they are designed to be "receivers" of some other TextStory object via the overloaded assignment operator or assigned to some other existent text art.
hdi::core::TextStory::TextStory ( const TextStory s_)

TextStory copy constructor.

Author
GW
Date
08/2014
Parameters
s_TextStory object to copy values from
virtual hdi::core::TextStory::~TextStory ( )
virtual

Destructs a TextStory object.

Author
GW
Date
08/2014

Member Function Documentation

virtual std::auto_ptr<ATE::IStory> hdi::core::TextStory::ateStory ( ) const
virtual

Gets the ATE story ref around which the target object is wrapped.

Author
GW
Date
08/2014
Returns
ATE::IStoryRef for the target object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
virtual int32_t hdi::core::TextStory::charCount ( ) const
virtual

Retrieves the number of characters in the target story.

Author
GW
Date
08/2014
Returns
The number of characters, or -1 for error
virtual std::auto_ptr<TextStory> hdi::core::TextStory::duplicate ( )
virtual

Duplicates the target object.

Author
GW
Date
08/2014
Returns
A duplicate of the target object, or NULL for error
virtual int32_t hdi::core::TextStory::index ( ) const
virtual

Retrieves the index position of the target story in its collection.

Author
GW
Date
08/2014
Returns
The 0-based index, or -1 for error
virtual bool hdi::core::TextStory::isEmpty ( ) const
virtual

Gets whether the target TextStory object is empty.

Author
GW
Date
08/2014
Returns
true if the target TextStory object is empty, false otherwise
virtual bool hdi::core::TextStory::kerningForChar ( const int32_t  index_,
AutoKernType &  type__,
int32_t &  kerning__ 
) const
virtual

Retrieves the kerning type and value for a character in the target story.

Author
GW
Date
08/2014
Parameters
index_The 0-based position index of the character
type__Return-by-reference for the kerning type enum value
kerning__Return-by-reference for the kerning value
Returns
true if the kerning could be acquired, false otherwise
virtual bool hdi::core::TextStory::kerningForRange ( const TextRange range_,
AutoKernType &  type__,
int32_t &  kerning__ 
) const
virtual

Retrieves the kerning type and value for a text range in the target story.

Author
GW
Date
08/2014
Parameters
range_The text range object
type__Return-by-reference for the kerning type enum value
kerning__Return-by-reference for the kerning value
Returns
true if the kerning could be acquired, false otherwise
virtual bool hdi::core::TextStory::operator!= ( const TextStory rhs_) const
virtual

Tests whether a given TextStory object is not the same as another.

Author
GW
Date
08/2014
Parameters
rhs_TextStory to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different text story, false otherwise
virtual TextStory& hdi::core::TextStory::operator= ( const TextStory rhs_)
virtual

Overloaded assignment operator for TextStory objects.

Author
GW
Date
08/2014
virtual bool hdi::core::TextStory::operator== ( const TextStory rhs_) const
virtual

Tests whether a given TextStory object is the same as another.

Author
GW
Date
08/2014
Parameters
rhs_TextStory to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same text story, false otherwise
virtual TextParaVector hdi::core::TextStory::paragraphs ( ) const
virtual

Retrieves a vector of paragraphs contained in the target story.

Author
GW
Date
08/2014
Returns
The paragraphs vector object
Warning
The caller assumes responsibility for the memory of the contained TextPara objects.
virtual void hdi::core::TextStory::resumeReflow ( )
virtual

Resumes normal reflow calculation after a call to suspendReflow()

Author
GW
Date
08/2014
virtual TextRangeVector hdi::core::TextStory::runs ( ) const
virtual

Retrieves a vector of runs contained in the target story.

Author
GW
Date
08/2014
Returns
The runs (text ranges) vector object
Warning
The caller assumes responsibility for the memory of the contained TextRange objects.
virtual std::auto_ptr<TextRangeSet> hdi::core::TextStory::selections ( ) const
virtual

Retrieves the set of text ranges that contains the selected text of the target story.

Author
GW
Date
08/2014
Returns
The text range set object
virtual void hdi::core::TextStory::setAutoKerningForRange ( const TextRange range_,
const AutoKernType  type_ 
)
virtual

Sets automatic or optical kerning for a text range in the target story.

Author
GW
Date
08/2014
Parameters
range_The text range to change
type_The kerning type enum value
virtual void hdi::core::TextStory::setKerningForChar ( const int32_t  index_,
const int32_t  kerning_ 
)
virtual

Sets a specific kern value in the target story.

Author
GW
Date
08/2014
Parameters
index_The 0-based position index of the character to kern
kerning_The kerning value
virtual std::auto_ptr<TextStorySet> hdi::core::TextStory::stories ( ) const
virtual

Retrieves the story collection that contains the target story.

Author
GW
Date
08/2014
Returns
The story collection object
virtual void hdi::core::TextStory::suspendReflow ( )
virtual

Suspends reflow calculation for the target story. Speeds up calls that cause reflow, such as TextRange insertion methods.

Author
GW
Date
08/2014
Note
Use resumeReflow() to restore normal reflow calculation
virtual std::auto_ptr<TextArt> hdi::core::TextStory::textFrame ( const int32_t  index_) const
virtual

Retrieves a specific text frame from the target story.

Author
GW
Date
08/2014
Parameters
index_The 0-based position index
Returns
The text frame object, or NULL for error
virtual TextArtVector hdi::core::TextStory::textFrames ( ) const
virtual

Retrieves a vector of text frames contained in the target story.

Author
GW
Date
08/2014
Returns
The text frames vector object
Warning
The caller assumes responsibility of the memory for the contained TextArt objects.
virtual std::auto_ptr<TextRange> hdi::core::TextStory::textRange ( ) const
virtual

Retrieves the text range that contains the entire text of the target story.

Author
GW
Date
08/2014
Returns
The text range object
virtual std::auto_ptr<TextRange> hdi::core::TextStory::textRange ( const int32_t  start_,
const int32_t  end_ 
) const
virtual

Retrieves an arbitrary text range from this story.

Author
GW
Date
08/2014
Parameters
start_The 0-based position index of the first character in the range
end_The 0-based position index of the last character in the range
Returns
The text range object
Note
If end_ is greater than the size of the story, the last character of the story is used.
virtual TextWordVector hdi::core::TextStory::words ( ) const
virtual

Retrieves a vector of words contained in the target story.

Author
GW
Date
08/2014
Returns
The words vector object
Warning
The caller assumes responsibility for the memory of the contained TextWord objects.