本文整理汇总了C++中CJS_PropValue::SetNull方法的典型用法代码示例。如果您正苦于以下问题:C++ CJS_PropValue::SetNull方法的具体用法?C++ CJS_PropValue::SetNull怎么用?C++ CJS_PropValue::SetNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CJS_PropValue
的用法示例。
在下文中一共展示了CJS_PropValue::SetNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activeDocs
FX_BOOL app::activeDocs(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (!vp.IsGetting())
return FALSE;
CJS_Context* pContext = (CJS_Context *)cc;
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
CJS_Array aDocs(pRuntime->GetIsolate());
if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
{
CJS_Document* pJSDocument = NULL;
if (pDoc == pCurDoc)
{
JSFXObject pObj = JS_GetThisObj(*pRuntime);
if (JS_GetObjDefnID(pObj) == JS_GetObjDefnID(*pRuntime, L"Document"))
pJSDocument = (CJS_Document*)JS_GetPrivate(pRuntime->GetIsolate(),pObj);
}
else
{
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime,L"Document"));
pJSDocument = (CJS_Document*)JS_GetPrivate(pRuntime->GetIsolate(),pObj);
ASSERT(pJSDocument != NULL);
}
aDocs.SetElement(0,CJS_Value(pRuntime->GetIsolate(),pJSDocument));
}
if (aDocs.GetLength() > 0)
vp << aDocs;
else
vp.SetNull();
return TRUE;
}
示例2: ADBE
FX_BOOL Document::ADBE(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
ASSERT(m_pDocument != NULL);
if (vp.IsGetting())
{
vp.SetNull();
}
else
{
}
return TRUE;
}
示例3: icons
FX_BOOL Document::icons(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting()) {
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
sError = JSGetStringFromID(pContext, IDS_STRING_JSREADONLY);
return FALSE;
}
if (!m_pIconTree)
{
vp.SetNull();
return TRUE;
}
CJS_Array Icons(m_isolate);
IconElement* pIconElement = NULL;
int iIconTreeLength = m_pIconTree->GetLength();
CJS_Context* pContext = (CJS_Context *)cc;
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
for (int i = 0; i < iIconTreeLength; i++)
{
pIconElement = (*m_pIconTree)[i];
JSFXObject pObj = JS_NewFxDynamicObj(*pRuntime, pContext, JS_GetObjDefnID(*pRuntime, L"Icon"));
if (pObj.IsEmpty()) return FALSE;
CJS_Icon * pJS_Icon = (CJS_Icon *)JS_GetPrivate(pObj);
if (!pJS_Icon) return FALSE;
Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
if (!pIcon)return FALSE;
pIcon->SetStream(pIconElement->IconStream->GetStream());
pIcon->SetIconName(pIconElement->IconName);
Icons.SetElement(i, CJS_Value(m_isolate,pJS_Icon));
}
vp << Icons;
return TRUE;
}