Logo ROOT   6.08/07
Reference Guide
TVirtualPadEditor.h
Go to the documentation of this file.
1 // @(#)root/base:$Id: TVirtualPadEditor.h,v 1.0 2003/11/25
2 // Author: Rene Brun 25/11/03
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef ROOT_TVirtualPadEditor
12 #define ROOT_TVirtualPadEditor
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TVirtualPadEditor //
18 // //
19 // Abstract base class used by ROOT graphics editor //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TString
24 #include "TString.h"
25 #endif
26 
27 class TCanvas;
28 
30 
31 protected:
32  static TVirtualPadEditor *fgPadEditor; // singleton editor dialog
33  static TString fgEditorName; // name of the default pad editor "Ged"
34 
35 public:
37  virtual ~TVirtualPadEditor();
38  virtual Bool_t IsGlobal() const = 0;
39 
40  // methods related to the old editor interface
41  virtual void DrawLine(Double_t, Double_t , Double_t , Double_t ) { }
42  virtual void DrawLineNDC(Double_t , Double_t , Double_t , Double_t ) { }
43  virtual void DrawText(Double_t , Double_t , const char *) { }
44  virtual void DrawTextNDC(Double_t , Double_t , const char *) { }
45  virtual void FillAttributes(Int_t , Int_t ) { }
46  virtual void LineAttributes(Int_t , Int_t , Int_t ) { }
47  virtual void MarkerAttributes(Int_t , Int_t , Float_t ) { }
48  virtual void TextAttributes(Int_t ,Float_t ,Int_t ,Int_t ,Float_t ) { }
49 
50  virtual void Build() { }
51  virtual void Show() { }
52  virtual void Hide() { }
53  virtual void DeleteEditors() { }
54  virtual void SetGlobal(Bool_t) { }
55  virtual TCanvas* GetCanvas() const = 0;
56 
57  // methods related to the new editor interface
58 
59  //static methods for both interfaces
60  static const char *GetEditorName();
62  static TVirtualPadEditor *LoadEditor();
63  static void HideEditor();
64  static void ShowEditor();
65  static void SetPadEditorName(const char *name);
66  static void Terminate();
67  static void UpdateFillAttributes(Int_t col, Int_t sty);
68  static void UpdateLineAttributes(Int_t col, Int_t sty, Int_t width);
69  static void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_t msiz);
70  static void UpdateTextAttributes(Int_t align,Float_t angle,Int_t col,Int_t font,Float_t tsize);
71 
72  ClassDef(TVirtualPadEditor,0) //Abstract interface for graphics pad editor
73 };
74 
75 #endif
virtual void DrawLine(Double_t, Double_t, Double_t, Double_t)
static void SetPadEditorName(const char *name)
Set type of default pad editor. Static method.
float Float_t
Definition: RtypesCore.h:53
virtual void Hide()
static TVirtualPadEditor * LoadEditor()
Static function returning a pointer to a new pad editor.
static void UpdateTextAttributes(Int_t align, Float_t angle, Int_t col, Int_t font, Float_t tsize)
Update text attributes via the pad editor.
Basic string class.
Definition: TString.h:137
TVirtualPadEditor()
Virtual editor ctor.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void MarkerAttributes(Int_t, Int_t, Float_t)
virtual void DeleteEditors()
#define ClassDef(name, id)
Definition: Rtypes.h:254
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
virtual void TextAttributes(Int_t, Float_t, Int_t, Int_t, Float_t)
virtual void DrawTextNDC(Double_t, Double_t, const char *)
virtual void Show()
virtual ~TVirtualPadEditor()
Virtual editor dtor.
static TString fgEditorName
static void HideEditor()
Hide the pad editor. Static method.
static TVirtualPadEditor * fgPadEditor
static void ShowEditor()
Show the global pad editor. Static method.
static void UpdateFillAttributes(Int_t col, Int_t sty)
Update fill attributes via the pad editor.
The Canvas class.
Definition: TCanvas.h:41
static void UpdateLineAttributes(Int_t col, Int_t sty, Int_t width)
Update line attributes via the pad editor.
static const char * GetEditorName()
Returns the type of the default pad editor. Static method.
static void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_t msiz)
Update marker attributes via the pad editor.
double Double_t
Definition: RtypesCore.h:55
virtual void DrawLineNDC(Double_t, Double_t, Double_t, Double_t)
Abstract base class used by ROOT graphics editor.
virtual void FillAttributes(Int_t, Int_t)
virtual void Build()
virtual void DrawText(Double_t, Double_t, const char *)
virtual void LineAttributes(Int_t, Int_t, Int_t)
static void Terminate()
Close the global pad editor. Static method.
virtual Bool_t IsGlobal() const =0
const Bool_t kTRUE
Definition: Rtypes.h:91
char name[80]
Definition: TGX11.cxx:109
virtual void SetGlobal(Bool_t)
virtual TCanvas * GetCanvas() const =0