Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCanvas.h
Go to the documentation of this file.
1// @(#)root/gpad:$Id$
2// Author: Rene Brun 12/12/94
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#ifndef ROOT_TCanvas
13#define ROOT_TCanvas
14
15#include "TPad.h"
16
17#include "TAttCanvas.h"
18
19class TCanvasImp;
20class TContextMenu;
21class TControlBar;
22
23class TCanvas : public TPad {
24
25friend class TCanvasImp;
26friend class TThread;
27friend class TInterpreter;
28
29protected:
30 TAttCanvas fCatt; ///< Canvas attributes
31 TString fDISPLAY; ///< Name of destination screen
32 Size_t fXsizeUser; ///< User specified size of canvas along X in CM
33 Size_t fYsizeUser; ///< User specified size of canvas along Y in CM
34 Size_t fXsizeReal; ///< Current size of canvas along X in CM
35 Size_t fYsizeReal; ///< Current size of canvas along Y in CM
36 Color_t fHighLightColor; ///< Highlight color of active pad
37 Int_t fDoubleBuffer; ///< Double buffer flag (0=off, 1=on)
38 Int_t fWindowTopX; ///< Top X position of window (in pixels)
39 Int_t fWindowTopY; ///< Top Y position of window (in pixels)
40 UInt_t fWindowWidth; ///< Width of window (including borders, etc.)
41 UInt_t fWindowHeight; ///< Height of window (including menubar, borders, etc.)
42 UInt_t fCw; ///< Width of the canvas along X (pixels)
43 UInt_t fCh; ///< Height of the canvas along Y (pixels)
44 Int_t fEvent; ///<! Type of current or last handled event
45 Int_t fEventX; ///<! Last X mouse position in canvas
46 Int_t fEventY; ///<! Last Y mouse position in canvas
47 Int_t fCanvasID; ///<! Canvas identifier
48 TObject *fSelected; ///<! Currently selected object
49 TObject *fClickSelected; ///<! Currently click-selected object
50 Int_t fSelectedX; ///<! X of selected object
51 Int_t fSelectedY; ///<! Y of selected object
52 TString fSelectedOpt; ///<! Drawing option of selected object
53 TPad *fSelectedPad; ///<! Pad containing currently selected object
54 TPad *fClickSelectedPad;///<! Pad containing currently click-selected object
55 TPad *fPadSave; ///<! Pointer to saved pad in HandleInput
56 TCanvasImp *fCanvasImp; ///<! Window system specific canvas implementation
57 TContextMenu *fContextMenu; ///<! Context menu pointer
58 Bool_t fBatch; ///<! True when in batchmode
59 Bool_t fUpdating; ///<! True when Updating the canvas
60 Bool_t fRetained; ///< Retain structure flag
61 Bool_t fUseGL; ///<! True when rendering is with GL
62 Bool_t fDrawn; ///<! Set to True when the Draw method is called
63 //
64 TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
65
66 static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
67
68private:
69 TCanvas(const TCanvas &canvas) = delete;
70 TCanvas &operator=(const TCanvas &rhs) = delete;
71 void Build();
72 void CopyPixmaps() override;
73 void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
74 void RunAutoExec();
75
76 //Initialize PadPainter.
77 void CreatePainter();
78
79protected:
80 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
81 //-- used by friend TThread class
82 void Init();
83
84public:
85 // TCanvas status bits
86 enum {
95 kShowToolTips = BIT(23)
96 };
97
98 TCanvas(Bool_t build=kTRUE);
99 TCanvas(const char *name, const char *title="", Int_t form=1);
100 TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
101 TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
102 Int_t ww, Int_t wh);
103 TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
104 virtual ~TCanvas();
105
106 //-- used by friend TThread class
107 void Constructor();
108 void Constructor(const char *name, const char *title, Int_t form);
109 void Constructor(const char *name, const char *title, Int_t ww, Int_t wh);
110 void Constructor(const char *name, const char *title,
111 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
112 void Destructor();
113
114 TVirtualPad *cd(Int_t subpadnumber=0) override;
115 void Browse(TBrowser *b) override;
116 void Clear(Option_t *option="") override;
117 void Close(Option_t *option="") override;
118 void Delete(Option_t * = "") override { MayNotUse("Delete()"); }
119 void DisconnectWidget(); // used by TCanvasImp
120 void Draw(Option_t *option="") override;
121 TObject *DrawClone(Option_t *option="") const override; // *MENU*
122 virtual TObject *DrawClonePad(); // *MENU*
123 virtual void EditorBar();
124 void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
125 void EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
126 void FeedbackMode(Bool_t set);
127 void Flush();
128 void UseCurrentStyle() override; // *MENU*
129 void ForceUpdate();
130 const char *GetDISPLAY() const {return fDISPLAY.Data();}
133 Int_t GetEvent() const override { return fEvent; }
134 Int_t GetEventX() const override { return fEventX; }
135 Int_t GetEventY() const override { return fEventY; }
136 Color_t GetHighLightColor() const override { return fHighLightColor; }
137 TVirtualPad *GetPadSave() const override { return fPadSave; }
138 void ClearPadSave() { fPadSave = nullptr; }
139 TObject *GetSelected() const override { return fSelected; }
141 Int_t GetSelectedX() const { return fSelectedX; }
142 Int_t GetSelectedY() const { return fSelectedY; }
144 TVirtualPad *GetSelectedPad() const override { return fSelectedPad; }
150 Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
151 Size_t GetXsizeUser() const { return fXsizeUser; }
152 Size_t GetYsizeUser() const { return fYsizeUser; }
153 Size_t GetXsizeReal() const { return fXsizeReal; }
154 Size_t GetYsizeReal() const { return fYsizeReal; }
155 Int_t GetCanvasID() const override { return fCanvasID; }
156 TCanvasImp *GetCanvasImp() const override { return fCanvasImp; }
161 UInt_t GetWw() const override { return fCw; }
162 UInt_t GetWh() const override { return fCh; }
163 virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
164 {wtopx=GetWindowTopX(); wtopy=fWindowTopY; ww=fWindowWidth; wh=fWindowHeight;}
165 virtual void HandleInput(EEventType button, Int_t x, Int_t y);
166 Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
167 virtual void HighlightConnect(const char *slot);
168 void Iconify();
169 Bool_t IsBatch() const override { return fBatch; }
170 Bool_t IsDrawn() { return fDrawn; }
171 Bool_t IsFolder() const override;
173 Bool_t IsRetained() const override { return fRetained; }
174 Bool_t IsWeb() const;
175 void ls(Option_t *option="") const override;
176 void MoveOpaque(Int_t set=1);
177 Bool_t OpaqueMoving() const override { return TestBit(kMoveOpaque); }
178 Bool_t OpaqueResizing() const override { return TestBit(kResizeOpaque); }
179 void Paint(Option_t *option="") override;
180 TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) override { return TPad::Pick(px, py, pickobj); }
181 virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
182 virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *SIGNAL*
183 virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y); // *SIGNAL*
184 virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected); // *SIGNAL*
185 virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event); // *SIGNAL*
186 virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
187 void Closed() override; // *SIGNAL*
188 void RaiseWindow();
190 virtual void Resize(Option_t *option="");
191 void ResizeOpaque(Int_t set=1);
192 void SaveSource(const char *filename="", Option_t *option="");
193 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
194 void SetCursor(ECursor cursor) override;
195 void SetDoubleBuffer(Int_t mode=1) override;
196 void SetName(const char *name="") override;
197 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
198 void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
200 void SetWindowSize(UInt_t ww, UInt_t wh);
202 void SetCanvasSize(UInt_t ww, UInt_t wh) override; // *MENU*
204 void SetSelected(TObject *obj) override;
206 void SetSelectedPad(TPad *pad) { fSelectedPad = pad; }
208 void Show();
209 virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
210 void SetBatch(Bool_t batch=kTRUE) override;
211 static void SetFolder(Bool_t isfolder=kTRUE);
212 void SetPadSave(TPad *pad) {fPadSave = pad;}
213 bool SetRealAspectRatio(const Int_t axis = 1); // *MENU*
214 void SetRetained(Bool_t retained=kTRUE) { fRetained=retained;}
215 void SetTitle(const char *title="") override;
216 virtual void ToggleEventStatus();
217 virtual void ToggleAutoExec();
218 virtual void ToggleToolBar();
219 virtual void ToggleEditor();
220 virtual void ToggleToolTips();
221 void Update() override;
222
223 Bool_t UseGL() const { return fUseGL; }
224 void SetSupportGL(Bool_t support) {fUseGL = support;}
226 void DeleteCanvasPainter();
227
228 static TCanvas *MakeDefCanvas();
229 static Bool_t SupportAlpha();
230
231 ClassDefOverride(TCanvas,8) //Graphics canvas
232};
233
234#endif
EEventType
Definition Buttons.h:15
ECursor
Definition GuiTypes.h:372
#define b(i)
Definition RSha256.hxx:100
int Int_t
Definition RtypesCore.h:45
float Size_t
Definition RtypesCore.h:96
unsigned int UInt_t
Definition RtypesCore.h:46
const Bool_t kFALSE
Definition RtypesCore.h:101
bool Bool_t
Definition RtypesCore.h:63
short Color_t
Definition RtypesCore.h:92
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:329
char name[80]
Definition TGX11.cxx:110
Manages canvas attributes.
Definition TAttCanvas.h:17
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition TCanvasImp.h:30
The Canvas class.
Definition TCanvas.h:23
void Init()
Initialize the TCanvas members. Called by all constructors.
Definition TCanvas.cxx:525
UInt_t fCw
Width of the canvas along X (pixels)
Definition TCanvas.h:42
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
Definition TCanvas.cxx:1037
void SetWindowSize(UInt_t ww, UInt_t wh)
Set canvas window size.
Definition TCanvas.cxx:2199
static void SetFolder(Bool_t isfolder=kTRUE)
If isfolder=kTRUE, the canvas can be browsed like a folder by default a canvas is not browsable.
Definition TCanvas.cxx:2054
void Browse(TBrowser *b) override
Browse.
Definition TCanvas.cxx:672
UInt_t GetWindowHeight() const
Definition TCanvas.h:160
TObject * GetClickSelected() const
Definition TCanvas.h:140
virtual void EditorBar()
Get editor bar.
Definition TCanvas.cxx:1028
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition TCanvas.cxx:1504
void ClearPadSave()
Definition TCanvas.h:138
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Definition TCanvas.cxx:1063
TVirtualPad * GetClickSelectedPad() const
Definition TCanvas.h:145
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition TCanvas.h:35
void Constructor()
Canvas default constructor.
Definition TCanvas.cxx:181
void SetClickSelectedPad(TPad *pad)
Definition TCanvas.h:207
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition TCanvas.cxx:2435
TCanvas(const TCanvas &canvas)=delete
Int_t fWindowTopX
Top X position of window (in pixels)
Definition TCanvas.h:38
void SetSelectedPad(TPad *pad)
Definition TCanvas.h:206
void SetDoubleBuffer(Int_t mode=1) override
Set Double Buffer On/Off.
Definition TCanvas.cxx:2015
void SetHighLightColor(Color_t col)
Definition TCanvas.h:203
virtual void ToggleToolTips()
Toggle tooltip display.
Definition TCanvas.cxx:2477
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:725
TCanvas & operator=(const TCanvas &rhs)=delete
void UseCurrentStyle() override
Force a copy of current style for all objects in canvas.
Definition TCanvas.cxx:1174
Bool_t IsDrawn()
Definition TCanvas.h:170
void Iconify()
Iconify canvas.
Definition TCanvas.cxx:1467
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition TCanvas.cxx:1199
Bool_t IsWeb() const
Is web canvas.
Definition TCanvas.cxx:1484
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition TCanvas.cxx:2444
void Destructor()
Actual canvas destructor.
Definition TCanvas.cxx:682
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
Definition TCanvas.h:163
TCanvasImp * GetCanvasImp() const override
Definition TCanvas.h:156
Bool_t IsRetained() const override
Definition TCanvas.h:173
void SetSupportGL(Bool_t support)
Definition TCanvas.h:224
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition TCanvas.cxx:2615
TPad * fPadSave
! Pointer to saved pad in HandleInput
Definition TCanvas.h:55
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition TCanvas.cxx:2489
Bool_t fBatch
! True when in batchmode
Definition TCanvas.h:58
Bool_t fUseGL
! True when rendering is with GL
Definition TCanvas.h:61
Int_t GetEventY() const override
Definition TCanvas.h:135
Int_t fEventX
! Last X mouse position in canvas
Definition TCanvas.h:45
Bool_t IsBatch() const override
Definition TCanvas.h:169
TObject * DrawClone(Option_t *option="") const override
Draw a clone of this canvas A new canvas is created that is a clone of this canvas.
Definition TCanvas.cxx:890
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition TCanvas.h:34
Bool_t HasMenuBar() const
Definition TCanvas.h:166
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition TCanvas.cxx:2605
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
Definition TCanvas.cxx:1631
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
Definition TCanvas.h:180
void Close(Option_t *option="") override
Close canvas.
Definition TCanvas.cxx:776
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix canvas aspect ratio to current value if fixed is true.
Definition TCanvas.cxx:2032
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition TCanvas.cxx:1668
Color_t GetHighLightColor() const override
Definition TCanvas.h:136
Bool_t GetShowToolBar() const
Definition TCanvas.h:147
void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected)
Report name and title of primitive below the cursor.
Definition TCanvas.cxx:962
Bool_t IsFolder() const override
Is folder ?
Definition TCanvas.cxx:1476
UInt_t fWindowWidth
Width of window (including borders, etc.)
Definition TCanvas.h:40
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition TCanvas.h:64
void CopyPixmaps() override
Copy the canvas pixmap of the pad to the canvas.
Definition TCanvas.cxx:825
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition TCanvas.cxx:2561
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Definition TCanvas.h:54
Bool_t fUpdating
! True when Updating the canvas
Definition TCanvas.h:59
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition TCanvas.cxx:1826
void SetCanvasImp(TCanvasImp *i)
Definition TCanvas.h:201
Color_t fHighLightColor
Highlight color of active pad.
Definition TCanvas.h:36
Size_t GetXsizeUser() const
Definition TCanvas.h:151
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
Definition TCanvas.cxx:2227
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition TCanvas.cxx:1653
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition TCanvas.cxx:1223
TObject * GetSelected() const override
Definition TCanvas.h:139
Size_t GetXsizeReal() const
Definition TCanvas.h:153
Int_t GetEventX() const override
Definition TCanvas.h:134
Size_t fXsizeUser
User specified size of canvas along X in CM.
Definition TCanvas.h:32
Int_t fEventY
! Last Y mouse position in canvas
Definition TCanvas.h:46
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:706
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Definition TCanvas.h:41
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition TCanvas.cxx:1210
void SetPadSave(TPad *pad)
Definition TCanvas.h:212
Bool_t GetShowEditor() const
Definition TCanvas.h:148
TObject * fClickSelected
! Currently click-selected object
Definition TCanvas.h:49
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set Width and Height of canvas to ww and wh respectively.
Definition TCanvas.cxx:1990
void Show()
Show canvas.
Definition TCanvas.cxx:2238
TPad * fSelectedPad
! Pad containing currently selected object
Definition TCanvas.h:53
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Definition TCanvas.cxx:1639
Bool_t GetAutoExec() const
Definition TCanvas.h:150
Int_t fSelectedX
! X of selected object
Definition TCanvas.h:50
virtual void ToggleEditor()
Toggle editor.
Definition TCanvas.cxx:2466
TVirtualPad * GetSelectedPad() const override
Definition TCanvas.h:144
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition TCanvas.cxx:1593
TObject * fSelected
! Currently selected object
Definition TCanvas.h:48
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this canvas in C++ macro file with GUI.
Definition TCanvas.cxx:1781
void SetCursor(ECursor cursor) override
Set cursor.
Definition TCanvas.cxx:2006
Bool_t GetShowToolTips() const
Definition TCanvas.h:149
Int_t fCanvasID
! Canvas identifier
Definition TCanvas.h:47
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
Definition TCanvas.cxx:2570
void SetTitle(const char *title="") override
Set canvas title.
Definition TCanvas.cxx:2181
UInt_t fCh
Height of the canvas along Y (pixels)
Definition TCanvas.h:43
const char * GetDISPLAY() const
Definition TCanvas.h:130
TContextMenu * fContextMenu
! Context menu pointer
Definition TCanvas.h:57
Int_t GetCanvasID() const override
Definition TCanvas.h:155
TAttCanvas fCatt
Canvas attributes.
Definition TCanvas.h:30
void SetName(const char *name="") override
Set canvas name. In case name is an empty string, a default name is set.
Definition TCanvas.cxx:2062
UInt_t GetWindowWidth() const
Definition TCanvas.h:159
Bool_t fRetained
Retain structure flag.
Definition TCanvas.h:60
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition TCanvas.cxx:2552
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition TCanvas.cxx:1118
Size_t GetYsizeUser() const
Definition TCanvas.h:152
Int_t GetSelectedY() const
Definition TCanvas.h:142
void ls(Option_t *option="") const override
List all pads.
Definition TCanvas.cxx:1492
void RaiseWindow()
Raise canvas window.
Definition TCanvas.cxx:1747
void Build()
Build a canvas. Called by all constructors.
Definition TCanvas.cxx:574
Int_t GetSelectedX() const
Definition TCanvas.h:141
Int_t fWindowTopY
Top Y position of window (in pixels)
Definition TCanvas.h:39
void Paint(Option_t *option="") override
Paint canvas.
Definition TCanvas.cxx:1543
void SetClickSelected(TObject *obj)
Definition TCanvas.h:205
TVirtualPad * GetPadSave() const override
Definition TCanvas.h:137
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2502
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TCanvas.cxx:1100
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition TCanvas.cxx:1770
TContextMenu * GetContextMenu() const
Definition TCanvas.h:131
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition TCanvas.cxx:758
Size_t GetYsizeReal() const
Definition TCanvas.h:154
UInt_t GetWw() const override
Definition TCanvas.h:161
Bool_t OpaqueMoving() const override
Definition TCanvas.h:177
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition TCanvas.h:56
UInt_t GetWh() const override
Definition TCanvas.h:162
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
Definition TCanvas.cxx:1612
void Flush()
Flush canvas buffers.
Definition TCanvas.cxx:1132
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Definition TCanvas.h:33
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Definition TCanvas.h:37
Option_t * GetSelectedOpt() const
Definition TCanvas.h:143
void ForceUpdate()
Force canvas update.
Definition TCanvas.cxx:1166
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
Definition TCanvas.cxx:2584
void SetSelected(TObject *obj) override
Set selected canvas.
Definition TCanvas.cxx:2172
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition TCanvas.cxx:1535
virtual ~TCanvas()
Canvas destructor.
Definition TCanvas.cxx:664
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition TCanvas.h:66
Int_t GetEvent() const override
Definition TCanvas.h:133
void Closed() override
Emit Closed signal.
Definition TCanvas.cxx:766
Int_t GetDoubleBuffer() const
Definition TCanvas.h:132
void SetWindowPosition(Int_t x, Int_t y)
Set canvas window position.
Definition TCanvas.cxx:2190
TString fDISPLAY
Name of destination screen.
Definition TCanvas.h:31
bool SetRealAspectRatio(const Int_t axis=1)
Function to resize a canvas so that the plot inside is shown in real aspect ratio.
Definition TCanvas.cxx:2105
Int_t fEvent
! Type of current or last handled event
Definition TCanvas.h:44
Bool_t GetShowEventStatus() const
Definition TCanvas.h:146
TString fSelectedOpt
! Drawing option of selected object
Definition TCanvas.h:52
Int_t fSelectedY
! Y of selected object
Definition TCanvas.h:51
Bool_t fDrawn
! Set to True when the Draw method is called
Definition TCanvas.h:62
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
Definition TCanvas.cxx:1974
void Delete(Option_t *="") override
Delete this object.
Definition TCanvas.h:118
Bool_t UseGL() const
Definition TCanvas.h:223
@ kResizeOpaque
Definition TCanvas.h:93
@ kShowToolTips
Definition TCanvas.h:95
@ kShowToolBar
Definition TCanvas.h:90
@ kMoveOpaque
Definition TCanvas.h:92
@ kIsGrayscale
Definition TCanvas.h:94
@ kShowEventStatus
Definition TCanvas.h:87
@ kAutoExec
Definition TCanvas.h:88
@ kMenuBar
Definition TCanvas.h:89
@ kShowEditor
Definition TCanvas.h:91
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition TCanvas.cxx:1762
virtual void ToggleToolBar()
Toggle toolbar.
Definition TCanvas.cxx:2455
void SetRetained(Bool_t retained=kTRUE)
Definition TCanvas.h:214
Bool_t OpaqueResizing() const override
Definition TCanvas.h:178
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition TCanvas.cxx:907
void ResetDrawn()
Definition TCanvas.h:189
This class provides an interface to context sensitive popup menus.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition TControlBar.h:26
This class defines an abstract interface to a generic command line interpreter.
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:201
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
Definition TObject.cxx:1016
The most important graphics class in the ROOT system.
Definition TPad.h:26
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition TPad.cxx:4535
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
th1 Draw()