blob: 1d71585a3596c494a8cf9e15925e778998d55f8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef FPDFSDK_CPDFSDK_BAANNOT_H_
#define FPDFSDK_CPDFSDK_BAANNOT_H_
#include "core/fpdfdoc/cpdf_aaction.h"
#include "core/fpdfdoc/cpdf_action.h"
#include "core/fpdfdoc/cpdf_annot.h"
#include "core/fpdfdoc/cpdf_defaultappearance.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_string.h"
#include "fpdfsdk/cfx_systemhandler.h"
#include "fpdfsdk/cpdfsdk_annot.h"
class CFX_Matrix;
class CFX_RenderDevice;
class CPDF_Dictionary;
class CPDF_RenderOptions;
class CPDFSDK_PageView;
class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
public:
CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
~CPDFSDK_BAAnnot() override;
// CPDFSDK_Annot
CPDF_Annot::Subtype GetAnnotSubtype() const override;
void SetRect(const CFX_FloatRect& rect) override;
CFX_FloatRect GetRect() const override;
CPDF_Annot* GetPDFAnnot() const override;
CPDF_Dictionary* GetAnnotDict() const;
CPDF_Annot* GetPDFPopupAnnot() const;
CPDF_Dictionary* GetAPDict() const;
void SetContents(const WideString& sContents);
WideString GetContents() const;
void SetAnnotName(const WideString& sName);
WideString GetAnnotName() const;
void SetModifiedDate(const FX_SYSTEMTIME& st);
FX_SYSTEMTIME GetModifiedDate() const;
void SetFlags(uint32_t nFlags);
uint32_t GetFlags() const;
void SetAppState(const ByteString& str);
ByteString GetAppState() const;
void SetStructParent(int key);
int GetStructParent() const;
void SetBorderWidth(int nWidth);
int GetBorderWidth() const;
void SetBorderStyle(BorderStyle nStyle);
BorderStyle GetBorderStyle() const;
void SetColor(FX_COLORREF color);
void RemoveColor();
bool GetColor(FX_COLORREF& color) const;
bool IsVisible() const;
CPDF_Action GetAction() const;
void SetAction(const CPDF_Action& a);
void RemoveAction();
CPDF_AAction GetAAction() const;
void SetAAction(const CPDF_AAction& aa);
void RemoveAAction();
virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
virtual bool IsAppearanceValid();
virtual bool IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
virtual void DrawAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device,
CPDF_Annot::AppearanceMode mode,
const CPDF_RenderOptions* pOptions);
void DrawBorder(CFX_RenderDevice* pDevice,
const CFX_Matrix* pUser2Device,
const CPDF_RenderOptions* pOptions);
void ClearCachedAP();
void SetOpenState(bool bState);
protected:
CFX_UnownedPtr<CPDF_Annot> const m_pAnnot;
};
#endif // FPDFSDK_CPDFSDK_BAANNOT_H_
|