Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cxfa_button.cpp
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
#
include
"xfa/fxfa/parser/cxfa_button.h"
8
9
#
include
"fxjs/xfa/cjx_node.h"
10
#
include
"xfa/fxfa/parser/cxfa_document.h"
11
12
namespace
{
13
14
const
CXFA_Node
::
PropertyData
kButtonPropertyData[] = {
15
{
XFA_Element
::Extras, 1, {}},
16
};
17
18
const
CXFA_Node
::
AttributeData
kButtonAttributeData[] = {
19
{
XFA_Attribute
::Id,
XFA_AttributeType
::
CData
,
nullptr
},
20
{
XFA_Attribute
::Use,
XFA_AttributeType
::
CData
,
nullptr
},
21
{
XFA_Attribute
::Usehref,
XFA_AttributeType
::
CData
,
nullptr
},
22
{
XFA_Attribute
::Highlight,
XFA_AttributeType
::
Enum
,
23
(
void
*)
XFA_AttributeValue
::Inverted},
24
};
25
26
}
// namespace
27
28
// static
29
CXFA_Button* CXFA_Button::
FromNode
(
CXFA_Node
* pNode) {
30
return
pNode && pNode->GetElementType() == XFA_Element::Button
31
?
static_cast
<CXFA_Button*>(pNode)
32
:
nullptr
;
33
}
34
35
CXFA_Button::CXFA_Button(CXFA_Document* doc,
XFA_PacketType
packet)
36
: CXFA_Node(doc,
37
packet,
38
{XFA_XDPPACKET::kTemplate, XFA_XDPPACKET::kForm},
39
XFA_ObjectType::Node,
40
XFA_Element::Button,
41
kButtonPropertyData,
42
kButtonAttributeData,
43
cppgc::MakeGarbageCollected<CJX_Node>(
44
doc->GetHeap()->GetAllocationHandle(),
45
this
)) {}
46
47
CXFA_Button::~
CXFA_Button
() =
default
;
48
49
XFA_FFWidgetType
CXFA_Button::
GetDefaultFFWidgetType
()
const
{
50
return
XFA_FFWidgetType
::
kButton
;
51
}
52
53
XFA_AttributeValue
CXFA_Button::
GetHighlight
() {
54
return
JSObject()->GetEnum(
XFA_Attribute
::Highlight);
55
}
CXFA_Button::FromNode
static CXFA_Button * FromNode(CXFA_Node *pNode)
Definition
cxfa_button.cpp:29
CXFA_Button::GetDefaultFFWidgetType
XFA_FFWidgetType GetDefaultFFWidgetType() const override
Definition
cxfa_button.cpp:49
CXFA_Button::GetHighlight
XFA_AttributeValue GetHighlight()
Definition
cxfa_button.cpp:53
CXFA_Button::~CXFA_Button
~CXFA_Button() override
CXFA_Node
Definition
cxfa_node.h:94
XFA_FFWidgetType
XFA_FFWidgetType
Definition
cxfa_ffwidget_type.h:10
XFA_FFWidgetType::kButton
@ kButton
Definition
cxfa_ffwidget_type.h:13
XFA_AttributeType
XFA_AttributeType
Definition
fxfa_basic.h:83
XFA_AttributeType::Enum
@ Enum
Definition
fxfa_basic.h:84
XFA_AttributeType::CData
@ CData
Definition
fxfa_basic.h:85
XFA_Attribute
XFA_Attribute
Definition
fxfa_basic.h:67
XFA_Element
XFA_Element
Definition
fxfa_basic.h:75
XFA_AttributeValue
XFA_AttributeValue
Definition
fxfa_basic.h:60
XFA_PacketType
XFA_PacketType
Definition
fxfa_basic.h:44
CXFA_Node::AttributeData
Definition
cxfa_node.h:110
CXFA_Node::PropertyData
Definition
cxfa_node.h:96
qtwebengine
src
3rdparty
chromium
third_party
pdfium
xfa
fxfa
parser
cxfa_button.cpp
Generated on
for Qt by
1.18.0