Logo ROOT   6.14/05
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 #include "TString.h"
24 
25 class TCanvas;
26 
28 
29 protected:
30  static TVirtualPadEditor *fgPadEditor; // singleton editor dialog
31  static TString fgEditorName; // name of the default pad editor "Ged"
32 
33 public:
35  virtual ~TVirtualPadEditor();
36  virtual Bool_t IsGlobal() const = 0;
37 
38  // methods related to the old editor interface
39  virtual void DrawLine(Double_t, Double_t , Double_t , Double_t ) { }
40  virtual void DrawLineNDC(Double_t , Double_t , Double_t , Double_t ) { }
41  virtual void DrawText(Double_t , Double_t , const char *) { }
42  virtual void DrawTextNDC(Double_t , Double_t , const char *) { }
43  virtual void FillAttributes(Int_t , Int_t ) { }
44  virtual void LineAttributes(Int_t , Int_t , Int_t ) { }
45  virtual void MarkerAttributes(Int_t , Int_t , Float_t ) { }
46  virtual void TextAttributes(Int_t ,Float_t ,Int_t ,Int_t ,Float_t ) { }
47 
48  virtual void Build() { }
49  virtual void Show() { }
50  virtual void Hide() { }
51  virtual void DeleteEditors() { }
52  virtual void SetGlobal(Bool_t) { }
53  virtual TCanvas* GetCanvas() const = 0;
54 
55  // methods related to the new editor interface
56 
57  //static methods for both interfaces
58  static const char *GetEditorName();
60  static TVirtualPadEditor *LoadEditor();
61  static void HideEditor();
62  static void ShowEditor();
63  static void SetPadEditorName(const char *name);
64  static void Terminate();
65  static void UpdateFillAttributes(Int_t col, Int_t sty);
66  static void UpdateLineAttributes(Int_t col, Int_t sty, Int_t width);
67  static void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_t msiz);
68  static void UpdateTextAttributes(Int_t align,Float_t angle,Int_t col,Int_t font,Float_t tsize);
69 
70  ClassDef(TVirtualPadEditor,0) //Abstract interface for graphics pad editor
71 };
72 
73 #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
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
Definition: TGaxis.cxx:2551
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:131
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:320
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:31
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: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109
virtual void SetGlobal(Bool_t)
virtual TCanvas * GetCanvas() const =0