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::TextPara Class Reference

Public Types

typedef std::vector< std::shared_ptr< TextWord > > TextWordVector
 

Public Member Functions

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

Friends

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

Constructor & Destructor Documentation

◆ TextPara() [1/2]

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.

◆ TextPara() [2/2]

hdi::core::TextPara::TextPara ( const TextPara p_)

TextPara copy constructor.

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

◆ ~TextPara()

virtual hdi::core::TextPara::~TextPara ( )
virtual

Destructs a TextPara object.

Author
GW
Date
08/2014

Member Function Documentation

◆ ateParagraph()

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

◆ contents()

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.

◆ isEmpty()

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

◆ length()

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

◆ operator!=()

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

◆ operator=()

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

Overloaded assignment operator for TextPara objects.

Author
GW
Date
08/2014

◆ operator==()

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

◆ selections()

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

◆ story()

virtual std::unique_ptr< TextStory > hdi::core::TextPara::story ( ) const
virtual

Retrieves the story that contains this paragraph.

Author
GW
Date
08/2014
Returns
The story object

◆ textRange()

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

◆ textRangeSet()

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

◆ words()

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