All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Action.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2018 by PDFTron Systems 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>
12 #include <PDF/KeyStrokeEventData.h>
13 
14 namespace pdftron {
15  namespace PDF {
16 
29 class Action
30 {
31 public:
32 
43  static Action CreateGoto(class Destination dest);
44 
55  static Action CreateGoto(const UChar* key, int key_sz, class Destination dest);
56 
70  static Action CreateGotoRemote(const FileSpec& file, int page_num);
71 
83  static Action CreateGotoRemote(const FileSpec& file, int page_num, bool new_window);
84 
96  static Action CreateURI(SDF::SDFDoc& doc, const char* uri);
97 
109  static Action CreateURI(SDF::SDFDoc& doc, UString& uri);
110 
120  static Action CreateSubmitForm(const FileSpec& url);
121 
129  static Action CreateLaunch(SDF::SDFDoc& doc, const char* path);
130 
139  static Action CreateHideField(SDF::SDFDoc& sdfdoc, int list_length, const char** field);
140 
148  static Action CreateImportData(SDF::SDFDoc& doc, const char* path);
149 
156  static Action CreateResetForm(SDF::SDFDoc& doc);
157 
165  static Action CreateJavaScript(SDF::SDFDoc& doc, const char* script);
166 
175  Action (SDF::Obj in_obj = 0);
176 
184  Action (const Action& in_action);
185 
193  Action& operator=(const Action& in_action);
194 
202  bool operator==(const Action& in_action);
203 
212  bool IsValid() const;
213 
214 
219  enum Type
220  {
241  };
242 
246  Type GetType() const;
247 
253  void Execute();
254 
263 
268  bool NeedsWriteLock();
269 
283  SDF::Obj GetNext() const;
284 
293  class Destination GetDest();
294 
295 
302  {
305  e_export_format = 2, // submit in HTML format if set, FDF format if clear
308  e_xfdf = 5,
315  // bit 12 is unused by PDF standard
317  };
318 
324  bool GetFormActionFlag( FormActionFlag flag ) const ;
325 
332  void SetFormActionFlag( FormActionFlag flag, bool value );
333 
334 
338  SDF::Obj GetSDFObj () const;
339 
340 
341  //for xamarin use only
342  static Action* CreateInternal(ptrdiff_t impl);
343  ptrdiff_t GetHandleInternal();
344 
346 #ifndef SWIGHIDDEN
347  Action(TRN_Action impl);
348  TRN_Action mp_action;
349 #endif
350 };
352 
353  } // namespace PDF
354 } // namespace pdftron
355 
356 
357 #include <Impl/Page.inl>
358 
359 #endif // PDFTRON_H_CPPPDFAction
Action & operator=(const Action &in_action)
Action(SDF::Obj in_obj=0)
(PDF 1.6) Set the current view of a 3D annotation
Definition: Action.h:238
bool GetFormActionFlag(FormActionFlag flag) const
static Action CreateURI(SDF::SDFDoc &doc, const char *uri)
KeyStrokeActionResult ExecuteKeyStrokeAction(const KeyStrokeEventData &data)
class Destination GetDest()
SDF::Obj GetNext() const
static Action CreateGoto(class Destination dest)
Import field values from a file.
Definition: Action.h:233
Resolve a uniform resource identifier.
Definition: Action.h:226
Adobe supplement to ISO 32000; specifies a command to be sent to rich media annotation&#39;s handler...
Definition: Action.h:239
Go to a destination in the current document.
Definition: Action.h:221
Set an annotation&#39;s Hidden flag.
Definition: Action.h:229
static Action CreateJavaScript(SDF::SDFDoc &doc, const char *script)
Set fields to their default values.
Definition: Action.h:232
static Action CreateSubmitForm(const FileSpec &url)
Execute a JavaScript script.
Definition: Action.h:234
Type GetType() const
Send data to a uniform resource locator.
Definition: Action.h:231
static Action CreateResetForm(SDF::SDFDoc &doc)
(&#39;Go-to embedded&#39;; PDF 1.6) Go to a destination in an embedded file.
Definition: Action.h:223
TRN_UChar UChar
Definition: BasicTypes.h:12
Begin reading an article thread.
Definition: Action.h:225
Unknown Action type.
Definition: Action.h:240
Launch an application, usually to open a file.
Definition: Action.h:224
Execute an action predefined by the viewer application.
Definition: Action.h:230
static Action * CreateInternal(ptrdiff_t impl)
static Action CreateImportData(SDF::SDFDoc &doc, const char *path)
static Action CreateGotoRemote(const FileSpec &file, int page_num)
void SetFormActionFlag(FormActionFlag flag, bool value)
ptrdiff_t GetHandleInternal()
bool operator==(const Action &in_action)
(PDF 1.5) Set the states of optional content groups.
Definition: Action.h:235
bool IsValid() const
static Action CreateLaunch(SDF::SDFDoc &doc, const char *path)
static Action CreateHideField(SDF::SDFDoc &sdfdoc, int list_length, const char **field)
(PDF 1.5) Controls the playing of multimedia content.
Definition: Action.h:236
Updates the display of a document, using a transition dictionary.
Definition: Action.h:237
(&#39;Go-to remote&#39;) Go to a destination in another document.
Definition: Action.h:222
SDF::Obj GetSDFObj() const

© 2002-2014 PDFTron Systems Inc.