#ifndef ROOT_TGToolBar
#define ROOT_TGToolBar
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TGButton;
class TGPictureButton;
class TList;
class TMap;
struct ToolBarData_t {
const char *fPixmap;
const char *fTipText;
Bool_t fStayDown;
Int_t fId;
TGButton *fButton;
};
class TGToolBar : public TGCompositeFrame {
protected:
TList *fPictures;
TList *fTrash;
TMap *fMapOfButtons;
private:
TGToolBar(const TGToolBar&);
TGToolBar& operator=(const TGToolBar&);
public:
TGToolBar(const TGWindow *p = 0, UInt_t w = 1, UInt_t h = 1,
UInt_t options = kHorizontalFrame,
Pixel_t back = GetDefaultFrameBackground());
virtual ~TGToolBar();
virtual TGButton *AddButton(const TGWindow *w, ToolBarData_t *button, Int_t spacing = 0);
virtual TGButton *AddButton(const TGWindow *w, TGPictureButton *button, Int_t spacing = 0);
virtual void ChangeIcon(ToolBarData_t *button, const char *new_icon);
virtual void Cleanup();
virtual TGButton *GetButton(Int_t id) const;
virtual Long_t GetId(TGButton *button) const;
virtual void SetId(TGButton *button, Long_t id);
virtual void ButtonPressed();
virtual void ButtonReleased();
virtual void ButtonClicked();
virtual void Pressed(Int_t id) { Emit("Pressed(Int_t)",id); }
virtual void Released(Int_t id) { Emit("Released(Int_t)",id);}
virtual void Clicked(Int_t id) { Emit("Clicked(Int_t)",id); }
virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
ClassDef(TGToolBar,0)
};
#endif