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
cjx_field.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 FXJS_XFA_CJX_FIELD_H_
8#define FXJS_XFA_CJX_FIELD_H_
9
10#include "fxjs/xfa/cjx_container.h"
11#include "fxjs/xfa/jse_define.h"
12
13class CXFA_Field;
14
15class CJX_Field final : public CJX_Container {
16 public:
18 ~CJX_Field() override;
19
20 // CJX_Object:
21 bool DynamicTypeIs(TypeTag eType) const override;
22
23 JSE_METHOD(addItem);
24 JSE_METHOD(boundItem);
25 JSE_METHOD(clearItems);
26 JSE_METHOD(deleteItem);
27 JSE_METHOD(execCalculate);
28 JSE_METHOD(execEvent);
29 JSE_METHOD(execInitialize);
30 JSE_METHOD(execValidate);
31 JSE_METHOD(getDisplayItem);
32 JSE_METHOD(getItemState);
33 JSE_METHOD(getSaveItem);
34 JSE_METHOD(setItemState);
35
36 JSE_PROP(defaultValue); /* {default} */
37 JSE_PROP(editValue);
38 JSE_PROP(formatMessage);
39 JSE_PROP(formattedValue);
40 JSE_PROP(length);
41 JSE_PROP(parentSubform);
42 JSE_PROP(rawValue);
43 JSE_PROP(selectedIndex);
44
45 private:
46 explicit CJX_Field(CXFA_Field* field);
47
48 using Type__ = CJX_Field;
49 using ParentType__ = CJX_Container;
50
51 static const TypeTag static_type__ = TypeTag::Field;
52 static const CJX_MethodSpec MethodSpecs[];
53};
54
55#endif // FXJS_XFA_CJX_FIELD_H_
float ToFloat() const
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:27
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:34
bool DynamicTypeIs(TypeTag eType) const override
bool DynamicTypeIs(TypeTag eType) const override
Definition cjx_field.cpp:45
~CJX_Field() override
XFA_EventError execSingleEventByName(WideStringView wsEventName, XFA_Element eType)
Definition cjx_node.cpp:468
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
WideString GetContent(bool bScriptModify) const
void ThrowInvalidPropertyException(v8::Isolate *pIsolate) const
CXFA_Document * GetDocument() const
CXFA_Node * GetXFANode() const
void SetContent(const WideString &wsContent, const WideString &wsXMLValue, bool bNotify, bool bScriptModify, bool bSyncData)
XFA_EventError ExecEventByDeepFirst(CXFA_Node *pFormNode, XFA_EVENTTYPE eEventType, bool bIsFormReady, bool bRecursive)
CXFA_Value * GetFormValueIfExists() const
WideString GetValue(XFA_ValuePicture eValueType)
bool SetValue(XFA_ValuePicture eValueType, const WideString &wsValue)
int32_t GetSelectedItem(int32_t nIndex)
void SetItemState(int32_t nIndex, bool bSelected, bool bNotify, bool bScriptModify)
WideString NumericLimit(const WideString &wsValue)
void InsertItem(const WideString &wsLabel, const WideString &wsValue, bool bNotify)
WideString GetFormatDataValue(const WideString &wsValue)
bool DeleteItem(int32_t nIndex, bool bNotify, bool bScriptModify)
void SetPreNull(bool val)
Definition cxfa_node.h:322
bool GetItemState(int32_t nIndex)
void ClearAllSelections()
bool IsNull() const
Definition cxfa_node.h:323
CXFA_Node * GetContainerNode()
bool IsWidgetReady() const
Definition cxfa_node.h:327
CXFA_Node * GetUIChildNode()
WideString GetItemValue(WideStringView wsLabel)
void SetIsNull(bool val)
Definition cxfa_node.h:324
XFA_Element GetElementType() const
Definition cxfa_object.h:91
ByteString ToUTF8() const
WideString & operator=(WideString &&that) noexcept
bool IsEmpty() const
Definition widestring.h:118
const wchar_t * c_str() const
Definition widestring.h:81
WideString(const WideString &other)
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
@ XFA_EVENT_Initialize
@ XFA_EVENT_Calculate
@ XFA_EVENT_Validate
XFA_ValuePicture
Definition cxfa_node.h:70
int32_t FXSYS_wtoi(const wchar_t *str)
XFA_EventError
Definition fxfa.h:54
XFA_Attribute
Definition fxfa_basic.h:67
XFA_Element
Definition fxfa_basic.h:75
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
JSMessage
#define JSE_PROP(prop_name)
Definition jse_define.h:28
#define JSE_METHOD(method_name)
Definition jse_define.h:17
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