diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-10 11:35:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-10 15:51:02 +0000 |
commit | b9eed2f50403e59c7aa414e272ae732d9bca0a7b (patch) | |
tree | 35c7e377169229b0b4688ad3d3f6488805eae542 /fpdfsdk/formfiller/cffl_button.h | |
parent | 217644c0d65abfc9729c083074d505b22cd7ccf6 (diff) | |
download | pdfium-b9eed2f50403e59c7aa414e272ae732d9bca0a7b.tar.xz |
Fix nits in CFFL_FormFiller
Cleanup nits in CFFL_FormFiller. Split CFFL_Button into own files.
Change-Id: I41fa7118a46aa1f495c15f90a4c4b77b309a10d3
Reviewed-on: https://pdfium-review.googlesource.com/7339
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/formfiller/cffl_button.h')
-rw-r--r-- | fpdfsdk/formfiller/cffl_button.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/fpdfsdk/formfiller/cffl_button.h b/fpdfsdk/formfiller/cffl_button.h new file mode 100644 index 0000000000..37c294dbf0 --- /dev/null +++ b/fpdfsdk/formfiller/cffl_button.h @@ -0,0 +1,56 @@ +// Copyright 2017 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_FORMFILLER_CFFL_BUTTON_H_ +#define FPDFSDK_FORMFILLER_CFFL_BUTTON_H_ + +#include "core/fxcrt/fx_coordinates.h" +#include "fpdfsdk/formfiller/cffl_formfiller.h" + +class CFX_RenderDevice; +class CFX_Matrix; +class CPDFSDK_Annot; +class CPDFSDK_FormFillEnvironment; +class CPDFSDK_PageView; +class CPDFSDK_Widget; + +class CFFL_Button : public CFFL_FormFiller { + public: + CFFL_Button(CPDFSDK_FormFillEnvironment* pFormFillEnv, + CPDFSDK_Widget* pWidget); + ~CFFL_Button() override; + + // CFFL_FormFiller + void OnMouseEnter(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot) override; + void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) override; + bool OnLButtonDown(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_PointF& point) override; + bool OnLButtonUp(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_PointF& point) override; + bool OnMouseMove(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + uint32_t nFlags, + const CFX_PointF& point) override; + void OnDraw(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device) override; + void OnDrawDeactive(CPDFSDK_PageView* pPageView, + CPDFSDK_Annot* pAnnot, + CFX_RenderDevice* pDevice, + CFX_Matrix* pUser2Device) override; + + private: + bool m_bMouseIn; + bool m_bMouseDown; +}; + +#endif // FPDFSDK_FORMFILLER_CFFL_BUTTON_H_ |