Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreTextRangeSet.h
Go to the documentation of this file.
1
6
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;
27 class TextPara;
28 class TextParaFeatures;
30 class TextRange;
31 class TextWord;
32
37 {
38 public:
39 typedef std::vector< std::shared_ptr<TextPara> > TextParaVector;
40 typedef std::vector< std::shared_ptr<TextRange> > TextRangeVector;
41 typedef std::vector< std::shared_ptr<TextWord> > TextWordVector;
42
53
62
68 virtual ~TextRangeSet();
69
78 virtual TextRangeSet& operator=(const TextRangeSet& rhs_);
79
88 virtual bool operator==(const TextRangeSet& rhs_) const;
89
98 virtual bool operator!=(const TextRangeSet& rhs_) const;
99
111 virtual std::unique_ptr<ATE::ITextRanges> ateTextRangeSet() const;
112
120 virtual bool isEmpty() const;
121
129 virtual int32_t size() const;
130
138 virtual std::unique_ptr<TextRangeSet> selections() const;
139
147 virtual TextParaVector paragraphs() const;
148
156 virtual TextWordVector words() const;
157
165 virtual TextRangeVector runs() const;
166
175 virtual std::unique_ptr<TextCharInspector> charInspector() const;
176
185 virtual std::unique_ptr<TextParaInspector> paraInspector() const;
186
193 virtual void clearNamedCharStyle();
194
201 virtual void clearNamedParaStyle();
202
211 virtual std::unique_ptr<TextCharFeatures> uniqueCharFeatures() const;
212
221 virtual std::unique_ptr<TextParaFeatures> uniqueParaFeatures() const;
222
231 virtual bool hasLocalCharFeatures();
232
241 virtual bool hasLocalParaFeatures();
242
253 virtual std::unique_ptr<TextCharFeatures> localCharFeatures();
254
266 virtual void setLocalCharFeatures(const TextCharFeatures& feat_);
267
278
287
298 virtual std::unique_ptr<TextParaFeatures> localParaFeatures();
299
311 virtual void setLocalParaFeatures(const TextParaFeatures& feat_);
312
323
332
341 virtual void select(const bool addToCurrSelection_ = false);
342
349 virtual void deselect();
350
364 virtual std::string contents(const std::string& le_ = "\n") const;
365
373 virtual void changeCase(const CaseChangeType type_);
374
382 virtual void add(const TextRange& range_);
383
392 virtual std::unique_ptr<TextRange> textRange(const int32_t index_) const;
393
401 virtual void remove(const int32_t index_);
402
408 virtual void removeAll();
409
410
411 private:
412 friend aip::TextRangeSet* __accessImpl(const TextRangeSet&);
413 friend TextRangeSet __accessCtor(const aip::TextRangeSet&);
414
418 aip::TextRangeSet* __impl;
419
425 TextRangeSet(const aip::TextRangeSet&);
426 };
427
428 typedef std::unique_ptr<TextRangeSet> TextRangeSetUP;
429 typedef std::shared_ptr<TextRangeSet> TextRangeSetSP;
430 typedef std::weak_ptr<TextRangeSet> TextRangeSetWP;
431
432 extern aip::TextRangeSet* __accessImpl(const TextRangeSet&);
433 extern TextRangeSet __accessCtor(const aip::TextRangeSet&);
434 }
435}
436
437#endif
438// HDI_CORE_AIP_MODE
439
440#endif
441// __HDI_CORE_TEXT_RANGE_SET__
Allows for easy manipulation of Illustrator text character features.
Definition hdicoreTextCharFeatures.h:34
Allows for easy inspection of Illustrator text characters.
Definition hdicoreTextCharInspector.h:33
Allows for easy manipulation of Illustrator text paragraph features.
Definition hdicoreTextParaFeatures.h:30
Encapsulates text paragraph functionality from the Illustrator SDK.
Definition hdicoreTextPara.h:34
Allows for easy inspection of Illustrator text characters.
Definition hdicoreTextParaInspector.h:29
Allows for easy manipulation of Illustrator text ranges.
Definition hdicoreTextRange.h:41
Encapsulates text range set functionality from the Illustrator SDK.
Definition hdicoreTextRangeSet.h:37
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 ...
Encapsulates text word functionality from the Illustrator SDK.
Definition hdicoreTextWord.h:29
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