Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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{nullptr}; //TCanvas associated with this implementation
35
38 {
39 if (this != &ci)
40 fCanvas = ci.fCanvas;
41 return *this;
42 }
43
44 virtual void Lock() {}
45 virtual void Unlock() {}
46 virtual Bool_t IsLocked() { return kFALSE; }
47
48 virtual Bool_t IsWeb() const { return kFALSE; }
49 virtual Bool_t PerformUpdate(Bool_t /* async */) { return kFALSE; }
50 virtual TVirtualPadPainter *CreatePadPainter() { return nullptr; }
51
52public:
53 TCanvasImp(TCanvas *c = nullptr) : fCanvas(c) {}
54 TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height) : fCanvas(c) { (void) name; (void) width; (void) height; }
55 TCanvasImp(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height) : fCanvas(c) {(void) name; (void) x; (void) y; (void) width; (void) height;}
56 virtual ~TCanvasImp() {}
57
58 TCanvas *Canvas() const { return fCanvas; }
59 virtual void Close() {}
60 virtual void ForceUpdate() {}
62 {
63 x = y = 0;
64 w = h = 0;
65 return 0;
66 }
67 virtual void Iconify() {}
68 virtual Int_t InitWindow() { return 0; }
69 virtual void SetStatusText(const char *text = nullptr, Int_t partidx = 0) { (void) text; (void) partidx; }
70 virtual void SetWindowPosition(Int_t x, Int_t y) { (void) x; (void) y; }
71 virtual void SetWindowSize(UInt_t width, UInt_t height) { (void) width; (void) height; }
72 virtual void SetWindowTitle(const char *newTitle) { (void) newTitle; }
73 virtual void SetCanvasSize(UInt_t w, UInt_t h) { (void) w; (void) h; }
74 virtual void Show() {}
75 virtual void ShowMenuBar(Bool_t show = kTRUE) { (void) show; }
76 virtual void ShowStatusBar(Bool_t show = kTRUE) { (void) show; }
77 virtual void RaiseWindow() {}
78 virtual void ReallyDelete() {}
79
80 virtual void ShowEditor(Bool_t show = kTRUE) { (void) show; }
81 virtual void ShowToolBar(Bool_t show = kTRUE) { (void) show; }
82 virtual void ShowToolTips(Bool_t show = kTRUE) { (void) show; }
83
84 virtual Bool_t HasEditor() const { return kFALSE; }
85 virtual Bool_t HasMenuBar() const { return kFALSE; }
86 virtual Bool_t HasStatusBar() const { return kFALSE; }
87 virtual Bool_t HasToolBar() const { return kFALSE; }
88 virtual Bool_t HasToolTips() const { return kFALSE; }
89
90 ClassDef(TCanvasImp,0) //ABC describing main window protocol
91};
92
93#endif
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
char name[80]
Definition TGX11.cxx:110
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition TCanvasImp.h:30
virtual void SetStatusText(const char *text=nullptr, Int_t partidx=0)
Definition TCanvasImp.h:69
TCanvasImp(TCanvas *c=nullptr)
Definition TCanvasImp.h:53
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition TCanvasImp.h:70
virtual void ShowMenuBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:75
virtual void Show()
Definition TCanvasImp.h:74
virtual Bool_t HasToolBar() const
Definition TCanvasImp.h:87
virtual Bool_t PerformUpdate(Bool_t)
Definition TCanvasImp.h:49
virtual void ShowToolTips(Bool_t show=kTRUE)
Definition TCanvasImp.h:82
virtual void Iconify()
Definition TCanvasImp.h:67
TCanvas * Canvas() const
Definition TCanvasImp.h:58
TCanvas * fCanvas
Definition TCanvasImp.h:34
virtual Int_t InitWindow()
Definition TCanvasImp.h:68
TCanvasImp(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
Definition TCanvasImp.h:55
virtual ~TCanvasImp()
Definition TCanvasImp.h:56
virtual Bool_t HasEditor() const
Definition TCanvasImp.h:84
TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height)
Definition TCanvasImp.h:54
virtual void Close()
Definition TCanvasImp.h:59
TCanvasImp(const TCanvasImp &ci)
Definition TCanvasImp.h:36
virtual void SetWindowTitle(const char *newTitle)
Definition TCanvasImp.h:72
virtual Bool_t IsWeb() const
Definition TCanvasImp.h:48
virtual UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Definition TCanvasImp.h:61
virtual Bool_t IsLocked()
Definition TCanvasImp.h:46
virtual TVirtualPadPainter * CreatePadPainter()
Definition TCanvasImp.h:50
virtual void ShowEditor(Bool_t show=kTRUE)
Definition TCanvasImp.h:80
virtual Bool_t HasMenuBar() const
Definition TCanvasImp.h:85
virtual void RaiseWindow()
Definition TCanvasImp.h:77
virtual void SetWindowSize(UInt_t width, UInt_t height)
Definition TCanvasImp.h:71
virtual Bool_t HasToolTips() const
Definition TCanvasImp.h:88
virtual void SetCanvasSize(UInt_t w, UInt_t h)
Definition TCanvasImp.h:73
virtual void ReallyDelete()
Definition TCanvasImp.h:78
virtual void ForceUpdate()
Definition TCanvasImp.h:60
virtual Bool_t HasStatusBar() const
Definition TCanvasImp.h:86
TCanvasImp & operator=(const TCanvasImp &ci)
Definition TCanvasImp.h:37
virtual void ShowStatusBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:76
virtual void Unlock()
Definition TCanvasImp.h:45
virtual void ShowToolBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:81
virtual void Lock()
Definition TCanvasImp.h:44
The Canvas class.
Definition TCanvas.h:23
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17