#ifndef MARS_MStatusArray
#define MARS_MStatusArray

#ifndef ROOT_TObjArray
#include <TObjArray.h>
#endif

class TClass;
class TCanvas;
class TVirtualPad;

class MStatusDisplay;

class MStatusArray : public TObjArray
{
private:
    void     PrintObjectsInPad(const TCollection *list, const TString &name, Int_t lvl=0) const;
    TObject *FindObjectInPad(TVirtualPad *pad, const char *object, TClass *base) const;
    TClass  *GetClass(const char *name) const;

public:
    MStatusArray() : TObjArray() { }
    TObject *DisplayIn(Option_t *o=0) const;         // *MENU*
    void     DisplayIn(MStatusDisplay &d, const char *tab=0) const;
    TObject *Display() const { return DisplayIn(); } // *MENU*

    TCanvas *FindCanvas(const char *name) const;

    TObject *FindObjectInCanvas(const char *object, const char *base, const char *canvas) const;
    TObject *FindObjectInCanvas(const char *object, const char *canvas) const;

    void Print(Option_t *o="") const;
    void Print(Option_t *wildcard, Option_t *option) const
    {
        Print(wildcard);
    }

    TObject *FindObject(const char *object, const char *base) const;
    TObject *FindObject(const char *object) const;
    TObject *FindObject(const TObject *o) const { return 0; }

    Int_t Read(const char *name=NULL);

    ClassDef(MStatusArray, 0) // Helper class for status display
};

#endif
