//--------------------------------------------------------------------------- // $RCSfile: TreeMultiItemBase.cpp,v $ // $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemBase.cpp,v $ // $Revision: 1.1 $ // $Date: 2008/03/28 13:42:18 $ //--------------------------------------------------------------------------- // Author: Jorgen Bodde // Copyright: (c) Jorgen Bodde // License: wxWidgets License //--------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "TreeMultiItemBase.cpp" #endif /* for compilers that support precompilation includes "wx/wx.h" */ #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #include "wx/treemultictrl/TreeMultiItemBase.h" #include "wx/treemultictrl/TreeMultiItemNode.h" /** TreeMultiItemBase * This class is the node of the whole tree. All the other classes in the * tree descend from this node. It contains the type of the class without * using RTTI. NOTE: this class cannot be constructed directly */ TreeMultiItemBase::TreeMultiItemBase(TreeMultiItemNode *parent) : _excluded(false) , _x(0) , _y(0) , _width(0) , _height(0) , _parent(parent) , m_Selected(false) #if(CHECKBOXVIEW) , _checkbox(false) , _checkboxState(0) #endif { // TODO: Enter your constructor code here } TreeMultiItemBase::~TreeMultiItemBase() { // TODO: Enter your destructor code here } bool TreeMultiItemBase::IsVisible() { // are we excluded? then we are not visible as well if(IsExcluded()) return false; // check every parent up until the last and if one of them is collapsed // we are not visible TreeMultiItemNode *p = GetParent(); while(p) { if(!p->IsExpanded()) return false; else p = p->GetParent(); } return true; }