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 TThread;
28friend class TInterpreter;
29
30protected:
31 TAttCanvas fCatt; ///< Canvas attributes
32 TString fDISPLAY; ///< Name of destination screen
33 Size_t fXsizeUser; ///< User specified size of canvas along X in CM
34 Size_t fYsizeUser; ///< User specified size of canvas along Y in CM
35 Size_t fXsizeReal; ///< Current size of canvas along X in CM
36 Size_t fYsizeReal; ///< Current size of canvas along Y in CM
37 Color_t fHighLightColor; ///< Highlight color of active pad
38 Int_t fDoubleBuffer; ///< Double buffer flag (0=off, 1=on)
39 Int_t fWindowTopX; ///< Top X position of window (in pixels)
40 Int_t fWindowTopY; ///< Top Y position of window (in pixels)
41 UInt_t fWindowWidth; ///< Width of window (including borders, etc.)
42 UInt_t fWindowHeight; ///< Height of window (including menubar, borders, etc.)
43 UInt_t fCw; ///< Width of the canvas along X (pixels)
44 UInt_t fCh; ///< Height of the canvas along Y (pixels)
45 Int_t fEvent; ///<! Type of current or last handled event
46 Int_t fEventX; ///<! Last X mouse position in canvas
47 Int_t fEventY; ///<! Last Y mouse position in canvas
48 Int_t fCanvasID; ///<! Canvas identifier
49 TObject *fSelected; ///<! Currently selected object
50 TObject *fClickSelected; ///<! Currently click-selected object
51 Int_t fSelectedX; ///<! X of selected object
52 Int_t fSelectedY; ///<! Y of selected object
53 TString fSelectedOpt; ///<! Drawing option of selected object
54 TPad *fSelectedPad; ///<! Pad containing currently selected object
55 TPad *fClickSelectedPad;///<! Pad containing currently click-selected object
56 TPad *fPadSave; ///<! Pointer to saved pad in HandleInput
57 TCanvasImp *fCanvasImp; ///<! Window system specific canvas implementation
58 TContextMenu *fContextMenu; ///<! Context menu pointer
59 Bool_t fBatch; ///<! True when in batchmode
60 Bool_t fUpdating; ///<! True when Updating the canvas
61 Bool_t fRetained; ///< Retain structure flag
62 Bool_t fUseGL; ///<! True when rendering is with GL
63 Bool_t fDrawn; ///<! Set to True when the Draw method is called
64 Bool_t fUpdated; ///<! Set to True when Update method was called
65 //
66 TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
67
68 static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
69
70private:
71 TCanvas(const TCanvas &canvas) = delete;
72 TCanvas &operator=(const TCanvas &rhs) = delete;
73 void Build();
74 void CopyPixmaps() override;
75 void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
76 void RunAutoExec();
77
78 //Initialize PadPainter.
79 void CreatePainter();
80
81protected:
82 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
83 //-- used by friend TThread class
84 void Init();
85
86public:
87 // TCanvas status bits
88 enum {
97 kShowToolTips = BIT(23)
98 };
99
100 TCanvas(Bool_t build=kTRUE);
101 TCanvas(const char *name, const char *title="", Int_t form=1);
102 TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
103 TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
104 Int_t ww, Int_t wh);
105 TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
106 ~TCanvas() override;
107
108 //-- used by friend TThread class
109 void Constructor();
110 void Constructor(const char *name, const char *title, Int_t form);
111 void Constructor(const char *name, const char *title, Int_t ww, Int_t wh);
112 void Constructor(const char *name, const char *title,
113 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
114 void Destructor();
115
116 TVirtualPad *cd(Int_t subpadnumber=0) override;
117 void Browse(TBrowser *b) override;
118 void Clear(Option_t *option="") override;
119 void Close(Option_t *option="") override;
120 void Delete(Option_t * = "") override { MayNotUse("Delete()"); }
121 void DisconnectWidget(); // used by TCanvasImp
122 void Draw(Option_t *option="") override;
123 TObject *DrawClone(Option_t *option="") const override; // *MENU*
124 virtual TObject *DrawClonePad(); // *MENU*
125 virtual void EditorBar();
126 void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
127 void EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
128 void FeedbackMode(Bool_t set);
129 void Flush();
130 void UseCurrentStyle() override; // *MENU*
131 void ForceUpdate();
132 const char *GetDISPLAY() const {return fDISPLAY.Data();}
135 Int_t GetEvent() const override { return fEvent; }
136 Int_t GetEventX() const override { return fEventX; }
137 Int_t GetEventY() const override { return fEventY; }
138 Color_t GetHighLightColor() const override { return fHighLightColor; }
139 TVirtualPad *GetPadSave() const override { return fPadSave; }
140 void ClearPadSave() { fPadSave = nullptr; }
141 TObject *GetSelected() const override { return fSelected; }
143 Int_t GetSelectedX() const { return fSelectedX; }
144 Int_t GetSelectedY() const { return fSelectedY; }
146 TVirtualPad *GetSelectedPad() const override { return fSelectedPad; }
152 Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
153 Size_t GetXsizeUser() const { return fXsizeUser; }
154 Size_t GetYsizeUser() const { return fYsizeUser; }
155 Size_t GetXsizeReal() const { return fXsizeReal; }
156 Size_t GetYsizeReal() const { return fYsizeReal; }
157 Int_t GetCanvasID() const override { return fCanvasID; }
158 TCanvasImp *GetCanvasImp() const override { return fCanvasImp; }
163 UInt_t GetWw() const override { return fCw; }
164 UInt_t GetWh() const override { return fCh; }
165 virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
166 {wtopx=GetWindowTopX(); wtopy=fWindowTopY; ww=fWindowWidth; wh=fWindowHeight;}
167 virtual void HandleInput(EEventType button, Int_t x, Int_t y);
168 Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
169 virtual void HighlightConnect(const char *slot);
170 void Iconify();
171 Bool_t IsBatch() const override { return fBatch; }
172 Bool_t IsDrawn() const { return fDrawn; }
173 Bool_t IsUpdated() const { return fUpdated; }
174 Bool_t IsFolder() const override;
176 Bool_t IsRetained() const override { return fRetained; }
177 Bool_t IsWeb() const override;
178 void ls(Option_t *option="") const override;
179 void MoveOpaque(Int_t set=1);
180 Bool_t OpaqueMoving() const override { return TestBit(kMoveOpaque); }
181 Bool_t OpaqueResizing() const override { return TestBit(kResizeOpaque); }
182 void Paint(Option_t *option="") override;
183 TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) override { return TPad::Pick(px, py, pickobj); }
184 virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
185 virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *SIGNAL*
186 virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y); // *SIGNAL*
187 virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected); // *SIGNAL*
188 virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event); // *SIGNAL*
189 virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
190 void Closed() override; // *SIGNAL*
191 void RaiseWindow();
194 virtual void Resize(Option_t *option="");
195 void ResizeOpaque(Int_t set=1);
196 void SaveSource(const char *filename="", Option_t *option="");
197 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
198 void SetCursor(ECursor cursor) override;
199 void SetDoubleBuffer(Int_t mode=1) override;
200 void SetName(const char *name="") override;
201 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
202 void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
204 void SetWindowSize(UInt_t ww, UInt_t wh);
206 void SetCanvasSize(UInt_t ww, UInt_t wh) override; // *MENU*
208 void SetSelected(TObject *obj) override;
210 void SetSelectedPad(TPad *pad) { fSelectedPad = pad; }
212 void Show();
213 virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
214 void SetBatch(Bool_t batch=kTRUE) override;
215 static void SetFolder(Bool_t isfolder=kTRUE);
216 void SetPadSave(TPad *pad) {fPadSave = pad;}
217 bool SetRealAspectRatio(const Int_t axis = 1); // *MENU*
218 void SetRetained(Bool_t retained=kTRUE) { fRetained=retained;}
219 void SetTitle(const char *title="") override;
220 virtual void ToggleEventStatus();
221 virtual void ToggleAutoExec();
222 virtual void ToggleToolBar();
223 virtual void ToggleEditor();
224 virtual void ToggleToolTips();
225 void Update() override;
226 void UpdateAsync() override;
227
228 Bool_t UseGL() const { return fUseGL; }
229 void SetSupportGL(Bool_t support) {fUseGL = support;}
231 void DeleteCanvasPainter();
232
233 static TCanvas *MakeDefCanvas();
234 static Bool_t SupportAlpha();
235
236 static Bool_t SaveAll(const std::vector<TPad *>& = {}, const char *filename = "", Option_t *option = "");
237
238 ClassDefOverride(TCanvas,8) //Graphics canvas
239};
240
241#endif
EEventType
Definition Buttons.h:15
ECursor
Definition GuiTypes.h:372
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
float Size_t
Definition RtypesCore.h:96
unsigned int UInt_t
Definition RtypesCore.h:46
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr 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:341
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: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:534
UInt_t fCw
Width of the canvas along X (pixels)
Definition TCanvas.h:43
~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:1046
void SetWindowSize(UInt_t ww, UInt_t wh)
Set canvas window size.
Definition TCanvas.cxx:2172
Bool_t IsDrawn() const
Definition TCanvas.h:172
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:2034
void Browse(TBrowser *b) override
Browse.
Definition TCanvas.cxx:682
UInt_t GetWindowHeight() const
Definition TCanvas.h:162
TObject * GetClickSelected() const
Definition TCanvas.h:142
void ResetUpdated()
Definition TCanvas.h:193
virtual void EditorBar()
Get editor bar.
Definition TCanvas.cxx:1037
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition TCanvas.cxx:1514
void ClearPadSave()
Definition TCanvas.h:140
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Definition TCanvas.cxx:1072
TVirtualPad * GetClickSelectedPad() const
Definition TCanvas.h:147
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition TCanvas.h:36
void Constructor()
Canvas default constructor.
Definition TCanvas.cxx:188
void SetClickSelectedPad(TPad *pad)
Definition TCanvas.h:211
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition TCanvas.cxx:2408
TCanvas(const TCanvas &canvas)=delete
Int_t fWindowTopX
Top X position of window (in pixels)
Definition TCanvas.h:39
void SetSelectedPad(TPad *pad)
Definition TCanvas.h:210
void SetHighLightColor(Color_t col)
Definition TCanvas.h:207
virtual void ToggleToolTips()
Toggle tooltip display.
Definition TCanvas.cxx:2450
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:1183
void Iconify()
Iconify canvas.
Definition TCanvas.cxx:1477
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition TCanvas.cxx:1208
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition TCanvas.cxx:2417
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:165
TCanvasImp * GetCanvasImp() const override
Definition TCanvas.h:158
Bool_t IsRetained() const override
Definition TCanvas.h:176
Bool_t fUpdated
! Set to True when Update method was called
Definition TCanvas.h:64
void SetSupportGL(Bool_t support)
Definition TCanvas.h:229
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition TCanvas.cxx:2612
TPad * fPadSave
! Pointer to saved pad in HandleInput
Definition TCanvas.h:56
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition TCanvas.cxx:2462
Bool_t fBatch
! True when in batchmode
Definition TCanvas.h:59
Bool_t fUseGL
! True when rendering is with GL
Definition TCanvas.h:62
Int_t GetEventY() const override
Definition TCanvas.h:137
Int_t fEventX
! Last X mouse position in canvas
Definition TCanvas.h:46
Bool_t IsBatch() const override
Definition TCanvas.h:171
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:904
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition TCanvas.h:35
Bool_t HasMenuBar() const
Definition TCanvas.h:168
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition TCanvas.cxx:2602
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
Definition TCanvas.cxx:1629
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
Definition TCanvas.h:183
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:2012
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition TCanvas.cxx:1666
Color_t GetHighLightColor() const override
Definition TCanvas.h:138
Bool_t GetShowToolBar() const
Definition TCanvas.h:149
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:976
Bool_t IsFolder() const override
Is folder ?
Definition TCanvas.cxx:1486
UInt_t fWindowWidth
Width of window (including borders, etc.)
Definition TCanvas.h:41
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition TCanvas.h:66
void CopyPixmaps() override
Copy the canvas pixmap of the pad to the canvas.
Definition TCanvas.cxx:833
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition TCanvas.cxx:2553
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Definition TCanvas.h:55
Bool_t fUpdating
! True when Updating the canvas
Definition TCanvas.h:60
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition TCanvas.cxx:1820
void SetCanvasImp(TCanvasImp *i)
Definition TCanvas.h:205
Color_t fHighLightColor
Highlight color of active pad.
Definition TCanvas.h:37
Size_t GetXsizeUser() const
Definition TCanvas.h:153
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
Definition TCanvas.cxx:2200
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition TCanvas.cxx:1651
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition TCanvas.cxx:1232
void UpdateAsync() override
Asynchronous pad update.
Definition TCanvas.cxx:2531
TObject * GetSelected() const override
Definition TCanvas.h:141
Size_t GetXsizeReal() const
Definition TCanvas.h:155
Int_t GetEventX() const override
Definition TCanvas.h:136
Bool_t IsUpdated() const
Definition TCanvas.h:173
Size_t fXsizeUser
User specified size of canvas along X in CM.
Definition TCanvas.h:33
Int_t fEventY
! Last Y mouse position in canvas
Definition TCanvas.h:47
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:42
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition TCanvas.cxx:1219
void SetPadSave(TPad *pad)
Definition TCanvas.h:216
Bool_t GetShowEditor() const
Definition TCanvas.h:150
TObject * fClickSelected
! Currently click-selected object
Definition TCanvas.h:50
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set Width and Height of canvas to ww and wh respectively.
Definition TCanvas.cxx:1971
void Show()
Show canvas.
Definition TCanvas.cxx:2211
TPad * fSelectedPad
! Pad containing currently selected object
Definition TCanvas.h:54
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Definition TCanvas.cxx:1637
Bool_t GetAutoExec() const
Definition TCanvas.h:152
Int_t fSelectedX
! X of selected object
Definition TCanvas.h:51
virtual void ToggleEditor()
Toggle editor.
Definition TCanvas.cxx:2439
TVirtualPad * GetSelectedPad() const override
Definition TCanvas.h:146
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition TCanvas.cxx:1591
TObject * fSelected
! Currently selected object
Definition TCanvas.h:49
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this canvas in C++ macro file with GUI.
Definition TCanvas.cxx:1776
Bool_t GetShowToolTips() const
Definition TCanvas.h:151
Int_t fCanvasID
! Canvas identifier
Definition TCanvas.h:48
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
Definition TCanvas.cxx:2562
void SetTitle(const char *title="") override
Set canvas title.
Definition TCanvas.cxx:2154
UInt_t fCh
Height of the canvas along Y (pixels)
Definition TCanvas.h:44
const char * GetDISPLAY() const
Definition TCanvas.h:132
TContextMenu * fContextMenu
! Context menu pointer
Definition TCanvas.h:58
Int_t GetCanvasID() const override
Definition TCanvas.h:157
TAttCanvas fCatt
Canvas attributes.
Definition TCanvas.h:31
void SetName(const char *name="") override
Set canvas name. In case name is an empty string, a default name is set.
Definition TCanvas.cxx:2042
UInt_t GetWindowWidth() const
Definition TCanvas.h:161
Bool_t fRetained
Retain structure flag.
Definition TCanvas.h:61
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition TCanvas.cxx:2544
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition TCanvas.cxx:1126
Size_t GetYsizeUser() const
Definition TCanvas.h:154
Int_t GetSelectedY() const
Definition TCanvas.h:144
void ls(Option_t *option="") const override
List all pads.
Definition TCanvas.cxx:1502
void RaiseWindow()
Raise canvas window.
Definition TCanvas.cxx:1742
void Build()
Build a canvas. Called by all constructors.
Definition TCanvas.cxx:584
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:2640
Int_t GetSelectedX() const
Definition TCanvas.h:143
Int_t fWindowTopY
Top Y position of window (in pixels)
Definition TCanvas.h:40
void Paint(Option_t *option="") override
Paint canvas.
Definition TCanvas.cxx:1541
void SetClickSelected(TObject *obj)
Definition TCanvas.h:209
TVirtualPad * GetPadSave() const override
Definition TCanvas.h:139
@ kResizeOpaque
Definition TCanvas.h:95
@ kShowToolTips
Definition TCanvas.h:97
@ kShowToolBar
Definition TCanvas.h:92
@ kMoveOpaque
Definition TCanvas.h:94
@ kIsGrayscale
Definition TCanvas.h:96
@ kShowEventStatus
Definition TCanvas.h:89
@ kAutoExec
Definition TCanvas.h:90
@ kMenuBar
Definition TCanvas.h:91
@ kShowEditor
Definition TCanvas.h:93
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2475
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TCanvas.cxx:1108
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition TCanvas.cxx:1765
TContextMenu * GetContextMenu() const
Definition TCanvas.h:133
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition TCanvas.cxx:767
Size_t GetYsizeReal() const
Definition TCanvas.h:156
UInt_t GetWw() const override
Definition TCanvas.h:163
Bool_t OpaqueMoving() const override
Definition TCanvas.h:180
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition TCanvas.h:57
UInt_t GetWh() const override
Definition TCanvas.h:164
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
Definition TCanvas.cxx:1610
void Flush()
Flush canvas buffers.
Definition TCanvas.cxx:1143
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Definition TCanvas.h:34
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Definition TCanvas.h:38
Option_t * GetSelectedOpt() const
Definition TCanvas.h:145
void ForceUpdate()
Force canvas update.
Definition TCanvas.cxx:1175
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
Definition TCanvas.cxx:2581
void SetSelected(TObject *obj) override
Set selected canvas.
Definition TCanvas.cxx:2145
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition TCanvas.cxx:1533
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition TCanvas.h:68
Int_t GetEvent() const override
Definition TCanvas.h:135
void Closed() override
Emit Closed signal.
Definition TCanvas.cxx:775
Int_t GetDoubleBuffer() const
Definition TCanvas.h:134
Bool_t IsWeb() const override
Is web canvas.
Definition TCanvas.cxx:1494
void SetWindowPosition(Int_t x, Int_t y)
Set canvas window position.
Definition TCanvas.cxx:2163
TString fDISPLAY
Name of destination screen.
Definition TCanvas.h:32
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:2078
Int_t fEvent
! Type of current or last handled event
Definition TCanvas.h:45
Bool_t GetShowEventStatus() const
Definition TCanvas.h:148
TString fSelectedOpt
! Drawing option of selected object
Definition TCanvas.h:53
Int_t fSelectedY
! Y of selected object
Definition TCanvas.h:52
Bool_t fDrawn
! Set to True when the Draw method is called
Definition TCanvas.h:63
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
Definition TCanvas.cxx:1953
void Delete(Option_t *="") override
Delete this object.
Definition TCanvas.h:120
Bool_t UseGL() const
Definition TCanvas.h:228
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition TCanvas.cxx:1757
virtual void ToggleToolBar()
Toggle toolbar.
Definition TCanvas.cxx:2428
void SetRetained(Bool_t retained=kTRUE)
Definition TCanvas.h:218
Bool_t OpaqueResizing() const override
Definition TCanvas.h:181
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition TCanvas.cxx:921
void ResetDrawn()
Definition TCanvas.h:192
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:199
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:1040
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:4549
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
<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()