Loading...
Searching...
No Matches
Action.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFAction
6#define PDFTRON_H_CPPPDFAction
7
8#include <PDF/FileSpec.h>
9#include <SDF/Obj.h>
10#include <C/PDF/TRN_Action.h>
13
14namespace pdftron {
15 namespace PDF {
16
17class Destination;
18
31class Action
32{
33public:
34
45 static Action CreateGoto(class Destination dest);
46
57 static Action CreateGoto(const UChar* key, int key_sz, class Destination dest);
58
72 static Action CreateGotoRemote(const FileSpec& file, int page_num);
73
85 static Action CreateGotoRemote(const FileSpec& file, int page_num, bool new_window);
86
98 static Action CreateURI(SDF::SDFDoc& doc, const char* uri);
99
112
122 static Action CreateSubmitForm(const FileSpec& url);
123
131 static Action CreateLaunch(SDF::SDFDoc& doc, const char* path);
132
141#ifndef SWIG
142 static Action CreateHideField(SDF::SDFDoc& sdfdoc, int list_length, const char** field);
143#endif
144 static Action CreateHideField(SDF::SDFDoc& sdfdoc, const std::vector<std::string>& field);
145
153 static Action CreateImportData(SDF::SDFDoc& doc, const char* path);
154
162
170 static Action CreateJavaScript(SDF::SDFDoc& doc, const char* script);
171
180 Action (SDF::Obj in_obj = 0);
181
189 Action (const Action& in_action);
190
198 Action& operator=(const Action& in_action);
199
207 bool operator==(const Action& in_action);
208
217 bool IsValid() const;
218
219
247
251 Type GetType() const;
252
258 void Execute();
259
268
274
289
299
300
307 {
310 e_export_format = 2, // submit in HTML format if set, FDF format if clear
320 // bit 12 is unused by PDF standard
322 };
323
330
337 void SetFormActionFlag( FormActionFlag flag, bool value );
338
339
344
345
346 //for xamarin use only
347 static Action* CreateInternal(ptrdiff_t impl);
348 ptrdiff_t GetHandleInternal();
349
350// @cond PRIVATE_DOC
351#ifndef SWIGHIDDEN
352 Action(TRN_Action impl);
353 TRN_Action mp_action;
354#endif
355// @endcond
356};
357
358 } // namespace PDF
359} // namespace pdftron
360
361
362#include <Impl/Page.inl>
363
364#endif // PDFTRON_H_CPPPDFAction
class Destination GetDest()
bool operator==(const Action &in_action)
bool GetFormActionFlag(FormActionFlag flag) const
static Action CreateGoto(class Destination dest)
static Action CreateHideField(SDF::SDFDoc &sdfdoc, const std::vector< std::string > &field)
SDF::Obj GetSDFObj() const
bool IsValid() const
static Action CreateImportData(SDF::SDFDoc &doc, const char *path)
static Action CreateResetForm(SDF::SDFDoc &doc)
void SetFormActionFlag(FormActionFlag flag, bool value)
SDF::Obj GetNext() const
static Action CreateHideField(SDF::SDFDoc &sdfdoc, int list_length, const char **field)
ptrdiff_t GetHandleInternal()
Action & operator=(const Action &in_action)
Type GetType() const
static Action CreateGotoRemote(const FileSpec &file, int page_num)
Action(SDF::Obj in_obj=0)
static Action CreateGotoRemote(const FileSpec &file, int page_num, bool new_window)
static Action CreateLaunch(SDF::SDFDoc &doc, const char *path)
static Action CreateSubmitForm(const FileSpec &url)
static Action CreateURI(SDF::SDFDoc &doc, const char *uri)
@ e_Movie
Play a movie.
Definition Action.h:233
@ e_SubmitForm
Send data to a uniform resource locator.
Definition Action.h:236
@ e_GoToE
('Go-to embedded'; PDF 1.6) Go to a destination in an embedded file.
Definition Action.h:228
@ e_Named
Execute an action predefined by the viewer application.
Definition Action.h:235
@ e_Rendition
(PDF 1.5) Controls the playing of multimedia content.
Definition Action.h:241
@ e_ImportData
Import field values from a file.
Definition Action.h:238
@ e_Trans
Updates the display of a document, using a transition dictionary.
Definition Action.h:242
@ e_ResetForm
Set fields to their default values.
Definition Action.h:237
@ e_URI
Resolve a uniform resource identifier.
Definition Action.h:231
@ e_GoTo
Go to a destination in the current document.
Definition Action.h:226
@ e_Unknown
Unknown Action type.
Definition Action.h:245
@ e_Launch
Launch an application, usually to open a file.
Definition Action.h:229
@ e_Thread
Begin reading an article thread.
Definition Action.h:230
@ e_RichMediaExecute
Adobe supplement to ISO 32000; specifies a command to be sent to rich media annotation's handler.
Definition Action.h:244
@ e_GoToR
('Go-to remote') Go to a destination in another document.
Definition Action.h:227
@ e_Sound
Play a sound.
Definition Action.h:232
@ e_SetOCGState
(PDF 1.5) Set the states of optional content groups.
Definition Action.h:240
@ e_GoTo3DView
(PDF 1.6) Set the current view of a 3D annotation
Definition Action.h:243
@ e_JavaScript
Execute a JavaScript script.
Definition Action.h:239
@ e_Hide
Set an annotation's Hidden flag.
Definition Action.h:234
static Action CreateGoto(const UChar *key, int key_sz, class Destination dest)
KeyStrokeActionResult ExecuteKeyStrokeAction(const KeyStrokeEventData &data)
static Action CreateJavaScript(SDF::SDFDoc &doc, const char *script)
static Action CreateURI(SDF::SDFDoc &doc, UString &uri)
Action(const Action &in_action)
static Action * CreateInternal(ptrdiff_t impl)
TRN_UChar UChar
Definition BasicTypes.h:12