Logo ROOT  
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
TVirtualPadEditor::Terminate
static void Terminate()
Close the global pad editor. Static method.
Definition: TVirtualPadEditor.cxx:118
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TVirtualPadEditor::DeleteEditors
virtual void DeleteEditors()
Definition: TVirtualPadEditor.h:51
TVirtualPadEditor::GetCanvas
virtual TCanvas * GetCanvas() const =0
TVirtualPadEditor::LoadEditor
static TVirtualPadEditor * LoadEditor()
Static function returning a pointer to a new pad editor.
Definition: TVirtualPadEditor.cxx:47
TVirtualPadEditor::TextAttributes
virtual void TextAttributes(Int_t, Float_t, Int_t, Int_t, Float_t)
Definition: TVirtualPadEditor.h:46
TVirtualPadEditor::SetPadEditorName
static void SetPadEditorName(const char *name)
Set type of default pad editor. Static method.
Definition: TVirtualPadEditor.cxx:85
Float_t
float Float_t
Definition: RtypesCore.h:57
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TVirtualPadEditor::TVirtualPadEditor
TVirtualPadEditor()
Virtual editor ctor.
Definition: TVirtualPadEditor.cxx:31
TVirtualPadEditor::Hide
virtual void Hide()
Definition: TVirtualPadEditor.h:50
TVirtualPadEditor::MarkerAttributes
virtual void MarkerAttributes(Int_t, Int_t, Float_t)
Definition: TVirtualPadEditor.h:45
TVirtualPadEditor::UpdateTextAttributes
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.
Definition: TVirtualPadEditor.cxx:140
TString
Basic string class.
Definition: TString.h:136
TString.h
bool
TVirtualPadEditor::HideEditor
static void HideEditor()
Hide the pad editor. Static method.
Definition: TVirtualPadEditor.cxx:109
TVirtualPadEditor::GetPadEditor
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
Definition: TVirtualPadEditor.cxx:74
TVirtualPadEditor::DrawTextNDC
virtual void DrawTextNDC(Double_t, Double_t, const char *)
Definition: TVirtualPadEditor.h:42
TVirtualPadEditor::fgPadEditor
static TVirtualPadEditor * fgPadEditor
Definition: TVirtualPadEditor.h:30
TVirtualPadEditor::Show
virtual void Show()
Definition: TVirtualPadEditor.h:49
TVirtualPadEditor::ShowEditor
static void ShowEditor()
Show the global pad editor. Static method.
Definition: TVirtualPadEditor.cxx:96
TVirtualPadEditor::UpdateFillAttributes
static void UpdateFillAttributes(Int_t col, Int_t sty)
Update fill attributes via the pad editor.
Definition: TVirtualPadEditor.cxx:129
TVirtualPadEditor::~TVirtualPadEditor
virtual ~TVirtualPadEditor()
Virtual editor dtor.
Definition: TVirtualPadEditor.cxx:38
TVirtualPadEditor::UpdateMarkerAttributes
static void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_t msiz)
Update marker attributes via the pad editor.
Definition: TVirtualPadEditor.cxx:164
TVirtualPadEditor::fgEditorName
static TString fgEditorName
Definition: TVirtualPadEditor.h:31
TVirtualPadEditor::GetEditorName
static const char * GetEditorName()
Returns the type of the default pad editor. Static method.
Definition: TVirtualPadEditor.cxx:66
TVirtualPadEditor::DrawLineNDC
virtual void DrawLineNDC(Double_t, Double_t, Double_t, Double_t)
Definition: TVirtualPadEditor.h:40
TVirtualPadEditor::LineAttributes
virtual void LineAttributes(Int_t, Int_t, Int_t)
Definition: TVirtualPadEditor.h:44
TVirtualPadEditor::UpdateLineAttributes
static void UpdateLineAttributes(Int_t col, Int_t sty, Int_t width)
Update line attributes via the pad editor.
Definition: TVirtualPadEditor.cxx:152
Double_t
double Double_t
Definition: RtypesCore.h:59
TVirtualPadEditor::IsGlobal
virtual Bool_t IsGlobal() const =0
TCanvas
The Canvas class.
Definition: TCanvas.h:23
TVirtualPadEditor::Build
virtual void Build()
Definition: TVirtualPadEditor.h:48
TVirtualPadEditor::DrawText
virtual void DrawText(Double_t, Double_t, const char *)
Definition: TVirtualPadEditor.h:41
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TVirtualPadEditor::FillAttributes
virtual void FillAttributes(Int_t, Int_t)
Definition: TVirtualPadEditor.h:43
TVirtualPadEditor::DrawLine
virtual void DrawLine(Double_t, Double_t, Double_t, Double_t)
Definition: TVirtualPadEditor.h:39
TVirtualPadEditor
Abstract base class used by ROOT graphics editor.
Definition: TVirtualPadEditor.h:27
TVirtualPadEditor::SetGlobal
virtual void SetGlobal(Bool_t)
Definition: TVirtualPadEditor.h:52
int