#ifndef ROOT_TGShutter
#define ROOT_TGShutter
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TGCanvas
#include "TGCanvas.h"
#endif
#ifndef ROOT_TGWidget
#include "TGWidget.h"
#endif
class TGButton;
class TGCanvas;
class TTimer;
class TList;
class TGShutterItem : public TGVerticalFrame, public TGWidget {
friend class TGShutter;
protected:
TGButton *fButton;
TGCanvas *fCanvas;
TGFrame *fContainer;
TGLayoutHints *fL1, *fL2;
private:
TGShutterItem(const TGShutterItem&);
TGShutterItem& operator=(const TGShutterItem&);
public:
TGShutterItem(const TGWindow *p = 0, TGHotString *s = 0, Int_t id = -1,
UInt_t options = 0);
virtual ~TGShutterItem();
TGButton *GetButton() const { return fButton; }
TGFrame *GetContainer() const { return fCanvas->GetContainer(); }
virtual void Selected() { Emit(" Selected()"); }
virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
ClassDef(TGShutterItem,0)
};
class TGShutter : public TGCompositeFrame {
protected:
TTimer *fTimer;
TGShutterItem *fSelectedItem;
TGShutterItem *fClosingItem;
TList *fTrash;
Int_t fHeightIncrement;
Int_t fClosingHeight;
Int_t fClosingHadScrollbar;
UInt_t fDefWidth;
UInt_t fDefHeight;
private:
TGShutter(const TGShutter&);
TGShutter& operator=(const TGShutter&);
public:
TGShutter(const TGWindow *p = 0, UInt_t options = kSunkenFrame);
virtual ~TGShutter();
virtual void AddItem(TGShutterItem *item);
virtual void RemoveItem(const char *name);
virtual TGShutterItem *AddPage(const char *item = "Page");
virtual void RemovePage();
virtual void RenamePage(const char *name);
virtual Bool_t HandleTimer(TTimer *t);
virtual void Layout();
virtual void SetLayoutManager(TGLayoutManager*) { }
TGShutterItem *GetSelectedItem() const { return fSelectedItem; }
TGShutterItem *GetItem(const char *name);
virtual void SetSelectedItem(TGShutterItem *item);
virtual void SetSelectedItem(const char *name);
virtual void EnableItem(const char *name, Bool_t on = kTRUE);
virtual TGDimension GetDefaultSize() const;
virtual void SetDefaultSize(UInt_t w, UInt_t h);
virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
virtual Bool_t ProcessMessage(Long_t cmd, Long_t parm1, Long_t parm2);
virtual void Selected(TGShutterItem *item) { Emit(" Selected(TGShutterItem*)", item); }
ClassDef(TGShutter,0)
};
#endif