00001
00002
00003
00004
00005
00006 #ifndef H_CPPPDFAction
00007 #define H_CPPPDFAction
00008
00009
00010 #include <PDF/FileSpec.h>
00011 #include <SDF/Obj.h>
00012 #include <C/PDF/TRN_Action.h>
00013
00014 namespace pdftron {
00015 namespace PDF {
00016
00029 class Action
00030 {
00031 public:
00032
00043 static Action CreateGoto(class Destination dest);
00044
00055 static Action CreateGoto(const UChar* key, int key_sz, class Destination dest);
00056
00070 static Action CreateGotoRemote(const FileSpec& file, int page_num);
00071
00083 static Action CreateGotoRemote(const FileSpec& file, int page_num, bool new_window);
00084
00096 static Action CreateURI(SDF::SDFDoc& doc, const char* uri);
00097
00107 static Action CreateSubmitForm(const FileSpec& url);
00108
00109
00110
00111
00112
00113
00114
00115
00116 static Action CreateLaunch(SDF::SDFDoc& doc, const char* path);
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 static Action CreateHideField(SDF::SDFDoc& doc, int list_length, const char** field_list);
00127
00128
00129
00130
00131
00132
00133
00134
00135 static Action CreateImportData(SDF::SDFDoc& doc, const char* path);
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 static Action CreateResetForm(SDF::SDFDoc& doc);
00146
00147
00148
00149
00150
00151
00152
00153
00154 static Action CreateJavaScript(SDF::SDFDoc& doc, const char* script);
00155
00164 Action (SDF::Obj in_obj = 0);
00165
00173 Action (const Action& in_action);
00174
00182 Action& operator=(const Action& in_action);
00183
00191 bool operator==(const Action& in_action);
00192
00201 bool IsValid() const;
00202
00203
00208 enum Type
00209 {
00210 e_GoTo,
00211 e_GoToR,
00212 e_GoToE,
00213 e_Launch,
00214 e_Thread,
00215 e_URI,
00216 e_Sound,
00217 e_Movie,
00218 e_Hide,
00219 e_Named,
00220 e_SubmitForm,
00221 e_ResetForm,
00222 e_ImportData,
00223 e_JavaScript,
00224 e_SetOCGState,
00225 e_Rendition,
00226 e_Trans,
00227 e_GoTo3DView,
00228 e_RichMediaExecute,
00229 e_Unknown
00230 };
00231
00235 Type GetType() const;
00236
00242 void Execute();
00243
00257 SDF::Obj GetNext() const;
00258
00267 class Destination GetDest();
00268
00269
00275 enum FormActionFlag
00276 {
00277 e_exclude = 0,
00278 e_include_no_value_fields = 1,
00279 e_export_format = 2,
00280 e_get_method = 3,
00281 e_submit_coordinates = 4,
00282 e_xfdf = 5,
00283 e_include_append_saves = 6,
00284 e_include_annotations = 7,
00285 e_submit_pdf = 8,
00286 e_canonical_format = 9,
00287 e_excl_non_user_annots = 10,
00288 e_excl_F_key = 11,
00289
00290 e_embed_form = 13
00291 };
00292
00298 bool GetFormActionFlag( FormActionFlag flag ) const ;
00299
00305 void SetFormActionFlag( FormActionFlag flag, bool value );
00306
00307
00311 SDF::Obj GetSDFObj () const;
00312
00314 Action(TRN_Action impl);
00315 TRN_Action mp_action;
00317 };
00318
00319 }
00320 }
00321
00322
00323 #include <Impl/Page.inl>
00324 #endif
00325