In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing)
Same childs => children in a few places in documenatation and variables. Removed a compile warning in CCubeSceneNode. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3330 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
c00c459bde
commit
29f6ca002e
|
@ -1,3 +1,9 @@
|
|||
- In IGUITreeView "clearChilds" and "hasChilds" deprecated for "clearChildren" and "hasChildren" (thx @Greenya for noticing)
|
||||
|
||||
- add dimension2d::operator-
|
||||
|
||||
- add CGUIEditBox::getOverrideColor and CGUIEditBox::isOverrideColorEnabled
|
||||
|
||||
- Add logging level ELL_DEBUG
|
||||
|
||||
- Add parameter DisplayAdapter to creation params to allow selecting the card when more than one card is in the system.
|
||||
|
|
|
@ -805,7 +805,7 @@ void CQuake3EventHandler::CreateGUI()
|
|||
gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
|
||||
gui.Window, -1, true, true, false );
|
||||
gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
|
||||
gui.SceneTree->getRoot()->clearChilds();
|
||||
gui.SceneTree->getRoot()->clearChildren();
|
||||
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
||||
|
||||
|
||||
|
@ -1288,7 +1288,7 @@ void CQuake3EventHandler::SetGUIActive( s32 command)
|
|||
gui.SceneTree && Game->Device->getGUIEnvironment()->getFocus() != gui.SceneTree
|
||||
)
|
||||
{
|
||||
gui.SceneTree->getRoot()->clearChilds();
|
||||
gui.SceneTree->getRoot()->clearChildren();
|
||||
addSceneTreeItem ( Game->Device->getSceneManager()->getRootSceneNode(), gui.SceneTree->getRoot() );
|
||||
}
|
||||
|
||||
|
|
|
@ -66,11 +66,25 @@ namespace gui
|
|||
//! returns the child item count
|
||||
virtual u32 getChildCount() const = 0;
|
||||
|
||||
//! removes all childs (recursive) from this node
|
||||
virtual void clearChilds() = 0;
|
||||
//! removes all children (recursive) from this node
|
||||
virtual void clearChildren() = 0;
|
||||
|
||||
//! removes all children (recursive) from this node
|
||||
/** \deprecated Deprecated in 1.8, use clearChildren() instead. */
|
||||
_IRR_DEPRECATED_ void clearChilds()
|
||||
{
|
||||
return clearChildren();
|
||||
}
|
||||
|
||||
//! returns true if this node has child nodes
|
||||
virtual bool hasChilds() const = 0;
|
||||
virtual bool hasChildren() const = 0;
|
||||
|
||||
//! returns true if this node has child nodes
|
||||
/** \deprecated Deprecated in 1.8, use hasChildren() instead. */
|
||||
_IRR_DEPRECATED_ bool hasChilds() const
|
||||
{
|
||||
return hasChildren();
|
||||
}
|
||||
|
||||
//! Adds a new node behind the last child node.
|
||||
/** \param text text of the new node
|
||||
|
@ -135,11 +149,11 @@ namespace gui
|
|||
void* data=0, IReferenceCounted* data2=0) = 0;
|
||||
|
||||
//! Return the first child node from this node.
|
||||
/** \return The first child node or 0 if this node has no childs. */
|
||||
/** \return The first child node or 0 if this node has no children. */
|
||||
virtual IGUITreeViewNode* getFirstChild() const = 0;
|
||||
|
||||
//! Return the last child node from this node.
|
||||
/** \return The last child node or 0 if this node has no childs. */
|
||||
/** \return The last child node or 0 if this node has no children. */
|
||||
virtual IGUITreeViewNode* getLastChild() const = 0;
|
||||
|
||||
//! Returns the previous sibling node from this node.
|
||||
|
@ -171,7 +185,7 @@ namespace gui
|
|||
/** \return True if the node was found as achild node and was not already the last child. */
|
||||
virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
|
||||
|
||||
//! Returns true if the node is expanded (childs are visible).
|
||||
//! Returns true if the node is expanded (children are visible).
|
||||
virtual bool getExpanded() const = 0;
|
||||
|
||||
//! Sets if the node is expanded.
|
||||
|
@ -187,7 +201,7 @@ namespace gui
|
|||
virtual bool isRoot() const = 0;
|
||||
|
||||
//! Returns the level of this node.
|
||||
/** The root node has level 0. Direct childs of the root has level 1 ... */
|
||||
/** The root node has level 0. Direct children of the root has level 1 ... */
|
||||
virtual s32 getLevel() const = 0;
|
||||
|
||||
//! Returns true if this node is visible (all parents are expanded).
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace
|
|||
|
||||
//! prefab for a container scene node
|
||||
//! Collects other prefabs and instantiates them upon instantiation
|
||||
//! Uses a dummy scene node to return the childs as one scene node
|
||||
//! Uses a dummy scene node to return the children as one scene node
|
||||
class CScenePrefab : public CPrefab
|
||||
{
|
||||
public:
|
||||
|
@ -279,7 +279,7 @@ namespace
|
|||
os::Printer::log("COLLADA: Constructing scene instance", Id.c_str());
|
||||
#endif
|
||||
|
||||
if (Childs.size()==0)
|
||||
if (Children.size()==0)
|
||||
return 0;
|
||||
|
||||
scene::IDummyTransformationSceneNode* s = mgr->addDummyTransformationSceneNode(parent);
|
||||
|
@ -295,14 +295,14 @@ namespace
|
|||
}
|
||||
os::Printer::log("COLLADA: Transformation", t.c_str());
|
||||
|
||||
for (u32 i=0; i<Childs.size(); ++i)
|
||||
Childs[i]->addInstance(s, mgr);
|
||||
for (u32 i=0; i<Children.size(); ++i)
|
||||
Children[i]->addInstance(s, mgr);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
core::array<IColladaPrefab*> Childs;
|
||||
core::array<IColladaPrefab*> Children;
|
||||
core::matrix4 Transformation;
|
||||
};
|
||||
|
||||
|
@ -737,7 +737,7 @@ void CColladaFileLoader::readNodeSection(io::IXMLReaderUTF8* reader, scene::ISce
|
|||
if (p)
|
||||
{
|
||||
nodeprefab = new CScenePrefab(readId(reader));
|
||||
p->Childs.push_back(nodeprefab);
|
||||
p->Children.push_back(nodeprefab);
|
||||
Prefabs.push_back(nodeprefab); // in order to delete them later on
|
||||
}
|
||||
|
||||
|
@ -1132,7 +1132,7 @@ void CColladaFileLoader::instantiateNode(scene::ISceneNode* parent,
|
|||
if (url == "" || url == Prefabs[i]->getId())
|
||||
{
|
||||
if (p)
|
||||
p->Childs.push_back(Prefabs[i]);
|
||||
p->Children.push_back(Prefabs[i]);
|
||||
else
|
||||
if (CreateInstances)
|
||||
{
|
||||
|
@ -1153,7 +1153,7 @@ void CColladaFileLoader::instantiateNode(scene::ISceneNode* parent,
|
|||
if (instanceGeometryName==type)
|
||||
{
|
||||
Prefabs.push_back(new CGeometryPrefab(url));
|
||||
p->Childs.push_back(Prefabs.getLast());
|
||||
p->Children.push_back(Prefabs.getLast());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1661,7 +1661,7 @@ void CColladaFileLoader::readGeometry(io::IXMLReaderUTF8* reader)
|
|||
core::array<SSource> sources;
|
||||
bool okToReadArray = false;
|
||||
|
||||
// handles geometry node and the mesh childs in this loop
|
||||
// handles geometry node and the mesh children in this loop
|
||||
// read sources with arrays and accessor for each mesh
|
||||
if (!reader->isEmptyElement())
|
||||
while(reader->read())
|
||||
|
|
|
@ -214,7 +214,7 @@ private:
|
|||
void readAssetSection(io::IXMLReaderUTF8* reader);
|
||||
|
||||
//! reads a <node> section and its content
|
||||
//! if a prefab pointer is passed the nodes are created as scene prefabs childs of that prefab
|
||||
//! if a prefab pointer is passed the nodes are created as scene prefabs children of that prefab
|
||||
void readNodeSection(io::IXMLReaderUTF8* reader, scene::ISceneNode* parent, CScenePrefab* p=0);
|
||||
|
||||
//! reads a <lookat> element and its content and creates a matrix from it
|
||||
|
|
|
@ -64,7 +64,6 @@ void CCubeSceneNode::render()
|
|||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||
|
||||
// for debug purposes only:
|
||||
bool renderMeshes = true;
|
||||
video::SMaterial mat = Mesh->getMeshBuffer(0)->getMaterial();
|
||||
|
||||
// overwrite half transparency
|
||||
|
|
|
@ -32,9 +32,9 @@ CGUIModalScreen::CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* pare
|
|||
bool CGUIModalScreen::canTakeFocus(IGUIElement* target) const
|
||||
{
|
||||
return (target && ((const IGUIElement*)target == this // this element can take it
|
||||
|| isMyChild(target) // own childs also
|
||||
|| isMyChild(target) // own children also
|
||||
|| (target->getType() == EGUIET_MODAL_SCREEN )// other modals also fine
|
||||
|| (target->getParent() && target->getParent()->getType() == EGUIET_MODAL_SCREEN ))) // childs of other modals will do
|
||||
|| (target->getParent() && target->getParent()->getType() == EGUIET_MODAL_SCREEN ))) // children of other modals will do
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ CGUITreeViewNode::~CGUITreeViewNode()
|
|||
setSelected( false );
|
||||
}
|
||||
|
||||
clearChilds();
|
||||
clearChildren();
|
||||
|
||||
if( Data2 )
|
||||
{
|
||||
|
@ -62,15 +62,15 @@ void CGUITreeViewNode::setIcon( const wchar_t* icon )
|
|||
Icon = icon;
|
||||
}
|
||||
|
||||
void CGUITreeViewNode::clearChilds()
|
||||
void CGUITreeViewNode::clearChildren()
|
||||
{
|
||||
core::list<CGUITreeViewNode*>::Iterator it;
|
||||
|
||||
for( it = Childs.begin(); it != Childs.end(); it++ )
|
||||
for( it = Children.begin(); it != Children.end(); it++ )
|
||||
{
|
||||
( *it )->drop();
|
||||
}
|
||||
Childs.clear();
|
||||
Children.clear();
|
||||
}
|
||||
|
||||
IGUITreeViewNode* CGUITreeViewNode::addChildBack(
|
||||
|
@ -83,7 +83,7 @@ IGUITreeViewNode* CGUITreeViewNode::addChildBack(
|
|||
{
|
||||
CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this );
|
||||
|
||||
Childs.push_back( newChild );
|
||||
Children.push_back( newChild );
|
||||
newChild->Text = text;
|
||||
newChild->Icon = icon;
|
||||
newChild->ImageIndex = imageIndex;
|
||||
|
@ -107,7 +107,7 @@ IGUITreeViewNode* CGUITreeViewNode::addChildFront(
|
|||
{
|
||||
CGUITreeViewNode* newChild = new CGUITreeViewNode( Owner, this );
|
||||
|
||||
Childs.push_front( newChild );
|
||||
Children.push_front( newChild );
|
||||
newChild->Text = text;
|
||||
newChild->Icon = icon;
|
||||
newChild->ImageIndex = imageIndex;
|
||||
|
@ -133,7 +133,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildAfter(
|
|||
core::list<CGUITreeViewNode*>::Iterator itOther;
|
||||
CGUITreeViewNode* newChild = 0;
|
||||
|
||||
for( itOther = Childs.begin(); itOther != Childs.end(); itOther++ )
|
||||
for( itOther = Children.begin(); itOther != Children.end(); itOther++ )
|
||||
{
|
||||
if( other == *itOther )
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildAfter(
|
|||
{
|
||||
data2->grab();
|
||||
}
|
||||
Childs.insert_after( itOther, newChild );
|
||||
Children.insert_after( itOther, newChild );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore(
|
|||
core::list<CGUITreeViewNode*>::Iterator itOther;
|
||||
CGUITreeViewNode* newChild = 0;
|
||||
|
||||
for( itOther = Childs.begin(); itOther != Childs.end(); itOther++ )
|
||||
for( itOther = Children.begin(); itOther != Children.end(); itOther++ )
|
||||
{
|
||||
if( other == *itOther )
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore(
|
|||
{
|
||||
data2->grab();
|
||||
}
|
||||
Childs.insert_before( itOther, newChild );
|
||||
Children.insert_before( itOther, newChild );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -191,25 +191,25 @@ IGUITreeViewNode* CGUITreeViewNode::insertChildBefore(
|
|||
|
||||
IGUITreeViewNode* CGUITreeViewNode::getFirstChild() const
|
||||
{
|
||||
if( Childs.empty() )
|
||||
if( Children.empty() )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return *( Childs.begin() );
|
||||
return *( Children.begin() );
|
||||
}
|
||||
}
|
||||
|
||||
IGUITreeViewNode* CGUITreeViewNode::getLastChild() const
|
||||
{
|
||||
if( Childs.empty() )
|
||||
if( Children.empty() )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return *( Childs.getLast() );
|
||||
return *( Children.getLast() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,11 +221,11 @@ IGUITreeViewNode* CGUITreeViewNode::getPrevSibling() const
|
|||
|
||||
if( Parent )
|
||||
{
|
||||
for( itThis = Parent->Childs.begin(); itThis != Parent->Childs.end(); itThis++ )
|
||||
for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ )
|
||||
{
|
||||
if( this == *itThis )
|
||||
{
|
||||
if( itThis != Parent->Childs.begin() )
|
||||
if( itThis != Parent->Children.begin() )
|
||||
{
|
||||
other = *itOther;
|
||||
}
|
||||
|
@ -244,11 +244,11 @@ IGUITreeViewNode* CGUITreeViewNode::getNextSibling() const
|
|||
|
||||
if( Parent )
|
||||
{
|
||||
for( itThis = Parent->Childs.begin(); itThis != Parent->Childs.end(); itThis++ )
|
||||
for( itThis = Parent->Children.begin(); itThis != Parent->Children.end(); itThis++ )
|
||||
{
|
||||
if( this == *itThis )
|
||||
{
|
||||
if( itThis != Parent->Childs.getLast() )
|
||||
if( itThis != Parent->Children.getLast() )
|
||||
{
|
||||
other = *( ++itThis );
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ IGUITreeViewNode* CGUITreeViewNode::getNextVisible() const
|
|||
|
||||
node = const_cast<CGUITreeViewNode*>( this );
|
||||
|
||||
if( node->getExpanded() && node->hasChilds() )
|
||||
if( node->getExpanded() && node->hasChildren() )
|
||||
{
|
||||
next = node->getFirstChild();
|
||||
}
|
||||
|
@ -291,12 +291,12 @@ bool CGUITreeViewNode::deleteChild( IGUITreeViewNode* child )
|
|||
core::list<CGUITreeViewNode*>::Iterator itChild;
|
||||
bool deleted = false;
|
||||
|
||||
for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ )
|
||||
for( itChild = Children.begin(); itChild != Children.end(); itChild++ )
|
||||
{
|
||||
if( child == *itChild )
|
||||
{
|
||||
child->drop();
|
||||
Childs.erase( itChild );
|
||||
Children.erase( itChild );
|
||||
deleted = true;
|
||||
break;
|
||||
}
|
||||
|
@ -311,11 +311,11 @@ bool CGUITreeViewNode::moveChildUp( IGUITreeViewNode* child )
|
|||
CGUITreeViewNode* nodeTmp;
|
||||
bool moved = false;
|
||||
|
||||
for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ )
|
||||
for( itChild = Children.begin(); itChild != Children.end(); itChild++ )
|
||||
{
|
||||
if( child == *itChild )
|
||||
{
|
||||
if( itChild != Childs.begin() )
|
||||
if( itChild != Children.begin() )
|
||||
{
|
||||
nodeTmp = *itChild;
|
||||
*itChild = *itOther;
|
||||
|
@ -336,11 +336,11 @@ bool CGUITreeViewNode::moveChildDown( IGUITreeViewNode* child )
|
|||
CGUITreeViewNode* nodeTmp;
|
||||
bool moved = false;
|
||||
|
||||
for( itChild = Childs.begin(); itChild != Childs.end(); itChild++ )
|
||||
for( itChild = Children.begin(); itChild != Children.end(); itChild++ )
|
||||
{
|
||||
if( child == *itChild )
|
||||
{
|
||||
if( itChild != Childs.getLast() )
|
||||
if( itChild != Children.getLast() )
|
||||
{
|
||||
itOther = itChild;
|
||||
++itOther;
|
||||
|
@ -731,7 +731,7 @@ void CGUITreeView::mouseAction( s32 xpos, s32 ypos, bool onlyHover /*= false*/ )
|
|||
if( hitNode && !onlyHover
|
||||
&& xpos < hitNode->getLevel() * IndentWidth
|
||||
&& xpos > ( hitNode->getLevel() - 1 ) * IndentWidth
|
||||
&& hitNode->hasChilds() )
|
||||
&& hitNode->hasChildren() )
|
||||
{
|
||||
hitNode->setExpanded( !hitNode->getExpanded() );
|
||||
|
||||
|
@ -873,7 +873,7 @@ void CGUITreeView::draw()
|
|||
driver->draw2DRectangle( skin->getColor( EGDC_HIGH_LIGHT ), frameRect, &clientClip );
|
||||
}
|
||||
|
||||
if( node->hasChilds() )
|
||||
if( node->hasChildren() )
|
||||
{
|
||||
core::rect<s32> rc;
|
||||
core::rect<s32> expanderRect;
|
||||
|
@ -984,7 +984,7 @@ void CGUITreeView::draw()
|
|||
// horizontal line
|
||||
rc.UpperLeftCorner.X = frameRect.UpperLeftCorner.X - IndentWidth - ( IndentWidth >> 1 ) - 1;
|
||||
rc.UpperLeftCorner.Y = frameRect.UpperLeftCorner.Y + ( ( frameRect.getHeight() ) >> 1 );
|
||||
if( node->hasChilds() )
|
||||
if( node->hasChildren() )
|
||||
{
|
||||
rc.LowerRightCorner.X = frameRect.UpperLeftCorner.X - IndentWidth;
|
||||
}
|
||||
|
|
|
@ -93,14 +93,14 @@ namespace gui
|
|||
|
||||
//! returns the child item count
|
||||
virtual u32 getChildCount() const
|
||||
{ return Childs.getSize(); }
|
||||
{ return Children.getSize(); }
|
||||
|
||||
//! removes all childs (recursive) from this node
|
||||
virtual void clearChilds();
|
||||
//! removes all children (recursive) from this node
|
||||
virtual void clearChildren();
|
||||
|
||||
//! returns true if this node has child nodes
|
||||
virtual bool hasChilds() const
|
||||
{ return !Childs.empty(); }
|
||||
virtual bool hasChildren() const
|
||||
{ return !Children.empty(); }
|
||||
|
||||
//! Adds a new node behind the last child node.
|
||||
//! \param text text of the new node
|
||||
|
@ -198,7 +198,7 @@ namespace gui
|
|||
//! Moves a child node one position down.
|
||||
virtual bool moveChildDown( IGUITreeViewNode* child );
|
||||
|
||||
//! Returns true if the node is expanded (childs are visible).
|
||||
//! Returns true if the node is expanded (children are visible).
|
||||
virtual bool getExpanded() const
|
||||
{ return Expanded; }
|
||||
|
||||
|
@ -231,7 +231,7 @@ namespace gui
|
|||
void* Data;
|
||||
IReferenceCounted* Data2;
|
||||
bool Expanded;
|
||||
core::list<CGUITreeViewNode*> Childs;
|
||||
core::list<CGUITreeViewNode*> Children;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ private:
|
|||
return;
|
||||
#if defined (OCTREE_PARENTTEST )
|
||||
if ( r == core::ISREL3D_CLIPPED )
|
||||
parentTest = 1; // must still check childs
|
||||
parentTest = 1; // must still check children
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue