#ifndef TMTOOLBAR_H
#define TMTOOLBAR_H

#include <RQ_OBJECT.h>
#include <TGFrame.h>
#include <TGButton.h>

const Int_t NR_TOOLBAR_BUTTONS=7;

class TMToolBar : public TGCompositeFrame {

  RQ_OBJECT("TMToolBar")

  public :

  TMToolBar(TGWindow *handler, TGWindow *p, UInt_t w, UInt_t h);
  ~TMToolBar();
  void SetButtonUp(Int_t id);
  void SetButtonDown(Int_t id);
  void DisableButtonGrayPicture(Int_t id);
  virtual void DisableButton(Int_t id);
  virtual void EnableButton(Int_t id);
  virtual Bool_t IsToggledDown(Int_t id);
  virtual void ToggleButton(Int_t id);
  virtual void SetButtonUsable(Int_t id);
  virtual Bool_t IsButtonUsable(Int_t id);
  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
		
  private :

  TGCompositeFrame		*fCompositeFrame;
  TGCompositeFrame              *fMainFRL, *fMainFRR, *fTopFR, *fBottomFR;
  TGLayoutHints			*fL[7];
  TGButton 		        *fButton[NR_TOOLBAR_BUTTONS];
  TString                       toolTipText[NR_TOOLBAR_BUTTONS];
  Bool_t			UsableButtons[NR_TOOLBAR_BUTTONS];	
  Pixel_t                       green, gray;


  ClassDef(TMToolBar, 1)
};

#endif
