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
68 virtual void Iconify() {}
69 virtual Int_t InitWindow() { return 0; }
70 virtual void SetStatusText(const char *text = nullptr, Int_t partidx = 0) { (void) text; (void) partidx; }
71 virtual void SetWindowPosition(Int_t x, Int_t y) { (void) x; (void) y; }
72 virtual void SetWindowSize(UInt_t width, UInt_t height) { (void) width; (void) height; }
73 virtual void SetWindowTitle(const char *newTitle) { (void) newTitle; }
74 virtual void SetCanvasSize(UInt_t w, UInt_t h) { (void) w; (void) h; }
75 virtual void Show() {}
76 virtual void ShowMenuBar(Bool_t show = kTRUE) { (void) show; }
77 virtual void ShowStatusBar(Bool_t show = kTRUE) { (void) show; }
78 virtual void RaiseWindow() {}
79 virtual void ReallyDelete() {}
80
81 virtual void ShowEditor(Bool_t show = kTRUE) { (void) show; }
82 virtual void ShowToolBar(Bool_t show = kTRUE) { (void) show; }
83 virtual void ShowToolTips(Bool_t show = kTRUE) { (void) show; }
84
85 virtual Bool_t HasEditor() const { return kFALSE; }
86 virtual Bool_t HasMenuBar() const { return kFALSE; }
87 virtual Bool_t HasStatusBar() const { return kFALSE; }
88 virtual Bool_t HasToolBar() const { return kFALSE; }
89 virtual Bool_t HasToolTips() const { return kFALSE; }
90
91 virtual void Warp(Int_t ix, Int_t iy);
92 virtual Int_t RequestLocator(Int_t &x, Int_t &y);
93 virtual void GetCanvasGeometry(Int_t wid, UInt_t &w, UInt_t &h);
94 virtual void ResizeCanvasWindow(Int_t wid);
95 virtual void UpdateDisplay(Int_t mode = 0, Bool_t sleep = kFALSE);
96
97 ClassDef(TCanvasImp,0) //ABC describing main window protocol
98};
99
100#endif
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:77
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDef(name, id)
Definition Rtypes.h:344
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char mode
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:157
R__EXTERN C unsigned int sleep(unsigned int seconds)
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:70
TCanvasImp(TCanvas *c=nullptr)
Definition TCanvasImp.h:53
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition TCanvasImp.h:71
virtual void ShowMenuBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:76
virtual Int_t RequestLocator(Int_t &x, Int_t &y)
Request current mouse pointer, redirect to gVirtualX.
virtual void Show()
Definition TCanvasImp.h:75
virtual Bool_t HasToolBar() const
Definition TCanvasImp.h:88
virtual Bool_t PerformUpdate(Bool_t)
Definition TCanvasImp.h:49
virtual void ShowToolTips(Bool_t show=kTRUE)
Definition TCanvasImp.h:83
virtual void Iconify()
Definition TCanvasImp.h:68
TCanvas * Canvas() const
Definition TCanvasImp.h:58
TCanvas * fCanvas
Definition TCanvasImp.h:34
virtual Int_t InitWindow()
Definition TCanvasImp.h:69
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:85
TCanvasImp(TCanvas *c, const char *name, UInt_t width, UInt_t height)
Definition TCanvasImp.h:54
virtual void UpdateDisplay(Int_t mode=0, Bool_t sleep=kFALSE)
Update gVirtualX display, also optionally sleep to wait until operation finished.
virtual void Close()
Definition TCanvasImp.h:59
TCanvasImp(const TCanvasImp &ci)
Definition TCanvasImp.h:36
virtual void Warp(Int_t ix, Int_t iy)
Change mouse pointer, redirect to gVirtualX.
virtual void SetWindowTitle(const char *newTitle)
Definition TCanvasImp.h:73
virtual void GetCanvasGeometry(Int_t wid, UInt_t &w, UInt_t &h)
Gets the size and position of the canvas paint area.
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 void ResizeCanvasWindow(Int_t wid)
Resize canvas window, redirect to gVirtualX.
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:81
virtual Bool_t HasMenuBar() const
Definition TCanvasImp.h:86
virtual void RaiseWindow()
Definition TCanvasImp.h:78
virtual void SetWindowSize(UInt_t width, UInt_t height)
Definition TCanvasImp.h:72
virtual Bool_t HasToolTips() const
Definition TCanvasImp.h:89
virtual void SetCanvasSize(UInt_t w, UInt_t h)
Definition TCanvasImp.h:74
virtual void ReallyDelete()
Definition TCanvasImp.h:79
virtual void ForceUpdate()
Definition TCanvasImp.h:60
virtual Bool_t HasStatusBar() const
Definition TCanvasImp.h:87
TCanvasImp & operator=(const TCanvasImp &ci)
Definition TCanvasImp.h:37
virtual void ShowStatusBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:77
virtual void Unlock()
Definition TCanvasImp.h:45
virtual void ShowToolBar(Bool_t show=kTRUE)
Definition TCanvasImp.h:82
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