Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace plugin
17  {
18  class TextRangeSet;
19  }
20 
21  namespace core
22  {
23  class TextCharFeatures;
24  class TextCharInspector;
25  class TextPara;
26  class TextParaFeatures;
27  class TextParaInspector;
28  class TextRange;
29  class TextWord;
30 
32  {
33  public:
34  typedef std::vector< TextPara* > TextParaVector;
35  typedef std::vector< TextRange* > TextRangeVector;
36  typedef std::vector< TextWord* > TextWordVector;
37 
47  TextRangeSet();
48 
56  TextRangeSet(const TextRangeSet& rs_);
57 
63  virtual ~TextRangeSet();
64 
70  virtual TextRangeSet& operator=(const TextRangeSet& rhs_);
71 
80  virtual bool operator==(const TextRangeSet& rhs_) const;
81 
90  virtual bool operator!=(const TextRangeSet& rhs_) const;
91 
103  virtual std::auto_ptr<ATE::ITextRanges> ateTextRangeSet() const;
104 
112  virtual bool isEmpty() const;
113 
121  virtual int32_t size() const;
122 
130  virtual std::auto_ptr<TextRangeSet> selections() const;
131 
141  virtual TextParaVector paragraphs() const;
142 
152  virtual TextWordVector words() const;
153 
163  virtual TextRangeVector runs() const;
164 
173  virtual std::auto_ptr<TextCharInspector> charInspector() const;
174 
183  virtual std::auto_ptr<TextParaInspector> paraInspector() const;
184 
191  virtual void clearNamedCharStyle();
192 
199  virtual void clearNamedParaStyle();
200 
209  virtual std::auto_ptr<TextCharFeatures> uniqueCharFeatures() const;
210 
219  virtual std::auto_ptr<TextParaFeatures> uniqueParaFeatures() const;
220 
229  virtual bool hasLocalCharFeatures();
230 
239  virtual bool hasLocalParaFeatures();
240 
251  virtual std::auto_ptr<TextCharFeatures> localCharFeatures();
252 
264  virtual void setLocalCharFeatures(const TextCharFeatures& feat_);
265 
275  virtual void replaceOrAddLocalCharFeatures(const TextCharFeatures& feat_);
276 
284  virtual void clearLocalCharFeatures();
285 
296  virtual std::auto_ptr<TextParaFeatures> localParaFeatures();
297 
309  virtual void setLocalParaFeatures(const TextParaFeatures& feat_);
310 
320  virtual void replaceOrAddLocalParaFeatures(const TextParaFeatures& feat_);
321 
329  virtual void clearLocalParaFeatures();
330 
339  virtual void select(const bool addToCurrSelection_ = false);
340 
347  virtual void deselect();
348 
362  virtual std::string contents(const std::string& le_ = "\n") const;
363 
371  virtual void changeCase(const CaseChangeType type_);
372 
380  virtual void add(const TextRange& range_);
381 
390  virtual std::auto_ptr<TextRange> textRange(const int32_t index_) const;
391 
399  virtual void remove(const int32_t index_);
400 
406  virtual void removeAll();
407 
408 
409  private:
410  friend plugin::TextRangeSet* __accessImpl(const TextRangeSet&);
411  friend TextRangeSet __accessCtor(const plugin::TextRangeSet&);
412 
416  plugin::TextRangeSet* __impl;
417 
423  TextRangeSet(const plugin::TextRangeSet&);
424  };
425 
426  typedef std::auto_ptr<TextRangeSet> TextRangeSetAP;
427 
428  extern plugin::TextRangeSet* __accessImpl(const TextRangeSet&);
429  extern TextRangeSet __accessCtor(const plugin::TextRangeSet&);
430  }
431 }
432 
433 #endif
434 // __HDI_CORE_TEXT_RANGE_SET__
virtual TextWordVector words() const
Retrieves a vector of words contained in the target text range set.
virtual void add(const TextRange &range_)
Adds a text range as a member of this set.
virtual std::auto_ptr< TextParaFeatures > localParaFeatures()
Retrieves the paragraph features that have local overrides in the target text range set...
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 void deselect()
Deselects the text in the target text range set. This can result in a discontiguous selection...
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:38
virtual std::auto_ptr< TextCharFeatures > uniqueCharFeatures() const
Retrieves the unique character features used in the target text range set. Unique features are those ...
virtual int32_t size() const
Retrieves the number of members of the target set.
virtual void changeCase(const CaseChangeType type_)
Changes the case of the text in the target text range set.
Allows for easy manipulation of Illustrator text character features.
Definition: hdicoreTextCharFeatures.h:31
virtual TextParaVector paragraphs() const
Retrieves a vector of paragraphs contained in the target text range set.
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 bool operator!=(const TextRangeSet &rhs_) const
Tests whether a given TextRangeSet object is not the same as another.
Definition: hdicoreTextRangeSet.h:31
virtual std::auto_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::auto_ptr< TextCharInspector > charInspector() const
Creates an inspector with which to access the character features of all characters in the target text...
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 select(const bool addToCurrSelection_=false)
Selects the text in the target text range set.
virtual bool isEmpty() const
Gets whether the target TextRangeSet object is empty.
virtual bool hasLocalCharFeatures()
Reports whether there any local character feature overrides for characters contained in the target te...
virtual std::auto_ptr< TextParaInspector > paraInspector() const
Creates an inspector with which to access the paragraph features of all paragraphs in the target text...
TextRangeSet()
Creates a new TextRangeSet object.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
virtual std::auto_ptr< TextRange > textRange(const int32_t index_) const
Retrieves a member of this set by position index.
virtual std::auto_ptr< TextParaFeatures > uniqueParaFeatures() const
Retrieves the unique paragraph features used in the target text range set. Unique features are those ...
virtual bool hasLocalParaFeatures()
Reports whether there any local paragraph feature overrides for paragraphs contained in the target te...
Allows for easy manipulation of Illustrator text paragraph features.
Definition: hdicoreTextParaFeatures.h:27
virtual ~TextRangeSet()
Destructs a TextRangeSet object.
Definition: hdicoreaiArray.h:12
virtual bool operator==(const TextRangeSet &rhs_) const
Tests whether a given TextRangeSet object is the same as another.
virtual void clearNamedCharStyle()
Removes the association of the target text range set and its character style. Copies the feature valu...
virtual void clearNamedParaStyle()
Removes the association of the target text range set and its paragraph style. Copies the feature valu...
virtual void removeAll()
Removes all members from the set.
virtual void clearLocalCharFeatures()
Removes all local overrides for all characters in the target text range set. All character features a...
virtual TextRangeSet & operator=(const TextRangeSet &rhs_)
Overloaded assignment operator for TextRangeSet objects.
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 std::auto_ptr< TextRangeSet > selections() const
Retrieves the selected text within the target text range set.
virtual TextRangeVector runs() const
Retrieves a vector of runs (ranges) contained in the target text range set.
virtual std::auto_ptr< ATE::ITextRanges > ateTextRangeSet() const
Gets the ATE range set ref around which the target object is wrapped.
virtual void clearLocalParaFeatures()
Removes all local overrides for all paragraphs in this text range set. All paragraph features are the...