Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreTextCharStyleSet.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TEXT_CHAR_STYLE_SET__
8 #define __HDI_CORE_TEXT_CHAR_STYLE_SET__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class TextCharStyleSet;
17  }
18 
19  namespace core
20  {
21  class TextCharStyle;
22  class TextRange;
23 
25  {
26  public:
38  class Iterator
39  {
40  public:
48  Iterator(const Iterator& iter_);
49 
55  ~Iterator();
56 
66  Iterator& operator=(const Iterator& iter_);
67 
76  bool operator==(const Iterator& iter_) const;
77 
86  bool operator!=(const Iterator& iter_) const;
87 
96 
104  Iterator operator++(int);
105 
113  Iterator& operator--();
114 
122  Iterator operator--(int);
123 
132  bool atEnd() const;
133 
142  std::auto_ptr<TextCharStyle> style() const;
143 
144 
145  private:
146  // Only TextCharStyleSet can construct a new Iterator object
147  friend class TextCharStyleSet;
148 
152  void* __data;
153 
159  Iterator();
160 
168  explicit Iterator(const TextCharStyleSet& set_);
169  };
170 
171  typedef std::auto_ptr<Iterator> IteratorAP;
172 
183 
191  TextCharStyleSet(const TextCharStyleSet& css_);
192 
198  virtual ~TextCharStyleSet();
199 
205  virtual TextCharStyleSet& operator=(const TextCharStyleSet& rhs_);
206 
215  virtual bool operator==(const TextCharStyleSet& rhs_) const;
216 
225  virtual bool operator!=(const TextCharStyleSet& rhs_) const;
226 
238  virtual std::auto_ptr<ATE::ICharStyles> ateCharStyleSet() const;
239 
249  virtual bool isEmpty() const;
250 
258  virtual int32_t size() const;
259 
275  virtual Iterator begin() const;
276 
282  virtual void showAllStyles() const;
283 
289  virtual void showOnlyUnreferencedStyles() const;
290 
298  virtual void showOnlyStylesReferencedIn(const TextRange& range_);
299 
308  virtual void moveStyleTo(const TextCharStyle& style_, const int32_t pos_);
309 
310 
311  private:
312  friend plugin::TextCharStyleSet* __accessImpl(const TextCharStyleSet&);
313  friend TextCharStyleSet __accessCtor(const plugin::TextCharStyleSet&);
314 
318  plugin::TextCharStyleSet* __impl;
319 
325  TextCharStyleSet(const plugin::TextCharStyleSet&);
326  };
327 
328  typedef std::auto_ptr<TextCharStyleSet> TextCharStyleSetAP;
329 
330  extern plugin::TextCharStyleSet* __accessImpl(const TextCharStyleSet&);
331  extern TextCharStyleSet __accessCtor(const plugin::TextCharStyleSet&);
332  }
333 }
334 
335 #endif
336 // __HDI_CORE_TEXT_CHAR_STYLE_SET__
virtual void showAllStyles() const
Shows all char styles.
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:38
virtual int32_t size() const
Gets the count of the contained char styles.
Iterator & operator=(const Iterator &iter_)
Assigns one Iterator object to another.
~Iterator()
Destructs an Iterator object.
Definition: hdicoreTextCharStyleSet.h:24
virtual std::auto_ptr< ATE::ICharStyles > ateCharStyleSet() const
Gets the ATE char style set ref around which the target object is wrapped.
virtual void moveStyleTo(const TextCharStyle &style_, const int32_t pos_)
Reorders styles in this set by moving a style to a given position.
Iterator & operator++()
Prefix increment operator for forward iteration.
virtual bool isEmpty() const
Gets whether the target TextCharStyleSet object is empty.
bool atEnd() const
Determines whether iteration should stop; works well as the conditional in a for() loop...
bool operator!=(const Iterator &iter_) const
Tests whether a given Iterator object is not the same as another.
bool operator==(const Iterator &iter_) const
Tests whether a given Iterator object is the same as another.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
std::auto_ptr< TextCharStyle > style() const
Gets the current paragraph style pointed to by the iterator.
Definition: hdicoreaiArray.h:12
virtual ~TextCharStyleSet()
Destructs a TextCharStyleSet object.
Iterator & operator--()
Prefix decrement operator for reverse iteration.
Definition: hdicoreTextCharStyle.h:23
virtual Iterator begin() const
Gets an iterator for the set.
virtual TextCharStyleSet & operator=(const TextCharStyleSet &rhs_)
Overloaded assignment operator for TextCharStyleSet objects.
virtual void showOnlyStylesReferencedIn(const TextRange &range_)
Shows only styles that are used in the given text range.
TextCharStyleSet()
Creates a new TextCharStyleSet object.
Allows for iteration through the children of a character style set, a la std::vector iteration...
Definition: hdicoreTextCharStyleSet.h:38
virtual void showOnlyUnreferencedStyles() const
Shows only styles to which there are not references in text.
virtual bool operator!=(const TextCharStyleSet &rhs_) const
Tests whether a given TextCharStyleSet object is not the same as another.
virtual bool operator==(const TextCharStyleSet &rhs_) const
Tests whether a given TextCharStyleSet object is the same as another.