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_fffield.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 XFA_FXFA_CXFA_FFFIELD_H_
8#define XFA_FXFA_CXFA_FFFIELD_H_
9
10#include "xfa/fwl/cfwl_widget.h"
11#include "xfa/fwl/ifwl_widgetdelegate.h"
12#include "xfa/fxfa/cxfa_ffpageview.h"
13#include "xfa/fxfa/cxfa_ffwidget.h"
14
15class CXFA_FFDropDown;
16class CXFA_Node;
17
19 public:
21
23 ~CXFA_FFField() override;
24
25 virtual CXFA_FFDropDown* AsDropDown();
26
27 // CXFA_FFWidget:
28 void Trace(cppgc::Visitor* visitor) const override;
29 CXFA_FFField* AsField() override;
30 CFX_RectF GetBBox(FocusOption focus) override;
32 const CFX_Matrix& matrix,
33 HighlightOption highlight) override;
34 bool IsLoaded() override;
35 bool LoadWidget() override;
36 bool PerformLayout() override;
38 Mask<XFA_FWL_KeyFlag> dwFlags,
39 const CFX_PointF& point,
40 CFWL_MessageMouse::MouseCommand command) override;
41 bool OnMouseEnter() override;
42 bool OnMouseExit() override;
44 const CFX_PointF& point) override;
45 bool OnLButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags,
46 const CFX_PointF& point) override;
48 const CFX_PointF& point) override;
49 bool OnMouseMove(Mask<XFA_FWL_KeyFlag> dwFlags,
50 const CFX_PointF& point) override;
51 bool OnMouseWheel(Mask<XFA_FWL_KeyFlag> dwFlags,
52 const CFX_PointF& point,
53 const CFX_Vector& delta) override;
55 const CFX_PointF& point) override;
56 bool OnRButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags,
57 const CFX_PointF& point) override;
59 const CFX_PointF& point) override;
60 [[nodiscard]] bool OnSetFocus(CXFA_FFWidget* pOldWidget) override;
61 [[nodiscard]] bool OnKillFocus(CXFA_FFWidget* pNewWidget) override;
62 bool OnKeyDown(XFA_FWL_VKEYCODE dwKeyCode,
63 Mask<XFA_FWL_KeyFlag> dwFlags) override;
64 bool OnChar(uint32_t dwChar, Mask<XFA_FWL_KeyFlag> dwFlags) override;
65 FWL_WidgetHit HitTest(const CFX_PointF& point) override;
66
67 // IFWL_WidgetDelegate:
68 void OnProcessMessage(CFWL_Message* pMessage) override;
69 void OnProcessEvent(CFWL_Event* pEvent) override;
70 void OnDrawWidget(CFGAS_GEGraphics* pGraphics,
71 const CFX_Matrix& matrix) override;
72
73 void UpdateFWL();
74 uint32_t UpdateUIProperty();
75
76 protected:
77 explicit CXFA_FFField(CXFA_Node* pNode);
78
79 bool PtInActiveRect(const CFX_PointF& point) override;
80
81 virtual void SetFWLRect();
82 virtual bool CommitData();
83 virtual bool IsDataChanged();
84
86 const CFWL_Widget* GetNormalWidget() const;
87 void SetNormalWidget(CFWL_Widget* widget);
88 CFX_PointF FWLToClient(const CFX_PointF& point);
89 void LayoutCaption();
90 void RenderCaption(CFGAS_GEGraphics* pGS, const CFX_Matrix& pMatrix);
91
92 int32_t CalculateOverride();
93 int32_t CalculateNode(CXFA_Node* pNode);
96 const CFX_Matrix& pMatrix,
97 HighlightOption highlight,
98 ShapeOption shape);
100 void CapPlacement();
101 void CapTopBottomPlacement(const CXFA_Margin* margin,
102 const CFX_RectF& rtWidget,
103 XFA_AttributeValue iCapPlacement);
104 void CapLeftRightPlacement(const CXFA_Margin* margin,
105 const CFX_RectF& rtWidget,
106 XFA_AttributeValue iCapPlacement);
107 void SetEditScrollOffset();
108
111
112 private:
113 cppgc::Member<CFWL_Widget> m_pNormalWidget;
114};
115
117 return field ? field->AsDropDown() : nullptr;
118}
119
120#endif // XFA_FXFA_CXFA_FFFIELD_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:25
BC_CHAR_ENCODING
Definition BC_Library.h:20
void RegisterEventTarget(CFWL_Widget *pListener, CFWL_Widget *pEventSource)
void SetDelegate(IFWL_WidgetDelegate *delegate)
void SetAdapterIface(AdapterIface *pItem)
CFWL_App * GetFWLApp() const
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void Concat(const CFX_Matrix &right)
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
bool AcceptsFocusOnButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, CFWL_MessageMouse::MouseCommand command) override
void Trace(cppgc::Visitor *visitor) const override
static BC_TYPE GetBarcodeTypeByName(const WideString &wsName)
void UpdateWidgetProperty() override
bool LoadWidget() override
~CXFA_FFBarcode() override
CXFA_FFField(CXFA_Node *pNode)
bool OnMouseEnter() override
bool OnSetFocus(CXFA_FFWidget *pOldWidget) override
void OnProcessMessage(CFWL_Message *pMessage) override
void Trace(cppgc::Visitor *visitor) const override
int32_t CalculateOverride()
bool OnMouseExit() override
bool OnLButtonUp(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
virtual bool IsDataChanged()
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
int32_t CalculateNode(CXFA_Node *pNode)
bool OnMouseWheel(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, const CFX_Vector &delta) override
bool OnLButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
const CFWL_Widget * GetNormalWidget() const
bool OnLButtonDblClk(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
bool OnKillFocus(CXFA_FFWidget *pNewWidget) override
CFX_PointF FWLToClient(const CFX_PointF &point)
~CXFA_FFField() override
bool PerformLayout() override
CFX_RectF m_UIRect
void DrawHighlight(CFGAS_GEGraphics *pGS, const CFX_Matrix &pMatrix, HighlightOption highlight, ShapeOption shape)
bool ProcessCommittedData()
virtual void SetFWLRect()
bool OnRButtonDblClk(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
virtual CXFA_FFDropDown * AsDropDown()
bool LoadWidget() override
void SetEditScrollOffset()
bool OnRButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
CFWL_Widget * GetNormalWidget()
CFX_RectF GetBBox(FocusOption focus) override
bool OnRButtonUp(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
bool AcceptsFocusOnButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, CFWL_MessageMouse::MouseCommand command) override
void SetNormalWidget(CFWL_Widget *widget)
void CapTopBottomPlacement(const CXFA_Margin *margin, const CFX_RectF &rtWidget, XFA_AttributeValue iCapPlacement)
bool PtInActiveRect(const CFX_PointF &point) override
FWL_WidgetHit HitTest(const CFX_PointF &point) override
void OnProcessEvent(CFWL_Event *pEvent) override
uint32_t UpdateUIProperty()
void RenderCaption(CFGAS_GEGraphics *pGS, const CFX_Matrix &pMatrix)
virtual bool CommitData()
CFX_RectF m_CaptionRect
bool IsLoaded() override
bool OnChar(uint32_t dwChar, Mask< XFA_FWL_KeyFlag > dwFlags) override
void CapLeftRightPlacement(const CXFA_Margin *margin, const CFX_RectF &rtWidget, XFA_AttributeValue iCapPlacement)
void SendMessageToFWLWidget(CFWL_Message *pMessage)
bool OnKeyDown(XFA_FWL_VKEYCODE dwKeyCode, Mask< XFA_FWL_KeyFlag > dwFlags) override
bool OnMouseMove(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
CXFA_FFField * AsField() override
bool OnKillFocus(CXFA_FFWidget *pNewWidget) override
void OnProcessEvent(CFWL_Event *pEvent) override
void OnTextWillChange(CFWL_Widget *pWidget, CFWL_EventTextWillChange *change)
void SelectAll() override
bool CanUndo() override
bool OnLButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnProcessMessage(CFWL_Message *pMessage) override
bool CanSelectAll() override
bool Redo() override
bool OnRButtonUp(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
~CXFA_FFTextEdit() override
bool Undo() override
absl::optional< WideString > Cut() override
bool CommitData() override
bool OnSetFocus(CXFA_FFWidget *pOldWidget) override
bool AcceptsFocusOnButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, CFWL_MessageMouse::MouseCommand command) override
bool UpdateFWLData() override
bool LoadWidget() override
void Trace(cppgc::Visitor *visitor) const override
bool Paste(const WideString &wsPaste) override
cppgc::Member< IFWL_WidgetDelegate > m_pOldDelegate
CXFA_FFTextEdit(CXFA_Node *pNode)
void Delete() override
void UpdateWidgetProperty() override
void DeSelect() override
absl::optional< WideString > Copy() override
bool CanCopy() override
void OnTextFull(CFWL_Widget *pWidget)
bool CanCut() override
bool CanPaste() override
FormFieldType GetFormFieldType() override
bool OnRButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
bool CanRedo() override
bool IsDataChanged() override
WideString GetText() override
CFX_Matrix GetRotateMatrix() override
virtual void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight)
bool HasVisibleStatus() const
bool IsEmpty() const
Definition widestring.h:118
int CompareNoCase(const wchar_t *str) const
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
FormFieldType
CXFA_FFDropDown * ToDropDown(CXFA_FFField *field)
XFA_FWL_KeyFlag
XFA_FWL_VKEYCODE
FWL_WidgetHit
XFA_AttributeValue
Definition fxfa_basic.h:60
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12