Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
idomtarget.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef __EDLIDOMTARGET_H__
6#define __EDLIDOMTARGET_H__
7
8#include <assert.h>
9#include <edl/iedlobject.h>
10#include <edl/edltypes.h>
11#include <edl/iedlenum.h>
12#include <edl/edlstring.h>
13#include <edl/idomid.h>
14
16
17
69
71#define edlobj2IDOMTarget(src) edl_cast((IDOMTarget *)NULL, src)
72
73
84{
85#define IDOMExternalTargetClassID 0x45192b05, 0xa73c447f, 0xbd0ac312, 0x882e6a7d
86 public:
87
89
94 virtual EDLSysString getTargetUri() const = 0;
95
100 virtual void setTargetUri(const EDLSysString &uri) = 0;
101
107 virtual bool getIsMap() const = 0;
108
113 virtual void setIsMap(bool isMap) = 0;
114
120 {
121 return eExternal;
122 }
123
124};
125
127#define edlobj2IDOMExternalTarget(src) edl_cast((IDOMExternalTarget *)NULL, src)
128
129
136{
137#define IDOMInternalTargetClassID 0xfcf28aeb, 0xf977476b, 0x884a1ab2, 0xfac79443
138 public:
139
141
146 virtual DOMid getTargetId() const = 0;
147
152 virtual void setTargetId(DOMid domId) = 0;
153
159 {
160 return eInternal;
161 }
162
163};
164
166#define edlobj2IDOMInternalTarget(src) edl_cast((IDOMInternalTarget *)NULL, src)
167
168template <typename basetype>
170{
171 public:
172
173 TypeWithNull() : m_isNull(true)
174 {}
175
176 TypeWithNull(basetype value) : m_value(value), m_isNull(false)
177 {}
178
179 TypeWithNull(const TypeWithNull<basetype>& that) : m_isNull(that.m_isNull), m_value(that.m_value)
180 {}
181
182 basetype getValue() const
183 {
184 assert(! m_isNull);
185 return m_value;
186 }
187
188 basetype getValueOrDefault(basetype defaultVal = basetype())
189 {
190 if (m_isNull)
191 {
192 return defaultVal;
193 }
194 else
195 {
196 return m_value;
197 }
198 }
199
200 bool isNull() const
201 {
202 return m_isNull;
203 }
204
205 void setValue(basetype value)
206 {
207 m_value = value;
208 m_isNull = false;
209 }
210
211 void setNull()
212 {
213 m_isNull = true;
214 }
215
216 const TypeWithNull & operator =(const TypeWithNull &another)
217 {
218 m_isNull = another.m_isNull;
219 if (!m_isNull)
220 m_value = another.m_value;
221 return *this;
222 }
223
224 bool equals(const TypeWithNull &another)
225 {
226 if (m_isNull != another.m_isNull)
227 {
228 return false;
229 }
230 if (!m_isNull)
231 {
232 if (m_value != another.m_value)
233 {
234 return false;
235 }
236 }
237 return true;
238 }
239
240private:
241 basetype m_value;
242 bool m_isNull;
243};
244
246
247
254{
255#define IDOMPageTargetClassID 0x2cb17446, 0xac5741d3, 0xb9ba405e, 0x616c7cee
256 public:
257
259
267 virtual uint32 getTargetPage() const = 0;
268
276 virtual void setTargetPage(uint32 page) = 0;
277
283 {
284 return ePage;
285 }
286
287};
288
290#define edlobj2IDOMPageTarget(src) edl_cast((IDOMPageTarget *)NULL, src)
291
294
301{
302#define IDOMPageRectTargetClassID 0xd21f80cf, 0x124c495b, 0x9eb05a87, 0x2fa73ef6
303 public:
304
306
324
339 static EDL_API IDOMPageRectTargetPtr create(IEDLClassFactory *pFactory,
340 DOMid pageId,
341 eFitType fitType = eFTFit,
342 double zoom = 0.0,
343 const doubleWithNull &left = doubleWithNull(),
344 const doubleWithNull &top = doubleWithNull(),
345 const doubleWithNull &right = doubleWithNull(),
346 const doubleWithNull &bottom = doubleWithNull());
347
352 virtual DOMid getPageId() const = 0;
353
358 virtual void setPageId(DOMid domId) = 0;
359
364 virtual eFitType getFitType() const = 0;
365
370 virtual void setFitType(eFitType fitType) = 0;
371
378 virtual double getZoom() const = 0;
379
386 virtual void setZoom(double zoom) = 0;
387
392 virtual doubleWithNull getLeft() const = 0;
393
398 virtual void setLeft(const doubleWithNull &left) = 0;
399
404 virtual doubleWithNull getTop() const = 0;
405
410 virtual void setTop(const doubleWithNull &top) = 0;
411
416 virtual doubleWithNull getRight() const = 0;
417
422 virtual void setRight(const doubleWithNull &right) = 0;
423
428 virtual doubleWithNull getBottom() const = 0;
429
434 virtual void setBottom(const doubleWithNull &bottom) = 0;
435
441 {
442 return ePageRect;
443 }
444
445};
446
447#define edlobj2IDOMPageRectTarget(src) edl_cast((IDOMPageRectTarget *)NULL, src)
448
455{
456#define IDOMActionLaunchClassID 0x877b883f, 0x5dcf4c04, 0xa469d7f5, 0xf637b394
457 public:
458
460
465 virtual EDLString getFile() const = 0;
466
471 virtual void setFile(const EDLString &file) = 0;
472
477 virtual EDLString getWinParameters() const = 0;
478
483 virtual void setWinParameters(const EDLString &params) = 0;
484
489 virtual EDLString getMacParameters() const = 0;
490
495 virtual void setMacParameters(const EDLString &params) = 0;
496
501 virtual EDLString getUnixParameters() const = 0;
502
507 virtual void setUnixParameters(const EDLString &params) = 0;
508
513 virtual bool getNewWindow() const = 0;
514
519 virtual void setNewWindow(bool bNewWindow) = 0;
520
526 {
527 return eActionLaunch;
528 }
529
530};
531
533#define edlobj2IDOMActionLaunch(src) edl_cast((IDOMActionLaunch *)NULL, src)
534
537
544{
545#define IDOMActionArrayClassID 0x52205412, 0xfaf74a65, 0x9d1d5e19, 0x9d15ece6
546 public:
547
549
555 virtual IDOMTargetCollectionEnumPtr getActionsEnum() = 0;
556
561 virtual uint32 getActionsCount() = 0;
562
566 virtual void clearActions() = 0;
567
573 virtual bool addAction(const IDOMTargetPtr &ptrAction) = 0;
574
580 {
581 return eActionArray;
582 }
583
584};
585
587#define edlobj2IDOMActionArray(src) edl_cast((IDOMActionArray *)NULL, src)
588
590
591#endif // EDLIDOMTARGET_H
IDOMActionArray interface.
Definition idomtarget.h:544
virtual uint32 getActionsCount()=0
Retrieves count of the actions.
virtual eTargetType getTargetType() const
Implementation of geTargetType for IDOMActionArray.
Definition idomtarget.h:579
virtual void clearActions()=0
Clears collection of actions.
virtual bool addAction(const IDOMTargetPtr &ptrAction)=0
Append a action to the action collection.
DECLARE_CLASS_ID(IDOMActionArrayClassID)
virtual IDOMTargetCollectionEnumPtr getActionsEnum()=0
Retrieves enumerator of the action collection Action collection is analog of entry "Next" of PDF acti...
IDOMActionLaunch interface.
Definition idomtarget.h:455
virtual EDLString getMacParameters() const =0
Retrieves the Mac OS-specific launch parameters.
virtual EDLString getWinParameters() const =0
Retrieves the Windows-specific launch parameters.
virtual EDLString getUnixParameters() const =0
Retrieves the UNIX-specific launch parameters.
virtual bool getNewWindow() const =0
Retrieves the new window flag.
DECLARE_CLASS_ID(IDOMActionLaunchClassID)
virtual EDLString getFile() const =0
Retrieves the file specification.
virtual void setWinParameters(const EDLString &params)=0
Sets the Windows-specific launch parameters.
virtual eTargetType getTargetType() const
Retrieves the target type.
Definition idomtarget.h:525
virtual void setMacParameters(const EDLString &params)=0
Sets the Mac OS-specific launch parameters.
virtual void setFile(const EDLString &file)=0
Sets the file specification.
virtual void setNewWindow(bool bNewWindow)=0
Setter for new window flag.
virtual void setUnixParameters(const EDLString &params)=0
Sets the UNIX-specific launch parameters.
IDOMExternalTarget interface.
Definition idomtarget.h:84
virtual void setTargetUri(const EDLSysString &uri)=0
Sets the target URI.
DECLARE_CLASS_ID(IDOMExternalTargetClassID)
virtual EDLSysString getTargetUri() const =0
Retrieves the target URI.
virtual eTargetType getTargetType() const
Retrieves the target URI type.
Definition idomtarget.h:119
virtual bool getIsMap() const =0
Retrieves the value of the IsMap flag. This is a flag specifying whether to track the mouse position ...
virtual void setIsMap(bool isMap)=0
Sets the value of the IsMap flag.
The IDOMInternalTarget interface describes the targets of hyperlinks that are in the same document bu...
Definition idomtarget.h:136
virtual DOMid getTargetId() const =0
Retrieves the internal target id.
DECLARE_CLASS_ID(IDOMInternalTargetClassID)
virtual void setTargetId(DOMid domId)=0
Sets the internal target id.
virtual eTargetType getTargetType() const
Implementation of getTargetType for IDOMInternalTarget.
Definition idomtarget.h:158
IDOMPageRectTarget nodes are used to describe hyperlinks on a page rectangle to targets on the same p...
Definition idomtarget.h:301
static EDL_API IDOMPageRectTargetPtr create(IEDLClassFactory *pFactory, DOMid pageId, eFitType fitType=eFTFit, double zoom=0.0, const doubleWithNull &left=doubleWithNull(), const doubleWithNull &top=doubleWithNull(), const doubleWithNull &right=doubleWithNull(), const doubleWithNull &bottom=doubleWithNull())
Simplified creator for a page rect target. Throws an exception of type IEDLError on failure.
virtual doubleWithNull getBottom() const =0
Gets the bottom coordinate value of the target.
virtual void setZoom(double zoom)=0
Sets for the zoom value.
virtual void setFitType(eFitType fitType)=0
Sets the fit type. See eFitType.
virtual void setTop(const doubleWithNull &top)=0
Sets the top coordinate value of the target.
DECLARE_CLASS_ID(IDOMPageRectTargetClassID)
virtual eFitType getFitType() const =0
Retrieves the fit type. See eFitType.
virtual doubleWithNull getLeft() const =0
Gets the left coordinate value of the target.
virtual void setPageId(DOMid domId)=0
Sets the target page DOM id.
virtual DOMid getPageId() const =0
Retrieves the target page DOM id.
virtual void setRight(const doubleWithNull &right)=0
Sets the right coordinate value of the target.
virtual doubleWithNull getRight() const =0
Gets the right coordinate value of the target.
virtual eTargetType getTargetType() const
Implementation of getTargetType for IDOMPageTarget.
Definition idomtarget.h:440
virtual doubleWithNull getTop() const =0
Gets the top coordinate value of the target.
virtual double getZoom() const =0
Retrieves the zoom value.
virtual void setLeft(const doubleWithNull &left)=0
Sets the left coordinate value of the target.
virtual void setBottom(const doubleWithNull &bottom)=0
Sets the bottom coordinate value of the target.
@ eFTFit
Definition idomtarget.h:316
@ eFTFitV
Definition idomtarget.h:318
@ eFTFitR
Definition idomtarget.h:319
@ eFTFitB
Definition idomtarget.h:320
@ eFTFitBH
Definition idomtarget.h:321
@ eFTFitBV
Definition idomtarget.h:322
@ eFTFitH
Definition idomtarget.h:317
@ eFTXyz
Definition idomtarget.h:315
@ eFTInvalid
Definition idomtarget.h:314
IDOMPageTarget nodes are used to describe hyperlinks on a page to targets on the same page.
Definition idomtarget.h:254
virtual eTargetType getTargetType() const
Implementation of getTargetType for IDOMPageTarget.
Definition idomtarget.h:282
DECLARE_CLASS_ID(IDOMPageTargetClassID)
virtual uint32 getTargetPage() const =0
Retrieves the target page number for a page target. A page target has the whole page as the target....
virtual void setTargetPage(uint32 page)=0
Sets the target page number for a page target. A page target has the whole page as the target....
Base class for defining hyperlink targets in a document.
Definition idomtarget.h:29
virtual eTargetType getTargetType() const =0
Retrieves the target type.
@ eActionArray
Array of actions.
Definition idomtarget.h:59
@ eActionGoToR
("Go-to remote") Go to a destination in another document.
Definition idomtarget.h:43
@ eActionJavaScript
(PDF 1.3) Execute a JavaScript script.
Definition idomtarget.h:54
@ eActionImportData
(PDF 1.2) Import field values from a file.
Definition idomtarget.h:53
@ eActionLaunch
Launch an application, usually to open a file.
Definition idomtarget.h:45
@ eActionGoTo3DView
(PDF 1.6) Set the current view of a 3D annotation
Definition idomtarget.h:58
@ eExternal
(PDF URI Action) Resolve a uniform resource identifier.
Definition idomtarget.h:39
@ eActionResetForm
(PDF 1.2) Set fields to their default values.
Definition idomtarget.h:52
@ eActionNamed
(PDF 1.2) Execute an action predefined by the viewer application.
Definition idomtarget.h:50
@ eActionHide
(PDF 1.2) Set an annotation's Hidden flag.
Definition idomtarget.h:49
@ ePage
XPS page target.
Definition idomtarget.h:41
@ eActionThread
Begin reading an article thread.
Definition idomtarget.h:46
@ eActionMovie
(PDF 1.2) Play a movie.
Definition idomtarget.h:48
@ ePageRect
(PDF Goto Action) Go to a destination in the current document.
Definition idomtarget.h:42
@ eActionGoToE
("Go-to embedded"; PDF 1.6) Go to a destination in an embedded file.
Definition idomtarget.h:44
@ eActionTrans
(PDF 1.5) Updates the display of a document, using a transition dictionary.
Definition idomtarget.h:57
@ eActionSetOCGState
(PDF 1.5) Set the states of optional content groups.
Definition idomtarget.h:55
@ eActionRendition
(PDF 1.5) Controls the playing of multimedia content.
Definition idomtarget.h:56
@ eInternal
XPS internal target.
Definition idomtarget.h:40
@ eActionSubmitForm
(PDF 1.2) Send data to a uniform resource locator.
Definition idomtarget.h:51
@ eActionSound
(PDF 1.2) Play a sound.
Definition idomtarget.h:47
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
Definition iedlenum.h:49
Definition idomtarget.h:170
TypeWithNull(basetype value)
Definition idomtarget.h:176
TypeWithNull()
Definition idomtarget.h:173
basetype getValue() const
Definition idomtarget.h:182
basetype getValueOrDefault(basetype defaultVal=basetype())
Definition idomtarget.h:188
void setNull()
Definition idomtarget.h:211
bool equals(const TypeWithNull &another)
Definition idomtarget.h:224
TypeWithNull(const TypeWithNull< basetype > &that)
Definition idomtarget.h:179
bool isNull() const
Definition idomtarget.h:200
const TypeWithNull & operator=(const TypeWithNull &another)
Definition idomtarget.h:216
void setValue(basetype value)
Definition idomtarget.h:205
#define _END_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:110
#define _BEGIN_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:109
EDLString and EDLSysString classes and associated EDL string manipulation functions.
std::string EDLSysString
Definition edlstring.h:158
std::wstring EDLString
Definition edlstring.h:165
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned int uint32
Definition edltypes.h:34
#define EDL_API
Definition edltypes.h:86
EDL::uint64 DOMid
Type used to uniquely idenitify a DOM node.
Definition idomid.h:17
eFitType
Destination fit types enumeration.
Definition idomtarget.h:313
eTargetType
An enumeration of target types.
Definition idomtarget.h:38
#define IDOMInternalTargetClassID
Definition idomtarget.h:137
#define IDOMPageTargetClassID
Definition idomtarget.h:255
IInputEnumRC< IDOMTargetPtr > IDOMTargetCollectionEnum
Definition idomtarget.h:535
TypeWithNull< double > doubleWithNull
Definition idomtarget.h:245
#define IDOMPageRectTargetClassID
Definition idomtarget.h:302
#define IDOMExternalTargetClassID
Definition idomtarget.h:85
#define IDOMActionLaunchClassID
Definition idomtarget.h:456
#define IDOMActionArrayClassID
Definition idomtarget.h:545
EDL iterator template classes designed to allow iteration over the contents of a collection....
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211