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_ffpushbutton.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_FFPUSHBUTTON_H_
8#define XFA_FXFA_CXFA_FFPUSHBUTTON_H_
9
10#include "v8/include/cppgc/member.h"
11#include "xfa/fxfa/cxfa_fffield.h"
12
13#define XFA_FWL_PSBSTYLEEXT_HiliteInverted (1L << 0)
14#define XFA_FWL_PSBSTYLEEXT_HilitePush (1L << 1)
15#define XFA_FWL_PSBSTYLEEXT_HiliteOutLine (1L << 2)
16
17class CXFA_Button;
18class CXFA_TextLayout;
20
21class CXFA_FFPushButton final : public CXFA_FFField {
22 public:
24 ~CXFA_FFPushButton() override;
25
26 void Trace(cppgc::Visitor* visitor) const override;
27
28 // CXFA_FFField
30 const CFX_Matrix& matrix,
31 HighlightOption highlight) override;
32 bool LoadWidget() override;
33 bool PerformLayout() override;
34 void UpdateWidgetProperty() override;
35 void OnProcessMessage(CFWL_Message* pMessage) override;
36 void OnProcessEvent(CFWL_Event* pEvent) override;
37 void OnDrawWidget(CFGAS_GEGraphics* pGraphics,
38 const CFX_Matrix& matrix) override;
40
41 private:
42 CXFA_FFPushButton(CXFA_Node* pNode, CXFA_Button* button);
43
44 void LoadHighlightCaption();
45 void LayoutHighlightCaption();
46 void RenderHighlightCaption(CFGAS_GEGraphics* pGS, CFX_Matrix* pMatrix);
47 float GetLineWidth();
48 FX_ARGB GetLineColor();
49 FX_ARGB GetFillColor();
50
51 cppgc::Member<CXFA_TextLayout> m_pRolloverTextLayout;
52 cppgc::Member<CXFA_TextLayout> m_pDownTextLayout;
53 cppgc::Member<CXFA_TextProvider> m_pRollProvider;
54 cppgc::Member<CXFA_TextProvider> m_pDownProvider;
55 cppgc::Member<IFWL_WidgetDelegate> m_pOldDelegate;
56 cppgc::Member<CXFA_Button> const button_;
57};
58
59#endif // XFA_FXFA_CXFA_FFPUSHBUTTON_H_
friend class EventParamScope
static bool IsXMLNameChar(wchar_t ch, bool bFirstChar)
WideString GetRef()
WideString GetLabelRef()
WideString GetValueRef()
CXFA_Script * GetScriptIfExists()
bool TestStatusBits(Mask< XFA_WidgetStatus > val) const
XFA_EVENTTYPE m_eType
CXFA_EventParam(XFA_EVENTTYPE type)
virtual WideString GetAppTitle() const =0
virtual int32_t MsgBox(const WideString &wsMessage, const WideString &wsTitle, uint32_t dwIconType, uint32_t dwButtonType)=0
CallbackIface * GetAppProvider() const
Definition cxfa_ffapp.h:144
UpdateScope(CXFA_FFDocView *pDocView)
void InvalidateRect(CXFA_FFPageView *pPageView, const CFX_RectF &rtInvalidate)
CXFA_FFWidgetHandler * GetWidgetHandler()
void AddValidateNode(CXFA_Node *node)
void ResetNode(CXFA_Node *pNode)
void AddCalculateNodeNotify(CXFA_Node *pNodeChange)
CXFA_FFDoc * GetDoc() const
bool SetFocus(CXFA_FFWidget *pNewFocus)
void DeleteLayoutItem(CXFA_FFWidget *pWidget)
void AddNewFormNode(CXFA_Node *pNode)
void OnPageViewEvent(CXFA_ViewLayoutItem *pSender, CXFA_FFDoc::PageViewEvent eEvent)
CXFA_FFWidget * GetWidgetByName(const WideString &wsName, CXFA_FFWidget *pRefWidget)
CXFA_FFPageView * GetPageView(int32_t nIndex) const
void SetFocusNode(CXFA_Node *pNode)
void AddCalculateNode(CXFA_Node *node)
CXFA_LayoutProcessor * GetLayoutProcessor() const
int32_t CountPageViews() const
XFA_EventError ExecEventActivityByDeepFirst(CXFA_Node *pFormNode, XFA_EVENTTYPE eEventType, bool bIsFormReady, bool bRecursive)
CXFA_Node * GetRootSubform()
void AddNullTestMsg(const WideString &msg)
void ProcessValueChanged(CXFA_Node *node)
void UpdateUIDisplay(CXFA_Node *pNode, CXFA_FFWidget *pExcept)
CXFA_FFWidget * GetWidgetForNode(CXFA_Node *node)
void AddIndexChangedSubform(CXFA_Subform *pNode)
bool IsValidationsEnabled() const
bool CommitData() override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnProcessEvent(CFWL_Event *pEvent) override
bool AcceptsFocusOnButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point, CFWL_MessageMouse::MouseCommand command) override
void Trace(cppgc::Visitor *visitor) const override
~CXFA_FFImageEdit() override
bool OnLButtonDown(Mask< XFA_FWL_KeyFlag > dwFlags, const CFX_PointF &point) override
bool LoadWidget() override
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
FormFieldType GetFormFieldType() override
void SetFWLRect() override
bool UpdateFWLData() override
void OnProcessMessage(CFWL_Message *pMessage) override
bool IsLoaded() override
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
bool LoadWidget() override
~CXFA_FFImage() override
void OnProcessMessage(CFWL_Message *pMessage) override
void Trace(cppgc::Visitor *visitor) const override
void OnProcessEvent(CFWL_Event *pEvent) override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
bool PerformLayout() override
~CXFA_FFPushButton() override
void UpdateWidgetProperty() override
bool LoadWidget() override
FormFieldType GetFormFieldType() override
void RenderWidget(CFGAS_GEGraphics *pGS, const CFX_Matrix &matrix, HighlightOption highlight) override
CXFA_FFWidget * GetNextFFWidget() const
virtual bool UpdateFWLData()
bool IsFocused() const
virtual bool IsLoaded()
CXFA_Node * GetNode() const
virtual bool LoadWidget()
CXFA_ContentLayoutItem * GetLayoutItem() const
CXFA_LayoutItem * GetLayoutItem(CXFA_Node *pFormItem)
CXFA_ViewLayoutItem * GetPage(int32_t index) const
CXFA_Node * GetFirstContainerChild() const
CXFA_Node * GetNextContainerSibling() const
CXFA_Validate * GetValidateIfExists() const
CXFA_Calculate * GetCalculateIfExists() const
bool DeleteItem(int32_t nIndex, bool bNotify, bool bScriptModify)
void SetFlag(XFA_NodeFlag dwFlag)
XFA_EventError ExecuteScript(CXFA_FFDocView *pDocView, CXFA_Script *script, CXFA_EventParam *pEventParam)
bool IsUserInteractive() const
Definition cxfa_node.h:162
XFA_EventError ProcessEvent(CXFA_FFDocView *pDocView, XFA_AttributeValue iActivity, CXFA_EventParam *pEventParam)
bool IsWidgetReady() const
Definition cxfa_node.h:327
void ResetData()
XFA_FFWidgetType GetFFWidgetType()
XFA_EventError ProcessValidate(CXFA_FFDocView *pDocView, int32_t iFlags)
XFA_EventError ProcessCalculate(CXFA_FFDocView *pDocView)
bool HasRemovedChildren() const
Definition cxfa_node.h:174
XFA_Element GetElementType() const
Definition cxfa_object.h:91
CXFA_Document * GetDocument() const
Definition cxfa_object.h:48
CXFA_ReadyNodeIterator(CXFA_Node *pTravelRoot)
CXFA_FFPageView * GetPageView() const
WideString & operator+=(const WideString &str)
bool operator==(const WideString &other) const
static WideString Format(const wchar_t *pFormat,...)
bool IsEmpty() const
Definition widestring.h:118
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
FormFieldType
CXFA_FFWidget * GetFFWidget(CXFA_ContentLayoutItem *item)
XFA_EVENTTYPE
@ XFA_EVENT_InitCalculate
@ XFA_EVENT_Initialize
@ XFA_EVENT_DocReady
@ XFA_EVENT_Unknown
@ XFA_EVENT_Calculate
@ XFA_EVENT_Validate
@ XFA_EVENT_Ready
@ XFA_EVENT_IndexChange
@ XFA_EVENT_DocClose
static XFA_EventError XFA_ProcessEvent(CXFA_FFDocView *pDocView, CXFA_Node *pNode, CXFA_EventParam *pParam)
const XFA_AttributeValue kXFAEventActivity[]
XFA_FFWidgetType
CXFA_ContentLayoutItem * ToContentLayoutItem(CXFA_LayoutItem *item)
XFA_NodeFlag
Definition cxfa_node.h:77
XFA_FWL_KeyFlag
AlertIcon
Definition fxfa.h:20
AlertButton
Definition fxfa.h:11
XFA_EventError
Definition fxfa.h:54
XFA_WidgetStatus
Definition fxfa.h:61
XFA_Element
Definition fxfa_basic.h:75
XFA_AttributeValue
Definition fxfa_basic.h:60
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12
WideString operator+(const wchar_t *str1, const WideString &str2)
Definition widestring.h:281
void XFA_EventErrorAccumulate(XFA_EventError *pAcc, XFA_EventError eNew)