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
cxfa_ffcombobox.h
Go to the documentation of this file.
1// Copyright 2017 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 XFA_FXFA_CXFA_FFCOMBOBOX_H_
8#define XFA_FXFA_CXFA_FFCOMBOBOX_H_
9
10#include "v8/include/cppgc/member.h"
11#include "xfa/fxfa/cxfa_ffdropdown.h"
12
13class CXFA_EventParam;
14
15class CXFA_FFComboBox final : public CXFA_FFDropDown {
16 public:
18 ~CXFA_FFComboBox() override;
19
20 void Trace(cppgc::Visitor* visitor) const override;
21
22 // CXFA_FFDropDown:
23 CXFA_FFComboBox* AsComboBox() override;
24
25 // CXFA_FFField
26 CFX_RectF GetBBox(FocusOption focus) override;
27 bool LoadWidget() override;
28 void UpdateWidgetProperty() override;
29 bool OnRButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags,
30 const CFX_PointF& point) override;
31 [[nodiscard]] bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
32 bool CanUndo() override;
33 bool CanRedo() override;
34 bool CanCopy() override;
35 bool CanCut() override;
36 bool CanPaste() override;
37 bool CanSelectAll() override;
38 bool Undo() override;
39 bool Redo() override;
40 absl::optional<WideString> Copy() override;
41 absl::optional<WideString> Cut() override;
42 bool Paste(const WideString& wsPaste) override;
43 void SelectAll() override;
44 void Delete() override;
45 void DeSelect() override;
46 WideString GetText() override;
48
49 // IFWL_WidgetDelegate
50 void OnProcessMessage(CFWL_Message* pMessage) override;
51 void OnProcessEvent(CFWL_Event* pEvent) override;
52 void OnDrawWidget(CFGAS_GEGraphics* pGraphics,
53 const CFX_Matrix& matrix) override;
54
55 // CXFA_FFDropDown
56 void InsertItem(const WideString& wsLabel, int32_t nIndex) override;
57 void DeleteItem(int32_t nIndex) override;
58
59 void OpenDropDownList();
60
61 void OnTextChanged(CFWL_Widget* pWidget, const WideString& wsChanged);
62 void OnSelectChanged(CFWL_Widget* pWidget, bool bLButtonUp);
63 void OnPreOpen(CFWL_Widget* pWidget);
64 void OnPostOpen(CFWL_Widget* pWidget);
65 void SetItemState(int32_t nIndex, bool bSelected);
66
67 private:
68 explicit CXFA_FFComboBox(CXFA_Node* pNode);
69
70 // CXFA_FFField:
71 bool PtInActiveRect(const CFX_PointF& point) override;
72 bool CommitData() override;
73 bool UpdateFWLData() override;
74 bool IsDataChanged() override;
75
76 uint32_t GetAlignment();
77 void FWLEventSelChange(CXFA_EventParam* pParam);
78 WideString GetCurrentText() const;
79
80 WideString m_wsNewValue;
81 cppgc::Member<IFWL_WidgetDelegate> m_pOldDelegate;
82};
83
84#endif // XFA_FXFA_CXFA_FFCOMBOBOX_H_
#define FWL_STYLEEXT_CMB_ListItemLeftAlign
#define FWL_STYLEEXT_CMB_EditVCenter
#define FWL_STYLEEXT_CMB_EditVFar
#define FWL_STYLEEXT_CMB_DropDown
#define FWL_STYLEEXT_CMB_ListItemCenterAlign
#define FWL_STYLEEXT_CMB_EditVNear
#define FWL_STYLEEXT_CMB_EditHNear
#define FWL_STYLEEXT_CMB_EditHCenter
#define FWL_STYLEEXT_CMB_ReadOnly
#define FWL_STYLEEXT_CMB_EditJustified
#define FWL_STYLEEXT_EDT_AutoHScroll
Definition cfwl_edit.h:22
#define FWL_STYLEEXT_EDT_ReadOnly
Definition cfwl_edit.h:19
void SetCurSel(int32_t iSel)
Type GetType() const
Definition cfwl_event.h:39
void RegisterEventTarget(CFWL_Widget *pListener, CFWL_Widget *pEventSource)
void SetDelegate(IFWL_WidgetDelegate *delegate)
void SetAdapterIface(AdapterIface *pItem)
CFWL_App * GetFWLApp() const
constexpr CFX_RectF()=default
XFA_EVENTTYPE m_eType
CXFA_EventParam(XFA_EVENTTYPE type)
void Trace(cppgc::Visitor *visitor) const override
bool CanRedo() override
void OnPostOpen(CFWL_Widget *pWidget)
void DeleteItem(int32_t nIndex) override
bool PtInActiveRect(const CFX_PointF &point) override
void Delete() override
bool LoadWidget() override
bool OnKillFocus(CXFA_FFWidget *pNewWidget) override
void OnPreOpen(CFWL_Widget *pWidget)
bool CanCut() override
bool CanUndo() override
void UpdateWidgetProperty() override
void OnProcessEvent(CFWL_Event *pEvent) override
void OnSelectChanged(CFWL_Widget *pWidget, bool bLButtonUp)
bool Paste(const WideString &wsPaste) override
bool OnRButtonUp(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
bool CanPaste() override
bool UpdateFWLData() override
CFX_RectF GetBBox(FocusOption focus) override
void SetItemState(int32_t nIndex, bool bSelected)
bool CanCopy() override
bool Undo() override
bool CanSelectAll() override
void OnTextChanged(CFWL_Widget *pWidget, const WideString &wsChanged)
FormFieldType GetFormFieldType() override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void DeSelect() override
~CXFA_FFComboBox() override
bool Redo() override
void OnProcessMessage(CFWL_Message *pMessage) override
bool IsDataChanged() override
absl::optional< WideString > Cut() override
CXFA_FFComboBox * AsComboBox() override
absl::optional< WideString > Copy() override
bool CommitData() override
void InsertItem(const WideString &wsLabel, int32_t nIndex) override
WideString GetText() override
void SelectAll() override
CXFA_FFDropDown(CXFA_Node *pNode)
bool OnKillFocus(CXFA_FFWidget *pNewWidget) override
bool ProcessCommittedData()
bool LoadWidget() override
bool OnRButtonUp(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
void SetNormalWidget(CFWL_Widget *widget)
void OnProcessEvent(CFWL_Event *pEvent) override
uint32_t UpdateUIProperty()
virtual CFX_RectF GetBBox(FocusOption focus)
CXFA_FFDoc * GetDoc()
XFA_AttributeValue GetHorizontalAlign()
Definition cxfa_para.cpp:57
XFA_AttributeValue GetVerticalAlign()
Definition cxfa_para.cpp:63
FormFieldType
@ XFA_EVENT_PostOpen
@ XFA_EVENT_PreOpen
@ XFA_EVENT_Change
@ XFA_EVENT_Unknown
XFA_FWL_KeyFlag
XFA_AttributeValue
Definition fxfa_basic.h:60
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12