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_layoutpseudomodel.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_LAYOUTPSEUDOMODEL_H_
8#define FXJS_XFA_CJX_LAYOUTPSEUDOMODEL_H_
9
10#include <vector>
11
12#include "fxjs/xfa/cjx_object.h"
13#include "fxjs/xfa/jse_define.h"
14#include "third_party/base/containers/span.h"
15
16class CScript_LayoutPseudoModel;
17class CXFA_LayoutProcessor;
18class CXFA_Node;
19
20class CJX_LayoutPseudoModel final : public CJX_Object {
21 public:
24
25 // CJX_Object:
26 bool DynamicTypeIs(TypeTag eType) const override;
27
28 JSE_METHOD(absPage);
29 JSE_METHOD(absPageCount);
30 JSE_METHOD(absPageCountInBatch);
31 JSE_METHOD(absPageInBatch);
32 JSE_METHOD(absPageSpan);
35 JSE_METHOD(pageContent);
36 JSE_METHOD(pageCount);
37 JSE_METHOD(pageSpan);
38 JSE_METHOD(relayout);
39 JSE_METHOD(relayoutPageArea);
40 JSE_METHOD(sheet);
41 JSE_METHOD(sheetCount);
42 JSE_METHOD(sheetCountInBatch);
43 JSE_METHOD(sheetInBatch);
47
48 JSE_PROP(ready);
49
50 private:
51 enum class HWXY { kH, kW, kX, kY };
52
53 explicit CJX_LayoutPseudoModel(CScript_LayoutPseudoModel* model);
54
55 using Type__ = CJX_LayoutPseudoModel;
56 using ParentType__ = CJX_Object;
57
58 static const TypeTag static_type__ = TypeTag::LayoutPseudoModel;
59 static const CJX_MethodSpec MethodSpecs[];
60
61 CJS_Result AllPageCount(CFXJSE_Engine* runtime);
62 CJS_Result NumberedPageCount(CFXJSE_Engine* runtime);
63 CJS_Result DoHWXYInternal(CFXJSE_Engine* runtime,
64 pdfium::span<v8::Local<v8::Value>> params,
65 HWXY layoutModel);
66 std::vector<CXFA_Node*> GetObjArray(CXFA_LayoutProcessor* pDocLayout,
67 int32_t iPageNo,
68 const WideString& wsType,
69 bool bOnPageArea);
70 CJS_Result PageInternals(CFXJSE_Engine* runtime,
71 pdfium::span<v8::Local<v8::Value>> params,
72 bool bAbsPage);
73};
74
75#endif // FXJS_XFA_CJX_LAYOUTPSEUDOMODEL_H_
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
~CJX_LayoutPseudoModel() override
void DefineMethods(pdfium::span< const CJX_MethodSpec > methods)
CXFA_Document * GetDocument() const
virtual bool DynamicTypeIs(TypeTag eType) const
void ThrowException(v8::Isolate *pIsolate, const WideString &str) const
CXFA_ContentLayoutItem * GetNext() const
CXFA_ContentLayoutItem * GetLast()
CXFA_ContentLayoutItem * GetFirst()
CXFA_NodeOwner * GetNodeOwner()
CXFA_FFDocView::LayoutStatus GetLayoutStatus()
const CXFA_ViewLayoutItem * GetPage() const
CXFA_ContentLayoutItem * AsContentLayoutItem()
CXFA_Node * GetFormNode() const
CXFA_ViewLayoutItem * GetPage(int32_t index) const
static CXFA_LayoutProcessor * FromDocument(const CXFA_Document *pXFADoc)
void Set(float fValue, XFA_Unit eUnit)
float ToUnit(XFA_Unit eUnit) const
static XFA_Unit GetUnitFromString(WideStringView wsUnit)
void PersistList(CXFA_List *list)
XFA_Element GetElementType() const
Definition cxfa_object.h:91
CXFA_Node * GetMasterPage() const
bool IsEmpty() const
Definition widestring.h:118
static WideString FromASCII(ByteStringView str)
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
int FXSYS_roundf(float f)
Definition fx_system.cpp:92
XFA_Unit
Definition fxfa_basic.h:91
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