kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 1 | // Copyright 2014 The PDFium Authors |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 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_PWL_CPWL_BUTTON_H_ |
| 8 | #define FPDFSDK_PWL_CPWL_BUTTON_H_ |
| 9 | |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 10 | #include <memory> |
| 11 | |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 12 | #include "fpdfsdk/pwl/cpwl_wnd.h" |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 13 | #include "fpdfsdk/pwl/ipwl_fillernotify.h" |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 14 | |
| 15 | class CPWL_Button : public CPWL_Wnd { |
| 16 | public: |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 17 | CPWL_Button(const CreateParams& cp, |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 18 | std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData); |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 19 | ~CPWL_Button() override; |
| 20 | |
| 21 | // CPWL_Wnd |
kumarashishg | 826308d | 2023-06-23 13:21:22 +0000 | [diff] [blame] | 22 | bool OnLButtonDown(Mask<FWL_EVENTFLAG> nFlag, |
| 23 | const CFX_PointF& point) override; |
| 24 | bool OnLButtonUp(Mask<FWL_EVENTFLAG> nFlag, const CFX_PointF& point) override; |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 25 | |
| 26 | protected: |
Haibo Huang | 49cc930 | 2020-04-27 16:14:24 -0700 | [diff] [blame] | 27 | bool m_bMouseDown = false; |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | #endif // FPDFSDK_PWL_CPWL_BUTTON_H_ |