Logo ROOT  
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 IsWeb() const { return kFALSE; }
46  virtual Bool_t PerformUpdate() { return kFALSE; }
47  virtual TVirtualPadPainter *CreatePadPainter() { return 0; }
48 
49 public:
51  TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height);
52  TCanvasImp(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
53  virtual ~TCanvasImp() { }
54 
55  TCanvas *Canvas() const { return fCanvas; }
56  virtual void Close() { }
57  virtual void ForceUpdate() { }
58  virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
59  virtual void Iconify() { }
60  virtual Int_t InitWindow() { return 0; }
61  virtual void SetStatusText(const char *text = 0, Int_t partidx = 0);
62  virtual void SetWindowPosition(Int_t x, Int_t y);
63  virtual void SetWindowSize(UInt_t w, UInt_t h);
64  virtual void SetWindowTitle(const char *newTitle);
65  virtual void SetCanvasSize(UInt_t w, UInt_t h);
66  virtual void Show() { }
67  virtual void ShowMenuBar(Bool_t show = kTRUE);
68  virtual void ShowStatusBar(Bool_t show = kTRUE);
69  virtual void RaiseWindow();
70  virtual void ReallyDelete();
71 
72  virtual void ShowEditor(Bool_t show = kTRUE);
73  virtual void ShowToolBar(Bool_t show = kTRUE);
74  virtual void ShowToolTips(Bool_t show = kTRUE);
75 
76  virtual Bool_t HasEditor() const { return kFALSE; }
77  virtual Bool_t HasMenuBar() const { return kFALSE; }
78  virtual Bool_t HasStatusBar() const { return kFALSE; }
79  virtual Bool_t HasToolBar() const { return kFALSE; }
80  virtual Bool_t HasToolTips() const { return kFALSE; }
81 
82  ClassDef(TCanvasImp,0) //ABC describing main window protocol
83 };
84 
85 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, UInt_t, UInt_t) : fCanvas(c) { }
86 inline TCanvasImp::TCanvasImp(TCanvas *c, const char *, Int_t, Int_t, UInt_t, UInt_t) : fCanvas(c) { }
88  { x = y = 0; w = h = 0; return 0;}
89 inline void TCanvasImp::SetStatusText(const char *, Int_t) { }
92 inline void TCanvasImp::SetWindowTitle(const char *) { }
96 inline void TCanvasImp::RaiseWindow() { }
97 inline void TCanvasImp::ReallyDelete() { }
98 
102 
103 #endif
c
#define c(i)
Definition: RSha256.hxx:101
TCanvasImp::HasToolTips
virtual Bool_t HasToolTips() const
Definition: TCanvasImp.h:80
TCanvasImp::ShowToolBar
virtual void ShowToolBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:100
TCanvasImp::Close
virtual void Close()
Definition: TCanvasImp.h:56
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TCanvasImp::SetWindowSize
virtual void SetWindowSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:91
TCanvasImp::Lock
virtual void Lock()
Definition: TCanvasImp.cxx:22
TCanvasImp::fCanvas
TCanvas * fCanvas
Definition: TCanvasImp.h:34
TCanvasImp::Unlock
virtual void Unlock()
Definition: TCanvasImp.h:42
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
Int_t
int Int_t
Definition: RtypesCore.h:45
x
Double_t x[n]
Definition: legend1.C:17
TCanvasImp::TCanvasImp
TCanvasImp(TCanvas *c=0)
Definition: TCanvasImp.h:50
TCanvasImp::Iconify
virtual void Iconify()
Definition: TCanvasImp.h:59
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TCanvasImp::GetWindowGeometry
virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Definition: TCanvasImp.h:87
text
TText * text
Definition: entrylist_figure1.C:10
TCanvasImp::IsWeb
virtual Bool_t IsWeb() const
Definition: TCanvasImp.h:45
bool
TCanvasImp::ForceUpdate
virtual void ForceUpdate()
Definition: TCanvasImp.h:57
TCanvasImp::~TCanvasImp
virtual ~TCanvasImp()
Definition: TCanvasImp.h:53
TCanvasImp::HasEditor
virtual Bool_t HasEditor() const
Definition: TCanvasImp.h:76
TCanvasImp::HasStatusBar
virtual Bool_t HasStatusBar() const
Definition: TCanvasImp.h:78
h
#define h(i)
Definition: RSha256.hxx:106
TCanvasImp::operator=
TCanvasImp & operator=(const TCanvasImp &ci)
Definition: TCanvasImp.h:38
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TCanvasImp::ShowToolTips
virtual void ShowToolTips(Bool_t show=kTRUE)
Definition: TCanvasImp.h:101
TCanvasImp::IsLocked
virtual Bool_t IsLocked()
Definition: TCanvasImp.h:43
TCanvasImp
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition: TCanvasImp.h:30
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
y
Double_t y[n]
Definition: legend1.C:17
TCanvasImp::ShowEditor
virtual void ShowEditor(Bool_t show=kTRUE)
Definition: TCanvasImp.h:99
TCanvasImp::ReallyDelete
virtual void ReallyDelete()
Definition: TCanvasImp.h:97
TCanvasImp::SetStatusText
virtual void SetStatusText(const char *text=0, Int_t partidx=0)
Definition: TCanvasImp.h:89
TCanvasImp::SetWindowPosition
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvasImp.h:90
TCanvasImp::SetCanvasSize
virtual void SetCanvasSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:93
unsigned int
TCanvasImp::PerformUpdate
virtual Bool_t PerformUpdate()
Definition: TCanvasImp.h:46
TCanvasImp::InitWindow
virtual Int_t InitWindow()
Definition: TCanvasImp.h:60
TCanvasImp::Show
virtual void Show()
Definition: TCanvasImp.h:66
TCanvas
The Canvas class.
Definition: TCanvas.h:23
TCanvasImp::TCanvasImp
TCanvasImp(const TCanvasImp &ci)
Definition: TCanvasImp.h:36
TCanvasImp::HasMenuBar
virtual Bool_t HasMenuBar() const
Definition: TCanvasImp.h:77
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TCanvasImp::SetWindowTitle
virtual void SetWindowTitle(const char *newTitle)
Definition: TCanvasImp.h:92
TPad::fCanvas
TCanvas * fCanvas
! Pointer to mother canvas
Definition: TPad.h:102
TVirtualPadPainter
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
Definition: TVirtualPadPainter.h:19
TCanvasImp::ShowStatusBar
virtual void ShowStatusBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:95
Rtypes.h
TCanvasImp::CreatePadPainter
virtual TVirtualPadPainter * CreatePadPainter()
Definition: TCanvasImp.h:47
TCanvasImp::Canvas
TCanvas * Canvas() const
Definition: TCanvasImp.h:55
TCanvasImp::RaiseWindow
virtual void RaiseWindow()
Definition: TCanvasImp.h:96
int
TCanvasImp::ShowMenuBar
virtual void ShowMenuBar(Bool_t show=kTRUE)
Definition: TCanvasImp.h:94
TCanvasImp::HasToolBar
virtual Bool_t HasToolBar() const
Definition: TCanvasImp.h:79