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_special_button.h
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#ifndef FPDFSDK_PWL_CPWL_SPECIAL_BUTTON_H_
8#define FPDFSDK_PWL_CPWL_SPECIAL_BUTTON_H_
9
10#include <memory>
11
12#include "fpdfsdk/pwl/cpwl_button.h"
13
14class CPWL_PushButton final : public CPWL_Button {
15 public:
17 const CreateParams& cp,
18 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
19 ~CPWL_PushButton() override;
20
21 // CPWL_Button:
22 CFX_FloatRect GetFocusRect() const override;
23};
24
25class CPWL_CheckBox final : public CPWL_Button {
26 public:
28 const CreateParams& cp,
29 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
30 ~CPWL_CheckBox() override;
31
32 // CPWL_Button:
33 bool OnLButtonUp(Mask<FWL_EVENTFLAG> nFlag, const CFX_PointF& point) override;
34 bool OnChar(uint16_t nChar, Mask<FWL_EVENTFLAG> nFlag) override;
35
36 bool IsChecked() const { return m_bChecked; }
37 void SetCheck(bool bCheck) { m_bChecked = bCheck; }
38
39 private:
40 bool m_bChecked = false;
41};
42
43class CPWL_RadioButton final : public CPWL_Button {
44 public:
46 const CreateParams& cp,
47 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
48 ~CPWL_RadioButton() override;
49
50 // CPWL_Button
51 bool OnLButtonUp(Mask<FWL_EVENTFLAG> nFlag, const CFX_PointF& point) override;
52 bool OnChar(uint16_t nChar, Mask<FWL_EVENTFLAG> nFlag) override;
53
54 bool IsChecked() const { return m_bChecked; }
55 void SetCheck(bool bCheck) { m_bChecked = bCheck; }
56
57 private:
58 bool m_bChecked = false;
59};
60
61#endif // FPDFSDK_PWL_CPWL_SPECIAL_BUTTON_H_
CFFL_Button(CFFL_InteractiveFormFiller *pFormFiller, CPDFSDK_Widget *pWidget)
bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Widget *pWidget, Mask< FWL_EVENTFLAG > nFlags, const CFX_PointF &point) override
~CFFL_CheckBox() override
bool IsDataChanged(const CPDFSDK_PageView *pPageView) override
bool OnKeyDown(FWL_VKEYCODE nKeyCode, Mask< FWL_EVENTFLAG > nFlags) override
std::unique_ptr< CPWL_Wnd > NewPWLWindow(const CPWL_Wnd::CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData) override
bool OnChar(CPDFSDK_Widget *pWidget, uint32_t nChar, Mask< FWL_EVENTFLAG > nFlags) override
bool OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Widget *pWidget, Mask< FWL_EVENTFLAG > nFlags, const CFX_PointF &point) override
void SaveData(const CPDFSDK_PageView *pPageView) override
CFFL_CheckBox(CFFL_InteractiveFormFiller *pFormFiller, CPDFSDK_Widget *pWidget)
virtual bool OnChar(CPDFSDK_Widget *pAnnot, uint32_t nChar, Mask< FWL_EVENTFLAG > nFlags)
CPWL_Wnd * GetPWLWindow(const CPDFSDK_PageView *pPageView) const
CPWL_Wnd * CreateOrUpdatePWLWindow(const CPDFSDK_PageView *pPageView)
bool CommitData(const CPDFSDK_PageView *pPageView, Mask< FWL_EVENTFLAG > nFlag)
virtual bool OnKeyDown(FWL_VKEYCODE nKeyCode, Mask< FWL_EVENTFLAG > nFlags)
bool IsValid() const
CPDFSDK_PageView * GetPageView() const
bool IsChecked() const
bool OnChar(uint16_t nChar, Mask< FWL_EVENTFLAG > nFlag) override
~CPWL_CheckBox() override
CPWL_CheckBox(const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
bool IsChecked() const
void SetCheck(bool bCheck)
bool OnLButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
CFX_FloatRect GetFocusRect() const override
CPWL_PushButton(const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
~CPWL_PushButton() override
~CPWL_RadioButton() override
void SetCheck(bool bCheck)
bool OnChar(uint16_t nChar, Mask< FWL_EVENTFLAG > nFlag) override
CPWL_RadioButton(const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
bool OnLButtonUp(Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool IsReadOnly() const
Definition cpwl_wnd.cpp:610
@ FWL_VKEY_Space
@ FWL_VKEY_Return
constexpr uint8_t kEscape
Definition ascii.h:24
constexpr uint8_t kReturn
Definition ascii.h:20
constexpr uint8_t kControlC
Definition ascii.h:16
constexpr uint8_t kNul
Definition ascii.h:13
constexpr uint8_t kControlZ
Definition ascii.h:23
constexpr uint8_t kSpace
Definition ascii.h:25
constexpr uint8_t kBackspace
Definition ascii.h:17
constexpr uint8_t kControlX
Definition ascii.h:22
constexpr uint8_t kControlB
Definition ascii.h:15
constexpr uint8_t kTab
Definition ascii.h:18
constexpr uint8_t kNewline
Definition ascii.h:19
constexpr uint8_t kControlV
Definition ascii.h:21
constexpr uint8_t kControlA
Definition ascii.h:14