File indexing completed on 2025-09-17 09:15:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TButton
0013 #define ROOT_TButton
0014
0015 #include "TPad.h"
0016 #include "TAttText.h"
0017
0018 class TButton : public TPad, public TAttText {
0019
0020 private:
0021 Bool_t fFocused;
0022 Bool_t fFraming;
0023 UChar_t fValidPattern[128];
0024
0025 TButton(const TButton &) = delete;
0026 TButton &operator=(const TButton &) = delete;
0027
0028 protected:
0029 TString fMethod;
0030
0031 public:
0032 TButton();
0033 TButton(const char *title, const char *method, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
0034 ~TButton() override;
0035 void Divide(Int_t = 1, Int_t = 1, Float_t = 0.01, Float_t = 0.01, Int_t = 0) override {}
0036 void Draw(Option_t *option = "") override;
0037 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0038 virtual const char *GetMethod() const { return fMethod.Data(); }
0039 void Paint(Option_t *option = "") override;
0040 void PaintModified() override;
0041 void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override;
0042 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0043 void SetBorderMode(Short_t bordermode) override { fBorderMode = bordermode; }
0044 virtual void SetFraming(Bool_t f = kTRUE);
0045 virtual Bool_t GetFraming() { return fFraming; };
0046 void SetGrid(Int_t = 1, Int_t = 1) override {}
0047 void SetLogx(Int_t = 1) override {}
0048 void SetLogy(Int_t = 1) override {}
0049 virtual void SetMethod(const char *method) { fMethod = method; }
0050 void SetName(const char *name) override { fName = name; }
0051 void x3d(Option_t * = "") override {}
0052
0053 ClassDefOverride(TButton,0)
0054 };
0055
0056 #endif
0057