Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpwl_button.cpp
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
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#include "fpdfsdk/pwl/cpwl_button.h"
8
9#include <utility>
10
12 const CreateParams& cp,
13 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
14 : CPWL_Wnd(cp, std::move(pAttachedData)) {
16}
17
18CPWL_Button::~CPWL_Button() = default;
19
20bool CPWL_Button::OnLButtonDown(Mask<FWL_EVENTFLAG> nFlag,
21 const CFX_PointF& point) {
23 m_bMouseDown = true;
24 SetCapture();
25 return true;
26}
27
28bool CPWL_Button::OnLButtonUp(Mask<FWL_EVENTFLAG> nFlag,
29 const CFX_PointF& point) {
30 CPWL_Wnd::OnLButtonUp(nFlag, point);
32 m_bMouseDown = false;
33 return true;
34}
CPWL_Button(const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
~CPWL_Button() override
bool OnLButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnLButtonDown(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool m_bMouseDown
Definition cpwl_button.h:27
void SetCapture()
Definition cpwl_wnd.cpp:518
void ReleaseCapture()
Definition cpwl_wnd.cpp:524
virtual bool OnLButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)
CreateParams * GetCreationParams()
Definition cpwl_wnd.h:238
virtual bool OnLButtonDown(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)