Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
27 class TVirtualPadEditor {
28 
29 protected:
30  static TVirtualPadEditor *fgPadEditor; // singleton editor dialog
31  static TString fgEditorName; // name of the default pad editor "Ged"
32 
33 public:
34  TVirtualPadEditor();
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();
59  static TVirtualPadEditor *GetPadEditor(Bool_t load = kTRUE);
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