Index: trunk/MagicSoft/Cosy/base/MGList.h
===================================================================
--- trunk/MagicSoft/Cosy/base/MGList.h	(revision 1531)
+++ trunk/MagicSoft/Cosy/base/MGList.h	(revision 1690)
@@ -1,40 +1,33 @@
-#ifndef MGLIST_H
-#define MGLIST_H
+#ifndef MARS_MGList
+#define MARS_MGList
 
-#ifdef DBG_MGLIST
-#include <iostream.h>
+#ifndef ROOT_TList
+#include <TList.h>
 #endif
 
-#ifndef ROOT_TOrdCollection
-#include <TOrdCollection.h>
-#endif
+class TGWidget;
+class TGPicture;
 
-class MGList : public TOrdCollection
+class MGList : public TList
 {
+private:
+    TGWidget *GetWidget(TObject *obj) const;
+    Bool_t    IsExisting(TObject *obj) const;
+
+    void      AddPicture(const TGPicture *pic, const char *name);
+
 public:
-    ~MGList()
-    {
-#ifdef DBG_MGLIST
-        cout << "Deleting:" << flush;
-#endif
+    MGList() : TList() {}
+    virtual ~MGList();
 
-        TIter Next(this);
+    void Add(TObject *obj);
+    void Add(TObject *obj, Option_t *opt);
 
-        TObject *obj;
-        while ((obj=Next()))
-        {
-#ifdef DBG_MGLIST
-            cout << " <" << ((TGObject*)obj)->GetName() << ">" << flush;
-#endif
-            delete (TGObject*)obj;
-        }
-#ifdef DBG_MGLIST
-        cout << endl;
-#endif
-    }
-    void Add(TGObject *obj)
-    {
-        TOrdCollection::Add(obj);
-    }
+    const TGPicture *GetPicture(const char *name);
+    const TGPicture *GetPicture(const char *name, Int_t width, Int_t height);
+
+    TObject *FindWidget(Int_t id) const;
+
+    ClassDef(MGList, 0)
 };
 
