Logo ROOT   6.12/07
Reference Guide
TCanvasImp.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 16/11/95
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 
12 
13 #ifndef ROOT_TCanvasImp
14 #define ROOT_TCanvasImp
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TCanvasImp //
19 // //
20 // ABC describing GUI independent main window (with menubar, scrollbars //
21 // and a drawing area). //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "Rtypes.h"
26 
27 class TCanvas;
28 class TVirtualPadPainter;
29 
30 class TCanvasImp {
31 friend class TCanvas;
32 
33 protected:
34  TCanvas *fCanvas; //TCanvas associated with this implementation
35 
37  : fCanvas(ci.fCanvas) { }
39  {if(this!=&ci) fCanvas=ci.fCanvas; return *this;}
40 
41  virtual void Lock() { }
42  virtual void Unlock() { }
43  virtual Bool_t IsLocked() { return kFALSE; }
44 
45  virtual Bool_t PerformUpdate() { return kFALSE; }
46  virtual TVirtualPadPainter *CreatePadPainter() { return 0; }
47 
48 public:
49  TCanvasImp(TCanvas *c=0) : fCanvas(c) { }
50  TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height);
51  TCanvasImp(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
52  virtual ~TCanvasImp() { }
53 
54  TCanvas *Canvas() const { return fCanvas; }
55  virtual void Close() { }
56  virtual void ForceUpdate() { }
57  virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
58  virtual void Iconify() { }
59  virtual Int_t InitWindow() { return 0; }
60  virtual void SetStatusText(const char *text = 0, Int_t partidx = 0);
61  virtual void SetWindowPosition(Int_t x, Int_t y);
62  virtual void SetWindowSize(UInt_t w, UInt_t h);
63  virtual void SetWindowTitle(const char *newTitle);
64  virtual void SetCanvasSize(UInt_t w, UInt_t h);
65  virtual void Show() { }
66  virtual void ShowMenuBar(Bool_t show = kTRUE);
67  virtual void ShowStatusBar(Bool_t show = kTRUE);
68  virtual void RaiseWindow();
69  virtual void ReallyDelete();
70 
71  virtual void ShowEditor(Bool_t show = kTRUE);
72  virtual void ShowToolBar(Bool_t show = kTRUE);
73  virtual void ShowToolTips(Bool_t show = kTRUE);
74 
75  virtual Bool_t HasEditor() const { return kFALSE; }
76  virtual Bool_t HasMenuBar() const { return kFALSE; }
77  virtual Bool_t HasStatusBar() const { return kFALSE; }
78  virtual Bool_t HasToolBar() const { return kFALSE; }
79  virtual Bool_t HasToolTips() const { return kFALSE; }
80 
81  ClassDef(TCanvasImp,0) //ABC describing main window protocol
82 };
83 
84 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, UInt_t, UInt_t) : fCanvas(c) { }
85 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, Int_t, Int_t, UInt_t, UInt_t) : fCanvas(c) { }
87  { x = y = 0; w = h = 0; return 0;}
88 inline void TCanvasImp::SetStatusText(const char *, Int_t) { }
91 inline void TCanvasImp::SetWindowTitle(const char *) { }
95 inline void TCanvasImp::RaiseWindow() { }
96 inline void TCanvasImp::ReallyDelete() { }
97 
101 
102 #endif
virtual Bool_t PerformUpdate()
Definition: TCanvasImp.h:45
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area)...
Definition: TCanvasImp.h:30
TCanvasImp & operator=(const TCanvasImp &ci)
Definition: TCanvasImp.h:38
virtual void ReallyDelete()
Definition: TCanvasImp.h:96
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvasImp.h:89
TH1 * h
Definition: legend2.C:5
virtual Bool_t HasToolBar() const
Definition: TCanvasImp.h:78
TCanvasImp(TCanvas *c=0)
Definition: TCanvasImp.h:49
virtual void SetWindowTitle(const char *newTitle)
Definition: TCanvasImp.h:91
TCanvasImp(const TCanvasImp &ci)
Definition: TCanvasImp.h:36
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t HasMenuBar() const
Definition: TCanvasImp.h:76
virtual Bool_t HasStatusBar() const
Definition: TCanvasImp.h:77
virtual void RaiseWindow()
Definition: TCanvasImp.h:95
virtual Bool_t IsLocked()
Definition: TCanvasImp.h:43
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual void ShowEditor(Bool_t show=kTRUE)
Definition: TCanvasImp.h:98
virtual void Show()
Definition: TCanvasImp.h:65
virtual void Close()
Definition: TCanvasImp.h:55
virtual void ShowToolBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:99
virtual void ShowMenuBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:93
virtual Bool_t HasToolTips() const
Definition: TCanvasImp.h:79
virtual void ForceUpdate()
Definition: TCanvasImp.h:56
virtual void Iconify()
Definition: TCanvasImp.h:58
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void ShowStatusBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:94
const Bool_t kFALSE
Definition: RtypesCore.h:88
The Canvas class.
Definition: TCanvas.h:31
TText * text
Double_t y[n]
Definition: legend1.C:17
virtual Bool_t HasEditor() const
Definition: TCanvasImp.h:75
virtual void SetWindowSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:90
virtual TVirtualPadPainter * CreatePadPainter()
Definition: TCanvasImp.h:46
virtual void Lock()
Definition: TCanvasImp.h:41
TCanvas * Canvas() const
Definition: TCanvasImp.h:54
virtual void ShowToolTips(Bool_t show=kTRUE)
Definition: TCanvasImp.h:100
virtual Int_t InitWindow()
Definition: TCanvasImp.h:59
virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Definition: TCanvasImp.h:86
virtual void SetStatusText(const char *text=0, Int_t partidx=0)
Definition: TCanvasImp.h:88
virtual void SetCanvasSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:92
virtual ~TCanvasImp()
Definition: TCanvasImp.h:52
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void Unlock()
Definition: TCanvasImp.h:42
TCanvas * fCanvas
Definition: TCanvasImp.h:34
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
char name[80]
Definition: TGX11.cxx:109