本文整理汇总了C++中Document::AttachDoc方法的典型用法代码示例。如果您正苦于以下问题:C++ Document::AttachDoc方法的具体用法?C++ Document::AttachDoc怎么用?C++ Document::AttachDoc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document::AttachDoc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
FX_BOOL CJS_Document::InitInstance(IFXJS_Context* cc)
{
CJS_Context* pContext = (CJS_Context*)cc;
ASSERT(pContext != NULL);
Document* pDoc = (Document*)GetEmbedObject();
ASSERT(pDoc != NULL);
pDoc->AttachDoc(pContext->GetReaderDocument());
pDoc->SetIsolate(pContext->GetJSRuntime()->GetIsolate());
return TRUE;
};
示例2: 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;
}