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
cffl_perwindowdata.h
Go to the documentation of this file.
1// Copyright 2020 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_FORMFILLER_CFFL_PERWINDOWDATA_H_
8#define FPDFSDK_FORMFILLER_CFFL_PERWINDOWDATA_H_
9
10#include <memory>
11
12#include "core/fxcrt/observed_ptr.h"
13#include "core/fxcrt/unowned_ptr.h"
14#include "fpdfsdk/pwl/ipwl_fillernotify.h"
15
16class CFFL_FormField;
17class CPDFSDK_PageView;
18class CPDFSDK_Widget;
19
20class CFFL_PerWindowData final : public IPWL_FillerNotify::PerWindowData {
21 public:
22 CFFL_PerWindowData(CPDFSDK_Widget* pWidget,
23 const CPDFSDK_PageView* pPageView,
24 uint32_t nAppearanceAge,
25 uint32_t nValueAge);
26 CFFL_PerWindowData& operator=(const CFFL_PerWindowData& that) = delete;
27 ~CFFL_PerWindowData() override;
28
29 // IPWL_FillerNotify::PerWindowData:
31
32 CPDFSDK_Widget* GetWidget() const { return m_pWidget.Get(); }
33 const CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
34 bool AppearanceAgeEquals(uint32_t age) const {
35 return age == m_nAppearanceAge;
36 }
37 uint32_t GetValueAge() const { return m_nValueAge; }
38
39 void SetFormField(CFFL_FormField* pFormField) { m_pFormField = pFormField; }
40 CFFL_FormField* GetFormField() { return m_pFormField; }
41
42 private:
43 CFFL_PerWindowData(const CFFL_PerWindowData& that);
44
45 ObservedPtr<CPDFSDK_Widget> m_pWidget;
46 UnownedPtr<const CPDFSDK_PageView> const m_pPageView;
47 UnownedPtr<CFFL_FormField> m_pFormField;
48 const uint32_t m_nAppearanceAge;
49 const uint32_t m_nValueAge;
50};
51
52#endif // FPDFSDK_FORMFILLER_CFFL_PERWINDOWDATA_H_
bool OnChar(CPDFSDK_Widget *pWidget, uint32_t nChar, Mask< FWL_EVENTFLAG > nFlags) override
void SavePWLWindowState(const CPDFSDK_PageView *pPageView) override
void SaveData(const CPDFSDK_PageView *pPageView) override
std::unique_ptr< CPWL_Wnd > NewPWLWindow(const CPWL_Wnd::CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData) override
void RecreatePWLWindowFromSavedState(const CPDFSDK_PageView *pPageView) override
void GetActionData(const CPDFSDK_PageView *pPageView, CPDF_AAction::AActionType type, CFFL_FieldAction &fa) override
bool IsDataChanged(const CPDFSDK_PageView *pPageView) override
~CFFL_ComboBox() override
CPWL_Wnd::CreateParams GetCreateParam() override
CFFL_ComboBox(CFFL_InteractiveFormFiller *pFormFiller, CPDFSDK_Widget *pWidget)
void SetActionData(const CPDFSDK_PageView *pPageView, CPDF_AAction::AActionType type, const CFFL_FieldAction &fa) override
bool IsIndexSelected(int index) override
bool SetIndexSelected(int index, bool selected) override
void OnSetFocusForEdit(CPWL_Edit *pEdit) override
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)
virtual CPWL_Wnd::CreateParams GetCreateParam()
CPDFSDK_PageView * GetCurPageView()
bool IsValid() const
void SetFormField(CFFL_FormField *pFormField)
CFFL_FormField * GetFormField()
std::unique_ptr< IPWL_FillerNotify::PerWindowData > Clone() const override
uint32_t GetValueAge() const
CFFL_PerWindowData & operator=(const CFFL_PerWindowData &that)=delete
const CPDFSDK_PageView * GetPageView() const
bool AppearanceAgeEquals(uint32_t age) const
CPDFSDK_Widget * GetWidget() const
CFFL_PerWindowData(CPDFSDK_Widget *pWidget, const CPDFSDK_PageView *pPageView, uint32_t nAppearanceAge, uint32_t nValueAge)
~CFFL_PerWindowData() override
~CFFL_TextObject() override
CPDF_BAFontMap * GetOrCreateFontMap()
CFFL_TextObject(CFFL_InteractiveFormFiller *pFormFiller, CPDFSDK_Widget *pWidget)
CPWL_Wnd * ResetPWLWindow(const CPDFSDK_PageView *pPageView) override
CPWL_Wnd * RestorePWLWindow(const CPDFSDK_PageView *pPageView) override
void SetSelect(int32_t nItemIndex)
int32_t GetSelect() const
WideString GetText() override
CPWL_Edit * GetEdit() const
bool IsTextFull() const
WideString GetText() override
void SetCharSet(FX_Charset nCharSet)
Definition cpwl_edit.h:81
void SetSelection(int32_t nStartChar, int32_t nEndChar)
std::pair< int32_t, int32_t > GetSelection() const
void ReplaceSelection(const WideString &text) override
void SetReadyToInput()
#define PCBS_ALLOWCUSTOMTEXT
Definition cpwl_wnd.h:59
FX_Charset
Definition fx_codepage.h:70
@ kChineseSimplified