Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
hdi::core::TextStory Class Reference

Public Types

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

Public Member Functions

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

Friends

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

Constructor & Destructor Documentation

◆ TextStory() [1/2]

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.

◆ TextStory() [2/2]

hdi::core::TextStory::TextStory ( const TextStory s_)

TextStory copy constructor.

Author
GW
Date
08/2014
Parameters
s_TextStory object to copy values from

◆ ~TextStory()

virtual hdi::core::TextStory::~TextStory ( )
virtual

Destructs a TextStory object.

Author
GW
Date
08/2014

Member Function Documentation

◆ ateStory()

virtual std::unique_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.

◆ charCount()

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

◆ duplicate()

virtual std::unique_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

◆ index()

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

◆ isEmpty()

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

◆ kerningForChar()

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

◆ kerningForRange()

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

◆ operator!=()

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

◆ operator=()

virtual TextStory & hdi::core::TextStory::operator= ( const TextStory rhs_)
virtual

Overloaded assignment operator for TextStory objects.

Author
GW
Date
08/2014

◆ operator==()

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

◆ paragraphs()

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

◆ resumeReflow()

virtual void hdi::core::TextStory::resumeReflow ( )
virtual

Resumes normal reflow calculation after a call to suspendReflow()

Author
GW
Date
08/2014

◆ runs()

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

◆ selections()

virtual std::unique_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

◆ setAutoKerningForRange()

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

◆ setKerningForChar()

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

◆ stories()

virtual std::unique_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

◆ suspendReflow()

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

◆ textFrame()

virtual std::unique_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

◆ textFrames()

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

◆ textRange() [1/2]

virtual std::unique_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

◆ textRange() [2/2]

virtual std::unique_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.

◆ words()

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