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

Public Types

typedef std::vector< TextWord * > TextWordVector
 

Public Member Functions

 TextPara ()
 Creates a new TextPara object. More...
 
 TextPara (const TextPara &p_)
 TextPara copy constructor. More...
 
virtual ~TextPara ()
 Destructs a TextPara object. More...
 
virtual TextParaoperator= (const TextPara &rhs_)
 Overloaded assignment operator for TextPara objects. More...
 
virtual bool operator== (const TextPara &rhs_) const
 Tests whether a given TextPara object is the same as another. More...
 
virtual bool operator!= (const TextPara &rhs_) const
 Tests whether a given TextPara object is not the same as another. More...
 
virtual std::auto_ptr< ATE::IParagraph > ateParagraph () const
 Gets the ATE paragraph ref around which the target object is wrapped. More...
 
virtual bool isEmpty () const
 Gets whether the target TextPara object is empty. More...
 
virtual int32_t length () const
 Retrieves the length of this paragraph. More...
 
virtual std::auto_ptr< TextStorystory () const
 Retrieves the story that contains this paragraph. More...
 
virtual std::auto_ptr< TextRangetextRange () const
 Retrieves the text range corresponding to this paragraph. More...
 
virtual std::auto_ptr< TextRangeSettextRangeSet () const
 Retrieves the set of text ranges corresponding to this paragraph. More...
 
virtual std::auto_ptr< TextRangeSetselections () const
 Retrieves the text selection in this paragraph. More...
 
virtual TextWordVector words () const
 Retrieves a vector of the words in this paragraph. More...
 
virtual std::string contents (const std::string &le_="\n")
 Gets the value (contents) of the text range. More...
 

Friends

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

Constructor & Destructor Documentation

hdi::core::TextPara::TextPara ( )

Creates a new TextPara object.

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

TextPara copy constructor.

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

Destructs a TextPara object.

Author
GW
Date
08/2014

Member Function Documentation

virtual std::auto_ptr<ATE::IParagraph> hdi::core::TextPara::ateParagraph ( ) const
virtual

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

Author
GW
Date
08/2014
Returns
ATE::IParagraphRef 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 std::string hdi::core::TextPara::contents ( const std::string &  le_ = "\n")
virtual

Gets the value (contents) of the text range.

Author
GW
Date
08/2014
Parameters
le_Indicates the desired line ending for the output string
Returns
A string for the value of the text art, as UTF-8
Note
Illustrator forces text art to utilize the "\r" character for line endings; if this behavior is unexpected or undesired for your application (as most systems use either "\n" or "\r\n" these days), you can specify what you'd prefer with the optional le_ argument.
virtual bool hdi::core::TextPara::isEmpty ( ) const
virtual

Gets whether the target TextPara object is empty.

Author
GW
Date
08/2014
Returns
true if the target TextPara object is empty, false otherwise
virtual int32_t hdi::core::TextPara::length ( ) const
virtual

Retrieves the length of this paragraph.

Author
GW
Date
08/2014
Returns
The number of characters in this paragraph, or -1 for error
virtual bool hdi::core::TextPara::operator!= ( const TextPara rhs_) const
virtual

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

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

Overloaded assignment operator for TextPara objects.

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

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

Author
GW
Date
08/2014
Parameters
rhs_TextPara to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same text paragraph, false otherwise
virtual std::auto_ptr<TextRangeSet> hdi::core::TextPara::selections ( ) const
virtual

Retrieves the text selection in this paragraph.

Author
GW
Date
08/2014
Returns
The text range set object
virtual std::auto_ptr<TextStory> hdi::core::TextPara::story ( ) const
virtual

Retrieves the story that contains this paragraph.

Author
GW
Date
08/2014
Returns
The story object
virtual std::auto_ptr<TextRange> hdi::core::TextPara::textRange ( ) const
virtual

Retrieves the text range corresponding to this paragraph.

Author
GW
Date
08/2014
Returns
The text range object
virtual std::auto_ptr<TextRangeSet> hdi::core::TextPara::textRangeSet ( ) const
virtual

Retrieves the set of text ranges corresponding to this paragraph.

Author
GW
Date
08/2014
Returns
The text ranges object
virtual TextWordVector hdi::core::TextPara::words ( ) const
virtual

Retrieves a vector of the words in this paragraph.

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