您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetCurrentDoc函数代码示例

51自学网 2021-06-01 21:05:59
  C++
这篇教程C++ GetCurrentDoc函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetCurrentDoc函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrentDoc函数的具体用法?C++ GetCurrentDoc怎么用?C++ GetCurrentDoc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetCurrentDoc函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NS_ENSURE_SUCCESS

nsresultnsHTMLSharedElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,                             nsIAtom* aPrefix, const nsAString& aValue,                             PRBool aNotify){  nsresult rv =  nsGenericHTMLElement::SetAttr(aNameSpaceID, aName, aPrefix,                                               aValue, aNotify);  NS_ENSURE_SUCCESS(rv, rv);  // If the href attribute of a <base> tag is changing, we may need to update  // the document's base URI, which will cause all the links on the page to be  // re-resolved given the new base.  If the target attribute is changing, we  // similarly need to change the base target.  if (mNodeInfo->Equals(nsGkAtoms::base) &&      aNameSpaceID == kNameSpaceID_None &&      IsInDoc()) {    if (aName == nsGkAtoms::href) {      SetBaseURIUsingFirstBaseWithHref(GetCurrentDoc(), this);    } else if (aName == nsGkAtoms::target) {      SetBaseTargetUsingFirstBaseWithTarget(GetCurrentDoc(), this);    }  }  return NS_OK;}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:25,


示例2: NS_ENSURE_TRUE

NS_IMETHODIMPnsHTMLMenuElement::SendShowEvent(){  NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_DOM_SECURITY_ERR);  nsCOMPtr<nsIDocument> document = GetCurrentDoc();  if (!document) {    return NS_ERROR_FAILURE;  }  nsEvent event(true, NS_SHOW_EVENT);  event.flags |= NS_EVENT_FLAG_CANT_CANCEL | NS_EVENT_FLAG_CANT_BUBBLE;  nsCOMPtr<nsIPresShell> shell = document->GetShell();  if (!shell) {    return NS_ERROR_FAILURE;  }   nsRefPtr<nsPresContext> presContext = shell->GetPresContext();  nsEventStatus status = nsEventStatus_eIgnore;  nsEventDispatcher::Dispatch(static_cast<nsIContent*>(this), presContext,                              &event, nullptr, &status);  return NS_OK;}
开发者ID:bebef1987,项目名称:mozilla-central,代码行数:25,


示例3: GetCurrentDoc

voidHTMLLinkElement::UnbindFromTree(bool aDeep, bool aNullParent){  // If this link is ever reinserted into a document, it might  // be under a different xml:base, so forget the cached state now.  Link::ResetLinkState(false, Link::ElementHasHref());  // Once we have XPCOMGC we shouldn't need to call UnbindFromTree during Unlink  // and so this messy event dispatch can go away.  nsCOMPtr<nsIDocument> oldDoc = GetCurrentDoc();  // Check for a ShadowRoot because link elements are inert in a  // ShadowRoot.  ShadowRoot* oldShadowRoot = GetBindingParent() ?    GetBindingParent()->GetShadowRoot() : nullptr;  if (oldDoc && !oldShadowRoot) {    oldDoc->UnregisterPendingLinkUpdate(this);  }  CreateAndDispatchEvent(oldDoc, NS_LITERAL_STRING("DOMLinkRemoved"));  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);  UpdateStyleSheetInternal(oldDoc, oldShadowRoot);  UpdateImport();}
开发者ID:Balakrishnan-Vivek,项目名称:gecko-dev,代码行数:25,


示例4: GetCurrentDoc

voidnsXTFElementWrapper::RegUnregAccessKey(PRBool aDoReg){  nsIDocument* doc = GetCurrentDoc();  if (!doc)    return;  // Get presentation shell 0  nsIPresShell *presShell = doc->GetShell();  if (!presShell)    return;  nsPresContext *presContext = presShell->GetPresContext();  if (!presContext)    return;  nsEventStateManager *esm = presContext->EventStateManager();  if (!esm)    return;  // Register or unregister as appropriate.  nsCOMPtr<nsIDOMAttr> accesskeyNode;  GetXTFElement()->GetAccesskeyNode(getter_AddRefs(accesskeyNode));  if (!accesskeyNode)    return;  nsAutoString accessKey;  accesskeyNode->GetValue(accessKey);  if (aDoReg && !accessKey.IsEmpty())    esm->RegisterAccessKey(this, (PRUint32)accessKey.First());  else    esm->UnregisterAccessKey(this, (PRUint32)accessKey.First());}
开发者ID:nikhilm,项目名称:v8monkey,代码行数:34,


示例5: GetCurrentDoc

///// Calls CreateAnyView(*doc) where doc is the current document.//voidTDocManager::ViewCreate(){  TDocument* doc = GetCurrentDoc();  if (doc)    CreateAnyView(*doc);}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:10,


示例6: UnsetFlags

voidHTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent){  // Cancel any DNS prefetches  // Note: Must come before ResetLinkState.  If called after, it will recreate  // mCachedURI based on data that is invalid - due to a call to GetHostname.  // If prefetch was deferred, clear flag and move on  if (HasFlag(HTML_ANCHOR_DNS_PREFETCH_DEFERRED))    UnsetFlags(HTML_ANCHOR_DNS_PREFETCH_DEFERRED);  // Else if prefetch was requested, clear flag and send cancellation  else if (HasFlag(HTML_ANCHOR_DNS_PREFETCH_REQUESTED)) {    UnsetFlags(HTML_ANCHOR_DNS_PREFETCH_REQUESTED);    // Possible that hostname could have changed since binding, but since this    // covers common cases, most DNS prefetch requests will be canceled    nsHTMLDNSPrefetch::CancelPrefetchLow(this, NS_ERROR_ABORT);  }    // If this link is ever reinserted into a document, it might  // be under a different xml:base, so forget the cached state now.  Link::ResetLinkState(false, Link::ElementHasHref());    nsIDocument* doc = GetCurrentDoc();  if (doc) {    doc->UnregisterPendingLinkUpdate(this);  }  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);}
开发者ID:L2-D2,项目名称:gecko-dev,代码行数:29,


示例7: GetFirstLabelableDescendant

nsGenericHTMLElement*HTMLLabelElement::GetLabeledElement() const{  nsAutoString elementId;  if (!GetAttr(kNameSpaceID_None, nsGkAtoms::_for, elementId)) {    // No @for, so we are a label for our first form control element.    // Do a depth-first traversal to look for the first form control element.    return GetFirstLabelableDescendant();  }  // We have a @for. The id has to be linked to an element in the same document  // and this element should be a labelable form control.  nsIDocument* doc = GetCurrentDoc();  if (!doc) {    return nullptr;  }  Element* element = doc->GetElementById(elementId);  if (element && element->IsLabelable()) {    return static_cast<nsGenericHTMLElement*>(element);  }  return nullptr;}
开发者ID:lofter2011,项目名称:Icefox,代码行数:25,


示例8: GetCurrentDoc

voidnsHTMLMetaElement::UnbindFromTree(bool aDeep, bool aNullParent){  nsCOMPtr<nsIDocument> oldDoc = GetCurrentDoc();  CreateAndDispatchEvent(oldDoc, NS_LITERAL_STRING("DOMMetaRemoved"));  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);}
开发者ID:almet,项目名称:mozilla-central,代码行数:7,


示例9: GetCurrentDoc

voidnsHTMLStyleElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent){  nsCOMPtr<nsIDocument> oldDoc = GetCurrentDoc();  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);  UpdateStyleSheetInternal(oldDoc);}
开发者ID:SecareLupus,项目名称:Drood,代码行数:8,


示例10: GetCurrentDoc

voidSVGTitleElement::SendTitleChangeEvent(bool aBound){  nsIDocument* doc = GetCurrentDoc();  if (doc) {    doc->NotifyPossibleTitleChange(aBound);  }}
开发者ID:CodeSpeaker,项目名称:gecko-dev,代码行数:8,


示例11: GetCurrentDoc

voidHTMLStyleElement::UnbindFromTree(bool aDeep, bool aNullParent){  nsCOMPtr<nsIDocument> oldDoc = GetCurrentDoc();  ShadowRoot* oldShadow = GetContainingShadow();  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);  UpdateStyleSheetInternal(oldDoc, oldShadow);}
开发者ID:PatMart,项目名称:gecko-dev,代码行数:8,


示例12: GetCurrentDoc

voidnsXMLStylesheetPI::UnbindFromTree(bool aDeep, bool aNullParent){  nsCOMPtr<nsIDocument> oldDoc = GetCurrentDoc();  nsXMLProcessingInstruction::UnbindFromTree(aDeep, aNullParent);  UpdateStyleSheetInternal(oldDoc);}
开发者ID:AntonSilviu,项目名称:v8monkey,代码行数:8,


示例13: GetCurrentDoc

voidnsSVGElement::FlushAnimations(){  nsIDocument* doc = GetCurrentDoc();  if (doc) {    nsSMILAnimationController* smilController = doc->GetAnimationController();    if (smilController) {      smilController->FlushResampleRequests();    }  }}
开发者ID:AllenDou,项目名称:firefox,代码行数:11,


示例14: GetCurrentDoc

voidSVGUseElement::TriggerReclone(){  nsIDocument *doc = GetCurrentDoc();  if (!doc)    return;  nsIPresShell *presShell = doc->GetShell();  if (!presShell)    return;  presShell->PostRecreateFramesFor(this);}
开发者ID:JSilver99,项目名称:mozilla-central,代码行数:11,


示例15: GetCurrentDoc

void CMainFrame::OnSelchangeGroupList (){	CFusionDoc *pDoc = GetCurrentDoc ();	int CurSel;	CurSel = m_wndGroupBar.m_comboBox.GetCurSel ();	if (CurSel != LB_ERR)	{		pDoc->mCurrentGroup = m_wndGroupBar.m_comboBox.GetItemData (CurSel);		m_wndTabControls->GrpTab->UpdateTabDisplay (pDoc);	}}
开发者ID:RealityFactory,项目名称:Genesis3D-Tools,代码行数:12,


示例16: GetCurrentDoc

boolHTMLObjectElement::IsFocusableForTabIndex(){  nsIDocument* doc = GetCurrentDoc();  if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {    return false;  }  return IsEditableRoot() ||         (Type() == eType_Document &&          nsContentUtils::IsSubDocumentTabbable(this));}
开发者ID:BitVapor,项目名称:Pale-Moon,代码行数:12,


示例17: GetCurrentDoc

nsresultHTMLMetaElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,                              const nsAttrValue* aValue, bool aNotify){  if (aNameSpaceID == kNameSpaceID_None) {    if (aName == nsGkAtoms::content) {      nsIDocument *document = GetCurrentDoc();      CreateAndDispatchEvent(document, NS_LITERAL_STRING("DOMMetaChanged"));    }  }  return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName, aValue,                                            aNotify);}
开发者ID:CodeSpeaker,项目名称:gecko-dev,代码行数:14,


示例18: NS_PRECONDITION

boolnsMappedAttributeElement::SetMappedAttribute(nsIDocument* aDocument,                                             nsIAtom* aName,                                             nsAttrValue& aValue,                                             nsresult* aRetval){  NS_PRECONDITION(aDocument == GetCurrentDoc(), "Unexpected document");  nsHTMLStyleSheet* sheet = aDocument ?    aDocument->GetAttributeStyleSheet() : nullptr;  *aRetval = mAttrsAndChildren.SetAndTakeMappedAttr(aName, aValue,                                                    this, sheet);  return true;}
开发者ID:Ajunboys,项目名称:mozilla-os2,代码行数:14,


示例19: GetCurrentDoc

voidHTMLAreaElement::UnbindFromTree(bool aDeep, bool aNullParent){  // If this link is ever reinserted into a document, it might  // be under a different xml:base, so forget the cached state now.  Link::ResetLinkState(false, Link::ElementHasHref());    nsIDocument* doc = GetCurrentDoc();  if (doc) {    doc->UnregisterPendingLinkUpdate(this);  }  nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);}
开发者ID:hiromitsuuuuu,项目名称:mozilla-central,代码行数:14,


示例20: GetBaseURI

voidSVGUseElement::LookupHref(){  nsAutoString href;  mStringAttributes[HREF].GetAnimValue(href, this);  if (href.IsEmpty())    return;  nsCOMPtr<nsIURI> targetURI;  nsCOMPtr<nsIURI> baseURI = mOriginal ? mOriginal->GetBaseURI() : GetBaseURI();  nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), href,                                            GetCurrentDoc(), baseURI);  mSource.Reset(this, targetURI);}
开发者ID:JSilver99,项目名称:mozilla-central,代码行数:15,


示例21: NS_ASSERTION

voidnsMathMLElement::SetIncrementScriptLevel(PRBool aIncrementScriptLevel,                                         PRBool aNotify){  if (aIncrementScriptLevel == mIncrementScriptLevel)    return;  mIncrementScriptLevel = aIncrementScriptLevel;  NS_ASSERTION(aNotify, "We always notify!");  nsIDocument* doc = GetCurrentDoc();  if (!doc)    return;  mozAutoDocUpdate upd(doc, UPDATE_CONTENT_STATE, PR_TRUE);  doc->ContentStateChanged(this, NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL);}
开发者ID:hungry-r,项目名称:mozilla-central,代码行数:17,


示例22: GetCurrentDoc

/* nsIDOMSVGMatrix getScreenCTM (); */NS_IMETHODIMP nsSVGGraphicElement::GetScreenCTM(nsIDOMSVGMatrix **_retval){  nsresult rv;  *_retval = nsnull;  nsIDocument* currentDoc = GetCurrentDoc();  if (currentDoc) {    // Flush all pending notifications so that our frames are uptodate    currentDoc->FlushPendingNotifications(Flush_Layout);  }  nsBindingManager *bindingManager = nsnull;  // XXXbz I _think_ this is right.  We want to be using the binding manager  // that would have attached the binding that gives us our anonymous parent.  // That's the binding manager for the document we actually belong to, which  // is our owner doc.  nsIDocument* ownerDoc = GetOwnerDoc();  if (ownerDoc) {    bindingManager = ownerDoc->BindingManager();  }  nsIContent* parent = nsnull;  nsCOMPtr<nsIDOMSVGMatrix> parentScreenCTM;  if (bindingManager) {    // check for an anonymous parent first    parent = bindingManager->GetInsertionParent(this);  }  if (!parent) {    // if we didn't find an anonymous parent, use the explicit one    parent = GetParent();  }  nsCOMPtr<nsIDOMSVGLocatable> locatableElement = do_QueryInterface(parent);  if (!locatableElement) {    // we don't have an SVGLocatable parent so we aren't even rendered    NS_WARNING("SVGGraphicElement without an SVGLocatable parent");    return NS_ERROR_FAILURE;  }  // get our parent's "screen" CTM  rv = locatableElement->GetScreenCTM(getter_AddRefs(parentScreenCTM));  if (NS_FAILED(rv)) return rv;  return AppendLocalTransform(parentScreenCTM, _retval);}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:47,



注:本文中的GetCurrentDoc函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetCurrentLine函数代码示例
C++ GetCurrentDirectoryW函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。