TreeMultiItemNode.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 // $RCSfile: TreeMultiItemNode.h,v $
00003 // $Source: /cvs/creatis/bbtk/kernel/src/ThirdParty/wx/treemultictrl/TreeMultiItemNode.h,v $
00004 // $Revision: 1.1 $
00005 // $Date: 2008/03/28 13:42:18 $
00006 //---------------------------------------------------------------------------
00007 // Author:      Jorgen Bodde
00008 // Copyright:   (c) Jorgen Bodde
00009 // License:     wxWidgets License
00010 //---------------------------------------------------------------------------
00011 
00012 #ifndef __TREEMULTIITEMNODE_HPP_
00013 #define __TREEMULTIITEMNODE_HPP_
00014 
00015 #ifdef __GNUG__
00016     #pragma interface "TreeMultiItemNode.cpp"
00017 #endif
00018 
00019 #ifndef WX_PRECOMP
00020     #include "wx/wx.h"
00021 #endif
00022 #include "wx/treebase.h"
00023 
00024 
00025 #include <wx/dynarray.h>
00026 #include "TreeMultiItemBase.h"
00027 #include "TreeMultiItemWindow.h"
00028 
00038 // declare the array class here
00039 
00040 WX_DECLARE_OBJARRAY(TreeMultiItemBase, TreeMultiItemBaseArray);
00041 
00042 class TreeMultiItemNode : public TreeMultiItemBase
00043 {
00044 private:
00045         TreeMultiItemBaseArray _items;
00046 
00048         wxString _caption;
00049 
00051         bool _nodeExpanded;
00052 
00054   wxTreeItemAttr m_Attributes;
00055 
00056 public:
00057         TreeMultiItemNode(TreeMultiItemNode *parent, const wxString &caption = wxEmptyString, const wxString &name = wxEmptyString);
00058         virtual ~TreeMultiItemNode();
00059 
00060         // isClass method
00061         virtual TreeMultiItemNode *IsTreeMultiItemNode() const {
00062                 return (TreeMultiItemNode *)this;
00063         };
00064         
00065         // add methods
00066         void AddNode(TreeMultiItemBase *node);
00067         void InsertNode(TreeMultiItemBase* NodePtr, size_t Position);
00068 
00069         // delete methods
00070         void Clear();
00071         void DeleteNode(TreeMultiItemBase *node);
00072         void DeleteNode(int index);
00073         TreeMultiItemBase *RemoveNode(TreeMultiItemBase *node);
00074         TreeMultiItemBase *RemoveNode(int index);
00075 
00076         // get methods
00077         int GetNodeCount() const;
00078         TreeMultiItemBase *GetNode(int index) const;
00079         int Index(TreeMultiItemBase *node,  bool searchFromEnd = false) const;
00080         TreeMultiItemBase *GetNodeNext(int &cookie) const;
00081         
00082         TreeMultiItemBase* First() const;
00083         TreeMultiItemBase* Last() const;
00084 
00087         void Fold(bool expand) {
00088                 if(_nodeExpanded != expand)
00089                         _nodeExpanded = expand;
00090         };
00091 
00093         const wxString &GetCaption() const {
00094                 return _caption;
00095         };
00096 
00098         bool IsExpanded() const {
00099                 return _nodeExpanded;
00100         };
00101 
00102 
00103 };
00104 
00105 #endif
00106 

Generated on Wed Nov 12 11:37:08 2008 for BBTK by  doxygen 1.5.6