本文整理汇总了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;
}
示例2: NextSiblingElement
TiXmlElement* TiXmlNode::NextSiblingElement()
{
TiXmlNode* node;
for ( node = NextSibling();
node;
node = node->NextSibling() )
{
if ( node->ToElement() )
return node->ToElement();
}
return 0;
}
示例3: NextSiblingElement
TiXmlElementA* TiXmlNodeA::NextSiblingElement() const
{
TiXmlNodeA* node;
for ( node = NextSibling();
node;
node = node->NextSibling() )
{
if ( node->ToElement() )
return node->ToElement();
}
return 0;
}
示例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));
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
}
}
示例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;
}
示例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();
}
}
示例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);
示例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()));
}
}