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_combobox.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_FORMFILLER_CFFL_COMBOBOX_H_
8#define FPDFSDK_FORMFILLER_CFFL_COMBOBOX_H_
9
10#include <memory>
11
12#include "core/fxcrt/widestring.h"
13#include "fpdfsdk/formfiller/cffl_textobject.h"
14
15class CPWL_ComboBox;
16
18 int nIndex = 0;
19 int nStart = 0;
20 int nEnd = 0;
21 WideString sValue;
22};
23
24class CFFL_ComboBox final : public CFFL_TextObject {
25 public:
26 CFFL_ComboBox(CFFL_InteractiveFormFiller* pFormFiller,
27 CPDFSDK_Widget* pWidget);
28 ~CFFL_ComboBox() override;
29
30 // CFFL_TextObject:
33 const CPWL_Wnd::CreateParams& cp,
34 std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
35 bool OnChar(CPDFSDK_Widget* pWidget,
36 uint32_t nChar,
37 Mask<FWL_EVENTFLAG> nFlags) override;
38 bool IsDataChanged(const CPDFSDK_PageView* pPageView) override;
39 void SaveData(const CPDFSDK_PageView* pPageView) override;
40 void GetActionData(const CPDFSDK_PageView* pPageView,
42 CFFL_FieldAction& fa) override;
43 void SetActionData(const CPDFSDK_PageView* pPageView,
45 const CFFL_FieldAction& fa) override;
46 void SavePWLWindowState(const CPDFSDK_PageView* pPageView) override;
48 const CPDFSDK_PageView* pPageView) override;
49 bool SetIndexSelected(int index, bool selected) override;
50 bool IsIndexSelected(int index) override;
51#ifdef PDF_ENABLE_XFA
52 bool IsFieldFull(const CPDFSDK_PageView* pPageView) override;
53#endif
54
55 // CPWL_Wnd::ProviderIface:
56 void OnSetFocusForEdit(CPWL_Edit* pEdit) override;
57
58 private:
59 WideString GetSelectExportText();
60 CPWL_ComboBox* GetPWLComboBox(const CPDFSDK_PageView* pPageView) const;
61 CPWL_ComboBox* CreateOrUpdatePWLComboBox(const CPDFSDK_PageView* pPageView);
62
63 FFL_ComboBoxState m_State;
64};
65
66#endif // FPDFSDK_FORMFILLER_CFFL_COMBOBOX_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)
CPDF_BAFontMap * GetOrCreateFontMap()
CFFL_TextObject(CFFL_InteractiveFormFiller *pFormFiller, CPDFSDK_Widget *pWidget)
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