diff options
author | jaepark <jaepark@google.com> | 2016-08-29 17:15:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-29 17:15:08 -0700 |
commit | 35512aa7e4acc3ceb9c6aef5d61eebfb4ae802af (patch) | |
tree | 18ad1447ba8a7d06f304e1418616d919eadbbf8c /core/fpdfdoc/include/cpdf_annot.h | |
parent | 07f5fd57682700bcbba20f01d52a806676fd02ff (diff) | |
download | pdfium-35512aa7e4acc3ceb9c6aef5d61eebfb4ae802af.tar.xz |
Display content of the annotation when mouse hover.
Each annotation has its contents, and users should be able to see the
contents. In this patch, PDFium creates a Popup annotation for each
annotation and stores the author and the content. When a user mouse
hover on the annotation, PDFium draws the corresponding Popup annotation
and displays the content.
Also, roll DEPS for testing/corpus to 5867fa6.
BUG=62625
Review-Url: https://codereview.chromium.org/2273893002
Diffstat (limited to 'core/fpdfdoc/include/cpdf_annot.h')
-rw-r--r-- | core/fpdfdoc/include/cpdf_annot.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfdoc/include/cpdf_annot.h b/core/fpdfdoc/include/cpdf_annot.h index 914393a818..416c540cc3 100644 --- a/core/fpdfdoc/include/cpdf_annot.h +++ b/core/fpdfdoc/include/cpdf_annot.h @@ -61,6 +61,9 @@ class CPDF_Annot { const CFX_Matrix* pUser2Device, const CPDF_RenderOptions* pOptions); CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); + void SetOpenState(bool bOpenState) { m_bOpenState = bOpenState; } + CPDF_Annot* GetPopupAnnot() const { return m_pPopupAnnot; } + void SetPopupAnnot(CPDF_Annot* pAnnot) { m_pPopupAnnot = pAnnot; } private: void GenerateAPIfNeeded(); @@ -69,6 +72,11 @@ class CPDF_Annot { CPDF_Document* const m_pDocument; const CFX_ByteString m_sSubtype; std::map<CPDF_Stream*, std::unique_ptr<CPDF_Form>> m_APMap; + // |m_bOpenState| is only set for popup annotations. + bool m_bOpenState; + // Not owned. If there is a valid pointer in |m_pPopupAnnot|, + // then this annot is never a popup. + CPDF_Annot* m_pPopupAnnot; }; CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, |