当前位置: 首页>>代码示例>>C++>>正文


C++ GetNextSibling函数代码示例

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


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

示例1: wxTreeItemId

wxTreeItemId CLocalTreeView::GetNearestParent(wxString& localDir)
{
	const wxString separator = wxFileName::GetPathSeparator();
#ifdef __WXMSW__
	int pos = localDir.Find(separator);
	if (pos == -1)
		return wxTreeItemId();

	wxString drive = localDir.Left(pos);
	localDir = localDir.Mid(pos + 1);

	wxTreeItemIdValue value;
	wxTreeItemId root = GetFirstChild(m_drives, value);
	while (root)
	{
		if (!GetItemText(root).Left(drive.Length()).CmpNoCase(drive))
			break;

		root = GetNextSibling(root);
	}
	if (!root)
	{
		if (drive[1] == ':')
			return AddDrive(drive[0]);
		return wxTreeItemId();
	}
#else
		if (localDir[0] == '/')
			localDir = localDir.Mid(1);
		wxTreeItemId root = GetRootItem();
#endif

	while (localDir != _T(""))
	{
		wxString subDir;
		int pos = localDir.Find(separator);
		if (pos == -1)
			subDir = localDir;
		else
			subDir = localDir.Left(pos);

		wxTreeItemId child = GetSubdir(root, subDir);
		if (!child)
			return root;

		if (!pos)
			return child;

		root = child;
		localDir = localDir.Mid(pos + 1);
	}

	return root;
}
开发者ID:Hellcenturion,项目名称:MILF,代码行数:54,代码来源:LocalTreeView.cpp

示例2: ResetAllAnimUpdateState

void CGuiWidget::ResetAllAnimUpdateState()
{
    if (xb0_animController)
        xb0_animController->ResetListUpdateState();
    CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
    if (child)
        child->ResetAllAnimUpdateState();
    CGuiWidget* nextSib = static_cast<CGuiWidget*>(GetNextSibling());
    if (nextSib)
        nextSib->ResetAllAnimUpdateState();
}
开发者ID:KalDragon,项目名称:urde,代码行数:11,代码来源:CGuiWidget.cpp

示例3: SetAnimUpdateState

void CGuiWidget::SetAnimUpdateState(EGuiAnimBehListID id, bool state)
{
    if (xb0_animController)
        xb0_animController->SetListUpdateState(id, state);
    CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
    if (child)
        child->SetAnimUpdateState(id, state);
    CGuiWidget* nextSib = static_cast<CGuiWidget*>(GetNextSibling());
    if (nextSib)
        nextSib->SetAnimUpdateState(id, state);
}
开发者ID:KalDragon,项目名称:urde,代码行数:11,代码来源:CGuiWidget.cpp

示例4: InitializeAnimControllers

void CGuiWidget::InitializeAnimControllers(EGuiAnimBehListID id, float fval, bool flag,
                                           EGuiAnimInitMode initMode)
{
    if (xb0_animController)
        xb0_animController->InitTransform(this, id, fval, flag, initMode);
    CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
    if (child)
        child->InitializeAnimControllers(id, fval, flag, initMode);
    CGuiWidget* nextSib = static_cast<CGuiWidget*>(GetNextSibling());
    if (nextSib)
        nextSib->InitializeAnimControllers(id, fval, flag, initMode);
}
开发者ID:KalDragon,项目名称:urde,代码行数:12,代码来源:CGuiWidget.cpp

示例5: ModifyRGBA

void CGuiWidget::RecalculateAllRGBA()
{
    CGuiWidget* parent = static_cast<CGuiWidget*>(GetParent());
    if (parent)
        ModifyRGBA(parent);
    CGuiWidget* nextSib = static_cast<CGuiWidget*>(GetNextSibling());
    if (nextSib)
        nextSib->RecalculateAllRGBA();
    CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
    if (child)
        child->RecalculateAllRGBA();
}
开发者ID:KalDragon,项目名称:urde,代码行数:12,代码来源:CGuiWidget.cpp

示例6: GetNextSibling

nsTableCellFrame*  
nsTableCellFrame::GetNextCell() const
{
  nsIFrame* childFrame = GetNextSibling();
  while (childFrame) {
    if (IS_TABLE_CELL(childFrame->GetType())) {
      return (nsTableCellFrame*)childFrame;
    }
    childFrame = childFrame->GetNextSibling();
  }
  return nsnull;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:12,代码来源:nsTableCellFrame.cpp

示例7: GetNextSibling

nsTableColFrame*  
nsTableColFrame::GetNextCol() const
{
  nsIFrame* childFrame = GetNextSibling();
  while (childFrame) {
    if (nsGkAtoms::tableColFrame == childFrame->GetType()) {
      return (nsTableColFrame*)childFrame;
    }
    childFrame = childFrame->GetNextSibling();
  }
  return nullptr;
}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:12,代码来源:nsTableColFrame.cpp

示例8: NS_ENSURE_TRUE

NS_IMETHODIMP
CompositionTransaction::DoTransaction() {
  if (NS_WARN_IF(!mEditorBase)) {
    return NS_ERROR_NOT_INITIALIZED;
  }

  // Fail before making any changes if there's no selection controller
  nsCOMPtr<nsISelectionController> selCon;
  mEditorBase->GetSelectionController(getter_AddRefs(selCon));
  NS_ENSURE_TRUE(selCon, NS_ERROR_NOT_INITIALIZED);

  // Advance caret: This requires the presentation shell to get the selection.
  if (mReplaceLength == 0) {
    ErrorResult rv;
    mTextNode->InsertData(mOffset, mStringToInsert, rv);
    if (NS_WARN_IF(rv.Failed())) {
      return rv.StealNSResult();
    }
    mEditorBase->RangeUpdaterRef().SelAdjInsertText(*mTextNode, mOffset,
                                                    mStringToInsert);
  } else {
    uint32_t replaceableLength = mTextNode->TextLength() - mOffset;
    ErrorResult rv;
    mTextNode->ReplaceData(mOffset, mReplaceLength, mStringToInsert, rv);
    if (NS_WARN_IF(rv.Failed())) {
      return rv.StealNSResult();
    }
    mEditorBase->RangeUpdaterRef().SelAdjDeleteText(mTextNode, mOffset,
                                                    mReplaceLength);
    mEditorBase->RangeUpdaterRef().SelAdjInsertText(*mTextNode, mOffset,
                                                    mStringToInsert);

    // If IME text node is multiple node, ReplaceData doesn't remove all IME
    // text.  So we need remove remained text into other text node.
    if (replaceableLength < mReplaceLength) {
      int32_t remainLength = mReplaceLength - replaceableLength;
      nsCOMPtr<nsINode> node = mTextNode->GetNextSibling();
      while (node && node->IsText() && remainLength > 0) {
        Text* text = static_cast<Text*>(node.get());
        uint32_t textLength = text->TextLength();
        text->DeleteData(0, remainLength, IgnoreErrors());
        mEditorBase->RangeUpdaterRef().SelAdjDeleteText(text, 0, remainLength);
        remainLength -= textLength;
        node = node->GetNextSibling();
      }
    }
  }

  nsresult rv = SetSelectionForRanges();
  NS_ENSURE_SUCCESS(rv, rv);

  return NS_OK;
}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:53,代码来源:CompositionTransaction.cpp

示例9: DoRegisterEventHandler

void CGuiWidget::RegisterEventHandler()
{
    bool flag = DoRegisterEventHandler();
    if (!flag)
    {
        CGuiWidget* ch = static_cast<CGuiWidget*>(GetChildObject());
        if (ch)
            ch->RegisterEventHandler();
    }
    CGuiWidget* sib = static_cast<CGuiWidget*>(GetNextSibling());
    if (sib && flag)
        sib->RegisterEventHandler();
}
开发者ID:KalDragon,项目名称:urde,代码行数:13,代码来源:CGuiWidget.cpp

示例10: GetFirstChild

void WatchWindow::UpdateItems()
{

    wxTreeItemIdValue cookie;
    wxTreeItemId item = GetFirstChild(m_root, cookie);

    while (item.IsOk())
    {
        UpdateItem(item);        
        item = GetNextSibling(item);
    }

}
开发者ID:AlexHayton,项目名称:decoda,代码行数:13,代码来源:WatchWindow.cpp

示例11: GetFirstChildInner

nsIFrame*
nsFrameIterator::GetFirstChild(nsIFrame* aFrame)
{
  nsIFrame* result = GetFirstChildInner(aFrame);
  if (mLockScroll && result && result->GetType() == nsGkAtoms::scrollFrame)
    return nsnull;
  if (result && mFollowOOFs) {
    result = nsPlaceholderFrame::GetRealFrameFor(result);
    
    if (IsPopupFrame(result))
      result = GetNextSibling(result);
  }
  return result;
}
开发者ID:mbrubeck,项目名称:mozilla-central,代码行数:14,代码来源:nsFrameTraversal.cpp

示例12: DumpSelf

void
Layer::Dump(FILE* aFile, const char* aPrefix)
{
  DumpSelf(aFile, aPrefix);

  if (Layer* kid = GetFirstChild()) {
    nsCAutoString pfx(aPrefix);
    pfx += "  ";
    kid->Dump(aFile, pfx.get());
  }

  if (Layer* next = GetNextSibling())
    next->Dump(aFile, aPrefix);
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:14,代码来源:Layers.cpp

示例13: wxCHECK_RET

void
wxTreeListCtrl::CheckItemRecursively(wxTreeListItem item, wxCheckBoxState state)
{
    wxCHECK_RET( m_model, "Must create first" );

    m_model->CheckItem(item, state);

    for ( wxTreeListItem child = GetFirstChild(item);
          child.IsOk();
          child = GetNextSibling(child) )
    {
        CheckItemRecursively(child, state);
    }
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:14,代码来源:treelist.cpp

示例14: fprintf_stderr

void
Layer::Dump(FILE* aFile, const char* aPrefix, bool aDumpHtml)
{
  if (aDumpHtml) {
    fprintf_stderr(aFile, "<li><a id=\"%p\" ", this);
#ifdef MOZ_DUMP_PAINTING
    if (GetType() == TYPE_CONTAINER || GetType() == TYPE_THEBES) {
      WriteSnapshotLinkToDumpFile(this, aFile);
    }
#endif
    fprintf_stderr(aFile, ">");
  }
  DumpSelf(aFile, aPrefix);

#ifdef MOZ_DUMP_PAINTING
  if (gfxUtils::sDumpPainting && AsLayerComposite() && AsLayerComposite()->GetCompositableHost()) {
    AsLayerComposite()->GetCompositableHost()->Dump(aFile, aPrefix, aDumpHtml);
  }
#endif

  if (aDumpHtml) {
    fprintf_stderr(aFile, "</a>");
  }

  if (Layer* mask = GetMaskLayer()) {
    fprintf_stderr(aFile, "%s  Mask layer:\n", aPrefix);
    nsAutoCString pfx(aPrefix);
    pfx += "    ";
    mask->Dump(aFile, pfx.get(), aDumpHtml);
  }

  if (Layer* kid = GetFirstChild()) {
    nsAutoCString pfx(aPrefix);
    pfx += "  ";
    if (aDumpHtml) {
      fprintf_stderr(aFile, "<ul>");
    }
    kid->Dump(aFile, pfx.get(), aDumpHtml);
    if (aDumpHtml) {
      fprintf_stderr(aFile, "</ul>");
    }
  }

  if (aDumpHtml) {
    fprintf_stderr(aFile, "</li>");
  }
  if (Layer* next = GetNextSibling())
    next->Dump(aFile, aPrefix, aDumpHtml);
}
开发者ID:nightahul,项目名称:gecko-dev,代码行数:49,代码来源:Layers.cpp

示例15: IsAllAnimsDone

void CGuiWidget::IsAllAnimsDone(EGuiAnimBehListID id, bool& isDone)
{
    if (xb0_animController)
    {
        if (!isDone)
            return;
        xb0_animController->IsAnimsDone(id, isDone);
    }
    CGuiWidget* child = static_cast<CGuiWidget*>(GetChildObject());
    if (child)
        child->IsAllAnimsDone(id, isDone);
    CGuiWidget* nextSib = static_cast<CGuiWidget*>(GetNextSibling());
    if (nextSib)
        nextSib->IsAllAnimsDone(id, isDone);
}
开发者ID:KalDragon,项目名称:urde,代码行数:15,代码来源:CGuiWidget.cpp


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