7#include "fxjs/cjs_annot.h"
9#include "constants/annotation_flags.h"
10#include "fxjs/cjs_event_context.h"
11#include "fxjs/cjs_object.h"
12#include "fxjs/js_define.h"
13#include "fxjs/js_resources.h"
16 {
"hidden", get_hidden_static, set_hidden_static},
17 {
"name", get_name_static, set_name_static},
18 {
"type", get_type_static, set_type_static}};
20uint32_t CJS_Annot::ObjDefnID = 0;
22const char CJS_Annot::kName[] =
"Annot";
32 JSConstructor<CJS_Annot>, JSDestructor);
36CJS_Annot::
CJS_Annot(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
42 m_pAnnot.Reset(annot);
45CJS_Result CJS_Annot::get_hidden(CJS_Runtime* pRuntime) {
49 CPDF_Annot* pPDFAnnot = m_pAnnot->GetPDFAnnot();
53CJS_Result CJS_Annot::set_hidden(CJS_Runtime* pRuntime,
54 v8::Local<v8::Value> vp) {
56 bool bHidden = pRuntime->ToBoolean(vp);
78CJS_Result CJS_Annot::get_name(CJS_Runtime* pRuntime) {
87CJS_Result CJS_Annot::set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
89 WideString annotName = pRuntime->ToWideString(vp);
99CJS_Result CJS_Annot::get_type(CJS_Runtime* pRuntime) {
109CJS_Result CJS_Annot::set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) {
static uint32_t GetObjDefnID()
static void DefineJSObjects(CFXJS_Engine *pEngine)
void SetSDKAnnot(CPDFSDK_BAAnnot *annot)
CJS_Annot(v8::Local< v8::Object > pObject, CJS_Runtime *pRuntime)
static void DefineProps(CFXJS_Engine *pEngine, uint32_t nObjDefnID, pdfium::span< const JSPropertySpec > consts)
static CJS_Result Success()
static CJS_Result Failure(JSMessage id)
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)
constexpr uint32_t kNoView
constexpr uint32_t kHidden
constexpr uint32_t kPrint
constexpr uint32_t kInvisible