Changeset 1690 for trunk/MagicSoft/Cosy/base
- Timestamp:
- 12/18/02 17:48:44 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/base/MGList.h
r918 r1690 1 #ifndef M GLIST_H2 #define M GLIST_H1 #ifndef MARS_MGList 2 #define MARS_MGList 3 3 4 #if def DBG_MGLIST5 #include < iostream.h>4 #ifndef ROOT_TList 5 #include <TList.h> 6 6 #endif 7 7 8 #ifndef ROOT_TOrdCollection 9 #include <TOrdCollection.h> 10 #endif 8 class TGWidget; 9 class TGPicture; 11 10 12 class MGList : public T OrdCollection11 class MGList : public TList 13 12 { 13 private: 14 TGWidget *GetWidget(TObject *obj) const; 15 Bool_t IsExisting(TObject *obj) const; 16 17 void AddPicture(const TGPicture *pic, const char *name); 18 14 19 public: 15 ~MGList() 16 { 17 #ifdef DBG_MGLIST 18 cout << "Deleting:" << flush; 19 #endif 20 MGList() : TList() {} 21 virtual ~MGList(); 20 22 21 TIter Next(this); 23 void Add(TObject *obj); 24 void Add(TObject *obj, Option_t *opt); 22 25 23 TObject *obj; 24 while ((obj=Next())) 25 { 26 #ifdef DBG_MGLIST 27 cout << " <" << ((TGObject*)obj)->GetName() << ">" << flush; 28 #endif 29 delete (TGObject*)obj; 30 } 31 #ifdef DBG_MGLIST 32 cout << endl; 33 #endif 34 } 35 void Add(TGObject *obj) 36 { 37 TOrdCollection::Add(obj); 38 } 26 const TGPicture *GetPicture(const char *name); 27 const TGPicture *GetPicture(const char *name, Int_t width, Int_t height); 28 29 TObject *FindWidget(Int_t id) const; 30 31 ClassDef(MGList, 0) 39 32 }; 40 33
Note:
See TracChangeset
for help on using the changeset viewer.