blob: 3ab798105103e0a1422160961afd48059d24a739 [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
dsinclair114e46a2016-09-29 17:18:21 -07007#ifndef FPDFSDK_CPDFSDK_ANNOT_H_
8#define FPDFSDK_CPDFSDK_ANNOT_H_
jaepark27362762016-08-11 13:10:39 -07009
dsinclair1727aee2016-09-29 13:12:56 -070010#include "core/fpdfdoc/cpdf_aaction.h"
11#include "core/fpdfdoc/cpdf_annot.h"
12#include "core/fpdfdoc/cpdf_defaultappearance.h"
dsinclaira52ab742016-09-29 13:59:29 -070013#include "core/fxcrt/cfx_observable.h"
Tom Sepezd0409af2017-05-25 15:53:57 -070014#include "core/fxcrt/cfx_unowned_ptr.h"
dsinclaira52ab742016-09-29 13:59:29 -070015#include "core/fxcrt/fx_basic.h"
jaepark27362762016-08-11 13:10:39 -070016#include "fpdfsdk/cfx_systemhandler.h"
dsinclair114e46a2016-09-29 17:18:21 -070017#include "fpdfsdk/fsdk_common.h"
18#include "fpdfsdk/fsdk_define.h"
jaepark27362762016-08-11 13:10:39 -070019
20class CFX_Matrix;
21class CFX_RenderDevice;
22class CPDF_Page;
23class CPDF_RenderOptions;
24class CPDFSDK_PageView;
25
tsepez7b68f612016-09-07 14:11:27 -070026class CPDFSDK_Annot : public CFX_Observable<CPDFSDK_Annot> {
jaepark27362762016-08-11 13:10:39 -070027 public:
28 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
29 virtual ~CPDFSDK_Annot();
30
31#ifdef PDF_ENABLE_XFA
tsepez4cf55152016-11-02 14:37:54 -070032 virtual bool IsXFAField();
jaepark27362762016-08-11 13:10:39 -070033 virtual CXFA_FFWidget* GetXFAWidget() const;
34#endif // PDF_ENABLE_XFA
35
Dan Sinclair05df0752017-03-14 14:43:42 -040036 virtual float GetMinWidth() const;
37 virtual float GetMinHeight() const;
jaepark27362762016-08-11 13:10:39 -070038 virtual int GetLayoutOrder() const;
39 virtual CPDF_Annot* GetPDFAnnot() const;
jaepark956553e2016-08-31 06:49:27 -070040 virtual CPDF_Annot::Subtype GetAnnotSubtype() const;
jaepark9ed91372016-08-26 16:16:10 -070041 virtual bool IsSignatureWidget() const;
jaepark27362762016-08-11 13:10:39 -070042 virtual CFX_FloatRect GetRect() const;
jaepark27362762016-08-11 13:10:39 -070043 virtual void SetRect(const CFX_FloatRect& rect);
jaepark27362762016-08-11 13:10:39 -070044
45 UnderlyingPageType* GetUnderlyingPage();
46 CPDF_Page* GetPDFPage();
47#ifdef PDF_ENABLE_XFA
48 CPDFXFA_Page* GetPDFXFAPage();
49#endif // PDF_ENABLE_XFA
50
Tom Sepezd0409af2017-05-25 15:53:57 -070051 CPDFSDK_PageView* GetPageView() const { return m_pPageView.Get(); }
jaepark27362762016-08-11 13:10:39 -070052
jaepark27362762016-08-11 13:10:39 -070053 protected:
Lei Zhang3db87592017-06-02 12:48:22 -070054 CFX_UnownedPtr<CPDFSDK_PageView> const m_pPageView;
jaepark27362762016-08-11 13:10:39 -070055};
56
dsinclair114e46a2016-09-29 17:18:21 -070057#endif // FPDFSDK_CPDFSDK_ANNOT_H_