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_rectangle.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_PARSER_CXFA_RECTANGLE_H_
8#define XFA_FXFA_PARSER_CXFA_RECTANGLE_H_
9
10#include <vector>
11
12#include "xfa/fgas/graphics/cfgas_gepath.h"
13#include "xfa/fxfa/parser/cxfa_box.h"
14
15class CXFA_Rectangle : public CXFA_Box {
16 public:
17 static CXFA_Rectangle* FromNode(CXFA_Node* pNode);
18
20 ~CXFA_Rectangle() override;
21
22 void GetFillPath(const std::vector<CXFA_Stroke*>& strokes,
23 const CFX_RectF& rtWidget,
24 CFGAS_GEPath* fillPath);
25 void Draw(const std::vector<CXFA_Stroke*>& strokes,
27 CFX_RectF rtWidget,
28 const CFX_Matrix& matrix);
29
30 protected:
31 CXFA_Rectangle(CXFA_Document* doc, XFA_PacketType packet);
32 CXFA_Rectangle(CXFA_Document* pDoc,
33 XFA_PacketType ePacket,
34 Mask<XFA_XDPPACKET> validPackets,
35 XFA_ObjectType oType,
36 XFA_Element eType,
37 pdfium::span<const PropertyData> properties,
38 pdfium::span<const AttributeData> attributes,
39 CJX_Object* js_node);
40
41 void Stroke(const std::vector<CXFA_Stroke*>& strokes,
43 CFX_RectF rtWidget,
44 const CFX_Matrix& matrix);
46 CFX_RectF rt,
47 float fThickness,
48 const CFX_Matrix& matrix);
50 CFX_RectF rt,
51 float fThickness,
52 const CFX_Matrix& matrix);
54 CFX_RectF rt,
55 float fThickness,
56 const CFX_Matrix& matrix);
58 CFX_RectF rt,
59 float fThickness,
60 const CFX_Matrix& matrix);
61 void StrokeRect(CFGAS_GEGraphics* pGraphic,
62 const CFX_RectF& rt,
63 float fLineWidth,
64 const CFX_Matrix& matrix,
65 FX_ARGB argbTopLeft,
66 FX_ARGB argbBottomRight);
67 void GetPath(const std::vector<CXFA_Stroke*>& strokes,
68 CFX_RectF rtWidget,
69 CFGAS_GEPath& path,
70 int32_t nIndex,
71 bool bStart,
72 bool bCorner);
73};
74
75#endif // XFA_FXFA_PARSER_CXFA_RECTANGLE_H_
CFX_XMLElement * ToXMLElement(CFX_XMLNode *pNode)
float ToFloat() const
void AddNodesOfRunScript(CXFA_Node *pNode)
friend class EventParamScope
void MergeDataFrom(const CFXJSE_MapModule *pSrc)
void SetValue(uint32_t key, int32_t value)
void SetMeasurement(uint32_t key, const CXFA_Measurement &measurement)
void SetString(uint32_t key, const WideString &wsString)
void RemoveKey(uint32_t key)
bool HasKey(uint32_t key) const
WideString GetNamespaceURI() const
void SetAttribute(const WideString &name, const WideString &value)
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:34
WideString GetAttributeByString(WideStringView attr) const
void RemoveAttribute(WideStringView wsAttr)
void ScriptSomMessage(v8::Isolate *pIsolate, v8::Local< v8::Value > *pValue, bool bSetting, SOMMessageType iMessageType)
float GetMeasureInUnit(XFA_Attribute eAttr, XFA_Unit unit) const
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
~CJX_Object() override
void SetCDataImpl(XFA_Attribute eAttr, const WideString &wsValue, bool bNotify, bool bScriptModify)
WideString GetContent(bool bScriptModify) const
bool HasMethod(const WideString &func) const
CJX_Object * AsCJXObject() override
CXFA_Object * GetXFAObject() const
Definition cjx_object.h:113
absl::optional< CXFA_Measurement > TryMeasure(XFA_Attribute eAttr, bool bUseDefault) const
CJS_Result RunMethod(CFXJSE_Engine *pScriptContext, const WideString &func, pdfium::span< v8::Local< v8::Value > > params)
void ThrowArgumentMismatchException(v8::Isolate *pIsolate) const
void ThrowIndexOutOfBoundsException(v8::Isolate *pIsolate) const
void SetAttributeByEnum(XFA_Attribute eAttr, const WideString &wsValue, bool bNotify)
void ThrowInvalidPropertyException(v8::Isolate *pIsolate) const
CXFA_Document * GetDocument() const
void ThrowParamCountMismatchException(v8::Isolate *pIsolate, const WideString &method) const
void SetCData(XFA_Attribute eAttr, const WideString &wsValue)
void SetBoolean(XFA_Attribute eAttr, bool bValue, bool bNotify)
absl::optional< WideString > TryCData(XFA_Attribute eAttr, bool bUseDefault) const
absl::optional< bool > TryBoolean(XFA_Attribute eAttr, bool bUseDefault) const
void SetInteger(XFA_Attribute eAttr, int32_t iValue, bool bNotify)
XFA_AttributeValue GetEnum(XFA_Attribute eAttr) const
void SetAttributeByString(WideStringView wsAttr, const WideString &wsValue)
bool GetBoolean(XFA_Attribute eAttr) const
virtual bool DynamicTypeIs(TypeTag eType) const
void MoveBufferMapData(CXFA_Object *pSrcObj, CXFA_Object *pDstObj)
bool HasAttribute(XFA_Attribute eAttr) const
int32_t GetInteger(XFA_Attribute eAttr) const
WideString GetCData(XFA_Attribute eAttr) const
void TakeCalcDataFrom(CJX_Object *that)
void ThrowException(v8::Isolate *pIsolate, const WideString &str) const
absl::optional< XFA_AttributeValue > TryEnum(XFA_Attribute eAttr, bool bUseDefault) const
absl::optional< WideString > TryAttribute(XFA_Attribute eAttr, bool bUseDefault) const
CXFA_Node * GetXFANode() const
void SetEnum(XFA_Attribute eAttr, XFA_AttributeValue eValue, bool bNotify)
void SetContent(const WideString &wsContent, const WideString &wsXMLValue, bool bNotify, bool bScriptModify, bool bSyncData)
absl::optional< int32_t > TryInteger(XFA_Attribute eAttr, bool bUseDefault) const
CXFA_Measurement GetMeasure(XFA_Attribute eAttr) const
void SetAttributeValue(const WideString &wsValue, const WideString &wsXMLValue)
void SetMeasure(XFA_Attribute eAttr, const CXFA_Measurement &mValue, bool bNotify)
absl::optional< WideString > TryContent(bool bScriptModify, bool bProto) const
absl::optional< float > TryMeasureAsFloat(XFA_Attribute attr) const
void MergeAllData(CXFA_Object *pDstObj)
absl::optional< WideString > TryNamespace() const
WideString GetAttributeByEnum(XFA_Attribute attr) const
CalcData * GetOrCreateCalcData(cppgc::Heap *heap)
void SetAttributeValueImpl(const WideString &wsValue, const WideString &wsXMLValue, bool bNotify, bool bScriptModify)
CJX_Object(CXFA_Object *obj)
void ThrowTooManyOccurrencesException(v8::Isolate *pIsolate, const WideString &obj) const
~CXFA_Border() override
CXFA_Fill * GetOrCreateFillIfPossible()
Definition cxfa_box.cpp:122
CXFA_Node * GetNodeByID(CXFA_Node *pRoot, WideStringView wsID) const
CXFA_FFNotify * GetNotify() const
CFXJSE_Engine * GetScriptContext() const
CXFA_Object * GetXFAObject(XFA_HashCode wsNodeNameHash)
static constexpr FX_ARGB kDefaultColor
Definition cxfa_edge.h:14
void OnValueChanging(CXFA_Node *pSender, XFA_Attribute eAttr)
void AddCalcValidate(CXFA_Node *pNode)
void RunSubformIndexChange(CXFA_Subform *pSubformNode)
void SetColor(FX_ARGB color)
Definition cxfa_fill.cpp:64
FX_ARGB GetFillColor() const
Definition cxfa_fill.cpp:73
FX_ARGB GetColor() const
void SetColor(FX_ARGB color)
CXFA_Measurement(float fValue, XFA_Unit eUnit)
float ToUnit(XFA_Unit eUnit) const
WideString ToString() const
CFX_XMLNode * GetXMLMappingNode() const
Definition cxfa_node.h:184
void RemoveChildAndNotify(CXFA_Node *pNode, bool bNotify)
void InsertChildAndNotify(CXFA_Node *pNode, CXFA_Node *pBeforeNode)
CXFA_Node * GetOrCreateProperty(int32_t index, XFA_Element eProperty)
void SendAttributeChangeMessage(XFA_Attribute eAttribute, bool bScriptModify)
WideString GetFormatDataValue(const WideString &wsValue)
CXFA_Node * CreateSamePacketNode(XFA_Element eType)
void UpdateNameHash()
CXFA_Node * GetTemplateNodeIfExists() const
CXFA_Node * GetBindData()
CFX_XMLNode * CreateXMLMappingNode()
void SetToXML(const WideString &value)
std::pair< CXFA_Node *, int32_t > GetProperty(int32_t index, XFA_Element eProperty) const
CXFA_Node * CloneTemplateToForm(bool bRecursive)
CXFA_Node * GetContainerNode()
XFA_AttributeType GetAttributeType(XFA_Attribute type) const
XFA_PacketType GetPacketType() const
Definition cxfa_node.h:146
CXFA_Node * GetItemIfExists(int32_t iIndex)
bool IsNeedSavingXMLNode() const
bool IsInitialized() const
Definition cxfa_node.h:161
CXFA_Node * GetModelNode()
XFA_Element GetElementType() const
Definition cxfa_object.h:91
bool IsNodeV() const
Definition cxfa_object.h:73
bool IsModelNode() const
Definition cxfa_object.h:72
XFA_ObjectType GetObjectType() const
Definition cxfa_object.h:49
bool IsContainerNode() const
Definition cxfa_object.h:69
void GetFillPath(const std::vector< CXFA_Stroke * > &strokes, const CFX_RectF &rtWidget, CFGAS_GEPath *fillPath)
void StrokeLowered(CFGAS_GEGraphics *pGS, CFX_RectF rt, float fThickness, const CFX_Matrix &matrix)
CXFA_Rectangle(CXFA_Document *pDoc, XFA_PacketType ePacket, Mask< XFA_XDPPACKET > validPackets, XFA_ObjectType oType, XFA_Element eType, pdfium::span< const PropertyData > properties, pdfium::span< const AttributeData > attributes, CJX_Object *js_node)
~CXFA_Rectangle() override
void GetPath(const std::vector< CXFA_Stroke * > &strokes, CFX_RectF rtWidget, CFGAS_GEPath &path, int32_t nIndex, bool bStart, bool bCorner)
static CXFA_Rectangle * FromNode(CXFA_Node *pNode)
void Stroke(const std::vector< CXFA_Stroke * > &strokes, CFGAS_GEGraphics *pGS, CFX_RectF rtWidget, const CFX_Matrix &matrix)
void StrokeRaised(CFGAS_GEGraphics *pGS, CFX_RectF rt, float fThickness, const CFX_Matrix &matrix)
void Draw(const std::vector< CXFA_Stroke * > &strokes, CFGAS_GEGraphics *pGS, CFX_RectF rtWidget, const CFX_Matrix &matrix)
void StrokeEtched(CFGAS_GEGraphics *pGS, CFX_RectF rt, float fThickness, const CFX_Matrix &matrix)
void StrokeEmbossed(CFGAS_GEGraphics *pGS, CFX_RectF rt, float fThickness, const CFX_Matrix &matrix)
CXFA_Rectangle(CXFA_Document *doc, XFA_PacketType packet)
void StrokeRect(CFGAS_GEGraphics *pGraphic, const CFX_RectF &rt, float fLineWidth, const CFX_Matrix &matrix, FX_ARGB argbTopLeft, FX_ARGB argbBottomRight)
FX_ARGB GetColor() const
void SetMSThickness(CXFA_Measurement msThinkness)
CXFA_Measurement GetMSThickness() const
void SetColor(FX_ARGB argb)
static CXFA_Subform * FromNode(CXFA_Node *pNode)
XFA_AttributeValue GetNullTest()
void SetScriptMessageText(const WideString &wsMessage)
WideString GetNullMessageText()
WideString GetScriptMessageText()
void SetNullTest(const WideString &wsValue)
void SetNullMessageText(const WideString &wsMessage)
WideString GetFormatMessageText()
void SetFormatMessageText(const WideString &wsMessage)
static ByteString Format(const char *pFormat,...)
ByteString ToUTF8() const
WideString & operator=(WideString &&that) noexcept
CharType operator[](const size_t index) const
Definition widestring.h:146
bool IsEmpty() const
Definition widestring.h:118
const wchar_t * c_str() const
Definition widestring.h:81
WideString(const WideString &other)
static WideString FromASCII(ByteStringView str)
static WideString FormatInteger(int i)
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
XFA_ObjectType
Definition cxfa_object.h:21
CXFA_Node * ToNode(CXFA_Object *pObj)
constexpr FX_ARGB ArgbEncode(uint32_t a, uint32_t r, uint32_t g, uint32_t b)
Definition fx_dib.h:118
int32_t FXSYS_wtoi(const wchar_t *str)
XFA_Unit
Definition fxfa_basic.h:91
XFA_AttributeType
Definition fxfa_basic.h:83
XFA_Attribute
Definition fxfa_basic.h:67
XFA_XDPPACKET
Definition fxfa_basic.h:51
@ XFA_HASHCODE_Template
Definition fxfa_basic.h:35
XFA_Element
Definition fxfa_basic.h:75
XFA_AttributeValue
Definition fxfa_basic.h:60
XFA_PacketType
Definition fxfa_basic.h:44
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
JSMessage
Definition heap.h:12
WideString operator+(const wchar_t *str1, const WideString &str2)
Definition widestring.h:281
Definition fxv8.h:22
bool IsUndefined(v8::Local< v8::Value > value)
Definition fxv8.cpp:19
bool IsNull(v8::Local< v8::Value > value)
Definition fxv8.cpp:23
bool XFA_FDEExtension_ResolveNamespaceQualifier(CFX_XMLElement *pNode, const WideString &wsQualifier, WideString *wsNamespaceURI)
bool XFA_FieldIsMultiListBox(const CXFA_Node *pFieldNode)