X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fsrc%2FThirdParty%2Fwx%2Ftreemultictrl%2FTreeMultiItemNode.cpp;h=9d87c86b62e760615329153e69fd94ffce8fe8d4;hb=9c6b34ade419c6f122fedac19563dca4c2407bc2;hp=6c6287280b9e2b19dee1892788a02202121f77b1;hpb=302e341409d918a232cd2ec25f2c533c27eb9011;p=bbtk.git diff --git a/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp b/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp index 6c62872..9d87c86 100644 --- a/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp +++ b/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp @@ -1,11 +1,38 @@ -//--------------------------------------------------------------------------- -// $RCSfile: TreeMultiItemNode.cpp,v $ -// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp,v $ -// $Revision: 1.1 $ -// $Date: 2008/03/28 13:42:18 $ -//--------------------------------------------------------------------------- -// Author: Jorgen Bodde -// Copyright: (c) Jorgen Bodde +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + +//--------------------------------------------------------------------------- +// $RCSfile: TreeMultiItemNode.cpp,v $ +// $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.cpp,v $ +// $Revision: 1.2 $ +// $Date: 2012/11/16 08:49:16 $ +//--------------------------------------------------------------------------- +// Author: Jorgen Bodde +// Copyright: (c) Jorgen Bodde // License: wxWidgets License //--------------------------------------------------------------------------- @@ -19,13 +46,13 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#include "wx/treemultictrl/TreeMultiItemNode.h" - -#include "wx/arrimpl.cpp" -WX_DEFINE_OBJARRAY(TreeMultiItemBaseArray); + #pragma hdrstop +#endif + +#include "wx/treemultictrl/TreeMultiItemNode.h" + +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(TreeMultiItemBaseArray); /** TreeMultiItemNode * This class is a container holder for multiple TreeMultiItemBase classes. @@ -59,18 +86,18 @@ TreeMultiItemNode::~TreeMultiItemNode() void TreeMultiItemNode::AddNode(TreeMultiItemBase *node) { if(node) - _items.Add(node); -} - -void TreeMultiItemNode::InsertNode(TreeMultiItemBase* NodePtr, size_t Position) -{ - if (NodePtr != NULL) - this->_items.Insert(NodePtr,Position); -} - -//------------------------------------------------------------ - -void TreeMultiItemNode::DeleteNode(TreeMultiItemBase *node) + _items.Add(node); +} + +void TreeMultiItemNode::InsertNode(TreeMultiItemBase* NodePtr, size_t Position) +{ + if (NodePtr != NULL) + this->_items.Insert(NodePtr,Position); +} + +//------------------------------------------------------------ + +void TreeMultiItemNode::DeleteNode(TreeMultiItemBase *node) { // this is wrong. The RemoveAt and Remove should delete // the object @@ -166,22 +193,22 @@ TreeMultiItemBase * TreeMultiItemNode::GetNodeNext(int &cookie) const return value; } - -//------------------------------------------------------------ - -TreeMultiItemBase* TreeMultiItemNode::First() const -{ - if (this->_items.GetCount() > 0) - return &(this->_items[0]); - else - return NULL; -} /* TreeMultiItemNode::First() const */ - -TreeMultiItemBase* TreeMultiItemNode::Last() const -{ - if(this->_items.GetCount() > 0) - return &(this->_items.Last()); - else - return NULL; -} /* TreeMultiItemNode::Last() const */ - + +//------------------------------------------------------------ + +TreeMultiItemBase* TreeMultiItemNode::First() const +{ + if (this->_items.GetCount() > 0) + return &(this->_items[0]); + else + return NULL; +} /* TreeMultiItemNode::First() const */ + +TreeMultiItemBase* TreeMultiItemNode::Last() const +{ + if(this->_items.GetCount() > 0) + return &(this->_items.Last()); + else + return NULL; +} /* TreeMultiItemNode::Last() const */ +