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 TWebCanvas;
27friend class TPad; // to create/reset painter for PS drawing
28friend class TThread;
29friend class TInterpreter;
30
31protected:
32 TAttCanvas fCatt; ///< Canvas attributes
33 TString fDISPLAY; ///< Name of destination screen
34 Size_t fXsizeUser; ///< User specified size of canvas along X in CM
35 Size_t fYsizeUser; ///< User specified size of canvas along Y in CM
36 Size_t fXsizeReal; ///< Current size of canvas along X in CM
37 Size_t fYsizeReal; ///< Current size of canvas along Y in CM
38 Color_t fHighLightColor; ///< Highlight color of active pad
39 Int_t fDoubleBuffer; ///< Double buffer flag (0=off, 1=on)
40 Int_t fWindowTopX; ///< Top X position of window (in pixels)
41 Int_t fWindowTopY; ///< Top Y position of window (in pixels)
42 UInt_t fWindowWidth; ///< Width of window (including borders, etc.)
43 UInt_t fWindowHeight; ///< Height of window (including menubar, borders, etc.)
44 UInt_t fCw; ///< Width of the canvas along X (pixels)
45 UInt_t fCh; ///< Height of the canvas along Y (pixels)
46 Int_t fEvent; ///<! Type of current or last handled event
47 Int_t fEventX; ///<! Last X mouse position in canvas
48 Int_t fEventY; ///<! Last Y mouse position in canvas
49 Int_t fCanvasID; ///<! Canvas identifier
50 TObject *fSelected; ///<! Currently selected object
51 TObject *fClickSelected; ///<! Currently click-selected object
52 Int_t fSelectedX; ///<! X of selected object
53 Int_t fSelectedY; ///<! Y of selected object
54 TString fSelectedOpt; ///<! Drawing option of selected object
55 TPad *fSelectedPad; ///<! Pad containing currently selected object
56 TPad *fClickSelectedPad;///<! Pad containing currently click-selected object
57 TPad *fPadSave; ///<! Pointer to saved pad in HandleInput
58 TCanvasImp *fCanvasImp; ///<! Window system specific canvas implementation
59 TContextMenu *fContextMenu; ///<! Context menu pointer
60 Bool_t fBatch; ///<! True when in batchmode
61 Bool_t fUpdating; ///<! True when Updating the canvas
62 Bool_t fRetained; ///< Retain structure flag
63 Bool_t fUseGL; ///<! True when rendering is with GL
64 Bool_t fDrawn; ///<! Set to True when the Draw method is called
65 Bool_t fUpdated; ///<! Set to True when Update method was called
66 //
67 TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
68
69 static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
70
71private:
72 TCanvas(const TCanvas &canvas) = delete;
73 TCanvas &operator=(const TCanvas &rhs) = delete;
74 void Build();
75 void CopyPixmaps() override;
76 void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
77 void RunAutoExec();
78
79 //Initialize PadPainter.
80 void CreatePainter();
82
83protected:
84 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
85 //-- used by friend TThread class
86 void Init();
87
88public:
89 // TCanvas status bits
90 enum {
99 kShowToolTips = BIT(23)
100 };
101
102 TCanvas(Bool_t build=kTRUE);
103 TCanvas(const char *name, const char *title="", Int_t form=1);
104 TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
105 TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
106 Int_t ww, Int_t wh);
107 TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
108 ~TCanvas() override;
109
110 //-- used by friend TThread class
111 void Constructor();
112 void Constructor(const char *name, const char *title, Int_t form);
113 void Constructor(const char *name, const char *title, Int_t ww, Int_t wh);
114 void Constructor(const char *name, const char *title,
116 void Destructor();
117
118 TVirtualPad *cd(Int_t subpadnumber=0) override;
119 void Browse(TBrowser *b) override;
120 void Clear(Option_t *option="") override;
121 void Close(Option_t *option="") override;
122 void Delete(Option_t * = "") override { MayNotUse("Delete()"); }
123 void DisconnectWidget(); // used by TCanvasImp
124 void Draw(Option_t *option="") override;
125 TObject *DrawClone(Option_t *option="") const override; // *MENU*
126 virtual TObject *DrawClonePad(); // *MENU*
127 virtual void EditorBar();
128 void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
130 void FeedbackMode(Bool_t set);
131 void Flush();
132 void UseCurrentStyle() override; // *MENU*
133 void ForceUpdate();
134 const char *GetDISPLAY() const {return fDISPLAY.Data();}
137 Int_t GetEvent() const override { return fEvent; }
138 Int_t GetEventX() const override { return fEventX; }
139 Int_t GetEventY() const override { return fEventY; }
140 Color_t GetHighLightColor() const override { return fHighLightColor; }
141 TVirtualPad *GetPadSave() const override { return fPadSave; }
142 void ClearPadSave() { fPadSave = nullptr; }
143 TObject *GetSelected() const override { return fSelected; }
145 Int_t GetSelectedX() const { return fSelectedX; }
146 Int_t GetSelectedY() const { return fSelectedY; }
148 TVirtualPad *GetSelectedPad() const override { return fSelectedPad; }
154 Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
155 Size_t GetXsizeUser() const { return fXsizeUser; }
156 Size_t GetYsizeUser() const { return fYsizeUser; }
157 Size_t GetXsizeReal() const { return fXsizeReal; }
158 Size_t GetYsizeReal() const { return fYsizeReal; }
159 Int_t GetCanvasID() const override { return fCanvasID; }
160 TCanvasImp *GetCanvasImp() const override { return fCanvasImp; }
165 UInt_t GetWw() const override { return fCw; }
166 UInt_t GetWh() const override { return fCh; }
169 virtual void HandleInput(EEventType button, Int_t x, Int_t y);
170 Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
171 virtual void HighlightConnect(const char *slot);
172 void Iconify();
173 Bool_t IsBatch() const override { return fBatch; }
174 Bool_t IsDrawn() const { return fDrawn; }
175 Bool_t IsUpdated() const { return fUpdated; }
176 Bool_t IsFolder() const override;
178 Bool_t IsRetained() const override { return fRetained; }
179 Bool_t IsWeb() const override;
180 void ls(Option_t *option="") const override;
181 void MoveOpaque(Int_t set=1);
182 Bool_t OpaqueMoving() const override { return TestBit(kMoveOpaque); }
183 Bool_t OpaqueResizing() const override { return TestBit(kResizeOpaque); }
184 void Paint(Option_t *option="") override;
185 TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) override { return TPad::Pick(px, py, pickobj); }
186 virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
187 virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *SIGNAL*
188 virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y); // *SIGNAL*
189 virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected); // *SIGNAL*
190 virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event); // *SIGNAL*
191 virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
192 void Closed() override; // *SIGNAL*
193 void RaiseWindow();
196 virtual void Resize(Option_t *option="");
197 void ResizeOpaque(Int_t set=1);
198 void SaveSource(const char *filename="", Option_t *option="");
199 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
200 void SetCursor(ECursor cursor) override;
201 void SetDoubleBuffer(Int_t mode=1) override;
202 void SetName(const char *name="") override;
203 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
204 void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
206 void SetWindowSize(UInt_t ww, UInt_t wh);
207 void SetCanvasImp(TCanvasImp *i);
208 void SetCanvasSize(UInt_t ww, UInt_t wh) override; // *MENU*
210 void SetSelected(TObject *obj) override;
214 void Show();
215 virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
216 void SetBatch(Bool_t batch=kTRUE) override;
217 static void SetFolder(Bool_t isfolder=kTRUE);
219 bool SetRealAspectRatio(const Int_t axis = 1); // *MENU*
221 void SetTitle(const char *title="") override;
222 virtual void ToggleEventStatus();
223 virtual void ToggleAutoExec();
224 virtual void ToggleToolBar();
225 virtual void ToggleEditor();
226 virtual void ToggleToolTips();
227 void Update() override;
228 void UpdateAsync() override;
229
230 Bool_t UseGL() const { return fUseGL; }
233 void DeleteCanvasPainter();
234
235 static TCanvas *MakeDefCanvas();
236 static Bool_t SupportAlpha();
237
238 static Bool_t SaveAll(const std::vector<TPad *>& = {}, const char *filename = "", Option_t *option = "");
239
240 ClassDefOverride(TCanvas,8) //Graphics canvas
241};
242
243#endif
EEventType
Definition Buttons.h:15
ECursor
Definition GuiTypes.h:373
#define b(i)
Definition RSha256.hxx:100
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
short Color_t
Color number (short)
Definition RtypesCore.h:99
float Size_t
Attribute size (float)
Definition RtypesCore.h:103
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define BIT(n)
Definition Rtypes.h:91
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetDoubleBuffer
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetCursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
char name[80]
Definition TGX11.cxx:157
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:536
UInt_t fCw
Width of the canvas along X (pixels)
Definition TCanvas.h:44
~TCanvas() override
Canvas destructor.
Definition TCanvas.cxx:674
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
Definition TCanvas.cxx:1047
void SetWindowSize(UInt_t ww, UInt_t wh)
Set canvas window size.
Definition TCanvas.cxx:2146
Bool_t IsDrawn() const
Definition TCanvas.h:174
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:2011
void Browse(TBrowser *b) override
Browse.
Definition TCanvas.cxx:682
UInt_t GetWindowHeight() const
Definition TCanvas.h:164
TObject * GetClickSelected() const
Definition TCanvas.h:144
void ResetUpdated()
Definition TCanvas.h:195
virtual void EditorBar()
Get editor bar.
Definition TCanvas.cxx:1038
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition TCanvas.cxx:1511
void ClearPadSave()
Definition TCanvas.h:142
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Definition TCanvas.cxx:1073
TVirtualPad * GetClickSelectedPad() const
Definition TCanvas.h:149
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition TCanvas.h:37
void Constructor()
Canvas default constructor.
Definition TCanvas.cxx:190
void SetClickSelectedPad(TPad *pad)
Definition TCanvas.h:213
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition TCanvas.cxx:2419
TCanvas(const TCanvas &canvas)=delete
Int_t fWindowTopX
Top X position of window (in pixels)
Definition TCanvas.h:40
void SetSelectedPad(TPad *pad)
Definition TCanvas.h:212
void SetHighLightColor(Color_t col)
Definition TCanvas.h:209
virtual void ToggleToolTips()
Toggle tooltip display.
Definition TCanvas.cxx:2461
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:734
TCanvas & operator=(const TCanvas &rhs)=delete
void UseCurrentStyle() override
Force a copy of current style for all objects in canvas.
Definition TCanvas.cxx:1181
void Iconify()
Iconify canvas.
Definition TCanvas.cxx:1474
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition TCanvas.cxx:1206
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition TCanvas.cxx:2428
void Destructor()
Actual canvas destructor.
Definition TCanvas.cxx:692
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
Definition TCanvas.h:167
TCanvasImp * GetCanvasImp() const override
Definition TCanvas.h:160
Bool_t IsRetained() const override
Definition TCanvas.h:178
Bool_t fUpdated
! Set to True when Update method was called
Definition TCanvas.h:65
void SetSupportGL(Bool_t support)
Definition TCanvas.h:231
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition TCanvas.cxx:2648
TPad * fPadSave
! Pointer to saved pad in HandleInput
Definition TCanvas.h:57
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition TCanvas.cxx:2473
Bool_t fBatch
! True when in batchmode
Definition TCanvas.h:60
Bool_t fUseGL
! True when rendering is with GL
Definition TCanvas.h:63
Int_t GetEventY() const override
Definition TCanvas.h:139
Int_t fEventX
! Last X mouse position in canvas
Definition TCanvas.h:47
Bool_t IsBatch() const override
Definition TCanvas.h:173
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:906
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition TCanvas.h:36
Bool_t HasMenuBar() const
Definition TCanvas.h:170
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition TCanvas.cxx:2615
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
Definition TCanvas.cxx:1626
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
Definition TCanvas.h:185
void Close(Option_t *option="") override
Close canvas.
Definition TCanvas.cxx:785
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix canvas aspect ratio to current value if fixed is true.
Definition TCanvas.cxx:1989
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition TCanvas.cxx:1663
Color_t GetHighLightColor() const override
Definition TCanvas.h:140
Bool_t GetShowToolBar() const
Definition TCanvas.h:151
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:977
Bool_t IsFolder() const override
Is folder ?
Definition TCanvas.cxx:1483
Bool_t EnsurePSPainter(Bool_t create, TVirtualPadPainter *&oldp)
Replace canvas painter For intenral use only - when creating PS images.
Definition TCanvas.cxx:2625
UInt_t fWindowWidth
Width of window (including borders, etc.)
Definition TCanvas.h:42
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition TCanvas.h:67
void CopyPixmaps() override
Copy the canvas pixmap of the pad to the canvas.
Definition TCanvas.cxx:835
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition TCanvas.cxx:2566
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Definition TCanvas.h:56
Bool_t fUpdating
! True when Updating the canvas
Definition TCanvas.h:61
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition TCanvas.cxx:1809
void SetCanvasImp(TCanvasImp *i)
Set canvas implementation If web-based implementation provided, some internal fields also initialized...
Definition TCanvas.cxx:2158
Color_t fHighLightColor
Highlight color of active pad.
Definition TCanvas.h:38
Size_t GetXsizeUser() const
Definition TCanvas.h:155
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
Definition TCanvas.cxx:2198
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition TCanvas.cxx:1648
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition TCanvas.cxx:1230
void UpdateAsync() override
Asynchronous pad update.
Definition TCanvas.cxx:2544
TObject * GetSelected() const override
Definition TCanvas.h:143
Size_t GetXsizeReal() const
Definition TCanvas.h:157
Int_t GetEventX() const override
Definition TCanvas.h:138
Bool_t IsUpdated() const
Definition TCanvas.h:175
Size_t fXsizeUser
User specified size of canvas along X in CM.
Definition TCanvas.h:34
Int_t fEventY
! Last Y mouse position in canvas
Definition TCanvas.h:48
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:716
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Definition TCanvas.h:43
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition TCanvas.cxx:1217
void SetPadSave(TPad *pad)
Definition TCanvas.h:218
Bool_t GetShowEditor() const
Definition TCanvas.h:152
TObject * fClickSelected
! Currently click-selected object
Definition TCanvas.h:51
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set Width and Height of canvas to ww and wh respectively.
Definition TCanvas.cxx:1947
void Show()
Show canvas.
Definition TCanvas.cxx:2209
TPad * fSelectedPad
! Pad containing currently selected object
Definition TCanvas.h:55
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Definition TCanvas.cxx:1634
Bool_t GetAutoExec() const
Definition TCanvas.h:154
Int_t fSelectedX
! X of selected object
Definition TCanvas.h:52
virtual void ToggleEditor()
Toggle editor.
Definition TCanvas.cxx:2450
TVirtualPad * GetSelectedPad() const override
Definition TCanvas.h:148
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition TCanvas.cxx:1588
TObject * fSelected
! Currently selected object
Definition TCanvas.h:50
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this canvas in C++ macro file with GUI.
Definition TCanvas.cxx:1775
Bool_t GetShowToolTips() const
Definition TCanvas.h:153
Int_t fCanvasID
! Canvas identifier
Definition TCanvas.h:49
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
Definition TCanvas.cxx:2575
void SetTitle(const char *title="") override
Set canvas title.
Definition TCanvas.cxx:2128
UInt_t fCh
Height of the canvas along Y (pixels)
Definition TCanvas.h:45
const char * GetDISPLAY() const
Definition TCanvas.h:134
TContextMenu * fContextMenu
! Context menu pointer
Definition TCanvas.h:59
Int_t GetCanvasID() const override
Definition TCanvas.h:159
TAttCanvas fCatt
Canvas attributes.
Definition TCanvas.h:32
void SetName(const char *name="") override
Set canvas name.
Definition TCanvas.cxx:2020
UInt_t GetWindowWidth() const
Definition TCanvas.h:163
Bool_t fRetained
Retain structure flag.
Definition TCanvas.h:62
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition TCanvas.cxx:2557
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition TCanvas.cxx:1127
Size_t GetYsizeUser() const
Definition TCanvas.h:156
Int_t GetSelectedY() const
Definition TCanvas.h:146
void ls(Option_t *option="") const override
List all pads.
Definition TCanvas.cxx:1499
void RaiseWindow()
Raise canvas window.
Definition TCanvas.cxx:1741
void Build()
Build a canvas. Called by all constructors.
Definition TCanvas.cxx:586
static Bool_t SaveAll(const std::vector< TPad * > &={}, const char *filename="", Option_t *option="")
Save provided pads/canvases into the image file(s) Filename can include printf argument for image num...
Definition TCanvas.cxx:2676
Int_t GetSelectedX() const
Definition TCanvas.h:145
Int_t fWindowTopY
Top Y position of window (in pixels)
Definition TCanvas.h:41
void Paint(Option_t *option="") override
Paint canvas.
Definition TCanvas.cxx:1538
void SetClickSelected(TObject *obj)
Definition TCanvas.h:211
TVirtualPad * GetPadSave() const override
Definition TCanvas.h:141
@ kResizeOpaque
Definition TCanvas.h:97
@ kShowToolTips
Definition TCanvas.h:99
@ kShowToolBar
Definition TCanvas.h:94
@ kMoveOpaque
Definition TCanvas.h:96
@ kIsGrayscale
Definition TCanvas.h:98
@ kShowEventStatus
Definition TCanvas.h:91
@ kAutoExec
Definition TCanvas.h:92
@ kMenuBar
Definition TCanvas.h:93
@ kShowEditor
Definition TCanvas.h:95
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2488
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TCanvas.cxx:1109
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition TCanvas.cxx:1764
TContextMenu * GetContextMenu() const
Definition TCanvas.h:135
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition TCanvas.cxx:767
Size_t GetYsizeReal() const
Definition TCanvas.h:158
UInt_t GetWw() const override
Definition TCanvas.h:165
Bool_t OpaqueMoving() const override
Definition TCanvas.h:182
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition TCanvas.h:58
UInt_t GetWh() const override
Definition TCanvas.h:166
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
Definition TCanvas.cxx:1607
void Flush()
Flush canvas buffers.
Definition TCanvas.cxx:1141
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Definition TCanvas.h:35
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Definition TCanvas.h:39
Option_t * GetSelectedOpt() const
Definition TCanvas.h:147
void ForceUpdate()
Force canvas update.
Definition TCanvas.cxx:1173
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
Definition TCanvas.cxx:2594
void SetSelected(TObject *obj) override
Set selected canvas.
Definition TCanvas.cxx:2119
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition TCanvas.cxx:1530
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition TCanvas.h:69
Int_t GetEvent() const override
Definition TCanvas.h:137
void Closed() override
Emit Closed signal.
Definition TCanvas.cxx:775
Int_t GetDoubleBuffer() const
Definition TCanvas.h:136
Bool_t IsWeb() const override
Is web canvas.
Definition TCanvas.cxx:1491
void SetWindowPosition(Int_t x, Int_t y)
Set canvas window position.
Definition TCanvas.cxx:2137
TString fDISPLAY
Name of destination screen.
Definition TCanvas.h:33
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:2052
Int_t fEvent
! Type of current or last handled event
Definition TCanvas.h:46
Bool_t GetShowEventStatus() const
Definition TCanvas.h:150
TString fSelectedOpt
! Drawing option of selected object
Definition TCanvas.h:54
Int_t fSelectedY
! Y of selected object
Definition TCanvas.h:53
Bool_t fDrawn
! Set to True when the Draw method is called
Definition TCanvas.h:64
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
Definition TCanvas.cxx:1929
void Delete(Option_t *="") override
Delete this object.
Definition TCanvas.h:122
Bool_t UseGL() const
Definition TCanvas.h:230
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition TCanvas.cxx:1756
virtual void ToggleToolBar()
Toggle toolbar.
Definition TCanvas.cxx:2439
void SetRetained(Bool_t retained=kTRUE)
Definition TCanvas.h:220
Bool_t OpaqueResizing() const override
Definition TCanvas.h:183
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition TCanvas.cxx:923
void ResetDrawn()
Definition TCanvas.h:194
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:42
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:204
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:1157
The most important graphics class in the ROOT system.
Definition TPad.h:28
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition TPad.cxx:4780
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
<div class="legacybox"><h2>Legacy Code</h2> TThread is a legacy interface: there will be no bug fixes...
Definition TThread.h:40
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
Basic TCanvasImp ABI implementation for Web-based Graphics Provides painting of main ROOT classes in ...
Definition TWebCanvas.h:35
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
th1 Draw()