Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
|
Allows for easy manipulation of Illustrator text ranges. More...
#include <hdicoreTextRange.h>
Public Types | |
enum | CollapseDirection { UnknownCollapseDir = 0 , CollapseEndDir = 10 , CollapseStartDir = 20 } |
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 | |
TextRange () | |
Creates a new TextRange object. | |
TextRange (const TextRange &tr_) | |
TextRange copy constructor. | |
virtual | ~TextRange () |
Destructs a TextRange object. | |
virtual TextRange & | operator= (const TextRange &rhs_) |
Overloaded assignment operator for TextRange objects. | |
virtual bool | operator== (const TextRange &rhs_) const |
Tests whether a given TextRange object is the same as another. | |
virtual bool | operator!= (const TextRange &rhs_) const |
Tests whether a given TextRange object is not the same as another. | |
virtual std::unique_ptr< ATE::ITextRange > | ateTextRange () const |
Gets the ATE text range ref around which the target object is wrapped. | |
virtual bool | isEmpty () const |
Gets whether the target TextRange object is empty. | |
virtual std::unique_ptr< TextRange > | duplicate () const |
Duplicates the target text range, returning a new unique TextRange object. | |
virtual int32_t | start () const |
Gets the start offset of the target text range. | |
virtual void | setStart (const int32_t start_) |
Sets the start offset of the target text range. | |
virtual int32_t | end () const |
Gets the end offset of the target text range. | |
virtual void | setEnd (const int32_t end_) |
Sets the end offset of the target text range. | |
virtual int32_t | size () const |
Retrieves the number of characters in the target text range. | |
virtual void | setRange (const int32_t start_, const int32_t end_) |
Convenience method to set both the start and end points of the target text range. | |
virtual void | collapse (const CollapseDirection dir_=CollapseEndDir) |
Resets start or end point of the target range so that it contains only one character, either the first or the last. | |
virtual int32_t | move (const int32_t unit_) |
Moves the target text range by adding or subtracting a number of characters to or from the start and end offsets. | |
virtual std::unique_ptr< TextStory > | story () const |
Retrieves the story that contains this text range. | |
virtual void | setStory (const TextStory &story_) |
Sets the story that contains this text range. | |
virtual std::unique_ptr< TextRangeSet > | selections () const |
Retrieves the selected text within this text range. | |
virtual TextArtVector | textFrames () const |
Gets a vector of the text frames contained in this text range. | |
virtual TextParaVector | paragraphs () const |
Gets a vector of the paragraphs contained in this text range. | |
virtual TextWordVector | words () const |
Gets a vector of the words contained in this text range. | |
virtual TextRangeVector | runs () const |
Gets a vector of the text ranges (that share character attributes) contained in this text range. | |
virtual std::unique_ptr< TextCharInspector > | charInspector () const |
Creates an inspector with which to access the character features of all characters in the target text range. | |
virtual std::unique_ptr< TextParaInspector > | paraInspector () const |
Creates an inspector with which to access the paragraph features of all paragraphs in the target text range. | |
virtual std::unique_ptr< TextCharStyleSet > | namedCharStyles () const |
Retrieves a set of all named character styles used in the target text range. | |
virtual bool | setNamedCharStyle (const std::string &name_) |
Associates a named character style to the target text range. The inherited values can be overridden by styles or features specified locally in contained text ranges or individual characters. | |
virtual void | clearNamedCharStyle () |
Removes the association of the target text range and its character style. Copies the feature values of the character style into local override values in the contained characters. | |
virtual std::unique_ptr< TextParaStyleSet > | namedParaStyles () const |
Retrieves a set of all named paragraph styles used in the target text range. | |
virtual bool | setNamedParaStyle (const std::string &name_) |
Associates a named paragraph style to the target text range. The inherited values can be overridden by styles or features specified locally in contained text ranges or individual paragraphs. | |
virtual void | clearNamedParaStyle () |
Removes the association of the target text range and its character style. Copies the feature values of the character style into local override values in the contained characters. | |
virtual std::unique_ptr< TextCharFeatures > | uniqueCharFeatures () const |
Retrieves the unique character features used in the target text range. Unique features are those which have the same value in all text runs in the range. | |
virtual std::unique_ptr< TextParaFeatures > | uniqueParaFeatures () const |
Retrieves the unique paragraph features used in the target text range. Unique features are those which have the same value in all text runs in the range. | |
virtual bool | hasLocalCharFeatures () const |
Reports whether there any local character feature overrides for characters contained in the target text range. | |
virtual std::unique_ptr< TextCharFeatures > | localCharFeatures () const |
Retrieves the character features that have local overrides in the target text range, and whose local values are the same in all text runs in the range. | |
virtual void | setLocalCharFeatures (const TextCharFeatures &feat_) |
Replaces all of the local overrides for all characters in the target text range with a new set of feature values. All values that are assigned become local values, replacing any previous local value. These local values override any specified in a style associated with the character or the text range. All values that are unassigned remove any previous local values, so that those values are inherited. | |
virtual void | replaceOrAddLocalCharFeatures (const TextCharFeatures &feat_) |
Modifies the local overrides for all characters in the target text range. All values that are assigned become local values, replacing any previous local value. Values that are unassigned leave any previous local values unchanged. | |
virtual void | clearLocalCharFeatures () |
Removes all local overrides for all characters in the target text range. All character features are then inherited from styles associated with the character or text range, or from the normal style. | |
virtual bool | hasLocalParaFeatures () const |
Reports whether there any local paragraph feature overrides for paragraphs contained in the target text range. | |
virtual std::unique_ptr< TextParaFeatures > | localParaFeatures () const |
Retrieves the paragraph features that have local overrides in the target text range, and whose local values are the same in all text runs in the range. | |
virtual void | setLocalParaFeatures (const TextParaFeatures &feat_) |
Replaces all of the local overrides for all paragraphs in the target text range with a new set of feature values. All values that are assigned become local values, replacing any previous local value. These local values override any specified in a style associated with the paragraph or the text range. All values that are unassigned remove any previous local values, so that those values are inherited. | |
virtual void | replaceOrAddLocalParaFeatures (const TextParaFeatures &feat_) |
Modifies the local overrides for all paragraphs in the target text range. All values that are assigned become local values, replacing any previous local value. Values that are unassigned leave any previous local values unchanged. | |
virtual void | clearLocalParaFeatures () |
Removes all local overrides for all paragraphs in the target text range. All paragraph features are then inherited from styles associated with the paragraph or text range, or from the normal style. | |
virtual void | insertBefore (const std::string &text_) |
Inserts text into the target text range before the current start point. | |
virtual void | insertAfter (const std::string &text_) |
Inserts text into the target text range after the current end point. | |
virtual void | insertBefore (const TextRange &otherRange_) |
Inserts text into the target text range before the current start point. | |
virtual void | insertAfter (const TextRange &otherRange_) |
Inserts text into the target text range after the current end point. | |
virtual std::string | contents (const std::string &le_="\n") const |
Gets the value (contents) of the text range. | |
virtual void | select (const bool addToCurrSelection_=false) |
Selects the text in the target text range. | |
virtual void | deselect () |
Deselects the text in the target text range; this can result in a discontiguous selection, if this text range is a subset of the selected text. | |
virtual void | changeCase (const CaseChangeType type_) |
Changes the case of the text in the target text range. | |
virtual void | fitHeadlines () |
Adjusts the tracking of the text in the target range to fit on one line spanning the width of the area text object. | |
virtual void | remove () |
Deletes all of the characters in the target text range. | |
Friends | |
aip::TextRange * | __accessImpl (const TextRange &) |
TextRange | __accessCtor (const aip::TextRange &) |
Allows for easy manipulation of Illustrator text ranges.
hdi::core::TextRange::TextRange | ( | ) |
Creates a new TextRange object.
hdi::core::TextRange::TextRange | ( | const TextRange & | tr_ | ) |
|
virtual |
Destructs a TextRange object.
|
virtual |
Gets the ATE text range ref around which the target object is wrapped.
|
virtual |
Changes the case of the text in the target text range.
type_ | Desired case type |
|
virtual |
Creates an inspector with which to access the character features of all characters in the target text range.
|
virtual |
Removes all local overrides for all characters in the target text range. All character features are then inherited from styles associated with the character or text range, or from the normal style.
|
virtual |
Removes all local overrides for all paragraphs in the target text range. All paragraph features are then inherited from styles associated with the paragraph or text range, or from the normal style.
|
virtual |
Removes the association of the target text range and its character style. Copies the feature values of the character style into local override values in the contained characters.
|
virtual |
Removes the association of the target text range and its character style. Copies the feature values of the character style into local override values in the contained characters.
|
virtual |
Resets start or end point of the target range so that it contains only one character, either the first or the last.
dir_ | The direction constant to collapse; CollapseEndDir sets the start offset to the end offset, while CollapseStartDir sets the end offset to the start offset |
|
virtual |
Gets the value (contents) of the text range.
le_ | Indicates the desired line ending for the output string |
|
virtual |
Deselects the text in the target text range; this can result in a discontiguous selection, if this text range is a subset of the selected text.
|
virtual |
|
virtual |
Gets the end offset of the target text range.
|
virtual |
Adjusts the tracking of the text in the target range to fit on one line spanning the width of the area text object.
|
virtual |
Reports whether there any local character feature overrides for characters contained in the target text range.
|
virtual |
Reports whether there any local paragraph feature overrides for paragraphs contained in the target text range.
|
virtual |
Inserts text into the target text range after the current end point.
text_ | The text to be inserted, as UTF-8 |
|
virtual |
Inserts text into the target text range after the current end point.
otherRange_ | A text range object containing the text |
|
virtual |
Inserts text into the target text range before the current start point.
text_ | The text to be inserted, as UTF-8 |
|
virtual |
Inserts text into the target text range before the current start point.
otherRange_ | A text range object containing the text |
|
virtual |
|
virtual |
Retrieves the character features that have local overrides in the target text range, and whose local values are the same in all text runs in the range.
|
virtual |
Retrieves the paragraph features that have local overrides in the target text range, and whose local values are the same in all text runs in the range.
|
virtual |
Moves the target text range by adding or subtracting a number of characters to or from the start and end offsets.
unit_ | The number of characters, positive to move the range toward the end, negative to move it toward the beginning of the story |
|
virtual |
Retrieves a set of all named character styles used in the target text range.
|
virtual |
Retrieves a set of all named paragraph styles used in the target text range.
|
virtual |
Overloaded assignment operator for TextRange objects.
|
virtual |
|
virtual |
Gets a vector of the paragraphs contained in this text range.
|
virtual |
Creates an inspector with which to access the paragraph features of all paragraphs in the target text range.
|
virtual |
Deletes all of the characters in the target text range.
|
virtual |
Modifies the local overrides for all characters in the target text range. All values that are assigned become local values, replacing any previous local value. Values that are unassigned leave any previous local values unchanged.
The | new feature set object |
|
virtual |
Modifies the local overrides for all paragraphs in the target text range. All values that are assigned become local values, replacing any previous local value. Values that are unassigned leave any previous local values unchanged.
feat_ | The new feature set object |
|
virtual |
Gets a vector of the text ranges (that share character attributes) contained in this text range.
|
virtual |
Selects the text in the target text range.
addToCurrSelection_ | true to add the target's text to the current selection, false to clear the current selection before selecting this text |
|
virtual |
Retrieves the selected text within this text range.
|
virtual |
Sets the end offset of the target text range.
end_ | The 0-based index of the end offset from the beginning of the containing story |
|
virtual |
Replaces all of the local overrides for all characters in the target text range with a new set of feature values. All values that are assigned become local values, replacing any previous local value. These local values override any specified in a style associated with the character or the text range. All values that are unassigned remove any previous local values, so that those values are inherited.
feat_ | The new feature set object |
|
virtual |
Replaces all of the local overrides for all paragraphs in the target text range with a new set of feature values. All values that are assigned become local values, replacing any previous local value. These local values override any specified in a style associated with the paragraph or the text range. All values that are unassigned remove any previous local values, so that those values are inherited.
feat_ | The new feature set object |
|
virtual |
Associates a named character style to the target text range. The inherited values can be overridden by styles or features specified locally in contained text ranges or individual characters.
The | name of the style, as UTF-8 |
|
virtual |
Associates a named paragraph style to the target text range. The inherited values can be overridden by styles or features specified locally in contained text ranges or individual paragraphs.
The | name of the style, as UTF-8 |
|
virtual |
Convenience method to set both the start and end points of the target text range.
start_ | The 0-based index of the start offset from the beginning of the containing story |
end_ | The 0-based index of the end offset from the beginning of the containing story |
|
virtual |
Sets the start offset of the target text range.
end_ | The 0-based index of the start offset from the beginning of the containing story |
|
virtual |
Sets the story that contains this text range.
New | containing story |
|
virtual |
Retrieves the number of characters in the target text range.
|
virtual |
Gets the start offset of the target text range.
|
virtual |
Retrieves the story that contains this text range.
|
virtual |
Gets a vector of the text frames contained in this text range.
|
virtual |
Retrieves the unique character features used in the target text range. Unique features are those which have the same value in all text runs in the range.
|
virtual |
Retrieves the unique paragraph features used in the target text range. Unique features are those which have the same value in all text runs in the range.
|
virtual |
Gets a vector of the words contained in this text range.