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


C++ NextSibling函数代码示例

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


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

示例1: NextSiblingElement

TiXmlElement* TiXmlNode::NextSiblingElement( const std::string& value ) const
{
	TiXmlNode* node;

	for (	node = NextSibling( value );
			node;
			node = node->NextSibling( value ) )
	{
		if ( node->ToElement() )
			return node->ToElement();
	}
	return 0;
}
开发者ID:chikanamakalaka,项目名称:pacman-sdl,代码行数:13,代码来源:tinyxml.cpp

示例2: NextSiblingElement

TiXmlElement* TiXmlNode::NextSiblingElement()
{
	TiXmlNode* node;

	for (	node = NextSibling();
	node;
	node = node->NextSibling() )
	{
		if ( node->ToElement() )
			return node->ToElement();
	}
	return 0;
}
开发者ID:Lord-Ptolemy,项目名称:projecteqemu,代码行数:13,代码来源:tinyxml.cpp

示例3: NextSiblingElement

TiXmlElementA* TiXmlNodeA::NextSiblingElement() const
{
	TiXmlNodeA* node;

	for (	node = NextSibling();
	node;
	node = node->NextSibling() )
	{
		if ( node->ToElement() )
			return node->ToElement();
	}
	return 0;
}
开发者ID:AndersBillLinden,项目名称:nppcr_npp,代码行数:13,代码来源:tinyxmlA.cpp

示例4: DumpManuelTree

/* Here is where the tree is dumped out in the Manuelian style. */
extern void DumpManuelTree(FILE *f, TREENODE *node)
{
   TREENODE *kid;

   kid = GetChild(node,1);
   while (kid) 
   {
      DumpManuelTree(f,kid);
      kid = NextSibling(kid);
   }
    
   fprintf(f,"%s\n",node->string);
   fprintf(f,"L%d/C%d\n",node->line,node->column);
   fprintf(f,"%d\n",ChildCount(node));
}
开发者ID:MARFMS,项目名称:chiquitico,代码行数:16,代码来源:Trees.c

示例5: PaintWindow

static void PaintWindow(HWND hwnd, LWPAINTSTRUCT *ps)
{
	HWND wp;
	
	wp = NextSibling(hwnd);
	if (wp)
	{
		PaintWindow(wp, ps);
	}
	
	PaintWindowNow(hwnd, ps);
	
	wp = Children(hwnd);
	if (wp)
	{
		PaintWindow(wp, ps);
	}
}
开发者ID:allanshin,项目名称:DirectFB_Microwindows,代码行数:18,代码来源:winlayered.c

示例6: PrintUnmapcount

void PrintUnmapcount(HWND hWnd)
{
	HWND wp = NULL;
	
	printf("hWnd = %x, unmapcount = %d, shouldPaint = %d, %s\n", hWnd, hWnd->unmapcount, hWnd->shouldPaint, hWnd->pClass->lpszClassName);

	wp = NextSibling(hWnd);
	if (wp != NULL)
	{
		PrintUnmapcount(wp);
	}
	
	wp = Children(hWnd);
	if (wp != NULL)
	{
		PrintUnmapcount(wp);
	}
}
开发者ID:allanshin,项目名称:DirectFB_Microwindows,代码行数:18,代码来源:winlayered.c

示例7: HideChildWindows

/* Disable clipping for all levels down (children)*/
static void HideChildWindows(HWND hWnd)
{
	HWND wp = NULL;

	wp = Children(hWnd);
	if (wp != NULL)
	{
		++wp->unmapcount;
		HideChildWindows(wp);
	}
	
	wp = NextSibling(hWnd);
	if (wp != NULL)
	{
		++wp->unmapcount;
		HideChildWindows(wp);
	}
}
开发者ID:allanshin,项目名称:DirectFB_Microwindows,代码行数:19,代码来源:winlayered.c

示例8: assert

/* Make a copy of the entire tree */
TREENODE *DuplicateTree(TREENODE *node)
{
   TREENODE *kid;
   TREENODE *dup;

   assert(node != NULL);

   dup = DuplicateNode(node);

   kid = GetChild(node,1);
   while (kid != 0) 
   {
      AddChild(dup,DuplicateTree(kid));
      kid = NextSibling(kid);
   }

   return dup;
}
开发者ID:MARFMS,项目名称:chiquitico,代码行数:19,代码来源:Trees.c

示例9: lock

bool CSettingPath::Deserialize(const TiXmlNode *node, bool update /* = false */)
{
  CExclusiveLock lock(m_critical);

  if (!CSettingString::Deserialize(node, update))
    return false;
    
  if (m_control != nullptr &&
     (m_control->GetType() != "button" || (m_control->GetFormat() != "path" && m_control->GetFormat() != "file")))
  {
    CLog::Log(LOGERROR, "CSettingPath: invalid <control> of \"%s\"", m_id.c_str());
    return false;
  }
    
  auto constraints = node->FirstChild(XML_ELM_CONSTRAINTS);
  if (constraints != nullptr)
  {
    // get writable
    XMLUtils::GetBoolean(constraints, "writable", m_writable);

    // get sources
    auto sources = constraints->FirstChild("sources");
    if (sources != nullptr)
    {
      m_sources.clear();
      auto source = sources->FirstChild("source");
      while (source != nullptr)
      {
        std::string strSource = source->FirstChild()->ValueStr();
        if (!strSource.empty())
          m_sources.push_back(strSource);

        source = source->NextSibling("source");
      }
    }

    // get masking
    auto masking = constraints->FirstChild("masking");
    if (masking != nullptr)
      m_masking = masking->FirstChild()->ValueStr();
  }

  return true;
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:44,代码来源:SettingPath.cpp

示例10: ShowChildWindows

/* Shows all levels down (children) */
static void ShowChildWindows(HWND hWnd)
{
	HWND wp = NULL;

	wp = Children(hWnd);
	if (wp != NULL)
	{
		--wp->unmapcount;
		ShowChildWindows(wp);
	}
	
	wp = NextSibling(hWnd);
	if (wp != NULL)
	{
		--wp->unmapcount;
		ShowChildWindows(wp);
	}
	
}
开发者ID:allanshin,项目名称:DirectFB_Microwindows,代码行数:20,代码来源:winlayered.c

示例11: Invalidate

void
BRadioButton::SetValue(int32 value)
{
	if (value != Value()) {
		BControl::SetValueNoUpdate(value);
		Invalidate();

		if (value == B_CONTROL_ON) {
			for (BView *sibling = NextSibling(); sibling != NULL; sibling = sibling->NextSibling()) {
				BRadioButton *rbtn = cast_as(sibling, BRadioButton);
				if (rbtn != NULL) rbtn->SetValue(B_CONTROL_OFF);
			}
			for (BView *sibling = PreviousSibling(); sibling != NULL; sibling = sibling->PreviousSibling()) {
				BRadioButton *rbtn = cast_as(sibling, BRadioButton);
				if (rbtn != NULL) rbtn->SetValue(B_CONTROL_OFF);
			}
		}
	}
}
开发者ID:D-os,项目名称:BeFree,代码行数:19,代码来源:RadioButton.cpp

示例12: FirstChild

NS_IMETHODIMP
inDeepTreeWalker::NextNode(nsIDOMNode **_retval)
{
  // First try our kids
  FirstChild(_retval);

  if (*_retval) {
    return NS_OK;
  }

  // Now keep trying next siblings up the parent chain, but if we
  // discover there's nothing else restore our state.
#ifdef DEBUG
  nsIDOMNode* origCurrentNode = mCurrentNode;
#endif
  uint32_t lastChildCallsToMake = 0;
  while (1) {
    NextSibling(_retval);

    if (*_retval) {
      return NS_OK;
    }

    nsCOMPtr<nsIDOMNode> parent;
    ParentNode(getter_AddRefs(parent));
    if (!parent) {
      // Nowhere else to go; we're done.  Restore our state.
      while (lastChildCallsToMake--) {
        nsCOMPtr<nsIDOMNode> dummy;
        LastChild(getter_AddRefs(dummy));
      }
      NS_ASSERTION(mCurrentNode == origCurrentNode,
                   "Didn't go back to the right node?");
      *_retval = nullptr;
      return NS_OK;
    }
    ++lastChildCallsToMake;
  }

  NS_NOTREACHED("how did we get here?");
  return NS_OK;
}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:42,代码来源:inDeepTreeWalker.cpp

示例13: PreviousSibling

void SeqSplitterView::MouseMoved(	BPoint where,
									uint32 code,
									const BMessage* message)
{
	if (code == B_ENTERED_VIEW) {
		if (mDirection == B_VERTICAL && gVrtCursor) SetViewCursor(gVrtCursor);
		if (mDirection == B_HORIZONTAL && gHrzCursor) SetViewCursor(gHrzCursor);
	}
	if( !mMouseDown || !Window() || !Window()->CurrentMessage() ) return;
	BView*	prev = PreviousSibling();
	BView*	next = NextSibling();
	if( !prev || !next ) return;
	
	// The mouse moved message's "where" field is in window
	// coordinates.  We need to use that instead of view
	// coordinates because the changes in this view's frame
	// are asynchronous with the mouse events we receive.
	BPoint	screenWhere;
	Window()->CurrentMessage()->FindPoint("where", &screenWhere);
	Window()->ConvertToScreen(&screenWhere);
	BPoint	delta = screenWhere - mPointDown;
	
	bool	locked = false;
//printf("recived mouse of %f\n", where.x);

if( Window() && Window()->Lock() ) {
	locked = true;
	Window()->BeginViewTransaction();
}
	if( mDirection == B_VERTICAL ) {
		/* Move me
		 */
		float	prevLeft = prev->Frame().left;
		float	nextRight = next->Frame().right;
		float	x = mFrameDown.left + delta.x;
		float	y = mFrameDown.top;
		if( x < prevLeft ) x = prevLeft;
		if( x + Bounds().Width() > nextRight ) x = nextRight - Bounds().Width();
		MoveTo( x, y );
		/* Move prev
		 */
		float	height = prev->Bounds().Height();
		float	prevRight = Frame().left - 1;
		prev->ResizeTo( prevRight - prevLeft, height );
		/* Move next
		 */
		height = next->Bounds().Height();
		float	nextTop = next->Frame().top;
		float	nextLeft = Frame().right + 1;
//printf("\tsending out move to %f\n", nextLeft);
		BRect	f = next->Frame();
		if( f.left != nextLeft ) next->MoveTo( nextLeft, nextTop );
		if( f.Width() != nextRight - nextLeft ) next->ResizeTo( nextRight - nextLeft, height );
#if 0
		next->MoveTo( nextLeft, nextTop );
		next->ResizeTo( nextRight - nextLeft, height );
#endif
	} else {
		/* Move me
		 */
		float	prevTop = prev->Frame().top;
		float	nextBottom = next->Frame().bottom;
		float	x = mFrameDown.left;
		float	y = mFrameDown.top + delta.y;
		if( y < prevTop ) y = prevTop;
		if( y + Bounds().Height() > nextBottom ) y = nextBottom - Bounds().Height();
		MoveTo( x, y );
		/* Move prev
		 */
		float	width = prev->Bounds().Width();
		float	prevBottom = Frame().top - 1;
		prev->ResizeTo( width, prevBottom - prevTop );
		/* Move next
		 */
		width = next->Bounds().Width();
		float	nextLeft = next->Frame().left;
		float	nextTop = Frame().bottom + 1;
		next->MoveTo( nextLeft, nextTop );
		next->ResizeTo( width, nextBottom - nextTop );
	}
if( locked ) {
	Window()->EndViewTransaction();
	Window()->Unlock();
}
}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:85,代码来源:SeqSplitterView.cpp

示例14: Window

	Window()->EndViewTransaction();
	Window()->Unlock();
}
}

void SeqSplitterView::SetDrawingFlags(uint32 flags)
{
	mDrawingFlags = flags;
}

void SeqSplitterView::MoveVerticalSplitter(float left)
{
	ArpVALIDATE(mDirection == B_VERTICAL, return);
	
	BView*		prev = PreviousSibling();
	BView*		next = NextSibling();
	if (!prev || !next) return;
	/* Move me
	 */
	float		prevLeft = prev->Frame().left;
	float		nextRight = next->Frame().right;
	float		x = left;
	float		y = Frame().top;
	if (x < prevLeft) x = prevLeft;
	if (x + Bounds().Width() > nextRight ) x = nextRight - Bounds().Width();
	MoveTo(x, y);
	/* Move prev
	 */
	float		height = prev->Bounds().Height();
	float		prevRight = Frame().left - 1;
	prev->ResizeTo(prevRight - prevLeft, height);
开发者ID:tgkokk,项目名称:Sequitur,代码行数:31,代码来源:SeqSplitterView.cpp

示例15: Join

void XMLParagraph::Join(const XMLParagraph &rstInput)
{
    if(rstInput.m_XMLDocument.FirstChild() == nullptr){
        return;
    }

    for(auto pNode = rstInput.m_XMLDocument.FirstChild()->FirstChild(); pNode; pNode = pNode->NextSibling()){
        m_XMLDocument.FirstChild()->InsertEndChild(pNode->DeepClone(m_XMLDocument.GetDocument()));
    }
}
开发者ID:etorth,项目名称:mir2x,代码行数:10,代码来源:xmlparagraph.cpp


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