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