| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef XFA_INCLUDE_FXFA_FXFA_H_ | |
| 8 #define XFA_INCLUDE_FXFA_FXFA_H_ | |
| 9 | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "xfa/include/fxfa/fxfa_basic.h" | |
| 13 #include "xfa/include/fxfa/fxfa_widget.h" | |
| 14 | |
| 15 class CFX_Graphics; | |
| 16 class CPDF_Document; | |
| 17 class CXFA_FFPageView; | |
| 18 class CXFA_Node; | |
| 19 class CXFA_NodeList; | |
| 20 class CXFA_WidgetAcc; | |
| 21 class IFWL_AdapterTimerMgr; | |
| 22 class IFX_Font; | |
| 23 class IXFA_AppProvider; | |
| 24 class IXFA_DocProvider; | |
| 25 class IXFA_WidgetAccIterator; | |
| 26 class IXFA_WidgetIterator; | |
| 27 | |
| 28 #define XFA_MBICON_Error 0 | |
| 29 #define XFA_MBICON_Warning 1 | |
| 30 #define XFA_MBICON_Question 2 | |
| 31 #define XFA_MBICON_Status 3 | |
| 32 #define XFA_MB_OK 0 | |
| 33 #define XFA_MB_OKCancel 1 | |
| 34 #define XFA_MB_YesNo 2 | |
| 35 #define XFA_MB_YesNoCancel 3 | |
| 36 #define XFA_IDOK 1 | |
| 37 #define XFA_IDCancel 2 | |
| 38 #define XFA_IDNo 3 | |
| 39 #define XFA_IDYes 4 | |
| 40 #define XFA_IDS_ValidateFailed 1 | |
| 41 #define XFA_IDS_CalcOverride 2 | |
| 42 #define XFA_IDS_ModifyField 3 | |
| 43 #define XFA_IDS_NotModifyField 4 | |
| 44 #define XFA_IDS_AppName 5 | |
| 45 #define XFA_IDS_ImageFilter 6 | |
| 46 #define XFA_IDS_UNKNOW_CATCHED 7 | |
| 47 #define XFA_IDS_Unable_TO_SET 8 | |
| 48 #define XFA_IDS_VALUE_EXCALMATORY 9 | |
| 49 #define XFA_IDS_INVALID_ENUM_VALUE 10 | |
| 50 #define XFA_IDS_UNSUPPORT_METHOD 11 | |
| 51 #define XFA_IDS_UNSUPPORT_PROP 12 | |
| 52 #define XFA_IDS_INVAlID_PROP_SET 13 | |
| 53 #define XFA_IDS_NOT_DEFAUL_VALUE 14 | |
| 54 #define XFA_IDS_UNABLE_SET_LANGUAGE 15 | |
| 55 #define XFA_IDS_UNABLE_SET_NUMPAGES 16 | |
| 56 #define XFA_IDS_UNABLE_SET_PLATFORM 17 | |
| 57 #define XFA_IDS_UNABLE_SET_VALIDATIONENABLE 18 | |
| 58 #define XFA_IDS_UNABLE_SET_VARIATION 19 | |
| 59 #define XFA_IDS_UNABLE_SET_VERSION 20 | |
| 60 #define XFA_IDS_UNABLE_SET_READY 21 | |
| 61 #define XFA_IDS_NUMBER_OF_OCCUR 22 | |
| 62 #define XFA_IDS_UNABLE_SET_CLASS_NAME 23 | |
| 63 #define XFA_IDS_UNABLE_SET_LENGTH_VALUE 24 | |
| 64 #define XFA_IDS_UNSUPPORT_CHAR 25 | |
| 65 #define XFA_IDS_BAD_SUFFIX 26 | |
| 66 #define XFA_IDS_EXPECTED_IDENT 27 | |
| 67 #define XFA_IDS_EXPECTED_STRING 28 | |
| 68 #define XFA_IDS_INVALIDATE_CHAR 29 | |
| 69 #define XFA_IDS_REDEFINITION 30 | |
| 70 #define XFA_IDS_INVALIDATE_TOKEN 31 | |
| 71 #define XFA_IDS_INVALIDATE_EXPRESSION 32 | |
| 72 #define XFA_IDS_UNDEFINE_IDENTIFIER 33 | |
| 73 #define XFA_IDS_INVALIDATE_LEFTVALUE 34 | |
| 74 #define XFA_IDS_COMPILER_ERROR 35 | |
| 75 #define XFA_IDS_CANNOT_MODIFY_VALUE 36 | |
| 76 #define XFA_IDS_ERROR_PARAMETERS 37 | |
| 77 #define XFA_IDS_EXPECT_ENDIF 38 | |
| 78 #define XFA_IDS_UNEXPECTED_EXPRESSION 39 | |
| 79 #define XFA_IDS_CONDITION_IS_NULL 40 | |
| 80 #define XFA_IDS_ILLEGALBREAK 41 | |
| 81 #define XFA_IDS_ILLEGALCONTINUE 42 | |
| 82 #define XFA_IDS_EXPECTED_OPERATOR 43 | |
| 83 #define XFA_IDS_DIVIDE_ZERO 44 | |
| 84 #define XFA_IDS_CANNOT_COVERT_OBJECT 45 | |
| 85 #define XFA_IDS_NOT_FOUND_CONTAINER 46 | |
| 86 #define XFA_IDS_NOT_FOUND_PROPERTY 47 | |
| 87 #define XFA_IDS_NOT_FOUND_METHOD 48 | |
| 88 #define XFA_IDS_NOT_FOUND_CONST 49 | |
| 89 #define XFA_IDS_NOT_ASSIGN_OBJECT 50 | |
| 90 #define XFA_IDS_IVALIDATE_INSTRUCTION 51 | |
| 91 #define XFA_IDS_EXPECT_NUMBER 52 | |
| 92 #define XFA_IDS_VALIDATE_OUT_ARRAY 53 | |
| 93 #define XFA_IDS_CANNOT_ASSIGN_IDENT 54 | |
| 94 #define XFA_IDS_NOT_FOUNT_FUNCTION 55 | |
| 95 #define XFA_IDS_NOT_ARRAY 56 | |
| 96 #define XFA_IDS_OUT_ARRAY 57 | |
| 97 #define XFA_IDS_NOT_SUPPORT_CALC 58 | |
| 98 #define XFA_IDS_ARGUMENT_NOT_ARRAY 59 | |
| 99 #define XFA_IDS_ARGUMENT_EXPECT_CONTAINER 60 | |
| 100 #define XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT 61 | |
| 101 #define XFA_IDS_FUNCTION_IS_BUILDIN 62 | |
| 102 #define XFA_IDS_ERROR_MSG 63 | |
| 103 #define XFA_IDS_INDEX_OUT_OF_BOUNDS 64 | |
| 104 #define XFA_IDS_INCORRECT_NUMBER_OF_METHOD 65 | |
| 105 #define XFA_IDS_ARGUMENT_MISMATCH 66 | |
| 106 #define XFA_IDS_INVALID_ENUMERATE 67 | |
| 107 #define XFA_IDS_INVALID_APPEND 68 | |
| 108 #define XFA_IDS_SOM_EXPECTED_LIST 69 | |
| 109 #define XFA_IDS_NOT_HAVE_PROPERTY 70 | |
| 110 #define XFA_IDS_INVALID_NODE_TYPE 71 | |
| 111 #define XFA_IDS_VIOLATE_BOUNDARY 72 | |
| 112 #define XFA_IDS_SERVER_DENY 73 | |
| 113 #define XFA_IDS_StringWeekDay_Sun 74 | |
| 114 #define XFA_IDS_StringWeekDay_Mon 75 | |
| 115 #define XFA_IDS_StringWeekDay_Tue 76 | |
| 116 #define XFA_IDS_StringWeekDay_Wed 77 | |
| 117 #define XFA_IDS_StringWeekDay_Thu 78 | |
| 118 #define XFA_IDS_StringWeekDay_Fri 79 | |
| 119 #define XFA_IDS_StringWeekDay_Sat 80 | |
| 120 #define XFA_IDS_StringMonth_Jan 81 | |
| 121 #define XFA_IDS_StringMonth_Feb 82 | |
| 122 #define XFA_IDS_StringMonth_March 83 | |
| 123 #define XFA_IDS_StringMonth_April 84 | |
| 124 #define XFA_IDS_StringMonth_May 85 | |
| 125 #define XFA_IDS_StringMonth_June 86 | |
| 126 #define XFA_IDS_StringMonth_July 87 | |
| 127 #define XFA_IDS_StringMonth_Aug 88 | |
| 128 #define XFA_IDS_StringMonth_Sept 89 | |
| 129 #define XFA_IDS_StringMonth_Oct 90 | |
| 130 #define XFA_IDS_StringMonth_Nov 91 | |
| 131 #define XFA_IDS_StringMonth_Dec 92 | |
| 132 #define XFA_IDS_String_Today 93 | |
| 133 #define XFA_IDS_ValidateLimit 94 | |
| 134 #define XFA_IDS_ValidateNullWarning 95 | |
| 135 #define XFA_IDS_ValidateNullError 96 | |
| 136 #define XFA_IDS_ValidateWarning 97 | |
| 137 #define XFA_IDS_ValidateError 98 | |
| 138 #define XFA_IDS_ValidateNumberError 99 | |
| 139 | |
| 140 // Probably should be called IXFA_AppDelegate. | |
| 141 class IXFA_AppProvider { | |
| 142 public: | |
| 143 virtual ~IXFA_AppProvider() {} | |
| 144 | |
| 145 /** | |
| 146 * Specifies the name of the client application in which a form currently | |
| 147 * exists. Such as Exchange-Pro. | |
| 148 */ | |
| 149 virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0; | |
| 150 virtual void GetAppType(CFX_WideString& wsAppType) = 0; | |
| 151 virtual void SetFoxitAppType(const CFX_WideStringC& wsFoxitAppType) {} | |
| 152 virtual void GetFoxitAppType(CFX_WideString& wsFoxitAppType) { | |
| 153 wsFoxitAppType.Empty(); | |
| 154 } | |
| 155 | |
| 156 /** | |
| 157 * Returns the language of the running host application. Such as zh_CN | |
| 158 */ | |
| 159 virtual void GetLanguage(CFX_WideString& wsLanguage) = 0; | |
| 160 | |
| 161 /** | |
| 162 * Returns the platform of the machine running the script. Such as WIN | |
| 163 */ | |
| 164 virtual void GetPlatform(CFX_WideString& wsPlatform) = 0; | |
| 165 | |
| 166 /** | |
| 167 * Indicates the packaging of the application that is running the script. Such | |
| 168 * as Full | |
| 169 */ | |
| 170 virtual void GetVariation(CFX_WideString& wsVariation) = 0; | |
| 171 | |
| 172 /** | |
| 173 * Indicates the version number of the current application. Such as 9 | |
| 174 */ | |
| 175 virtual void GetVersion(CFX_WideString& wsVersion) = 0; | |
| 176 virtual void GetFoxitVersion(CFX_WideString& wsFoxitVersion) { | |
| 177 wsFoxitVersion.Empty(); | |
| 178 } | |
| 179 | |
| 180 /** | |
| 181 * Get application name, such as Phantom. | |
| 182 */ | |
| 183 virtual void GetAppName(CFX_WideString& wsName) = 0; | |
| 184 virtual void GetFoxitAppName(CFX_WideString& wsFoxitName) { | |
| 185 wsFoxitName.Empty(); | |
| 186 } | |
| 187 | |
| 188 /** | |
| 189 * Causes the system to play a sound. | |
| 190 * @param[in] dwType The system code for the appropriate sound.0 (Error)1 | |
| 191 * (Warning)2 (Question)3 (Status)4 (Default) | |
| 192 */ | |
| 193 virtual void Beep(uint32_t dwType) = 0; | |
| 194 | |
| 195 /** | |
| 196 * Displays a message box. | |
| 197 * @param[in] dwIconType Icon type, refer to XFA_MBICON. | |
| 198 * @param[in] dwButtonType Button type, refer to XFA_MESSAGEBUTTON. | |
| 199 * @return A valid integer representing the value of the button pressed by the | |
| 200 * user, refer to XFA_ID. | |
| 201 */ | |
| 202 virtual int32_t MsgBox(const CFX_WideStringC& wsMessage, | |
| 203 const CFX_WideStringC& wsTitle = FX_WSTRC(L""), | |
| 204 uint32_t dwIconType = 0, | |
| 205 uint32_t dwButtonType = 0) = 0; | |
| 206 | |
| 207 /** | |
| 208 * Get a response from the user. | |
| 209 * @param[in] bMark - Mask the user input with * (asterisks) when true, | |
| 210 */ | |
| 211 virtual void Response(CFX_WideString& wsAnswer, | |
| 212 const CFX_WideStringC& wsQuestion, | |
| 213 const CFX_WideStringC& wsTitle = FX_WSTRC(L""), | |
| 214 const CFX_WideStringC& wsDefaultAnswer = FX_WSTRC(L""), | |
| 215 FX_BOOL bMark = TRUE) = 0; | |
| 216 | |
| 217 virtual int32_t GetDocumentCountInBatch() = 0; | |
| 218 virtual int32_t GetCurDocumentInBatch() = 0; | |
| 219 | |
| 220 /** | |
| 221 * Download something from somewhere. | |
| 222 * @param[in] wsURL - http, ftp, such as | |
| 223 * "http://www.w3.org/TR/REC-xml-names/". | |
| 224 */ | |
| 225 virtual IFX_FileRead* DownloadURL(const CFX_WideStringC& wsURL) = 0; | |
| 226 | |
| 227 /** | |
| 228 * POST data to the given url. | |
| 229 * @param[in] wsURL the URL being uploaded. | |
| 230 * @param[in] wsData the data being uploaded. | |
| 231 * @param[in] wsContentType the content type of data including text/html, | |
| 232 * text/xml, text/plain, multipart/form-data, | |
| 233 * application/x-www-form-urlencoded, | |
| 234 * application/octet-stream, any valid MIME type. | |
| 235 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, | |
| 236 * ISO8859-1, any recognized [IANA]character encoding | |
| 237 * @param[in] wsHeader any additional HTTP headers to be included in the | |
| 238 * post. | |
| 239 * @param[out] wsResponse decoded response from server. | |
| 240 * @return TRUE Server permitted the post request, FALSE otherwise. | |
| 241 */ | |
| 242 virtual FX_BOOL PostRequestURL(const CFX_WideStringC& wsURL, | |
| 243 const CFX_WideStringC& wsData, | |
| 244 const CFX_WideStringC& wsContentType, | |
| 245 const CFX_WideStringC& wsEncode, | |
| 246 const CFX_WideStringC& wsHeader, | |
| 247 CFX_WideString& wsResponse) = 0; | |
| 248 | |
| 249 /** | |
| 250 * PUT data to the given url. | |
| 251 * @param[in] wsURL the URL being uploaded. | |
| 252 * @param[in] wsData the data being uploaded. | |
| 253 * @param[in] wsEncode the encode of data including UTF-8, UTF-16, | |
| 254 * ISO8859-1, any recognized [IANA]character encoding | |
| 255 * @return TRUE Server permitted the post request, FALSE otherwise. | |
| 256 */ | |
| 257 virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, | |
| 258 const CFX_WideStringC& wsData, | |
| 259 const CFX_WideStringC& wsEncode) = 0; | |
| 260 | |
| 261 virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0; | |
| 262 virtual FX_BOOL ShowFileDialog(const CFX_WideStringC& wsTitle, | |
| 263 const CFX_WideStringC& wsFilter, | |
| 264 CFX_WideStringArray& wsPathArr, | |
| 265 FX_BOOL bOpen = TRUE) = 0; | |
| 266 virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; | |
| 267 }; | |
| 268 | |
| 269 #define XFA_INVALIDATE_AllPages 0x00000000 | |
| 270 #define XFA_INVALIDATE_CurrentPage 0x00000001 | |
| 271 #define XFA_PRINTOPT_ShowDialog 0x00000001 | |
| 272 #define XFA_PRINTOPT_CanCancel 0x00000002 | |
| 273 #define XFA_PRINTOPT_ShrinkPage 0x00000004 | |
| 274 #define XFA_PRINTOPT_AsImage 0x00000008 | |
| 275 #define XFA_PRINTOPT_ReverseOrder 0x00000010 | |
| 276 #define XFA_PRINTOPT_PrintAnnot 0x00000020 | |
| 277 #define XFA_PAGEVIEWEVENT_PostAdded 1 | |
| 278 #define XFA_PAGEVIEWEVENT_PostRemoved 3 | |
| 279 #define XFA_PAGEVIEWEVENT_StopLayout 4 | |
| 280 #define XFA_WIDGETEVENT_PostAdded 2 | |
| 281 #define XFA_WIDGETEVENT_PreRemoved 3 | |
| 282 #define XFA_WIDGETEVENT_PostContentChanged 6 | |
| 283 #define XFA_WIDGETEVENT_ListItemRemoved 7 | |
| 284 #define XFA_WIDGETEVENT_ListItemAdded 8 | |
| 285 #define XFA_WIDGETEVENT_AccessChanged 9 | |
| 286 class IXFA_DocProvider { | |
| 287 public: | |
| 288 virtual ~IXFA_DocProvider() {} | |
| 289 | |
| 290 virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; | |
| 291 virtual void InvalidateRect(CXFA_FFPageView* pPageView, | |
| 292 const CFX_RectF& rt, | |
| 293 uint32_t dwFlags = 0) = 0; | |
| 294 virtual void DisplayCaret(CXFA_FFWidget* hWidget, | |
| 295 FX_BOOL bVisible, | |
| 296 const CFX_RectF* pRtAnchor) = 0; | |
| 297 virtual FX_BOOL GetPopupPos(CXFA_FFWidget* hWidget, | |
| 298 FX_FLOAT fMinPopup, | |
| 299 FX_FLOAT fMaxPopup, | |
| 300 const CFX_RectF& rtAnchor, | |
| 301 CFX_RectF& rtPopup) = 0; | |
| 302 virtual FX_BOOL PopupMenu(CXFA_FFWidget* hWidget, | |
| 303 CFX_PointF ptPopup, | |
| 304 const CFX_RectF* pRectExclude = NULL) = 0; | |
| 305 virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags) = 0; | |
| 306 virtual void WidgetEvent(CXFA_FFWidget* hWidget, | |
| 307 CXFA_WidgetAcc* pWidgetData, | |
| 308 uint32_t dwEvent, | |
| 309 void* pParam = NULL, | |
| 310 void* pAdditional = NULL) = 0; | |
| 311 virtual FX_BOOL RenderCustomWidget(CXFA_FFWidget* hWidget, | |
| 312 CFX_Graphics* pGS, | |
| 313 CFX_Matrix* pMatrix, | |
| 314 const CFX_RectF& rtUI) { | |
| 315 return FALSE; | |
| 316 } | |
| 317 virtual int32_t CountPages(CXFA_FFDoc* hDoc) = 0; | |
| 318 virtual int32_t GetCurrentPage(CXFA_FFDoc* hDoc) = 0; | |
| 319 virtual void SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) = 0; | |
| 320 virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc) = 0; | |
| 321 virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | |
| 322 virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) = 0; | |
| 323 virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsTitle) = 0; | |
| 324 virtual void ExportData(CXFA_FFDoc* hDoc, | |
| 325 const CFX_WideStringC& wsFilePath, | |
| 326 FX_BOOL bXDP = TRUE) = 0; | |
| 327 virtual void ImportData(CXFA_FFDoc* hDoc, | |
| 328 const CFX_WideStringC& wsFilePath) = 0; | |
| 329 virtual void GotoURL(CXFA_FFDoc* hDoc, | |
| 330 const CFX_WideStringC& bsURL, | |
| 331 FX_BOOL bAppend = TRUE) = 0; | |
| 332 virtual FX_BOOL IsValidationsEnabled(CXFA_FFDoc* hDoc) = 0; | |
| 333 virtual void SetValidationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled) = 0; | |
| 334 virtual void SetFocusWidget(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | |
| 335 virtual void Print(CXFA_FFDoc* hDoc, | |
| 336 int32_t nStartPage, | |
| 337 int32_t nEndPage, | |
| 338 uint32_t dwOptions) = 0; | |
| 339 virtual int32_t AbsPageCountInBatch(CXFA_FFDoc* hDoc) = 0; | |
| 340 virtual int32_t AbsPageInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | |
| 341 virtual int32_t SheetCountInBatch(CXFA_FFDoc* hDoc) = 0; | |
| 342 virtual int32_t SheetInBatch(CXFA_FFDoc* hDoc, CXFA_FFWidget* hWidget) = 0; | |
| 343 virtual int32_t Verify(CXFA_FFDoc* hDoc, | |
| 344 CXFA_Node* pSigNode, | |
| 345 FX_BOOL bUsed = TRUE) { | |
| 346 return 0; | |
| 347 } | |
| 348 virtual FX_BOOL Sign(CXFA_FFDoc* hDoc, | |
| 349 CXFA_NodeList* pNodeList, | |
| 350 const CFX_WideStringC& wsExpression, | |
| 351 const CFX_WideStringC& wsXMLIdent, | |
| 352 const CFX_WideStringC& wsValue = FX_WSTRC(L"open"), | |
| 353 FX_BOOL bUsed = TRUE) { | |
| 354 return 0; | |
| 355 } | |
| 356 virtual CXFA_NodeList* Enumerate(CXFA_FFDoc* hDoc) { return 0; } | |
| 357 virtual FX_BOOL Clear(CXFA_FFDoc* hDoc, | |
| 358 CXFA_Node* pSigNode, | |
| 359 FX_BOOL bCleared = TRUE) { | |
| 360 return 0; | |
| 361 } | |
| 362 virtual void GetURL(CXFA_FFDoc* hDoc, CFX_WideString& wsDocURL) = 0; | |
| 363 virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0; | |
| 364 | |
| 365 virtual FX_BOOL SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0; | |
| 366 virtual FX_BOOL CheckWord(CXFA_FFDoc* hDoc, const CFX_ByteStringC& sWord) = 0; | |
| 367 virtual FX_BOOL GetSuggestWords(CXFA_FFDoc* hDoc, | |
| 368 const CFX_ByteStringC& sWord, | |
| 369 std::vector<CFX_ByteString>& sSuggest) = 0; | |
| 370 virtual FX_BOOL GetPDFScriptObject(CXFA_FFDoc* hDoc, | |
| 371 const CFX_ByteStringC& utf8Name, | |
| 372 FXJSE_HVALUE hValue) = 0; | |
| 373 virtual FX_BOOL GetGlobalProperty(CXFA_FFDoc* hDoc, | |
| 374 const CFX_ByteStringC& szPropName, | |
| 375 FXJSE_HVALUE hValue) = 0; | |
| 376 virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, | |
| 377 const CFX_ByteStringC& szPropName, | |
| 378 FXJSE_HVALUE hValue) = 0; | |
| 379 virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, | |
| 380 IFX_FileRead* pFile, | |
| 381 FX_BOOL bTakeOverFile) = 0; | |
| 382 virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, | |
| 383 const CFX_WideString& wsLink) = 0; | |
| 384 }; | |
| 385 #define XFA_DOCVIEW_View 0x00000000 | |
| 386 #define XFA_DOCVIEW_MasterPage 0x00000001 | |
| 387 #define XFA_DOCVIEW_Design 0x00000002 | |
| 388 #define XFA_DOCTYPE_Dynamic 0 | |
| 389 #define XFA_DOCTYPE_Static 1 | |
| 390 #define XFA_DOCTYPE_XDP 2 | |
| 391 #define XFA_PARSESTATUS_StatusErr -3 | |
| 392 #define XFA_PARSESTATUS_StreamErr -2 | |
| 393 #define XFA_PARSESTATUS_SyntaxErr -1 | |
| 394 #define XFA_PARSESTATUS_Ready 0 | |
| 395 #define XFA_PARSESTATUS_Done 100 | |
| 396 | |
| 397 enum XFA_EVENTTYPE { | |
| 398 XFA_EVENT_Click, | |
| 399 XFA_EVENT_Change, | |
| 400 XFA_EVENT_DocClose, | |
| 401 XFA_EVENT_DocReady, | |
| 402 XFA_EVENT_Enter, | |
| 403 XFA_EVENT_Exit, | |
| 404 XFA_EVENT_Full, | |
| 405 XFA_EVENT_IndexChange, | |
| 406 XFA_EVENT_Initialize, | |
| 407 XFA_EVENT_MouseDown, | |
| 408 XFA_EVENT_MouseEnter, | |
| 409 XFA_EVENT_MouseExit, | |
| 410 XFA_EVENT_MouseUp, | |
| 411 XFA_EVENT_PostExecute, | |
| 412 XFA_EVENT_PostOpen, | |
| 413 XFA_EVENT_PostPrint, | |
| 414 XFA_EVENT_PostSave, | |
| 415 XFA_EVENT_PostSign, | |
| 416 XFA_EVENT_PostSubmit, | |
| 417 XFA_EVENT_PreExecute, | |
| 418 XFA_EVENT_PreOpen, | |
| 419 XFA_EVENT_PrePrint, | |
| 420 XFA_EVENT_PreSave, | |
| 421 XFA_EVENT_PreSign, | |
| 422 XFA_EVENT_PreSubmit, | |
| 423 XFA_EVENT_Ready, | |
| 424 XFA_EVENT_InitCalculate, | |
| 425 XFA_EVENT_InitVariables, | |
| 426 XFA_EVENT_Calculate, | |
| 427 XFA_EVENT_Validate, | |
| 428 XFA_EVENT_Unknown, | |
| 429 }; | |
| 430 #define XFA_VALIDATE_preSubmit 1 | |
| 431 #define XFA_VALIDATE_prePrint 2 | |
| 432 #define XFA_VALIDATE_preExecute 3 | |
| 433 #define XFA_VALIDATE_preSave 4 | |
| 434 class CXFA_EventParam { | |
| 435 public: | |
| 436 CXFA_EventParam() { | |
| 437 m_pTarget = NULL; | |
| 438 m_eType = XFA_EVENT_Unknown; | |
| 439 m_wsResult.Empty(); | |
| 440 Reset(); | |
| 441 } | |
| 442 void Reset() { | |
| 443 m_wsChange.Empty(); | |
| 444 m_iCommitKey = 0; | |
| 445 m_wsFullText.Empty(); | |
| 446 m_bKeyDown = FALSE; | |
| 447 m_bModifier = FALSE; | |
| 448 m_wsNewContentType.Empty(); | |
| 449 m_wsNewText.Empty(); | |
| 450 m_wsPrevContentType.Empty(); | |
| 451 m_wsPrevText.Empty(); | |
| 452 m_bReenter = FALSE; | |
| 453 m_iSelEnd = 0; | |
| 454 m_iSelStart = 0; | |
| 455 m_bShift = FALSE; | |
| 456 m_wsSoapFaultCode.Empty(); | |
| 457 m_wsSoapFaultString.Empty(); | |
| 458 m_bIsFormReady = FALSE; | |
| 459 m_iValidateActivities = XFA_VALIDATE_preSubmit; | |
| 460 } | |
| 461 CXFA_WidgetAcc* m_pTarget; | |
| 462 XFA_EVENTTYPE m_eType; | |
| 463 CFX_WideString m_wsResult; | |
| 464 FX_BOOL m_bCancelAction; | |
| 465 int32_t m_iCommitKey; | |
| 466 FX_BOOL m_bKeyDown; | |
| 467 FX_BOOL m_bModifier; | |
| 468 FX_BOOL m_bReenter; | |
| 469 int32_t m_iSelEnd; | |
| 470 int32_t m_iSelStart; | |
| 471 FX_BOOL m_bShift; | |
| 472 CFX_WideString m_wsChange; | |
| 473 CFX_WideString m_wsFullText; | |
| 474 CFX_WideString m_wsNewContentType; | |
| 475 CFX_WideString m_wsNewText; | |
| 476 CFX_WideString m_wsPrevContentType; | |
| 477 CFX_WideString m_wsPrevText; | |
| 478 CFX_WideString m_wsSoapFaultCode; | |
| 479 CFX_WideString m_wsSoapFaultString; | |
| 480 FX_BOOL m_bIsFormReady; | |
| 481 int32_t m_iValidateActivities; | |
| 482 }; | |
| 483 #define XFA_EVENTERROR_Success 1 | |
| 484 #define XFA_EVENTERROR_Error -1 | |
| 485 #define XFA_EVENTERROR_NotExist 0 | |
| 486 #define XFA_EVENTERROR_Disabled 2 | |
| 487 enum XFA_WIDGETORDER { | |
| 488 XFA_WIDGETORDER_PreOrder, | |
| 489 }; | |
| 490 | |
| 491 #define XFA_TRAVERSEWAY_Tranvalse 0x0001 | |
| 492 #define XFA_TRAVERSEWAY_Form 0x0002 | |
| 493 #define XFA_WIDGETFILTER_Visible 0x0001 | |
| 494 #define XFA_WIDGETFILTER_Viewable 0x0010 | |
| 495 #define XFA_WIDGETFILTER_Printable 0x0020 | |
| 496 #define XFA_WIDGETFILTER_Field 0x0100 | |
| 497 #define XFA_WIDGETFILTER_AllType 0x0F00 | |
| 498 | |
| 499 class CXFA_RenderOptions { | |
| 500 public: | |
| 501 CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {} | |
| 502 FX_BOOL m_bPrint; | |
| 503 FX_BOOL m_bHighlight; | |
| 504 }; | |
| 505 #define XFA_RENDERSTATUS_Ready 1 | |
| 506 #define XFA_RENDERSTATUS_ToBeContinued 2 | |
| 507 #define XFA_RENDERSTATUS_Done 3 | |
| 508 #define XFA_RENDERSTATUS_Failed -1 | |
| 509 | |
| 510 enum XFA_WIDGETTYPE { | |
| 511 XFA_WIDGETTYPE_Barcode, | |
| 512 XFA_WIDGETTYPE_PushButton, | |
| 513 XFA_WIDGETTYPE_CheckButton, | |
| 514 XFA_WIDGETTYPE_RadioButton, | |
| 515 XFA_WIDGETTYPE_DatetimeEdit, | |
| 516 XFA_WIDGETTYPE_DecimalField, | |
| 517 XFA_WIDGETTYPE_NumericField, | |
| 518 XFA_WIDGETTYPE_Signature, | |
| 519 XFA_WIDGETTYPE_TextEdit, | |
| 520 XFA_WIDGETTYPE_DropdownList, | |
| 521 XFA_WIDGETTYPE_ListBox, | |
| 522 XFA_WIDGETTYPE_ImageField, | |
| 523 XFA_WIDGETTYPE_PasswordEdit, | |
| 524 XFA_WIDGETTYPE_Arc, | |
| 525 XFA_WIDGETTYPE_Rectangle, | |
| 526 XFA_WIDGETTYPE_Image, | |
| 527 XFA_WIDGETTYPE_Line, | |
| 528 XFA_WIDGETTYPE_Text, | |
| 529 XFA_WIDGETTYPE_ExcludeGroup, | |
| 530 XFA_WIDGETTYPE_Subform, | |
| 531 XFA_WIDGETTYPE_Unknown, | |
| 532 }; | |
| 533 #define XFA_WIDGETSTATUS_Visible 0x00000001 | |
| 534 #define XFA_WIDGETSTATUS_Invisible 0x00000002 | |
| 535 #define XFA_WIDGETSTATUS_Hidden 0x00000004 | |
| 536 #define XFA_WIDGETSTATUS_Viewable 0x00000010 | |
| 537 #define XFA_WIDGETSTATUS_Printable 0x00000020 | |
| 538 #define XFA_WIDGETSTATUS_Focused 0x00000100 | |
| 539 | |
| 540 class IXFA_WidgetIterator { | |
| 541 public: | |
| 542 virtual void Release() = 0; | |
| 543 virtual void Reset() = 0; | |
| 544 virtual CXFA_FFWidget* MoveToFirst() = 0; | |
| 545 virtual CXFA_FFWidget* MoveToLast() = 0; | |
| 546 virtual CXFA_FFWidget* MoveToNext() = 0; | |
| 547 virtual CXFA_FFWidget* MoveToPrevious() = 0; | |
| 548 virtual CXFA_FFWidget* GetCurrentWidget() = 0; | |
| 549 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; | |
| 550 | |
| 551 protected: | |
| 552 ~IXFA_WidgetIterator() {} | |
| 553 }; | |
| 554 | |
| 555 #endif // XFA_INCLUDE_FXFA_FXFA_H_ | |
| OLD | NEW |