本文整理汇总了C++中CJS_Runtime::GetIsolate方法的典型用法代码示例。如果您正苦于以下问题:C++ CJS_Runtime::GetIsolate方法的具体用法?C++ CJS_Runtime::GetIsolate怎么用?C++ CJS_Runtime::GetIsolate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CJS_Runtime
的用法示例。
在下文中一共展示了CJS_Runtime::GetIsolate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: activeDocs
FX_BOOL app::activeDocs(OBJ_PROP_PARAMS)
{
if (vp.IsGetting())
{
CJS_Context* pContext = (CJS_Context *)cc;
ASSERT(pContext != NULL);
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
ASSERT(pApp != NULL);
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
ASSERT(pRuntime != NULL);
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
CJS_Array aDocs(pRuntime->GetIsolate());
// int iNumDocs = pApp->CountDocuments();
// for(int iIndex = 0; iIndex<iNumDocs; iIndex++)
// {
CPDFSDK_Document* pDoc = pApp->GetCurrentDoc();
if (pDoc)
{
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);
// pDocument->AttachDoc(pDoc);
}
aDocs.SetElement(0,CJS_Value(pRuntime->GetIsolate(),pJSDocument));
}
// }
if (aDocs.GetLength() > 0)
vp << aDocs;
else
vp.SetNull();
return TRUE;
}
return FALSE;
}
示例3: calculate
FX_BOOL app::calculate(OBJ_PROP_PARAMS)
{
if (vp.IsSetting())
{
bool bVP;
vp >> bVP;
m_bCalculate = (FX_BOOL)bVP;
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
ASSERT(pApp != NULL);
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
ASSERT(pRuntime != NULL);
CJS_Array aDocs(pRuntime->GetIsolate());
// int iNumDocs = pApp->CountDocuments();
//
// for (int iIndex = 0;iIndex < iNumDocs; iIndex++)
// {
if (CPDFSDK_Document* pDoc = pApp->GetCurrentDoc())
{
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDoc->GetInterForm();
ASSERT(pInterForm != NULL);
pInterForm->EnableCalculate((FX_BOOL)m_bCalculate);
}
// }
}
示例4: GetIsolate
static v8::Isolate* GetIsolate(IFXJS_Context* cc) {
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
ASSERT(pRuntime != NULL);
return pRuntime->GetIsolate();
}
示例5: Target_Field
Field* CJS_EventHandler::Target_Field() {
CJS_Runtime* pRuntime = m_pJSContext->GetJSRuntime();
v8::Local<v8::Object> pDocObj = FXJS_NewFxDynamicObj(
pRuntime->GetIsolate(), pRuntime, CJS_Document::g_nObjDefnID);
ASSERT(!pDocObj.IsEmpty());
v8::Local<v8::Object> pFieldObj = FXJS_NewFxDynamicObj(
pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
ASSERT(!pFieldObj.IsEmpty());
CJS_Document* pJSDocument =
(CJS_Document*)FXJS_GetPrivate(pRuntime->GetIsolate(), pDocObj);
Document* pDocument = (Document*)pJSDocument->GetEmbedObject();
pDocument->AttachDoc(m_pTargetDoc ? m_pTargetDoc
: m_pJSContext->GetReaderDocument());
CJS_Field* pJSField =
(CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pFieldObj);
Field* pField = (Field*)pJSField->GetEmbedObject();
pField->AttachField(pDocument, m_strTargetName);
return pField;
}
示例6: calculate
FX_BOOL app::calculate(IFXJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
if (vp.IsSetting()) {
bool bVP;
vp >> bVP;
m_bCalculate = (FX_BOOL)bVP;
CJS_Context* pContext = (CJS_Context*)cc;
CPDFDoc_Environment* pApp = pContext->GetReaderApp();
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CJS_Array aDocs(pRuntime->GetIsolate());
if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
pDoc->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
} else {
示例7: GetIsolate
static v8::Isolate* GetIsolate(IFXJS_Context* cc) {
CJS_Context* pContext = (CJS_Context*)cc;
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
return pRuntime->GetIsolate();
}