#ifndef ROOT_TButton #define ROOT_TButton //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TButton // // // // A TButton object is a specialized TPad including possible list // of primitives used to build selections and options menus in a canvas. // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TPad //*KEEP,TPad. #include "TPad.h" //*KEND. #endif #ifndef ROOT_TAttText //*KEEP,TAttText. #include "TAttText.h" //*KEND. #endif class TButton : public TPad, public TAttText { private: Bool_t fFocused; // If cursor is in... Bool_t fFraming; // True if you want a frame to be painted when pressed TButton(const TButton &org); // no copy ctor, use TObject::Clone() TButton &operator=(const TButton &rhs); // idem protected: TString fMethod; //Method to be executed by this button public: TButton(); TButton(const Text_t *title, const Text_t *method, Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2); virtual ~TButton(); virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0); virtual void Draw(Option_t *option=""); virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); virtual const Text_t *GetMethod() const { return fMethod.Data(); } virtual void Paint(Option_t *option=""); virtual void PaintModified(); virtual void Range(Float_t x1, Float_t y1, Float_t x2, Float_t y2); virtual void SavePrimitive(ofstream &out, Option_t *option); virtual void SetBorderMode(Short_t bordermode) { fBorderMode = bordermode; } virtual void SetFraming(Bool_t f=1); virtual Bool_t GetFraming() { return fFraming; }; virtual void SetGrid(Int_t valuex = 1, Int_t valuey = 1); virtual void SetLogx(Int_t value = 1); virtual void SetLogy(Int_t value = 1); virtual void SetMethod(Text_t *method) { fMethod=method; } // *MENU* virtual void SetName(const Text_t *name) { fName = name; } virtual void x3d(Option_t *option=""); ClassDef(TButton,0) //A user interface button. }; inline void TButton::Divide(Int_t, Int_t, Float_t, Float_t, Int_t) { } inline void TButton::SetGrid(Int_t, Int_t) { } inline void TButton::SetLogx(Int_t) { } inline void TButton::SetLogy(Int_t) { } inline void TButton::x3d(Option_t *) { } #endif