Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreTextStory.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_TEXT_STORY__
8 #define __HDI_CORE_TEXT_STORY__
9 
10 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace plugin
17  {
18  class TextStory;
19  }
20 
21  namespace core
22  {
23  class TextArt;
24  class TextPara;
25  class TextRange;
26  class TextRangeSet;
27  class TextStorySet;
28  class TextWord;
29 
30  class TextStory
31  {
32  public:
33  typedef std::vector< TextArt* > TextArtVector;
34  typedef std::vector< TextPara* > TextParaVector;
35  typedef std::vector< TextRange* > TextRangeVector;
36  typedef std::vector< TextWord* > TextWordVector;
37 
47  TextStory();
48 
56  TextStory(const TextStory& s_);
57 
63  virtual ~TextStory();
64 
70  virtual TextStory& operator=(const TextStory& rhs_);
71 
80  virtual bool operator==(const TextStory& rhs_) const;
81 
90  virtual bool operator!=(const TextStory& rhs_) const;
91 
103  virtual std::auto_ptr<ATE::IStory> ateStory() const;
104 
112  virtual bool isEmpty() const;
113 
121  virtual std::auto_ptr<TextStory> duplicate();
122 
130  virtual int32_t index() const;
131 
139  virtual int32_t charCount() const;
140 
148  virtual std::auto_ptr<TextRange> textRange() const;
149 
161  virtual std::auto_ptr<TextRange> textRange(const int32_t start_, const int32_t end_) const;
162 
170  virtual std::auto_ptr<TextRangeSet> selections() const;
171 
179  virtual std::auto_ptr<TextStorySet> stories() const;
180 
190  virtual TextArtVector textFrames() const;
191 
201  virtual TextParaVector paragraphs() const;
202 
212  virtual TextWordVector words() const;
213 
223  virtual TextRangeVector runs() const;
224 
233  virtual std::auto_ptr<TextArt> textFrame(const int32_t index_) const;
234 
245  virtual bool kerningForRange(const TextRange& range_, AutoKernType& type__, int32_t& kerning__) const;
246 
255  virtual void setAutoKerningForRange(const TextRange& range_, const AutoKernType type_);
256 
267  virtual bool kerningForChar(const int32_t index_, AutoKernType& type__, int32_t& kerning__) const;
268 
277  virtual void setKerningForChar(const int32_t index_, const int32_t kerning_);
278 
287  virtual void suspendReflow();
288 
294  virtual void resumeReflow();
295 
296 
297  private:
298  friend plugin::TextStory* __accessImpl(const TextStory&);
299  friend TextStory __accessCtor(const plugin::TextStory&);
300 
304  plugin::TextStory* __impl;
305 
311  TextStory(const plugin::TextStory&);
312  };
313 
314  typedef std::auto_ptr<TextStory> TextStoryAP;
315 
316  extern plugin::TextStory* __accessImpl(const TextStory&);
317  extern TextStory __accessCtor(const plugin::TextStory&);
318  }
319 }
320 
321 #endif
322 // __HDI_CORE_TEXT_STORY__
virtual std::auto_ptr< TextArt > textFrame(const int32_t index_) const
Retrieves a specific text frame from the target story.
virtual bool kerningForRange(const TextRange &range_, AutoKernType &type__, int32_t &kerning__) const
Retrieves the kerning type and value for a text range in the target story.
virtual TextRangeVector runs() const
Retrieves a vector of runs contained in the target story.
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:38
virtual void suspendReflow()
Suspends reflow calculation for the target story. Speeds up calls that cause reflow, such as TextRange insertion methods.
virtual ~TextStory()
Destructs a TextStory object.
virtual bool operator==(const TextStory &rhs_) const
Tests whether a given TextStory object is the same as another.
virtual std::auto_ptr< ATE::IStory > ateStory() const
Gets the ATE story ref around which the target object is wrapped.
virtual void setAutoKerningForRange(const TextRange &range_, const AutoKernType type_)
Sets automatic or optical kerning for a text range in the target story.
virtual TextStory & operator=(const TextStory &rhs_)
Overloaded assignment operator for TextStory objects.
virtual TextParaVector paragraphs() const
Retrieves a vector of paragraphs contained in the target story.
virtual bool isEmpty() const
Gets whether the target TextStory object is empty.
virtual void resumeReflow()
Resumes normal reflow calculation after a call to suspendReflow()
virtual std::auto_ptr< TextRange > textRange() const
Retrieves the text range that contains the entire text of the target story.
Definition: hdicoreTextStory.h:30
virtual std::auto_ptr< TextStorySet > stories() const
Retrieves the story collection that contains the target story.
virtual int32_t index() const
Retrieves the index position of the target story in its collection.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
virtual bool kerningForChar(const int32_t index_, AutoKernType &type__, int32_t &kerning__) const
Retrieves the kerning type and value for a character in the target story.
Definition: hdicoreaiArray.h:12
virtual bool operator!=(const TextStory &rhs_) const
Tests whether a given TextStory object is not the same as another.
virtual TextArtVector textFrames() const
Retrieves a vector of text frames contained in the target story.
virtual std::auto_ptr< TextRangeSet > selections() const
Retrieves the set of text ranges that contains the selected text of the target story.
TextStory()
Creates a new TextStory object.
virtual void setKerningForChar(const int32_t index_, const int32_t kerning_)
Sets a specific kern value in the target story.
virtual std::auto_ptr< TextStory > duplicate()
Duplicates the target object.
virtual TextWordVector words() const
Retrieves a vector of words contained in the target story.
virtual int32_t charCount() const
Retrieves the number of characters in the target story.