OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 CPDF_Document* GetDocument() const | 157 CPDF_Document* GetDocument() const |
158 { | 158 { |
159 return m_pDocument; | 159 return m_pDocument; |
160 } | 160 } |
161 | 161 |
162 UsageType GetUsageType() const | 162 UsageType GetUsageType() const |
163 { | 163 { |
164 return m_eUsageType; | 164 return m_eUsageType; |
165 } | 165 } |
166 | 166 |
167 FX_BOOL» » » CheckOCGVisible(const CPDF_Dictionary *pOCGDict)
; | 167 bool» » » CheckOCGVisible(const CPDF_Dictionary *pOCGDict)
; |
168 | 168 |
169 void ResetOCContext(); | 169 void ResetOCContext(); |
170 protected: | 170 protected: |
171 | 171 |
172 FX_BOOL» » » LoadOCGStateFromConfig(const CFX_ByteStringC& cs
Config, const CPDF_Dictionary *pOCGDict, FX_BOOL &bValidConfig) const; | 172 bool» » » LoadOCGStateFromConfig(const CFX_ByteStringC& cs
Config, const CPDF_Dictionary *pOCGDict, bool &bValidConfig) const; |
173 | 173 |
174 FX_BOOL» » » LoadOCGState(const CPDF_Dictionary *pOCGDict) co
nst; | 174 bool» » » LoadOCGState(const CPDF_Dictionary *pOCGDict) co
nst; |
175 | 175 |
176 FX_BOOL» » » GetOCGVisible(const CPDF_Dictionary *pOCGDict); | 176 bool» » » GetOCGVisible(const CPDF_Dictionary *pOCGDict); |
177 | 177 |
178 FX_BOOL» » » GetOCGVE(CPDF_Array *pExpression, FX_BOOL bFromC
onfig, int nLevel = 0); | 178 bool» » » GetOCGVE(CPDF_Array *pExpression, bool bFromConf
ig, int nLevel = 0); |
179 | 179 |
180 FX_BOOL» » » LoadOCMDState(const CPDF_Dictionary *pOCMDDict,
FX_BOOL bFromConfig); | 180 bool» » » LoadOCMDState(const CPDF_Dictionary *pOCMDDict,
bool bFromConfig); |
181 | 181 |
182 CPDF_Document *m_pDocument; | 182 CPDF_Document *m_pDocument; |
183 | 183 |
184 UsageType m_eUsageType; | 184 UsageType m_eUsageType; |
185 | 185 |
186 std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates; | 186 std::map<const CPDF_Dictionary*, bool> m_OCGStates; |
187 }; | 187 }; |
188 class CPDF_LWinParam | 188 class CPDF_LWinParam |
189 { | 189 { |
190 public: | 190 public: |
191 | 191 |
192 CPDF_LWinParam(CPDF_Dictionary* pDict) | 192 CPDF_LWinParam(CPDF_Dictionary* pDict) |
193 { | 193 { |
194 m_pDict = pDict; | 194 m_pDict = pDict; |
195 } | 195 } |
196 | 196 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 { | 288 { |
289 return m_pDict->GetString("S"); | 289 return m_pDict->GetString("S"); |
290 } | 290 } |
291 | 291 |
292 ActionType GetType() const; | 292 ActionType GetType() const; |
293 | 293 |
294 CPDF_Dest GetDest(CPDF_Document* pDoc) const; | 294 CPDF_Dest GetDest(CPDF_Document* pDoc) const; |
295 | 295 |
296 CFX_WideString GetFilePath() const; | 296 CFX_WideString GetFilePath() const; |
297 | 297 |
298 FX_BOOL» » » » GetNewWindow() const | 298 bool» » » » GetNewWindow() const |
299 { | 299 { |
300 return m_pDict->GetBoolean("NewWindow"); | 300 return m_pDict->GetBoolean("NewWindow"); |
301 } | 301 } |
302 | 302 |
303 CPDF_LWinParam GetWinParam() const; | 303 CPDF_LWinParam GetWinParam() const; |
304 | 304 |
305 CFX_ByteString GetURI(CPDF_Document* pDoc) const; | 305 CFX_ByteString GetURI(CPDF_Document* pDoc) const; |
306 | 306 |
307 FX_BOOL» » » » GetMouseMap() const | 307 bool» » » » GetMouseMap() const |
308 { | 308 { |
309 return m_pDict->GetBoolean("IsMap"); | 309 return m_pDict->GetBoolean("IsMap"); |
310 } | 310 } |
311 | 311 |
312 CPDF_ActionFields GetWidgets() const | 312 CPDF_ActionFields GetWidgets() const |
313 { | 313 { |
314 return this; | 314 return this; |
315 } | 315 } |
316 | 316 |
317 FX_BOOL» » » » GetHideStatus() const | 317 bool» » » » GetHideStatus() const |
318 { | 318 { |
319 return m_pDict->GetBoolean("H", TRUE); | 319 return m_pDict->GetBoolean("H", true); |
320 } | 320 } |
321 | 321 |
322 CFX_ByteString GetNamedAction() const | 322 CFX_ByteString GetNamedAction() const |
323 { | 323 { |
324 return m_pDict->GetString("N"); | 324 return m_pDict->GetString("N"); |
325 } | 325 } |
326 | 326 |
327 FX_DWORD GetFlags() const | 327 FX_DWORD GetFlags() const |
328 { | 328 { |
329 return m_pDict->GetInteger("Flags"); | 329 return m_pDict->GetInteger("Flags"); |
330 } | 330 } |
331 | 331 |
332 CFX_WideString GetJavaScript() const; | 332 CFX_WideString GetJavaScript() const; |
333 | 333 |
334 CPDF_Dictionary* GetAnnot() const; | 334 CPDF_Dictionary* GetAnnot() const; |
335 | 335 |
336 int32_t GetOperationType() const; | 336 int32_t GetOperationType() const; |
337 | 337 |
338 CPDF_Stream* GetSoundStream() const | 338 CPDF_Stream* GetSoundStream() const |
339 { | 339 { |
340 return m_pDict->GetStream("Sound"); | 340 return m_pDict->GetStream("Sound"); |
341 } | 341 } |
342 | 342 |
343 FX_FLOAT GetVolume() const | 343 FX_FLOAT GetVolume() const |
344 { | 344 { |
345 return m_pDict->GetNumber("Volume"); | 345 return m_pDict->GetNumber("Volume"); |
346 } | 346 } |
347 | 347 |
348 FX_BOOL» » » » IsSynchronous() const | 348 bool» » » » IsSynchronous() const |
349 { | 349 { |
350 return m_pDict->GetBoolean("Synchronous"); | 350 return m_pDict->GetBoolean("Synchronous"); |
351 } | 351 } |
352 | 352 |
353 FX_BOOL» » » » IsRepeat() const | 353 bool» » » » IsRepeat() const |
354 { | 354 { |
355 return m_pDict->GetBoolean("Repeat"); | 355 return m_pDict->GetBoolean("Repeat"); |
356 } | 356 } |
357 | 357 |
358 FX_BOOL» » » » IsMixPlay() const | 358 bool» » » » IsMixPlay() const |
359 { | 359 { |
360 return m_pDict->GetBoolean("Mix"); | 360 return m_pDict->GetBoolean("Mix"); |
361 } | 361 } |
362 | 362 |
363 FX_DWORD GetSubActionsCount() const; | 363 FX_DWORD GetSubActionsCount() const; |
364 | 364 |
365 CPDF_Action GetSubAction(FX_DWORD iIndex) const; | 365 CPDF_Action GetSubAction(FX_DWORD iIndex) const; |
366 | 366 |
367 protected: | 367 protected: |
368 CPDF_Dictionary* m_pDict; | 368 CPDF_Dictionary* m_pDict; |
(...skipping 29 matching lines...) Expand all Loading... |
398 Format, | 398 Format, |
399 Validate, | 399 Validate, |
400 Calculate, | 400 Calculate, |
401 CloseDocument, | 401 CloseDocument, |
402 SaveDocument, | 402 SaveDocument, |
403 DocumentSaved, | 403 DocumentSaved, |
404 PrintDocument, | 404 PrintDocument, |
405 DocumentPrinted | 405 DocumentPrinted |
406 }; | 406 }; |
407 | 407 |
408 FX_BOOL» » » » ActionExist(AActionType eType) const; | 408 bool» » » » ActionExist(AActionType eType) const; |
409 | 409 |
410 CPDF_Action GetAction(AActionType eType) const; | 410 CPDF_Action GetAction(AActionType eType) const; |
411 | 411 |
412 FX_POSITION GetStartPos() const; | 412 FX_POSITION GetStartPos() const; |
413 | 413 |
414 CPDF_Action GetNextAction(FX_POSITION& pos, AActionType& eTy
pe) const; | 414 CPDF_Action GetNextAction(FX_POSITION& pos, AActionType& eTy
pe) const; |
415 | 415 |
416 CPDF_Dictionary* m_pDict; | 416 CPDF_Dictionary* m_pDict; |
417 }; | 417 }; |
418 class CPDF_DocJSActions | 418 class CPDF_DocJSActions |
(...skipping 29 matching lines...) Expand all Loading... |
448 CPDF_FileSpec(CPDF_Object *pObj) | 448 CPDF_FileSpec(CPDF_Object *pObj) |
449 { | 449 { |
450 m_pObj = pObj; | 450 m_pObj = pObj; |
451 } | 451 } |
452 | 452 |
453 operator CPDF_Object*() const | 453 operator CPDF_Object*() const |
454 { | 454 { |
455 return m_pObj; | 455 return m_pObj; |
456 } | 456 } |
457 | 457 |
458 FX_BOOL» » » IsURL() const; | 458 bool» » » IsURL() const; |
459 | 459 |
460 FX_BOOL» » » GetFileName(CFX_WideString &wsFileName) const; | 460 bool» » » GetFileName(CFX_WideString &wsFileName) const; |
461 | 461 |
462 CPDF_Stream* GetFileStream() const; | 462 CPDF_Stream* GetFileStream() const; |
463 | 463 |
464 void» » » SetFileName(const CFX_WideStringC& wsFileName, F
X_BOOL bURL = FALSE); | 464 void» » » SetFileName(const CFX_WideStringC& wsFileName, b
ool bURL = false); |
465 protected: | 465 protected: |
466 | 466 |
467 CPDF_Object *m_pObj; | 467 CPDF_Object *m_pObj; |
468 }; | 468 }; |
469 class CPDF_LinkList | 469 class CPDF_LinkList |
470 { | 470 { |
471 public: | 471 public: |
472 | 472 |
473 CPDF_LinkList(CPDF_Document* pDoc) | 473 CPDF_LinkList(CPDF_Document* pDoc) |
474 { | 474 { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 ~CPDF_Annot(); | 536 ~CPDF_Annot(); |
537 | 537 |
538 CFX_ByteString GetSubType() const; | 538 CFX_ByteString GetSubType() const; |
539 | 539 |
540 FX_DWORD GetFlags() const; | 540 FX_DWORD GetFlags() const; |
541 | 541 |
542 void GetRect(CFX_FloatRect& rect) const; | 542 void GetRect(CFX_FloatRect& rect) const; |
543 | 543 |
544 CPDF_Dictionary* GetAnnotDict(); | 544 CPDF_Dictionary* GetAnnotDict(); |
545 | 545 |
546 FX_BOOL DrawAppearance(const CPDF_Page* pPage, | 546 bool DrawAppearance(const CPDF_Page* pPage, |
547 CFX_RenderDevice* pDevice, | 547 CFX_RenderDevice* pDevice, |
548 const CFX_AffineMatrix* pUser2Device, | 548 const CFX_AffineMatrix* pUser2Device, |
549 AppearanceMode mode, | 549 AppearanceMode mode, |
550 const CPDF_RenderOptions* pOptions); | 550 const CPDF_RenderOptions* pOptions); |
551 | 551 |
552 FX_BOOL DrawInContext(const CPDF_Page* pPage, | 552 bool DrawInContext(const CPDF_Page* pPage, |
553 const CPDF_RenderContext* pContext, | 553 const CPDF_RenderContext* pContext, |
554 const CFX_AffineMatrix* pUser2Device, | 554 const CFX_AffineMatrix* pUser2Device, |
555 AppearanceMode mode); | 555 AppearanceMode mode); |
556 | 556 |
557 void ClearCachedAP(); | 557 void ClearCachedAP(); |
558 | 558 |
559 void DrawBorder(CFX_RenderDevice* pDevice, | 559 void DrawBorder(CFX_RenderDevice* pDevice, |
560 const CFX_AffineMatrix* pUser2Device, | 560 const CFX_AffineMatrix* pUser2Device, |
561 const CPDF_RenderOptions* pOptions); | 561 const CPDF_RenderOptions* pOptions); |
562 | 562 |
(...skipping 15 matching lines...) Expand all Loading... |
578 | 578 |
579 CPDF_AnnotList(CPDF_Page* pPage); | 579 CPDF_AnnotList(CPDF_Page* pPage); |
580 | 580 |
581 ~CPDF_AnnotList(); | 581 ~CPDF_AnnotList(); |
582 | 582 |
583 void GetAnnotMatrix(const CPDF_Dictionary* pAnnotDict, const CFX_Matr
ix* pUser2Device, CFX_Matrix &matrix) const; | 583 void GetAnnotMatrix(const CPDF_Dictionary* pAnnotDict, const CFX_Matr
ix* pUser2Device, CFX_Matrix &matrix) const; |
584 | 584 |
585 void GetAnnotRect(const CPDF_Dictionary* pAnnotDict, const CFX_Matrix
* pUser2Device, CPDF_Rect &rtAnnot) const; | 585 void GetAnnotRect(const CPDF_Dictionary* pAnnotDict, const CFX_Matrix
* pUser2Device, CPDF_Rect &rtAnnot) const; |
586 | 586 |
587 void DisplayAnnots(const CPDF_Page* pPage, CF
X_RenderDevice* pDevice, | 587 void DisplayAnnots(const CPDF_Page* pPage, CF
X_RenderDevice* pDevice, |
588 CFX_AffineMatrix* pMatrix, FX_BOOL bShowWi
dget, | 588 CFX_AffineMatrix* pMatrix, bool bShowWidge
t, |
589 CPDF_RenderOptions* pOptions); | 589 CPDF_RenderOptions* pOptions); |
590 | 590 |
591 void DisplayAnnots(const CPDF_Page* pPage, CP
DF_RenderContext* pContext, | 591 void DisplayAnnots(const CPDF_Page* pPage, CP
DF_RenderContext* pContext, |
592 FX_BOOL bPrinting, CFX_AffineMatrix* pMatr
ix, FX_BOOL bShowWidget, | 592 bool bPrinting, CFX_AffineMatrix* pMatrix,
bool bShowWidget, |
593 CPDF_RenderOptions* pOptions) | 593 CPDF_RenderOptions* pOptions) |
594 { | 594 { |
595 DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3
: 1, pOptions, NULL); | 595 DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3
: 1, pOptions, NULL); |
596 } | 596 } |
597 | 597 |
598 void DisplayAnnots(const CPDF_Page* pPage, CP
DF_RenderContext* pContext, | 598 void DisplayAnnots(const CPDF_Page* pPage, CP
DF_RenderContext* pContext, |
599 FX_BOOL bPrinting, CFX_AffineMatrix* pMatr
ix, FX_BOOL bShowWidget, | 599 bool bPrinting, CFX_AffineMatrix* pMatrix,
bool bShowWidget, |
600 CPDF_RenderOptions* pOptions, FX_RECT *pCl
ipRect) | 600 CPDF_RenderOptions* pOptions, FX_RECT *pCl
ipRect) |
601 { | 601 { |
602 DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3
: 1, pOptions, pClipRect); | 602 DisplayAnnots(pPage, NULL, pContext, bPrinting, pMatrix, bShowWidget ? 3
: 1, pOptions, pClipRect); |
603 } | 603 } |
604 | 604 |
605 void DisplayAnnots(const CPDF_Page* pPage, CF
X_RenderDevice* pDevice, CPDF_RenderContext* pContext, | 605 void DisplayAnnots(const CPDF_Page* pPage, CF
X_RenderDevice* pDevice, CPDF_RenderContext* pContext, |
606 FX_BOOL bPrinting, CFX_AffineMatrix* pMatr
ix, FX_DWORD dwAnnotFlags, | 606 bool bPrinting, CFX_AffineMatrix* pMatrix,
FX_DWORD dwAnnotFlags, |
607 CPDF_RenderOptions* pOptions, FX_RECT* pCl
ipRect); | 607 CPDF_RenderOptions* pOptions, FX_RECT* pCl
ipRect); |
608 | 608 |
609 | 609 |
610 | 610 |
611 CPDF_Annot* GetAt(int index) | 611 CPDF_Annot* GetAt(int index) |
612 { | 612 { |
613 return (CPDF_Annot*)m_AnnotList.GetAt(index); | 613 return (CPDF_Annot*)m_AnnotList.GetAt(index); |
614 } | 614 } |
615 | 615 |
616 int Count() | 616 int Count() |
(...skipping 12 matching lines...) Expand all Loading... |
629 | 629 |
630 CFX_PtrArray m_AnnotList; | 630 CFX_PtrArray m_AnnotList; |
631 | 631 |
632 CPDF_Dictionary* m_pPageDict; | 632 CPDF_Dictionary* m_pPageDict; |
633 | 633 |
634 CPDF_Document* m_pDocument; | 634 CPDF_Document* m_pDocument; |
635 | 635 |
636 CFX_PtrArray m_Borders; | 636 CFX_PtrArray m_Borders; |
637 | 637 |
638 void DisplayPass(const CPDF_Page* pPage, CFX_
RenderDevice* pDevice, | 638 void DisplayPass(const CPDF_Page* pPage, CFX_
RenderDevice* pDevice, |
639 CPDF_RenderContext* pContext, FX_BOOL bPrint
ing, CFX_AffineMatrix* pMatrix, | 639 CPDF_RenderContext* pContext, bool bPrinting
, CFX_AffineMatrix* pMatrix, |
640 FX_BOOL bWidget, CPDF_RenderOptions* pOption
s, FX_RECT* clip_rect); | 640 bool bWidget, CPDF_RenderOptions* pOptions,
FX_RECT* clip_rect); |
641 friend class CPDF_Annot; | 641 friend class CPDF_Annot; |
642 }; | 642 }; |
643 #define COLORTYPE_TRANSPARENT 0 | 643 #define COLORTYPE_TRANSPARENT 0 |
644 #define COLORTYPE_GRAY 1 | 644 #define COLORTYPE_GRAY 1 |
645 #define COLORTYPE_RGB 2 | 645 #define COLORTYPE_RGB 2 |
646 #define COLORTYPE_CMYK 3 | 646 #define COLORTYPE_CMYK 3 |
647 class CPDF_DefaultAppearance | 647 class CPDF_DefaultAppearance |
648 { | 648 { |
649 public: | 649 public: |
650 | 650 |
(...skipping 20 matching lines...) Expand all Loading... |
671 } | 671 } |
672 | 672 |
673 const CPDF_DefaultAppearance& operator =(const CPDF_DefaultAppearance& cDA) | 673 const CPDF_DefaultAppearance& operator =(const CPDF_DefaultAppearance& cDA) |
674 { | 674 { |
675 m_csDA = (CFX_ByteString)(CPDF_DefaultAppearance&)cDA; | 675 m_csDA = (CFX_ByteString)(CPDF_DefaultAppearance&)cDA; |
676 return *this; | 676 return *this; |
677 } | 677 } |
678 | 678 |
679 | 679 |
680 | 680 |
681 FX_BOOL» » » » HasFont(); | 681 bool» » » » HasFont(); |
682 | 682 |
683 CFX_ByteString GetFontString(); | 683 CFX_ByteString GetFontString(); |
684 | 684 |
685 void GetFont(CFX_ByteString& csFontNameTag, F
X_FLOAT& fFontSize); | 685 void GetFont(CFX_ByteString& csFontNameTag, F
X_FLOAT& fFontSize); |
686 | 686 |
687 | 687 |
688 | 688 |
689 | 689 |
690 FX_BOOL» » » » HasColor(FX_BOOL bStrokingOperation = FA
LSE); | 690 bool» » » » HasColor(bool bStrokingOperation = false
); |
691 | 691 |
692 CFX_ByteString» » GetColorString(FX_BOOL bStrokingOperation = FALS
E); | 692 CFX_ByteString» » GetColorString(bool bStrokingOperation = false); |
693 | 693 |
694 void» » » » GetColor(int& iColorType, FX_FLOAT fc[4]
, FX_BOOL bStrokingOperation = FALSE); | 694 void» » » » GetColor(int& iColorType, FX_FLOAT fc[4]
, bool bStrokingOperation = false); |
695 | 695 |
696 void» » » » GetColor(FX_ARGB& color, int& iColorType
, FX_BOOL bStrokingOperation = FALSE); | 696 void» » » » GetColor(FX_ARGB& color, int& iColorType
, bool bStrokingOperation = false); |
697 | 697 |
698 | 698 |
699 | 699 |
700 | 700 |
701 FX_BOOL» » » » HasTextMatrix(); | 701 bool» » » » HasTextMatrix(); |
702 | 702 |
703 CFX_ByteString GetTextMatrixString(); | 703 CFX_ByteString GetTextMatrixString(); |
704 | 704 |
705 CFX_AffineMatrix GetTextMatrix(); | 705 CFX_AffineMatrix GetTextMatrix(); |
706 | 706 |
707 protected: | 707 protected: |
708 | 708 |
709 CFX_ByteString m_csDA; | 709 CFX_ByteString m_csDA; |
710 }; | 710 }; |
711 #define FIELDTYPE_UNKNOWN 0 | 711 #define FIELDTYPE_UNKNOWN 0 |
712 #define FIELDTYPE_PUSHBUTTON 1 | 712 #define FIELDTYPE_PUSHBUTTON 1 |
713 #define FIELDTYPE_CHECKBOX 2 | 713 #define FIELDTYPE_CHECKBOX 2 |
714 #define FIELDTYPE_RADIOBUTTON 3 | 714 #define FIELDTYPE_RADIOBUTTON 3 |
715 #define FIELDTYPE_COMBOBOX 4 | 715 #define FIELDTYPE_COMBOBOX 4 |
716 #define FIELDTYPE_LISTBOX 5 | 716 #define FIELDTYPE_LISTBOX 5 |
717 #define FIELDTYPE_TEXTFIELD 6 | 717 #define FIELDTYPE_TEXTFIELD 6 |
718 #define FIELDTYPE_SIGNATURE 7 | 718 #define FIELDTYPE_SIGNATURE 7 |
719 class CPDF_InterForm : public CFX_PrivateData | 719 class CPDF_InterForm : public CFX_PrivateData |
720 { | 720 { |
721 public: | 721 public: |
722 | 722 |
723 CPDF_InterForm(CPDF_Document* pDocument, FX_BOOL bUpdateAP); | 723 CPDF_InterForm(CPDF_Document* pDocument, bool bUpdateAP); |
724 | 724 |
725 ~CPDF_InterForm(); | 725 ~CPDF_InterForm(); |
726 | 726 |
727 | 727 |
728 | 728 |
729 static void»» » » EnableUpdateAP(FX_BOOL bUpdateAP); | 729 static void»» » » EnableUpdateAP(bool bUpdateAP); |
730 | 730 |
731 static FX_BOOL» » » UpdatingAPEnabled(); | 731 static bool»» » UpdatingAPEnabled(); |
732 | 732 |
733 | 733 |
734 static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* p
ResDict, const FX_CHAR* csType, int iMinLen = 2, const FX_CHAR* csPrefix = ""); | 734 static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* p
ResDict, const FX_CHAR* csType, int iMinLen = 2, const FX_CHAR* csPrefix = ""); |
735 | 735 |
736 | 736 |
737 | 737 |
738 static CPDF_Font* AddSystemDefaultFont(const CPDF_Document* pDocum
ent); | 738 static CPDF_Font* AddSystemDefaultFont(const CPDF_Document* pDocum
ent); |
739 | 739 |
740 static CPDF_Font* AddSystemFont(const CPDF_Document* pDocument, CF
X_ByteString csFontName, uint8_t iCharSet = 1); | 740 static CPDF_Font* AddSystemFont(const CPDF_Document* pDocument, CF
X_ByteString csFontName, uint8_t iCharSet = 1); |
741 | 741 |
742 static CPDF_Font* AddSystemFont(const CPDF_Document* pDocument, CF
X_WideString csFontName, uint8_t iCharSet = 1); | 742 static CPDF_Font* AddSystemFont(const CPDF_Document* pDocument, CF
X_WideString csFontName, uint8_t iCharSet = 1); |
743 | 743 |
744 static CPDF_Font* AddStandardFont(const CPDF_Document* pDocument,
CFX_ByteString csFontName); | 744 static CPDF_Font* AddStandardFont(const CPDF_Document* pDocument,
CFX_ByteString csFontName); |
745 | 745 |
746 static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont =
NULL); | 746 static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont =
NULL); |
747 | 747 |
748 static CFX_ByteString GetNativeFont(void* pLogFont = NULL); | 748 static CFX_ByteString GetNativeFont(void* pLogFont = NULL); |
749 | 749 |
750 static uint8_t GetNativeCharSet(); | 750 static uint8_t GetNativeCharSet(); |
751 | 751 |
752 static CPDF_Font* AddNativeFont(uint8_t iCharSet, const CPDF_Docum
ent* pDocument); | 752 static CPDF_Font* AddNativeFont(uint8_t iCharSet, const CPDF_Docum
ent* pDocument); |
753 | 753 |
754 static CPDF_Font* AddNativeFont(const CPDF_Document* pDocument); | 754 static CPDF_Font* AddNativeFont(const CPDF_Document* pDocument); |
755 | 755 |
756 | 756 |
757 | 757 |
758 | 758 |
759 FX_BOOL» » » » » ValidateFieldName(CFX_WideString
& csNewFieldName, int iType); | 759 bool» » » » » ValidateFieldName(CFX_WideString
& csNewFieldName, int iType); |
760 | 760 |
761 FX_BOOL» » » » » ValidateFieldName(const CPDF_For
mField* pField, CFX_WideString& csNewFieldName); | 761 bool» » » » » ValidateFieldName(const CPDF_For
mField* pField, CFX_WideString& csNewFieldName); |
762 | 762 |
763 FX_BOOL» » » » » ValidateFieldName(const CPDF_For
mControl* pControl, CFX_WideString& csNewFieldName); | 763 bool» » » » » ValidateFieldName(const CPDF_For
mControl* pControl, CFX_WideString& csNewFieldName); |
764 | 764 |
765 | 765 |
766 | 766 |
767 | 767 |
768 FX_DWORD CountFields(const CFX_WideString &csFiel
dName = L""); | 768 FX_DWORD CountFields(const CFX_WideString &csFiel
dName = L""); |
769 | 769 |
770 CPDF_FormField* GetField(FX_DWORD index, const CFX_WideS
tring &csFieldName = L""); | 770 CPDF_FormField* GetField(FX_DWORD index, const CFX_WideS
tring &csFieldName = L""); |
771 | 771 |
772 void GetAllFieldNames(CFX_WideStringA
rray& allFieldNames); | 772 void GetAllFieldNames(CFX_WideStringA
rray& allFieldNames); |
773 | 773 |
774 FX_BOOL» » » » » IsValidFormField(const void* pFi
eld); | 774 bool» » » » » IsValidFormField(const void* pFi
eld); |
775 | 775 |
776 CPDF_FormField* GetFieldByDict(CPDF_Dictionary* pFieldDi
ct) const; | 776 CPDF_FormField* GetFieldByDict(CPDF_Dictionary* pFieldDi
ct) const; |
777 | 777 |
778 | 778 |
779 | 779 |
780 | 780 |
781 FX_DWORD CountControls(CFX_WideString csFieldName
= L""); | 781 FX_DWORD CountControls(CFX_WideString csFieldName
= L""); |
782 | 782 |
783 CPDF_FormControl* GetControl(FX_DWORD index, CFX_WideString csFiel
dName = L""); | 783 CPDF_FormControl* GetControl(FX_DWORD index, CFX_WideString csFiel
dName = L""); |
784 | 784 |
785 FX_BOOL» » » » » IsValidFormControl(const void* p
Control); | 785 bool» » » » » IsValidFormControl(const void* p
Control); |
786 | 786 |
787 int CountPageControls(CPDF_Page* pPa
ge) const; | 787 int CountPageControls(CPDF_Page* pPa
ge) const; |
788 | 788 |
789 CPDF_FormControl* GetPageControl(CPDF_Page* pPage, int index) cons
t; | 789 CPDF_FormControl* GetPageControl(CPDF_Page* pPage, int index) cons
t; |
790 | 790 |
791 | 791 |
792 CPDF_FormControl* GetControlAtPoint(CPDF_Page* pPage, FX_FLOAT pdf
_x, FX_FLOAT pdf_y) const; | 792 CPDF_FormControl* GetControlAtPoint(CPDF_Page* pPage, FX_FLOAT pdf
_x, FX_FLOAT pdf_y) const; |
793 | 793 |
794 CPDF_FormControl* GetControlByDict(CPDF_Dictionary* pWidgetDict) c
onst; | 794 CPDF_FormControl* GetControlByDict(CPDF_Dictionary* pWidgetDict) c
onst; |
795 | 795 |
(...skipping 14 matching lines...) Expand all Loading... |
810 } | 810 } |
811 | 811 |
812 CPDF_Dictionary* GetFormDict() const | 812 CPDF_Dictionary* GetFormDict() const |
813 { | 813 { |
814 return m_pFormDict; | 814 return m_pFormDict; |
815 } | 815 } |
816 | 816 |
817 | 817 |
818 | 818 |
819 | 819 |
820 FX_BOOL» » » » » NeedConstructAP(); | 820 bool» » » » » NeedConstructAP(); |
821 | 821 |
822 void» » » » » NeedConstructAP(FX_BOOL bNeedAP)
; | 822 void» » » » » NeedConstructAP(bool bNeedAP); |
823 | 823 |
824 | 824 |
825 | 825 |
826 | 826 |
827 int CountFieldsInCalculationOrder(); | 827 int CountFieldsInCalculationOrder(); |
828 | 828 |
829 CPDF_FormField* GetFieldInCalculationOrder(int index); | 829 CPDF_FormField* GetFieldInCalculationOrder(int index); |
830 | 830 |
831 int FindFieldInCalculationOrder(cons
t CPDF_FormField* pField); | 831 int FindFieldInCalculationOrder(cons
t CPDF_FormField* pField); |
832 | 832 |
833 | 833 |
834 | 834 |
835 | 835 |
836 FX_DWORD CountFormFonts(); | 836 FX_DWORD CountFormFonts(); |
837 | 837 |
838 CPDF_Font* GetFormFont(FX_DWORD index, CFX_ByteStri
ng& csNameTag); | 838 CPDF_Font* GetFormFont(FX_DWORD index, CFX_ByteStri
ng& csNameTag); |
839 | 839 |
840 CPDF_Font* GetFormFont(CFX_ByteString csNameTag); | 840 CPDF_Font* GetFormFont(CFX_ByteString csNameTag); |
841 | 841 |
842 CPDF_Font* GetFormFont(CFX_ByteString csFontName, C
FX_ByteString& csNameTag); | 842 CPDF_Font* GetFormFont(CFX_ByteString csFontName, C
FX_ByteString& csNameTag); |
843 | 843 |
844 CPDF_Font* GetNativeFormFont(uint8_t iCharSet, CFX_
ByteString& csNameTag); | 844 CPDF_Font* GetNativeFormFont(uint8_t iCharSet, CFX_
ByteString& csNameTag); |
845 | 845 |
846 CPDF_Font* GetNativeFormFont(CFX_ByteString& csName
Tag); | 846 CPDF_Font* GetNativeFormFont(CFX_ByteString& csName
Tag); |
847 | 847 |
848 FX_BOOL» » » » » FindFormFont(const CPDF_Font* pF
ont, CFX_ByteString& csNameTag); | 848 bool» » » » » FindFormFont(const CPDF_Font* pF
ont, CFX_ByteString& csNameTag); |
849 | 849 |
850 FX_BOOL» » » » » FindFormFont(CFX_ByteString csFo
ntName, CPDF_Font*& pFont, CFX_ByteString& csNameTag); | 850 bool» » » » » FindFormFont(CFX_ByteString csFo
ntName, CPDF_Font*& pFont, CFX_ByteString& csNameTag); |
851 | 851 |
852 inline FX_BOOL» » » FindFormFont(CFX_WideString csFontName,
CPDF_Font*& pFont, CFX_ByteString& csNameTag) | 852 inline bool»» » FindFormFont(CFX_WideString csFontName, CPDF_Fon
t*& pFont, CFX_ByteString& csNameTag) |
853 { | 853 { |
854 return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag); | 854 return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag); |
855 } | 855 } |
856 | 856 |
857 | 857 |
858 | 858 |
859 | 859 |
860 | 860 |
861 void AddFormFont(const CPDF_Font* pFo
nt, CFX_ByteString& csNameTag); | 861 void AddFormFont(const CPDF_Font* pFo
nt, CFX_ByteString& csNameTag); |
862 | 862 |
(...skipping 12 matching lines...) Expand all Loading... |
875 | 875 |
876 CPDF_Font* GetDefaultFormFont(); | 876 CPDF_Font* GetDefaultFormFont(); |
877 | 877 |
878 | 878 |
879 | 879 |
880 int GetFormAlignment(); | 880 int GetFormAlignment(); |
881 | 881 |
882 | 882 |
883 | 883 |
884 | 884 |
885 CPDF_FormField*» » » CheckRequiredFields(const CFX_PtrArray *
fields = NULL, FX_BOOL bIncludeOrExclude = TRUE) const; | 885 CPDF_FormField*» » » CheckRequiredFields(const CFX_PtrArray *
fields = NULL, bool bIncludeOrExclude = true) const; |
886 | 886 |
887 CFDF_Document* » » » ExportToFDF(const CFX_WideStringC& pdf_p
ath, FX_BOOL bSimpleFileSpec = FALSE) const; | 887 CFDF_Document* » » » ExportToFDF(const CFX_WideStringC& pdf_p
ath, bool bSimpleFileSpec = false) const; |
888 | 888 |
889 CFDF_Document*» » » ExportToFDF(const CFX_WideStringC& pdf_p
ath, CFX_PtrArray& fields, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bSimpleFile
Spec = FALSE) const; | 889 CFDF_Document*» » » ExportToFDF(const CFX_WideStringC& pdf_p
ath, CFX_PtrArray& fields, bool bIncludeOrExclude = true, bool bSimpleFileSpec =
false) const; |
890 | 890 |
891 FX_BOOL» » » » » ImportFromFDF(const CFDF_Documen
t* pFDFDoc, FX_BOOL bNotify = FALSE); | 891 bool» » » » » ImportFromFDF(const CFDF_Documen
t* pFDFDoc, bool bNotify = false); |
892 | 892 |
893 | 893 |
894 | 894 |
895 | 895 |
896 FX_BOOL» » » » » ResetForm(const CFX_PtrArray& fi
elds, FX_BOOL bIncludeOrExclude = TRUE, FX_BOOL bNotify = FALSE); | 896 bool» » » » » ResetForm(const CFX_PtrArray& fi
elds, bool bIncludeOrExclude = true, bool bNotify = false); |
897 | 897 |
898 FX_BOOL» » » » » ResetForm(FX_BOOL bNotify = FALS
E); | 898 bool» » » » » ResetForm(bool bNotify = false); |
899 | 899 |
900 void ReloadForm(); | 900 void ReloadForm(); |
901 | 901 |
902 CPDF_FormNotify* GetFormNotify() const | 902 CPDF_FormNotify* GetFormNotify() const |
903 { | 903 { |
904 return m_pFormNotify; | 904 return m_pFormNotify; |
905 } | 905 } |
906 | 906 |
907 void SetFormNotify(const CPDF_FormNot
ify* pNotify); | 907 void SetFormNotify(const CPDF_FormNot
ify* pNotify); |
908 | 908 |
909 | 909 |
910 int»» » » » » GetPageWithWidget(int iCurPage,
FX_BOOL bNext); | 910 int»» » » » » GetPageWithWidget(int iCurPage,
bool bNext); |
911 | 911 |
912 | 912 |
913 | 913 |
914 FX_BOOL» » » » » IsUpdated() | 914 bool» » » » » IsUpdated() |
915 { | 915 { |
916 return m_bUpdated; | 916 return m_bUpdated; |
917 } | 917 } |
918 | 918 |
919 void ClearUpdatedFlag() | 919 void ClearUpdatedFlag() |
920 { | 920 { |
921 m_bUpdated = FALSE; | 921 m_bUpdated = false; |
922 } | 922 } |
923 | 923 |
924 | 924 |
925 FX_BOOL» » » » » HasXFAForm() const; | 925 bool» » » » » HasXFAForm() const; |
926 | 926 |
927 void FixPageFields(const CPDF_Page* p
Page); | 927 void FixPageFields(const CPDF_Page* p
Page); |
928 protected: | 928 protected: |
929 | 929 |
930 static FX_BOOL» » » m_bUpdateAP; | 930 static bool»» » m_bUpdateAP; |
931 | 931 |
932 void LoadField(CPDF_Dictionary* pFiel
dDict, int nLevel = 0); | 932 void LoadField(CPDF_Dictionary* pFiel
dDict, int nLevel = 0); |
933 | 933 |
934 CPDF_Object* GetFieldAttr(CPDF_Dictionary* pFieldDict
, const FX_CHAR* name); | 934 CPDF_Object* GetFieldAttr(CPDF_Dictionary* pFieldDict
, const FX_CHAR* name); |
935 | 935 |
936 CPDF_FormField* AddTerminalField(const CPDF_Dictionary*
pFieldDict); | 936 CPDF_FormField* AddTerminalField(const CPDF_Dictionary*
pFieldDict); |
937 | 937 |
938 CPDF_FormControl* AddControl(const CPDF_FormField* pField, const C
PDF_Dictionary* pWidgetDict); | 938 CPDF_FormControl* AddControl(const CPDF_FormField* pField, const C
PDF_Dictionary* pWidgetDict); |
939 | 939 |
940 void» » » » » FDF_ImportField(CPDF_Dictionary*
pField, const CFX_WideString& parent_name, FX_BOOL bNotify = FALSE, int nLevel
= 0); | 940 void» » » » » FDF_ImportField(CPDF_Dictionary*
pField, const CFX_WideString& parent_name, bool bNotify = false, int nLevel = 0
); |
941 | 941 |
942 FX_BOOL» » » » » ValidateFieldName(CFX_WideString
& csNewFieldName, int iType, const CPDF_FormField* pExcludedField, const CPDF_Fo
rmControl* pExcludedControl); | 942 bool» » » » » ValidateFieldName(CFX_WideString
& csNewFieldName, int iType, const CPDF_FormField* pExcludedField, const CPDF_Fo
rmControl* pExcludedControl); |
943 | 943 |
944 int CompareFieldName(const CFX_WideS
tring& name1, const CFX_WideString& name2); | 944 int CompareFieldName(const CFX_WideS
tring& name1, const CFX_WideString& name2); |
945 | 945 |
946 int CompareFieldName(const CFX_ByteS
tring& name1, const CFX_ByteString& name2); | 946 int CompareFieldName(const CFX_ByteS
tring& name1, const CFX_ByteString& name2); |
947 | 947 |
948 CPDF_Document* m_pDocument; | 948 CPDF_Document* m_pDocument; |
949 | 949 |
950 FX_BOOL» » » » » m_bGenerateAP; | 950 bool» » » » » m_bGenerateAP; |
951 | 951 |
952 CPDF_Dictionary* m_pFormDict; | 952 CPDF_Dictionary* m_pFormDict; |
953 | 953 |
954 CFX_MapPtrToPtr m_ControlMap; | 954 CFX_MapPtrToPtr m_ControlMap; |
955 | 955 |
956 CFieldTree *m_pFieldTree; | 956 CFieldTree *m_pFieldTree; |
957 | 957 |
958 CFX_ByteString m_bsEncoding; | 958 CFX_ByteString m_bsEncoding; |
959 | 959 |
960 CPDF_FormNotify* m_pFormNotify; | 960 CPDF_FormNotify* m_pFormNotify; |
961 | 961 |
962 FX_BOOL» » » » » m_bUpdated; | 962 bool» » » » » m_bUpdated; |
963 friend class CPDF_FormControl; | 963 friend class CPDF_FormControl; |
964 friend class CPDF_FormField; | 964 friend class CPDF_FormField; |
965 }; | 965 }; |
966 #define FORMFIELD_READONLY 0x01 | 966 #define FORMFIELD_READONLY 0x01 |
967 #define FORMFIELD_REQUIRED 0x02 | 967 #define FORMFIELD_REQUIRED 0x02 |
968 #define FORMFIELD_NOEXPORT 0x04 | 968 #define FORMFIELD_NOEXPORT 0x04 |
969 #define FORMRADIO_NOTOGGLEOFF 0x100 | 969 #define FORMRADIO_NOTOGGLEOFF 0x100 |
970 #define FORMRADIO_UNISON 0x200 | 970 #define FORMRADIO_UNISON 0x200 |
971 #define FORMTEXT_MULTILINE 0x100 | 971 #define FORMTEXT_MULTILINE 0x100 |
972 #define FORMTEXT_PASSWORD 0x200 | 972 #define FORMTEXT_PASSWORD 0x200 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 CPDF_Dictionary* GetFieldDict() const | 1011 CPDF_Dictionary* GetFieldDict() const |
1012 { | 1012 { |
1013 return m_pDict; | 1013 return m_pDict; |
1014 } | 1014 } |
1015 | 1015 |
1016 void SetFieldDict(CPDF_Dictionary* pD
ict) | 1016 void SetFieldDict(CPDF_Dictionary* pD
ict) |
1017 { | 1017 { |
1018 m_pDict = pDict; | 1018 m_pDict = pDict; |
1019 } | 1019 } |
1020 | 1020 |
1021 FX_BOOL» » » » » ResetField(FX_BOOL bNotify = FAL
SE); | 1021 bool» » » » » ResetField(bool bNotify = false)
; |
1022 | 1022 |
1023 | 1023 |
1024 | 1024 |
1025 int CountControls() | 1025 int CountControls() |
1026 { | 1026 { |
1027 return m_ControlList.GetSize(); | 1027 return m_ControlList.GetSize(); |
1028 } | 1028 } |
1029 | 1029 |
1030 CPDF_FormControl* GetControl(int index) | 1030 CPDF_FormControl* GetControl(int index) |
1031 { | 1031 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 | 1068 |
1069 | 1069 |
1070 CFX_WideString GetRichTextString(); | 1070 CFX_WideString GetRichTextString(); |
1071 | 1071 |
1072 | 1072 |
1073 | 1073 |
1074 CFX_WideString GetValue(); | 1074 CFX_WideString GetValue(); |
1075 | 1075 |
1076 CFX_WideString GetDefaultValue(); | 1076 CFX_WideString GetDefaultValue(); |
1077 | 1077 |
1078 FX_BOOL» » » » » SetValue(const CFX_WideString& v
alue, FX_BOOL bNotify = FALSE); | 1078 bool» » » » » SetValue(const CFX_WideString& v
alue, bool bNotify = false); |
1079 | 1079 |
1080 | 1080 |
1081 | 1081 |
1082 | 1082 |
1083 | 1083 |
1084 int GetMaxLen(); | 1084 int GetMaxLen(); |
1085 | 1085 |
1086 | 1086 |
1087 | 1087 |
1088 | 1088 |
1089 int CountSelectedItems(); | 1089 int CountSelectedItems(); |
1090 | 1090 |
1091 int GetSelectedIndex(int index); | 1091 int GetSelectedIndex(int index); |
1092 | 1092 |
1093 FX_BOOL» » » » » ClearSelection(FX_BOOL bNotify =
FALSE); | 1093 bool» » » » » ClearSelection(bool bNotify = fa
lse); |
1094 | 1094 |
1095 FX_BOOL» » » » » IsItemSelected(int index); | 1095 bool» » » » » IsItemSelected(int index); |
1096 | 1096 |
1097 FX_BOOL» » » » » SetItemSelection(int index, FX_B
OOL bSelected, FX_BOOL bNotify = FALSE); | 1097 bool» » » » » SetItemSelection(int index, bool
bSelected, bool bNotify = false); |
1098 | 1098 |
1099 FX_BOOL» » » » » IsItemDefaultSelected(int index)
; | 1099 bool» » » » » IsItemDefaultSelected(int index)
; |
1100 | 1100 |
1101 int GetDefaultSelectedItem(); | 1101 int GetDefaultSelectedItem(); |
1102 | 1102 |
1103 | 1103 |
1104 | 1104 |
1105 | 1105 |
1106 int CountOptions(); | 1106 int CountOptions(); |
1107 | 1107 |
1108 CFX_WideString GetOptionLabel(int index); | 1108 CFX_WideString GetOptionLabel(int index); |
1109 | 1109 |
1110 CFX_WideString GetOptionValue(int index); | 1110 CFX_WideString GetOptionValue(int index); |
1111 | 1111 |
1112 int FindOption(CFX_WideString csOptL
abel); | 1112 int FindOption(CFX_WideString csOptL
abel); |
1113 | 1113 |
1114 int FindOptionValue(const CFX_WideSt
ring& csOptValue, int iStartIndex = 0); | 1114 int FindOptionValue(const CFX_WideSt
ring& csOptValue, int iStartIndex = 0); |
1115 | 1115 |
1116 | 1116 |
1117 | 1117 |
1118 | 1118 |
1119 FX_BOOL» » » » » CheckControl(int iControlIndex,
FX_BOOL bChecked, FX_BOOL bNotify = FALSE); | 1119 bool» » » » » CheckControl(int iControlIndex,
bool bChecked, bool bNotify = false); |
1120 | 1120 |
1121 | 1121 |
1122 | 1122 |
1123 | 1123 |
1124 int GetTopVisibleIndex(); | 1124 int GetTopVisibleIndex(); |
1125 | 1125 |
1126 | 1126 |
1127 | 1127 |
1128 | 1128 |
1129 int CountSelectedOptions(); | 1129 int CountSelectedOptions(); |
1130 | 1130 |
1131 int GetSelectedOptionIndex(int index
); | 1131 int GetSelectedOptionIndex(int index
); |
1132 | 1132 |
1133 FX_BOOL» » » » » IsOptionSelected(int iOptIndex); | 1133 bool» » » » » IsOptionSelected(int iOptIndex); |
1134 | 1134 |
1135 FX_BOOL» » » » » SelectOption(int iOptIndex, FX_B
OOL bSelected, FX_BOOL bNotify = FALSE); | 1135 bool» » » » » SelectOption(int iOptIndex, bool
bSelected, bool bNotify = false); |
1136 | 1136 |
1137 FX_BOOL» » » » » ClearSelectedOptions(FX_BOOL bNo
tify = FALSE); | 1137 bool» » » » » ClearSelectedOptions(bool bNotif
y = false); |
1138 | 1138 |
1139 | 1139 |
1140 | 1140 |
1141 | 1141 |
1142 FX_FLOAT GetFontSize() | 1142 FX_FLOAT GetFontSize() |
1143 { | 1143 { |
1144 return m_FontSize; | 1144 return m_FontSize; |
1145 } | 1145 } |
1146 | 1146 |
1147 CPDF_Font* GetFont() | 1147 CPDF_Font* GetFont() |
(...skipping 14 matching lines...) Expand all Loading... |
1162 CPDF_InterForm* m_pForm; | 1162 CPDF_InterForm* m_pForm; |
1163 | 1163 |
1164 CPDF_Dictionary* m_pDict; | 1164 CPDF_Dictionary* m_pDict; |
1165 | 1165 |
1166 CFX_PtrArray m_ControlList; | 1166 CFX_PtrArray m_ControlList; |
1167 friend class CPDF_InterForm; | 1167 friend class CPDF_InterForm; |
1168 friend class CPDF_FormControl; | 1168 friend class CPDF_FormControl; |
1169 | 1169 |
1170 | 1170 |
1171 | 1171 |
1172 CFX_WideString» » » GetValue(FX_BOOL bDefault); | 1172 CFX_WideString» » » GetValue(bool bDefault); |
1173 | 1173 |
1174 FX_BOOL» » » » » SetValue(const CFX_WideString& v
alue, FX_BOOL bDefault, FX_BOOL bNotify); | 1174 bool» » » » » SetValue(const CFX_WideString& v
alue, bool bDefault, bool bNotify); |
1175 | 1175 |
1176 | 1176 |
1177 void SyncFieldFlags(); | 1177 void SyncFieldFlags(); |
1178 | 1178 |
1179 int FindListSel(CPDF_String* str); | 1179 int FindListSel(CPDF_String* str); |
1180 | 1180 |
1181 CFX_WideString GetOptionText(int index, int sub_index); | 1181 CFX_WideString GetOptionText(int index, int sub_index); |
1182 | 1182 |
1183 void LoadDA(); | 1183 void LoadDA(); |
1184 | 1184 |
1185 void UpdateAP(CPDF_FormControl* pCont
rol); | 1185 void UpdateAP(CPDF_FormControl* pCont
rol); |
1186 | 1186 |
1187 | 1187 |
1188 | 1188 |
1189 CFX_WideString» » » GetCheckValue(FX_BOOL bDefault); | 1189 CFX_WideString» » » GetCheckValue(bool bDefault); |
1190 | 1190 |
1191 FX_BOOL» » » » » SetCheckValue(const CFX_WideStri
ng& value, FX_BOOL bDefault, FX_BOOL bNotify); | 1191 bool» » » » » SetCheckValue(const CFX_WideStri
ng& value, bool bDefault, bool bNotify); |
1192 | 1192 |
1193 | 1193 |
1194 FX_FLOAT m_FontSize; | 1194 FX_FLOAT m_FontSize; |
1195 | 1195 |
1196 CPDF_Font* m_pFont; | 1196 CPDF_Font* m_pFont; |
1197 }; | 1197 }; |
1198 CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, const FX_CHAR* na
me, int nLevel = 0); | 1198 CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, const FX_CHAR* na
me, int nLevel = 0); |
1199 class CPDF_IconFit | 1199 class CPDF_IconFit |
1200 { | 1200 { |
1201 public: | 1201 public: |
(...skipping 16 matching lines...) Expand all Loading... |
1218 Bigger, | 1218 Bigger, |
1219 Smaller, | 1219 Smaller, |
1220 Never | 1220 Never |
1221 }; | 1221 }; |
1222 | 1222 |
1223 ScaleMethod GetScaleMethod(); | 1223 ScaleMethod GetScaleMethod(); |
1224 | 1224 |
1225 | 1225 |
1226 | 1226 |
1227 | 1227 |
1228 FX_BOOL» » » » » IsProportionalScale(); | 1228 bool» » » » » IsProportionalScale(); |
1229 | 1229 |
1230 | 1230 |
1231 | 1231 |
1232 | 1232 |
1233 void GetIconPosition(FX_FLOAT& fLeft,
FX_FLOAT& fBottom); | 1233 void GetIconPosition(FX_FLOAT& fLeft,
FX_FLOAT& fBottom); |
1234 | 1234 |
1235 | 1235 |
1236 | 1236 |
1237 | 1237 |
1238 FX_BOOL» » » » » GetFittingBounds(); | 1238 bool» » » » » GetFittingBounds(); |
1239 | 1239 |
1240 | 1240 |
1241 CPDF_Dictionary* m_pDict; | 1241 CPDF_Dictionary* m_pDict; |
1242 }; | 1242 }; |
1243 | 1243 |
1244 #define TEXTPOS_CAPTION 0 | 1244 #define TEXTPOS_CAPTION 0 |
1245 #define TEXTPOS_ICON 1 | 1245 #define TEXTPOS_ICON 1 |
1246 #define TEXTPOS_BELOW 2 | 1246 #define TEXTPOS_BELOW 2 |
1247 #define TEXTPOS_ABOVE 3 | 1247 #define TEXTPOS_ABOVE 3 |
1248 #define TEXTPOS_RIGHT 4 | 1248 #define TEXTPOS_RIGHT 4 |
(...skipping 27 matching lines...) Expand all Loading... |
1276 | 1276 |
1277 void DrawControl(CFX_RenderDevice* pD
evice, CFX_AffineMatrix* pMatrix, | 1277 void DrawControl(CFX_RenderDevice* pD
evice, CFX_AffineMatrix* pMatrix, |
1278 CPDF_Page* pPage, CPDF_Annot::Appearance
Mode mode, const CPDF_RenderOptions* pOptions = NULL); | 1278 CPDF_Page* pPage, CPDF_Annot::Appearance
Mode mode, const CPDF_RenderOptions* pOptions = NULL); |
1279 | 1279 |
1280 | 1280 |
1281 | 1281 |
1282 CFX_ByteString GetCheckedAPState(); | 1282 CFX_ByteString GetCheckedAPState(); |
1283 | 1283 |
1284 CFX_WideString GetExportValue(); | 1284 CFX_WideString GetExportValue(); |
1285 | 1285 |
1286 FX_BOOL» » » » » IsChecked(); | 1286 bool» » » » » IsChecked(); |
1287 | 1287 |
1288 FX_BOOL» » » » » IsDefaultChecked(); | 1288 bool» » » » » IsDefaultChecked(); |
1289 | 1289 |
1290 | 1290 |
1291 | 1291 |
1292 | 1292 |
1293 enum HighlightingMode { | 1293 enum HighlightingMode { |
1294 None = 0, | 1294 None = 0, |
1295 Invert, | 1295 Invert, |
1296 Outline, | 1296 Outline, |
1297 Push, | 1297 Push, |
1298 Toggle | 1298 Toggle |
1299 }; | 1299 }; |
1300 | 1300 |
1301 HighlightingMode GetHighlightingMode(); | 1301 HighlightingMode GetHighlightingMode(); |
1302 | 1302 |
1303 | 1303 |
1304 | 1304 |
1305 | 1305 |
1306 FX_BOOL» » » » » HasMKEntry(CFX_ByteString csEntr
y); | 1306 bool» » » » » HasMKEntry(CFX_ByteString csEntr
y); |
1307 | 1307 |
1308 | 1308 |
1309 | 1309 |
1310 | 1310 |
1311 int GetRotation(); | 1311 int GetRotation(); |
1312 | 1312 |
1313 | 1313 |
1314 | 1314 |
1315 | 1315 |
1316 inline FX_ARGB GetBorderColor(int& iColorType) | 1316 inline FX_ARGB GetBorderColor(int& iColorType) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1427 int GetControlAlignment(); | 1427 int GetControlAlignment(); |
1428 | 1428 |
1429 protected: | 1429 protected: |
1430 | 1430 |
1431 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict); | 1431 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict); |
1432 | 1432 |
1433 CFX_ByteString GetOnStateName(); | 1433 CFX_ByteString GetOnStateName(); |
1434 | 1434 |
1435 void SetOnStateName(const CFX_ByteStr
ing& csOn); | 1435 void SetOnStateName(const CFX_ByteStr
ing& csOn); |
1436 | 1436 |
1437 void» » » » » CheckControl(FX_BOOL bChecked); | 1437 void» » » » » CheckControl(bool bChecked); |
1438 | 1438 |
1439 FX_ARGB GetColor(int& iColorType, CFX_By
teString csEntry); | 1439 FX_ARGB GetColor(int& iColorType, CFX_By
teString csEntry); |
1440 | 1440 |
1441 FX_FLOAT GetOriginalColor(int index, CFX_ByteStri
ng csEntry); | 1441 FX_FLOAT GetOriginalColor(int index, CFX_ByteStri
ng csEntry); |
1442 | 1442 |
1443 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], CFX_ByteString csEntry); | 1443 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], CFX_ByteString csEntry); |
1444 | 1444 |
1445 CFX_WideString GetCaption(CFX_ByteString csEntry); | 1445 CFX_WideString GetCaption(CFX_ByteString csEntry); |
1446 | 1446 |
1447 CPDF_Stream* GetIcon(CFX_ByteString csEntry); | 1447 CPDF_Stream* GetIcon(CFX_ByteString csEntry); |
1448 | 1448 |
1449 CPDF_ApSettings» » » GetMK(FX_BOOL bCreate); | 1449 CPDF_ApSettings» » » GetMK(bool bCreate); |
1450 | 1450 |
1451 CPDF_InterForm* m_pForm; | 1451 CPDF_InterForm* m_pForm; |
1452 | 1452 |
1453 CPDF_FormField* m_pField; | 1453 CPDF_FormField* m_pField; |
1454 | 1454 |
1455 CPDF_Dictionary* m_pWidgetDict; | 1455 CPDF_Dictionary* m_pWidgetDict; |
1456 friend class CPDF_InterForm; | 1456 friend class CPDF_InterForm; |
1457 friend class CPDF_FormField; | 1457 friend class CPDF_FormField; |
1458 }; | 1458 }; |
1459 class CPDF_FormNotify | 1459 class CPDF_FormNotify |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 virtual int BeforeFormImportData(const CPDF_InterForm* pForm) | 1500 virtual int BeforeFormImportData(const CPDF_InterForm* pForm) |
1501 { | 1501 { |
1502 return 0; | 1502 return 0; |
1503 } | 1503 } |
1504 | 1504 |
1505 virtual int AfterFormImportData(const CPDF_InterForm* pForm) | 1505 virtual int AfterFormImportData(const CPDF_InterForm* pForm) |
1506 { | 1506 { |
1507 return 0; | 1507 return 0; |
1508 } | 1508 } |
1509 }; | 1509 }; |
1510 FX_BOOL»» FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict
); | 1510 bool» » FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict
); |
1511 class CPDF_PageLabel | 1511 class CPDF_PageLabel |
1512 { | 1512 { |
1513 public: | 1513 public: |
1514 | 1514 |
1515 CPDF_PageLabel(CPDF_Document* pDocument) | 1515 CPDF_PageLabel(CPDF_Document* pDocument) |
1516 { | 1516 { |
1517 m_pDocument = pDocument; | 1517 m_pDocument = pDocument; |
1518 } | 1518 } |
1519 | 1519 |
1520 | 1520 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 class CPDF_ViewerPreferences | 1552 class CPDF_ViewerPreferences |
1553 { | 1553 { |
1554 public: | 1554 public: |
1555 | 1555 |
1556 CPDF_ViewerPreferences(CPDF_Document *pDoc); | 1556 CPDF_ViewerPreferences(CPDF_Document *pDoc); |
1557 | 1557 |
1558 | 1558 |
1559 ~CPDF_ViewerPreferences(); | 1559 ~CPDF_ViewerPreferences(); |
1560 | 1560 |
1561 | 1561 |
1562 FX_BOOL IsDirectionR2L() const; | 1562 bool IsDirectionR2L() const; |
1563 | 1563 |
1564 FX_BOOL PrintScaling() const; | 1564 bool PrintScaling() const; |
1565 | 1565 |
1566 int32_t NumCopies() const; | 1566 int32_t NumCopies() const; |
1567 | 1567 |
1568 CPDF_Array* PrintPageRange() const; | 1568 CPDF_Array* PrintPageRange() const; |
1569 | 1569 |
1570 CFX_ByteString Duplex() const; | 1570 CFX_ByteString Duplex() const; |
1571 | 1571 |
1572 protected: | 1572 protected: |
1573 CPDF_Document* m_pDoc; | 1573 CPDF_Document* m_pDoc; |
1574 }; | 1574 }; |
1575 class CPDF_ApSettings | 1575 class CPDF_ApSettings |
1576 { | 1576 { |
1577 public: | 1577 public: |
1578 | 1578 |
1579 CPDF_ApSettings(CPDF_Dictionary* pDict = NULL) | 1579 CPDF_ApSettings(CPDF_Dictionary* pDict = NULL) |
1580 { | 1580 { |
1581 m_pDict = pDict; | 1581 m_pDict = pDict; |
1582 } | 1582 } |
1583 | 1583 |
1584 operator CPDF_Dictionary* () const | 1584 operator CPDF_Dictionary* () const |
1585 { | 1585 { |
1586 return m_pDict; | 1586 return m_pDict; |
1587 } | 1587 } |
1588 | 1588 |
1589 FX_BOOL» » » » » HasMKEntry(const CFX_ByteStringC
& csEntry); | 1589 bool» » » » » HasMKEntry(const CFX_ByteStringC
& csEntry); |
1590 | 1590 |
1591 | 1591 |
1592 | 1592 |
1593 int GetRotation(); | 1593 int GetRotation(); |
1594 | 1594 |
1595 | 1595 |
1596 | 1596 |
1597 | 1597 |
1598 inline FX_ARGB GetBorderColor(int& iColorType) | 1598 inline FX_ARGB GetBorderColor(int& iColorType) |
1599 { | 1599 { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 | 1695 |
1696 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], const CFX_ByteStringC& csEntry); | 1696 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], const CFX_ByteStringC& csEntry); |
1697 | 1697 |
1698 CFX_WideString GetCaption(const CFX_ByteStringC& csEntr
y); | 1698 CFX_WideString GetCaption(const CFX_ByteStringC& csEntr
y); |
1699 | 1699 |
1700 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); | 1700 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); |
1701 friend class CPDF_FormControl; | 1701 friend class CPDF_FormControl; |
1702 }; | 1702 }; |
1703 | 1703 |
1704 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1704 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
OLD | NEW |