diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-10-28 23:03:33 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-03 11:10:11 -0800 |
commit | fdc00a7042d912aafaabddae4d9c84199921ef23 (patch) | |
tree | 32ab8ac91cc68d2cd15b9168782a71b3f3f5e7b9 /fpdfsdk/include/fsdk_baseannot.h | |
parent | e9b38fa38de2c95d8260be31c57d9272c4d127ed (diff) | |
download | pdfium-fdc00a7042d912aafaabddae4d9c84199921ef23.tar.xz |
Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
Diffstat (limited to 'fpdfsdk/include/fsdk_baseannot.h')
-rw-r--r-- | fpdfsdk/include/fsdk_baseannot.h | 69 |
1 files changed, 46 insertions, 23 deletions
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h index 797c3f16d1..5f56fc7000 100644 --- a/fpdfsdk/include/fsdk_baseannot.h +++ b/fpdfsdk/include/fsdk_baseannot.h @@ -61,20 +61,33 @@ public: class CPDFSDK_Annot { public: - CPDFSDK_Annot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); - virtual ~CPDFSDK_Annot(); + CPDFSDK_Annot(CPDFSDK_PageView* pPageView); + virtual ~CPDFSDK_Annot() {}; public: + virtual FX_BOOL IsXFAField() { return FALSE; } + virtual FX_FLOAT GetMinWidth() const; virtual FX_FLOAT GetMinHeight() const; //define layout order to 5. virtual int GetLayoutOrder() const { return 5; } + virtual CPDF_Annot* GetPDFAnnot() { return NULL; } + virtual XFA_HWIDGET GetXFAWidget() { return NULL; } + + virtual CFX_ByteString GetType() const { return ""; } + virtual CFX_ByteString GetSubType() const { return ""; } + + virtual void SetRect(const CPDF_Rect& rect) {} + virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } + + virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions) {} + public: - CPDF_Annot* GetPDFAnnot(); + CPDF_Page* GetPDFPage(); + CPDFXFA_Page* GetPDFXFAPage(); - void SetPage(CPDFSDK_PageView* pPageView); - CPDFSDK_PageView* GetPageView(); - FX_DWORD GetFlags(); + void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } + CPDFSDK_PageView* GetPageView() { return m_pPageView; } // Tab Order int GetTabOrder(); @@ -84,17 +97,35 @@ public: FX_BOOL IsSelected(); void SetSelected(FX_BOOL bSelected); - CFX_ByteString GetType() const; +protected: + CPDF_Annot* m_pAnnot; + CPDFSDK_PageView* m_pPageView; + FX_BOOL m_bSelected; + int m_nTabOrder; + +}; + +class CPDFSDK_BAAnnot : public CPDFSDK_Annot +{ +public: + CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); + virtual ~CPDFSDK_BAAnnot(); + +public: + virtual FX_BOOL IsXFAField(); + + virtual CFX_ByteString GetType() const; virtual CFX_ByteString GetSubType() const; - CPDF_Page* GetPDFPage(); + virtual void SetRect(const CPDF_Rect& rect); + virtual CPDF_Rect GetRect() const; + + virtual CPDF_Annot* GetPDFAnnot(); + virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions); public: CPDF_Dictionary* GetAnnotDict() const; - void SetRect(const CPDF_Rect& rect); - CPDF_Rect GetRect() const; - void SetContents(const CFX_WideString& sContents); CFX_WideString GetContents() const; @@ -151,32 +182,24 @@ public: virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); public: - FX_BOOL IsAppearanceValid(); - FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode); - void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, + virtual FX_BOOL IsAppearanceValid(); + virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode); + virtual void DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOptions); void DrawBorder(CFX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, const CPDF_RenderOptions* pOptions); void ClearCachedAP(); + virtual void ResetAppearance(); void WriteAppearance(const CFX_ByteString& sAPType, const CPDF_Rect& rcBBox, const CPDF_Matrix& matrix, const CFX_ByteString& sContents, const CFX_ByteString& sAPState = ""); -public: - virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,CPDF_RenderOptions* pOptions); -public: - - private: FX_BOOL CreateFormFiller(); protected: CPDF_Annot* m_pAnnot; - CPDFSDK_PageView* m_pPageView; - FX_BOOL m_bSelected; - int m_nTabOrder; - }; |