示例#1
0
/*---------------------------------------------------------------------*//**
	兄弟ノード取得
**//*---------------------------------------------------------------------*/
MenuTreeNode* Menu::getMenuTreeNodeSibling(MenuTreeNode* mtnode) const
{
	for(TreeIterator<MenuTreeNode> it = _tree->iterator(); it.has(); it.next())
	{
		if(it.object() == mtnode)
		{
			TreeNode<MenuTreeNode>* tnodeSibling = it.node()->sibling();
			return (tnodeSibling != 0L) ? tnodeSibling->object() : 0L;
		}
	}
	return 0L;
}
示例#2
0
/*---------------------------------------------------------------------*//**
	子ノード取得
**//*---------------------------------------------------------------------*/
MenuTreeNode* Menu::getMenuTreeNodeChild(MenuTreeNode* mtnode) const
{
	for(TreeIterator<MenuTreeNode> it = _tree->iterator(); it.has(); it.next())
	{
		if(it.object() == mtnode)
		{
			TreeNode<MenuTreeNode>* tnodeChild = it.node()->child();
			return (tnodeChild != 0L) ? tnodeChild->object() : 0L;
		}
	}
	return 0L;
}