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
cjs_annot.h
Go to the documentation of this file.
1// Copyright 2016 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_CJS_ANNOT_H_
8#define FXJS_CJS_ANNOT_H_
9
10#include "fpdfsdk/cpdfsdk_baannot.h"
11#include "fxjs/cjs_object.h"
12#include "fxjs/js_define.h"
13
14class CJS_Annot final : public CJS_Object {
15 public:
16 static uint32_t GetObjDefnID();
17 static void DefineJSObjects(CFXJS_Engine* pEngine);
18
19 CJS_Annot(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
20 ~CJS_Annot() override;
21
22 void SetSDKAnnot(CPDFSDK_BAAnnot* annot);
23
24 JS_STATIC_PROP(hidden, hidden, CJS_Annot)
25 JS_STATIC_PROP(name, name, CJS_Annot)
26 JS_STATIC_PROP(type, type, CJS_Annot)
27
28 private:
29 static uint32_t ObjDefnID;
30 static const char kName[];
31 static const JSPropertySpec PropertySpecs[];
32
33 CJS_Result get_hidden(CJS_Runtime* pRuntime);
34 CJS_Result set_hidden(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
35
36 CJS_Result get_name(CJS_Runtime* pRuntime);
37 CJS_Result set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
38
39 CJS_Result get_type(CJS_Runtime* pRuntime);
40 CJS_Result set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
41
42 ObservedPtr<CPDFSDK_BAAnnot> m_pAnnot;
43};
44
45#endif // FXJS_CJS_ANNOT_H_
@ FXJSOBJTYPE_DYNAMIC
static uint32_t GetObjDefnID()
Definition cjs_annot.cpp:25
~CJS_Annot() override
static void DefineJSObjects(CFXJS_Engine *pEngine)
Definition cjs_annot.cpp:30
void SetSDKAnnot(CPDFSDK_BAAnnot *annot)
Definition cjs_annot.cpp:41
CJS_Annot(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
Definition cjs_annot.cpp:36
static void DefineProps(CFXJS_Engine *pEngine, uint32_t nObjDefnID, pdfium::span< const JSPropertySpec > consts)
static CJS_Result Success()
Definition cjs_result.h:27
static CJS_Result Failure(JSMessage id)
Definition cjs_result.h:34
WideString GetAnnotName() const
void SetAnnotName(const WideString &sName)
CPDF_Annot::Subtype GetAnnotSubtype() const override
void SetFlags(uint32_t nFlags)
uint32_t GetFlags() const
static ByteString AnnotSubtypeToString(Subtype nSubtype)
bool IsHidden() const
#define JS_STATIC_PROP(err_name, prop_name, class_name)
Definition js_define.h:141
JSMessage
constexpr uint32_t kNoView
constexpr uint32_t kHidden
constexpr uint32_t kPrint
constexpr uint32_t kInvisible