Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreTextStory.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_TEXT_STORY__
8#define __HDI_CORE_TEXT_STORY__
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 TextStory;
21 }
22
23 namespace core
24 {
25 class TextArt;
26 class TextPara;
27 class TextRange;
28 class TextRangeSet;
29 class TextStorySet;
30 class TextWord;
31
33 {
34 public:
35 typedef std::vector< std::shared_ptr<TextArt> > TextArtVector;
36 typedef std::vector< std::shared_ptr<TextPara> > TextParaVector;
37 typedef std::vector< std::shared_ptr<TextRange> > TextRangeVector;
38 typedef std::vector< std::shared_ptr<TextWord> > TextWordVector;
39
50
58 TextStory(const TextStory& s_);
59
65 virtual ~TextStory();
66
72 virtual TextStory& operator=(const TextStory& rhs_);
73
82 virtual bool operator==(const TextStory& rhs_) const;
83
92 virtual bool operator!=(const TextStory& rhs_) const;
93
105 virtual std::unique_ptr<ATE::IStory> ateStory() const;
106
114 virtual bool isEmpty() const;
115
123 virtual std::unique_ptr<TextStory> duplicate();
124
132 virtual int32_t index() const;
133
141 virtual int32_t charCount() const;
142
150 virtual std::unique_ptr<TextRange> textRange() const;
151
163 virtual std::unique_ptr<TextRange> textRange(const int32_t start_, const int32_t end_) const;
164
172 virtual std::unique_ptr<TextRangeSet> selections() const;
173
181 virtual std::unique_ptr<TextStorySet> stories() const;
182
190 virtual TextArtVector textFrames() const;
191
199 virtual TextParaVector paragraphs() const;
200
208 virtual TextWordVector words() const;
209
217 virtual TextRangeVector runs() const;
218
227 virtual std::unique_ptr<TextArt> textFrame(const int32_t index_) const;
228
239 virtual bool kerningForRange(const TextRange& range_, AutoKernType& type__, int32_t& kerning__) const;
240
249 virtual void setAutoKerningForRange(const TextRange& range_, const AutoKernType type_);
250
261 virtual bool kerningForChar(const int32_t index_, AutoKernType& type__, int32_t& kerning__) const;
262
271 virtual void setKerningForChar(const int32_t index_, const int32_t kerning_);
272
281 virtual void suspendReflow();
282
288 virtual void resumeReflow();
289
290
291 private:
292 friend aip::TextStory* __accessImpl(const TextStory&);
293 friend TextStory __accessCtor(const aip::TextStory&);
294
298 aip::TextStory* __impl;
299
305 TextStory(const aip::TextStory&);
306 };
307
308 typedef std::unique_ptr<TextStory> TextStoryUP;
309 typedef std::shared_ptr<TextStory> TextStorySP;
310 typedef std::weak_ptr<TextStory> TextStoryWP;
311
312 extern aip::TextStory* __accessImpl(const TextStory&);
313 extern TextStory __accessCtor(const aip::TextStory&);
314 }
315}
316
317#endif
318// HDI_CORE_AIP_MODE
319
320#endif
321// __HDI_CORE_TEXT_STORY__
Allows for easy manipulation of Illustrator text ranges.
Definition: hdicoreTextRange.h:41
Definition: hdicoreTextStory.h:33
virtual TextStory & operator=(const TextStory &rhs_)
Overloaded assignment operator for TextStory objects.
virtual TextArtVector textFrames() const
Retrieves a vector of text frames contained in the target story.
virtual TextRangeVector runs() const
Retrieves a vector of runs contained in the target story.
virtual void setKerningForChar(const int32_t index_, const int32_t kerning_)
Sets a specific kern value in the target story.
virtual std::unique_ptr< TextRange > textRange(const int32_t start_, const int32_t end_) const
Retrieves an arbitrary text range from this story.
virtual bool operator!=(const TextStory &rhs_) const
Tests whether a given TextStory object is not the same as another.
virtual void resumeReflow()
Resumes normal reflow calculation after a call to suspendReflow()
virtual std::unique_ptr< TextArt > textFrame(const int32_t index_) const
Retrieves a specific text frame from the target story.
virtual bool operator==(const TextStory &rhs_) const
Tests whether a given TextStory object is the same as another.
virtual ~TextStory()
Destructs a TextStory object.
virtual std::unique_ptr< ATE::IStory > ateStory() const
Gets the ATE story ref around which the target object is wrapped.
virtual std::unique_ptr< TextStory > duplicate()
Duplicates the target object.
virtual std::unique_ptr< TextRangeSet > selections() const
Retrieves the set of text ranges that contains the selected text of the target story.
virtual int32_t index() const
Retrieves the index position of the target story in its collection.
virtual TextWordVector words() const
Retrieves a vector of words contained in the target story.
virtual void suspendReflow()
Suspends reflow calculation for the target story. Speeds up calls that cause reflow,...
TextStory()
Creates a new TextStory object.
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 void setAutoKerningForRange(const TextRange &range_, const AutoKernType type_)
Sets automatic or optical kerning for a text range in the target story.
virtual bool isEmpty() const
Gets whether the target TextStory object is empty.
virtual int32_t charCount() const
Retrieves the number of characters in the target story.
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.
virtual TextParaVector paragraphs() const
Retrieves a vector of paragraphs contained in the target story.
virtual std::unique_ptr< TextRange > textRange() const
Retrieves the text range that contains the entire text of the target story.
TextStory(const TextStory &s_)
TextStory copy constructor.
virtual std::unique_ptr< TextStorySet > stories() const
Retrieves the story collection that contains the target story.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
AutoKernType
Indicates the kerning type of some text.
Definition: hdicoreTypes.h:495