Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreTextParaStyleSet.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TEXT_PARA_STYLE_SET__
8 #define __HDI_CORE_TEXT_PARA_STYLE_SET__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class TextParaStyleSet;
17  }
18 
19  namespace core
20  {
21  class TextParaStyle;
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<TextParaStyle> style() const;
143 
144 
145  private:
146  // Only TextParaStyleSet can construct a new Iterator object
147  friend class TextParaStyleSet;
148 
152  void* __data;
153 
159  Iterator();
160 
168  explicit Iterator(const TextParaStyleSet& set_);
169  };
170 
171  typedef std::auto_ptr<Iterator> IteratorAP;
172 
183 
191  TextParaStyleSet(const TextParaStyleSet& pss_);
192 
198  virtual ~TextParaStyleSet();
199 
205  virtual TextParaStyleSet& operator=(const TextParaStyleSet& rhs_);
206 
215  virtual bool operator==(const TextParaStyleSet& rhs_) const;
216 
225  virtual bool operator!=(const TextParaStyleSet& rhs_) const;
226 
238  virtual std::auto_ptr<ATE::IParaStyles> ateParaStyleSet() 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 TextParaStyle& style_, const int32_t pos_);
309 
310 
311  private:
312  friend plugin::TextParaStyleSet* __accessImpl(const TextParaStyleSet&);
313  friend TextParaStyleSet __accessCtor(const plugin::TextParaStyleSet&);
314 
318  plugin::TextParaStyleSet* __impl;
319 
325  TextParaStyleSet(const plugin::TextParaStyleSet&);
326  };
327 
328  typedef std::auto_ptr<TextParaStyleSet> TextParaStyleSetAP;
329 
330  extern plugin::TextParaStyleSet* __accessImpl(const TextParaStyleSet&);
331  extern TextParaStyleSet __accessCtor(const plugin::TextParaStyleSet&);
332  }
333 }
334 
335 #endif
336 // __HDI_CORE_TEXT_PARA_STYLE_SET__
Definition: hdicoreTextParaStyleSet.h:24
bool atEnd() const
Determines whether iteration should stop; works well as the conditional in a for() loop...
virtual bool operator==(const TextParaStyleSet &rhs_) const
Tests whether a given TextParaStyleSet object is the same as another.
~Iterator()
Destructs an Iterator object.
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:38
std::auto_ptr< TextParaStyle > style() const
Gets the current paragraph style pointed to by the iterator.
virtual bool operator!=(const TextParaStyleSet &rhs_) const
Tests whether a given TextParaStyleSet object is not the same as another.
Iterator & operator++()
Prefix increment operator for forward iteration.
Iterator & operator--()
Prefix decrement operator for reverse iteration.
virtual Iterator begin() const
Gets an iterator for the set.
Iterator & operator=(const Iterator &iter_)
Assigns one Iterator object to another.
virtual int32_t size() const
Gets the count of the contained paragraph styles.
virtual bool isEmpty() const
Gets whether the target TextParaStyleSet object is empty.
virtual std::auto_ptr< ATE::IParaStyles > ateParaStyleSet() const
Gets the ATE paragraph style set ref around which the target object is wrapped.
bool operator==(const Iterator &iter_) const
Tests whether a given Iterator object is the same as another.
virtual ~TextParaStyleSet()
Destructs a TextParaStyleSet object.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
bool operator!=(const Iterator &iter_) const
Tests whether a given Iterator object is not the same as another.
Definition: hdicoreaiArray.h:12
TextParaStyleSet()
Creates a new TextParaStyleSet object.
virtual void showAllStyles() const
Shows all paragraph styles.
virtual void showOnlyStylesReferencedIn(const TextRange &range_)
Shows only styles that are used in the given text range.
virtual void showOnlyUnreferencedStyles() const
Shows only styles to which there are not references in text.
virtual void moveStyleTo(const TextParaStyle &style_, const int32_t pos_)
Reorders styles in this set by moving a style to a given position.
virtual TextParaStyleSet & operator=(const TextParaStyleSet &rhs_)
Overloaded assignment operator for TextParaStyleSet objects.
Allows for iteration through the children of a paragraph style set, a la std::vector iteration...
Definition: hdicoreTextParaStyleSet.h:38
Definition: hdicoreTextParaStyle.h:23