TVirtualPadEditor.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TVirtualPadEditor.h,v 1.0 2003/11/25
00002 // Author: Rene Brun   25/11/03
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 #ifndef ROOT_TVirtualPadEditor
00012 #define ROOT_TVirtualPadEditor
00013 
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TVirtualPadEditor                                                    //
00018 //                                                                      //
00019 // Abstract base class used by ROOT graphics editor                     //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TString
00024 #include "TString.h"
00025 #endif
00026 
00027 class TCanvas;
00028 
00029 class TVirtualPadEditor {
00030 
00031 protected:
00032    static TVirtualPadEditor *fgPadEditor;    // singleton editor dialog
00033    static TString            fgEditorName;   // name of the default pad editor "Ged"
00034 
00035 public:
00036    TVirtualPadEditor();
00037    virtual ~TVirtualPadEditor();
00038    virtual Bool_t   IsGlobal() const = 0;
00039 
00040    // methods related to the old editor interface
00041    virtual void     DrawLine(Double_t, Double_t , Double_t , Double_t ) { }
00042    virtual void     DrawLineNDC(Double_t , Double_t , Double_t , Double_t ) { }
00043    virtual void     DrawText(Double_t , Double_t , const char *) { }
00044    virtual void     DrawTextNDC(Double_t , Double_t , const char *) { }
00045    virtual void     FillAttributes(Int_t , Int_t ) { }
00046    virtual void     LineAttributes(Int_t , Int_t , Int_t ) { }
00047    virtual void     MarkerAttributes(Int_t , Int_t , Float_t ) { }
00048    virtual void     TextAttributes(Int_t ,Float_t ,Int_t ,Int_t ,Float_t ) { }
00049 
00050    virtual void     Build() { }
00051    virtual void     Show() { }
00052    virtual void     Hide() { }
00053    virtual void     DeleteEditors() { }
00054    virtual void     SetGlobal(Bool_t) { }
00055    virtual TCanvas* GetCanvas() const = 0;
00056 
00057    // methods related to the new editor interface
00058 
00059    //static methods for both interfaces
00060    static const char        *GetEditorName();
00061    static TVirtualPadEditor *GetPadEditor(Bool_t load = kTRUE);
00062    static TVirtualPadEditor *LoadEditor();
00063    static void      HideEditor();
00064    static void      ShowEditor();
00065    static void      SetPadEditorName(const char *name);
00066    static void      Terminate();
00067    static void      UpdateFillAttributes(Int_t col, Int_t sty);
00068    static void      UpdateLineAttributes(Int_t col, Int_t sty, Int_t width);
00069    static void      UpdateMarkerAttributes(Int_t col, Int_t sty, Float_t msiz);
00070    static void      UpdateTextAttributes(Int_t align,Float_t angle,Int_t col,Int_t font,Float_t tsize);
00071 
00072    ClassDef(TVirtualPadEditor,0)  //Abstract interface for graphics pad editor
00073 };
00074 
00075 #endif

Generated on Tue Jul 5 14:10:34 2011 for ROOT_528-00b_version by  doxygen 1.5.1