Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreTextRangeSet.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_TEXT_RANGE_SET__
8#define __HDI_CORE_TEXT_RANGE_SET__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include <vector>
13
14#include "hdicoreTypes.h"
15
16namespace hdi
17{
18 namespace aip
19 {
20 class TextRangeSet;
21 }
22
23 namespace core
24 {
25 class TextCharFeatures;
26 class TextCharInspector;
27 class TextPara;
28 class TextParaFeatures;
29 class TextParaInspector;
30 class TextRange;
31 class TextWord;
32
34 {
35 public:
36 typedef std::vector< std::shared_ptr<TextPara> > TextParaVector;
37 typedef std::vector< std::shared_ptr<TextRange> > TextRangeVector;
38 typedef std::vector< std::shared_ptr<TextWord> > TextWordVector;
39
50
59
65 virtual ~TextRangeSet();
66
72 virtual TextRangeSet& operator=(const TextRangeSet& rhs_);
73
82 virtual bool operator==(const TextRangeSet& rhs_) const;
83
92 virtual bool operator!=(const TextRangeSet& rhs_) const;
93
105 virtual std::unique_ptr<ATE::ITextRanges> ateTextRangeSet() const;
106
114 virtual bool isEmpty() const;
115
123 virtual int32_t size() const;
124
132 virtual std::unique_ptr<TextRangeSet> selections() const;
133
141 virtual TextParaVector paragraphs() const;
142
150 virtual TextWordVector words() const;
151
159 virtual TextRangeVector runs() const;
160
169 virtual std::unique_ptr<TextCharInspector> charInspector() const;
170
179 virtual std::unique_ptr<TextParaInspector> paraInspector() const;
180
187 virtual void clearNamedCharStyle();
188
195 virtual void clearNamedParaStyle();
196
205 virtual std::unique_ptr<TextCharFeatures> uniqueCharFeatures() const;
206
215 virtual std::unique_ptr<TextParaFeatures> uniqueParaFeatures() const;
216
225 virtual bool hasLocalCharFeatures();
226
235 virtual bool hasLocalParaFeatures();
236
247 virtual std::unique_ptr<TextCharFeatures> localCharFeatures();
248
260 virtual void setLocalCharFeatures(const TextCharFeatures& feat_);
261
272
281
292 virtual std::unique_ptr<TextParaFeatures> localParaFeatures();
293
305 virtual void setLocalParaFeatures(const TextParaFeatures& feat_);
306
317
326
335 virtual void select(const bool addToCurrSelection_ = false);
336
343 virtual void deselect();
344
358 virtual std::string contents(const std::string& le_ = "\n") const;
359
367 virtual void changeCase(const CaseChangeType type_);
368
376 virtual void add(const TextRange& range_);
377
386 virtual std::unique_ptr<TextRange> textRange(const int32_t index_) const;
387
395 virtual void remove(const int32_t index_);
396
402 virtual void removeAll();
403
404
405 private:
406 friend aip::TextRangeSet* __accessImpl(const TextRangeSet&);
407 friend TextRangeSet __accessCtor(const aip::TextRangeSet&);
408
412 aip::TextRangeSet* __impl;
413
419 TextRangeSet(const aip::TextRangeSet&);
420 };
421
422 typedef std::unique_ptr<TextRangeSet> TextRangeSetUP;
423 typedef std::shared_ptr<TextRangeSet> TextRangeSetSP;
424 typedef std::weak_ptr<TextRangeSet> TextRangeSetWP;
425
426 extern aip::TextRangeSet* __accessImpl(const TextRangeSet&);
427 extern TextRangeSet __accessCtor(const aip::TextRangeSet&);
428 }
429}
430
431#endif
432// HDI_CORE_AIP_MODE
433
434#endif
435// __HDI_CORE_TEXT_RANGE_SET__
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
Definition: hdicoreTextRangeSet.h:34
virtual bool isEmpty() const
Gets whether the target TextRangeSet object is empty.
virtual std::unique_ptr< TextCharFeatures > localCharFeatures()
Retrieves the character features that have local overrides in the target text range set,...
virtual std::string contents(const std::string &le_="\n") const
Gets the value (contents) of the 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 int32_t size() const
Retrieves the number of members of the target set.
TextRangeSet()
Creates a new TextRangeSet object.
virtual void replaceOrAddLocalParaFeatures(const TextParaFeatures &feat_)
Modifies the local overrides for all paragraphs in the target text range set. All values that are ass...
virtual std::unique_ptr< TextRangeSet > selections() const
Retrieves the selected text within the target text range set.
virtual void select(const bool addToCurrSelection_=false)
Selects the text in the target text range set.
virtual void setLocalParaFeatures(const TextParaFeatures &feat_)
Replaces all of the local overrides for all paragraphs in the target text range set with a new set of...
virtual bool hasLocalParaFeatures()
Reports whether there any local paragraph feature overrides for paragraphs contained in the target te...
virtual void add(const TextRange &range_)
Adds a text range as a member of this set.
virtual bool operator==(const TextRangeSet &rhs_) const
Tests whether a given TextRangeSet object is the same as another.
virtual void setLocalCharFeatures(const TextCharFeatures &feat_)
Replaces all of the local overrides for all characters in the target text range set with a new set of...
virtual void replaceOrAddLocalCharFeatures(const TextCharFeatures &feat_)
Modifies the local overrides for all characters in the target text range set. All values that are ass...
virtual TextRangeVector runs() const
Retrieves a vector of runs (ranges) contained in the target text range set.
virtual void clearNamedCharStyle()
Removes the association of the target text range set and its character style. Copies the feature valu...
virtual bool hasLocalCharFeatures()
Reports whether there any local character feature overrides for characters contained in the target te...
virtual std::unique_ptr< TextRange > textRange(const int32_t index_) const
Retrieves a member of this set by position index.
virtual void clearNamedParaStyle()
Removes the association of the target text range set and its paragraph style. Copies the feature valu...
virtual std::unique_ptr< TextCharFeatures > uniqueCharFeatures() const
Retrieves the unique character features used in the target text range set. Unique features are those ...
virtual void changeCase(const CaseChangeType type_)
Changes the case of the text in the target text range set.
virtual TextParaVector paragraphs() const
Retrieves a vector of paragraphs contained in the target text range set.
virtual void deselect()
Deselects the text in the target text range set. This can result in a discontiguous selection,...
virtual void clearLocalParaFeatures()
Removes all local overrides for all paragraphs in this text range set. All paragraph features are the...
virtual void clearLocalCharFeatures()
Removes all local overrides for all characters in the target text range set. All character features a...
virtual void remove(const int32_t index_)
Removes a member from the set.
virtual TextRangeSet & operator=(const TextRangeSet &rhs_)
Overloaded assignment operator for TextRangeSet objects.
virtual std::unique_ptr< TextCharInspector > charInspector() const
Creates an inspector with which to access the character features of all characters in the target text...
TextRangeSet(const TextRangeSet &rs_)
TextRangeSet copy constructor.
virtual TextWordVector words() const
Retrieves a vector of words contained in the target text range set.
virtual void removeAll()
Removes all members from the set.
virtual ~TextRangeSet()
Destructs a TextRangeSet object.
virtual bool operator!=(const TextRangeSet &rhs_) const
Tests whether a given TextRangeSet object is not the same as another.
virtual std::unique_ptr< ATE::ITextRanges > ateTextRangeSet() const
Gets the ATE range set ref around which the target object is wrapped.
virtual std::unique_ptr< TextParaFeatures > localParaFeatures()
Retrieves the paragraph features that have local overrides in the target text range set,...
virtual std::unique_ptr< TextParaFeatures > uniqueParaFeatures() const
Retrieves the unique paragraph features used in the target text range set. Unique features are those ...
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