Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:38

0001 // @(#)root/gpad:$Id$
0002 // Author: Rene Brun   03/07/96
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TDialogCanvas
0013 #define ROOT_TDialogCanvas
0014 
0015 
0016 #include "TCanvas.h"
0017 #include "TAttText.h"
0018 
0019 class TDialogCanvas : public TCanvas, public TAttText {
0020 
0021 private:
0022    TDialogCanvas(const TDialogCanvas &) = delete;
0023    TDialogCanvas& operator=(const TDialogCanvas &) = delete;
0024 
0025 protected:
0026    TObject     *fRefObject{nullptr};   ///< Pointer to object to set attributes
0027    TPad        *fRefPad{nullptr};      ///< Pad containing object
0028 
0029 public:
0030    TDialogCanvas();
0031    TDialogCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
0032    TDialogCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy, UInt_t ww, UInt_t wh);
0033         ~TDialogCanvas() override;
0034    virtual void Apply(const char *action="");
0035    virtual void BuildStandardButtons();
0036    void         Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override;
0037    TObject     *GetRefObject() const { return fRefObject; }
0038    TPad        *GetRefPad() const { return fRefPad; }
0039    void         Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override;
0040    void         RecursiveRemove(TObject *obj) override;
0041    void         SetBorderMode(Short_t bordermode) override { fBorderMode = bordermode; }
0042    void         SetGrid(Int_t valuex = 1, Int_t valuey = 1) override;
0043    void         SetLogx(Int_t value = 1) override;
0044    void         SetLogy(Int_t value = 1) override;
0045    void         SetName(const char *name) override { fName = name; }
0046    virtual void SetRefObject(TObject *obj) { fRefObject = obj; }
0047    virtual void SetRefPad(TPad *pad) { fRefPad = pad; }
0048    void         x3d(Option_t *option = "") override;
0049 
0050    ClassDefOverride(TDialogCanvas,0)  //A specialized canvas to set attributes.
0051 };
0052 
0053 inline void TDialogCanvas::Divide(Int_t, Int_t, Float_t, Float_t, Int_t) { }
0054 inline void TDialogCanvas::SetGrid(Int_t, Int_t) { }
0055 inline void TDialogCanvas::SetLogx(Int_t) { }
0056 inline void TDialogCanvas::SetLogy(Int_t) { }
0057 inline void TDialogCanvas::x3d(Option_t *) { }
0058 
0059 #endif
0060