7#ifndef __HDI_CORE_TEXT_RANGE__
8#define __HDI_CORE_TEXT_RANGE__
10#if defined(HDI_CORE_AIP_MODE)
26 class TextCharFeatures;
27 class TextCharInspector;
28 class TextCharStyleSet;
30 class TextParaFeatures;
31 class TextParaInspector;
32 class TextParaStyleSet;
43 typedef std::vector< std::shared_ptr<TextArt> > TextArtVector;
44 typedef std::vector< std::shared_ptr<TextPara> > TextParaVector;
45 typedef std::vector< std::shared_ptr<TextRange> > TextRangeVector;
46 typedef std::vector< std::shared_ptr<TextWord> > TextWordVector;
48 enum CollapseDirection
50 UnknownCollapseDir = 0,
165 virtual int32_t
end()
const;
193 virtual void setRange(
const int32_t start_,
const int32_t end_);
204 virtual void collapse(
const CollapseDirection dir_ = CollapseEndDir);
219 virtual int32_t
move(
const int32_t unit_);
228 virtual std::unique_ptr<TextStory>
story()
const;
273 virtual TextWordVector
words()
const;
283 virtual TextRangeVector
runs()
const;
566 virtual std::string
contents(
const std::string& le_ =
"\n")
const;
576 virtual void select(
const bool addToCurrSelection_ =
false);
618 friend aip::TextRange* __accessImpl(
const TextRange&);
619 friend TextRange __accessCtor(
const aip::TextRange&);
624 aip::TextRange* __impl;
634 typedef std::unique_ptr<TextRange> TextRangeUP;
635 typedef std::shared_ptr<TextRange> TextRangeSP;
636 typedef std::weak_ptr<TextRange> TextRangeWP;
638 extern aip::TextRange* __accessImpl(
const TextRange&);
639 extern TextRange __accessCtor(
const aip::TextRange&);
Allows for easy manipulation of Illustrator text character features.
Definition: hdicoreTextCharFeatures.h:34
Allows for easy manipulation of Illustrator text paragraph features.
Definition: hdicoreTextParaFeatures.h:30
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:41
virtual bool setNamedParaStyle(const std::string &name_)
Associates a named paragraph style to the target text range. The inherited values can be overridden b...
virtual std::unique_ptr< TextCharFeatures > uniqueCharFeatures() const
Retrieves the unique character features used in the target text range. Unique features are those whic...
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 fea...
virtual std::unique_ptr< TextRange > duplicate() const
Duplicates the target text range, returning a new unique TextRange object.
virtual void clearLocalCharFeatures()
Removes all local overrides for all characters in the target text range. All character features are t...
virtual void clearNamedParaStyle()
Removes the association of the target text range and its character style. Copies the feature values o...
virtual void setStart(const int32_t start_)
Sets the start offset of the target text range.
virtual void insertAfter(const TextRange &otherRange_)
Inserts text into the target text range after the current end point.
virtual TextParaVector paragraphs() const
Gets a vector of the paragraphs contained in this text range.
virtual std::unique_ptr< TextParaFeatures > uniqueParaFeatures() const
Retrieves the unique paragraph features used in the target text range. Unique features are those whic...
virtual void fitHeadlines()
Adjusts the tracking of the text in the target range to fit on one line spanning the width of the are...
virtual std::unique_ptr< TextCharInspector > charInspector() const
Creates an inspector with which to access the character features of all characters in the target text...
virtual void collapse(const CollapseDirection dir_=CollapseEndDir)
Resets start or end point of the target range so that it contains only one character,...
virtual TextRange & operator=(const TextRange &rhs_)
Overloaded assignment operator for TextRange objects.
virtual int32_t size() const
Retrieves the number of characters in the target text range.
virtual void replaceOrAddLocalCharFeatures(const TextCharFeatures &feat_)
Modifies the local overrides for all characters in the target text range. All values that are assigne...
virtual bool setNamedCharStyle(const std::string &name_)
Associates a named character style to the target text range. The inherited values can be overridden b...
virtual std::string contents(const std::string &le_="\n") const
Gets the value (contents) of the text range.
virtual std::unique_ptr< TextParaStyleSet > namedParaStyles() const
Retrieves a set of all named paragraph styles used in the target text range.
virtual void select(const bool addToCurrSelection_=false)
Selects the text in the target text range.
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< ATE::ITextRange > ateTextRange() const
Gets the ATE text range ref around which the target object is wrapped.
virtual TextArtVector textFrames() const
Gets a vector of the text frames contained in this text range.
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 ...
virtual int32_t end() const
Gets the end offset of the target text 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 fea...
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 setEnd(const int32_t end_)
Sets the end offset of the target 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< TextParaInspector > paraInspector() const
Creates an inspector with which to access the paragraph features of all paragraphs in the target text...
virtual bool hasLocalParaFeatures() const
Reports whether there any local paragraph feature overrides for paragraphs contained in the target te...
virtual void changeCase(const CaseChangeType type_)
Changes the case of the text in the target text range.
virtual std::unique_ptr< TextRangeSet > selections() const
Retrieves the selected text within this text range.
virtual void insertBefore(const TextRange &otherRange_)
Inserts text into the target text range before the current start point.
virtual bool operator==(const TextRange &rhs_) const
Tests whether a given TextRange object is the same as another.
virtual bool hasLocalCharFeatures() const
Reports whether there any local character feature overrides for characters contained in the target te...
virtual void deselect()
Deselects the text in the target text range; this can result in a discontiguous selection,...
virtual bool operator!=(const TextRange &rhs_) const
Tests whether a given TextRange object is not the same as another.
virtual void insertAfter(const std::string &text_)
Inserts text into the target text range after the current end point.
virtual bool isEmpty() const
Gets whether the target TextRange object is empty.
virtual std::unique_ptr< TextCharStyleSet > namedCharStyles() const
Retrieves a set of all named character styles used in the target text range.
virtual void remove()
Deletes all of the characters in the target text range.
virtual ~TextRange()
Destructs a TextRange object.
TextRange(const TextRange &tr_)
TextRange copy constructor.
virtual TextWordVector words() const
Gets a vector of the words contained in this text range.
virtual void insertBefore(const std::string &text_)
Inserts text into the target text range before the current start point.
virtual std::unique_ptr< TextParaFeatures > localParaFeatures() const
Retrieves the paragraph features that have local overrides in the target text range,...
virtual void clearNamedCharStyle()
Removes the association of the target text range and its character style. Copies the feature values o...
virtual std::unique_ptr< TextCharFeatures > localCharFeatures() const
Retrieves the character features that have local overrides in the target text range,...
TextRange()
Creates a new TextRange object.
virtual void clearLocalParaFeatures()
Removes all local overrides for all paragraphs in the target text range. All paragraph features are t...
virtual int32_t start() const
Gets the start offset of the target text range.
virtual void replaceOrAddLocalParaFeatures(const TextParaFeatures &feat_)
Modifies the local overrides for all paragraphs in the target text range. All values that are assigne...
Definition: hdicoreTextStory.h:33
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
CaseChangeType
Indicates how the case of some text should be changed.
Definition: hdicoreTypes.h:507