blob: 9501037cd62921c81464f26e9c643eeb9d0612e6 [file] [log] [blame]
jaepark27362762016-08-11 13:10:39 -07001// Copyright 2016 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 FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_
8#define FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_
9
10#include "core/fpdfdoc/include/cpdf_aaction.h"
11#include "core/fpdfdoc/include/cpdf_annot.h"
12#include "core/fpdfdoc/include/cpdf_defaultappearance.h"
13#include "core/fxcrt/include/fx_basic.h"
14#include "fpdfsdk/cfx_systemhandler.h"
15#include "fpdfsdk/include/fsdk_common.h"
16#include "fpdfsdk/include/fsdk_define.h"
17
18class CFX_Matrix;
19class CFX_RenderDevice;
20class CPDF_Page;
21class CPDF_RenderOptions;
22class CPDFSDK_PageView;
23
24class CPDFSDK_Annot {
25 public:
26 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
27 virtual ~CPDFSDK_Annot();
28
29#ifdef PDF_ENABLE_XFA
30 virtual FX_BOOL IsXFAField();
31 virtual CXFA_FFWidget* GetXFAWidget() const;
32#endif // PDF_ENABLE_XFA
33
34 virtual FX_FLOAT GetMinWidth() const;
35 virtual FX_FLOAT GetMinHeight() const;
36 virtual int GetLayoutOrder() const;
37 virtual CPDF_Annot* GetPDFAnnot() const;
jaepark9ed91372016-08-26 16:16:10 -070038 virtual CFX_ByteString GetAnnotSubtype() const;
39 virtual bool IsSignatureWidget() const;
jaepark27362762016-08-11 13:10:39 -070040 virtual CFX_FloatRect GetRect() const;
41
42 virtual void SetRect(const CFX_FloatRect& rect);
43 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
44 CFX_Matrix* pUser2Device,
45 CPDF_RenderOptions* pOptions);
46
47 UnderlyingPageType* GetUnderlyingPage();
48 CPDF_Page* GetPDFPage();
49#ifdef PDF_ENABLE_XFA
50 CPDFXFA_Page* GetPDFXFAPage();
51#endif // PDF_ENABLE_XFA
52
53 void SetPage(CPDFSDK_PageView* pPageView);
54 CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
55
jaepark27362762016-08-11 13:10:39 -070056 FX_BOOL IsSelected();
57 void SetSelected(FX_BOOL bSelected);
58
59 protected:
60 CPDFSDK_PageView* m_pPageView;
61 FX_BOOL m_bSelected;
jaepark27362762016-08-11 13:10:39 -070062};
63
64#endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOT_H_