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 //
65 TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
66
67 static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
68
69private:
70 TCanvas(const TCanvas &canvas) = delete;
71 TCanvas &operator=(const TCanvas &rhs) = delete;
72 void Build();
73 void CopyPixmaps() override;
74 void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
75 void RunAutoExec();
76
77 //Initialize PadPainter.
78 void CreatePainter();
79
80protected:
81 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
82 //-- used by friend TThread class
83 void Init();
84
85public:
86 // TCanvas status bits
87 enum {
96 kShowToolTips = BIT(23)
97 };
98
99 TCanvas(Bool_t build=kTRUE);
100 TCanvas(const char *name, const char *title="", Int_t form=1);
101 TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
102 TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
103 Int_t ww, Int_t wh);
104 TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
105 virtual ~TCanvas();
106
107 //-- used by friend TThread class
108 void Constructor();
109 void Constructor(const char *name, const char *title, Int_t form);
110 void Constructor(const char *name, const char *title, Int_t ww, Int_t wh);
111 void Constructor(const char *name, const char *title,
112 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
113 void Destructor();
114
115 TVirtualPad *cd(Int_t subpadnumber=0) override;
116 void Browse(TBrowser *b) override;
117 void Clear(Option_t *option="") override;
118 void Close(Option_t *option="") override;
119 void Delete(Option_t * = "") override { MayNotUse("Delete()"); }
120 void DisconnectWidget(); // used by TCanvasImp
121 void Draw(Option_t *option="") override;
122 TObject *DrawClone(Option_t *option="") const override; // *MENU*
123 virtual TObject *DrawClonePad(); // *MENU*
124 virtual void EditorBar();
125 void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
126 void EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
127 void FeedbackMode(Bool_t set);
128 void Flush();
129 void UseCurrentStyle() override; // *MENU*
130 void ForceUpdate();
131 const char *GetDISPLAY() const {return fDISPLAY.Data();}
134 Int_t GetEvent() const override { return fEvent; }
135 Int_t GetEventX() const override { return fEventX; }
136 Int_t GetEventY() const override { return fEventY; }
137 Color_t GetHighLightColor() const override { return fHighLightColor; }
138 TVirtualPad *GetPadSave() const override { return fPadSave; }
139 void ClearPadSave() { fPadSave = nullptr; }
140 TObject *GetSelected() const override { return fSelected; }
142 Int_t GetSelectedX() const { return fSelectedX; }
143 Int_t GetSelectedY() const { return fSelectedY; }
145 TVirtualPad *GetSelectedPad() const override { return fSelectedPad; }
151 Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
152 Size_t GetXsizeUser() const { return fXsizeUser; }
153 Size_t GetYsizeUser() const { return fYsizeUser; }
154 Size_t GetXsizeReal() const { return fXsizeReal; }
155 Size_t GetYsizeReal() const { return fYsizeReal; }
156 Int_t GetCanvasID() const override { return fCanvasID; }
157 TCanvasImp *GetCanvasImp() const override { return fCanvasImp; }
162 UInt_t GetWw() const override { return fCw; }
163 UInt_t GetWh() const override { return fCh; }
164 virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
165 {wtopx=GetWindowTopX(); wtopy=fWindowTopY; ww=fWindowWidth; wh=fWindowHeight;}
166 virtual void HandleInput(EEventType button, Int_t x, Int_t y);
167 Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
168 virtual void HighlightConnect(const char *slot);
169 void Iconify();
170 Bool_t IsBatch() const override { return fBatch; }
171 Bool_t IsDrawn() { return fDrawn; }
172 Bool_t IsFolder() const override;
174 Bool_t IsRetained() const override { return fRetained; }
175 Bool_t IsWeb() const;
176 void ls(Option_t *option="") const override;
177 void MoveOpaque(Int_t set=1);
178 Bool_t OpaqueMoving() const override { return TestBit(kMoveOpaque); }
179 Bool_t OpaqueResizing() const override { return TestBit(kResizeOpaque); }
180 void Paint(Option_t *option="") override;
181 TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) override { return TPad::Pick(px, py, pickobj); }
182 virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
183 virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *SIGNAL*
184 virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y); // *SIGNAL*
185 virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected); // *SIGNAL*
186 virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event); // *SIGNAL*
187 virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
188 void Closed() override; // *SIGNAL*
189 void RaiseWindow();
191 virtual void Resize(Option_t *option="");
192 void ResizeOpaque(Int_t set=1);
193 void SaveSource(const char *filename="", Option_t *option="");
194 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
195 void SetCursor(ECursor cursor) override;
196 void SetDoubleBuffer(Int_t mode=1) override;
197 void SetName(const char *name="") override;
198 void SetFixedAspectRatio(Bool_t fixed = kTRUE) override; // *TOGGLE*
199 void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
201 void SetWindowSize(UInt_t ww, UInt_t wh);
203 void SetCanvasSize(UInt_t ww, UInt_t wh) override; // *MENU*
205 void SetSelected(TObject *obj) override;
207 void SetSelectedPad(TPad *pad) { fSelectedPad = pad; }
209 void Show();
210 virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
211 void SetBatch(Bool_t batch=kTRUE) override;
212 static void SetFolder(Bool_t isfolder=kTRUE);
213 void SetPadSave(TPad *pad) {fPadSave = pad;}
214 bool SetRealAspectRatio(const Int_t axis = 1); // *MENU*
215 void SetRetained(Bool_t retained=kTRUE) { fRetained=retained;}
216 void SetTitle(const char *title="") override;
217 virtual void ToggleEventStatus();
218 virtual void ToggleAutoExec();
219 virtual void ToggleToolBar();
220 virtual void ToggleEditor();
221 virtual void ToggleToolTips();
222 void Update() override;
223
224 Bool_t UseGL() const { return fUseGL; }
225 void SetSupportGL(Bool_t support) {fUseGL = support;}
227 void DeleteCanvasPainter();
228
229 static TCanvas *MakeDefCanvas();
230 static Bool_t SupportAlpha();
231
232 ClassDefOverride(TCanvas,8) //Graphics canvas
233};
234
235#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:533
UInt_t fCw
Width of the canvas along X (pixels)
Definition TCanvas.h:43
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
Definition TCanvas.cxx:1040
void SetWindowSize(UInt_t ww, UInt_t wh)
Set canvas window size.
Definition TCanvas.cxx:2165
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:2027
void Browse(TBrowser *b) override
Browse.
Definition TCanvas.cxx:680
UInt_t GetWindowHeight() const
Definition TCanvas.h:161
TObject * GetClickSelected() const
Definition TCanvas.h:141
virtual void EditorBar()
Get editor bar.
Definition TCanvas.cxx:1031
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition TCanvas.cxx:1504
void ClearPadSave()
Definition TCanvas.h:139
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Definition TCanvas.cxx:1066
TVirtualPad * GetClickSelectedPad() const
Definition TCanvas.h:146
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition TCanvas.h:36
void Constructor()
Canvas default constructor.
Definition TCanvas.cxx:186
void SetClickSelectedPad(TPad *pad)
Definition TCanvas.h:208
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition TCanvas.cxx:2401
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:207
void SetHighLightColor(Color_t col)
Definition TCanvas.h:204
virtual void ToggleToolTips()
Toggle tooltip display.
Definition TCanvas.cxx:2443
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:733
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:171
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:2410
void Destructor()
Actual canvas destructor.
Definition TCanvas.cxx:690
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
Definition TCanvas.h:164
TCanvasImp * GetCanvasImp() const override
Definition TCanvas.h:157
Bool_t IsRetained() const override
Definition TCanvas.h:174
void SetSupportGL(Bool_t support)
Definition TCanvas.h:225
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition TCanvas.cxx:2581
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:2455
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:136
Int_t fEventX
! Last X mouse position in canvas
Definition TCanvas.h:46
Bool_t IsBatch() const override
Definition TCanvas.h:170
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:898
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition TCanvas.h:35
Bool_t HasMenuBar() const
Definition TCanvas.h:167
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition TCanvas.cxx:2571
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
Definition TCanvas.cxx:1619
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
Definition TCanvas.h:181
void Close(Option_t *option="") override
Close canvas.
Definition TCanvas.cxx:784
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix canvas aspect ratio to current value if fixed is true.
Definition TCanvas.cxx:2005
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition TCanvas.cxx:1656
Color_t GetHighLightColor() const override
Definition TCanvas.h:137
Bool_t GetShowToolBar() const
Definition TCanvas.h:148
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:970
Bool_t IsFolder() const override
Is folder ?
Definition TCanvas.cxx:1476
UInt_t fWindowWidth
Width of window (including borders, etc.)
Definition TCanvas.h:41
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition TCanvas.h:65
void CopyPixmaps() override
Copy the canvas pixmap of the pad to the canvas.
Definition TCanvas.cxx:832
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition TCanvas.cxx:2527
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:1810
void SetCanvasImp(TCanvasImp *i)
Definition TCanvas.h:202
Color_t fHighLightColor
Highlight color of active pad.
Definition TCanvas.h:37
Size_t GetXsizeUser() const
Definition TCanvas.h:152
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
Definition TCanvas.cxx:2193
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition TCanvas.cxx:1641
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:140
Size_t GetXsizeReal() const
Definition TCanvas.h:154
Int_t GetEventX() const override
Definition TCanvas.h:135
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:714
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:1210
void SetPadSave(TPad *pad)
Definition TCanvas.h:213
Bool_t GetShowEditor() const
Definition TCanvas.h:149
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:1965
void Show()
Show canvas.
Definition TCanvas.cxx:2204
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:1627
Bool_t GetAutoExec() const
Definition TCanvas.h:151
Int_t fSelectedX
! X of selected object
Definition TCanvas.h:51
virtual void ToggleEditor()
Toggle editor.
Definition TCanvas.cxx:2432
TVirtualPad * GetSelectedPad() const override
Definition TCanvas.h:145
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition TCanvas.cxx:1581
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:1766
Bool_t GetShowToolTips() const
Definition TCanvas.h:150
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:2536
void SetTitle(const char *title="") override
Set canvas title.
Definition TCanvas.cxx:2147
UInt_t fCh
Height of the canvas along Y (pixels)
Definition TCanvas.h:44
const char * GetDISPLAY() const
Definition TCanvas.h:131
TContextMenu * fContextMenu
! Context menu pointer
Definition TCanvas.h:58
Int_t GetCanvasID() const override
Definition TCanvas.h:156
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:2035
UInt_t GetWindowWidth() const
Definition TCanvas.h:160
Bool_t fRetained
Retain structure flag.
Definition TCanvas.h:61
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition TCanvas.cxx:2518
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition TCanvas.cxx:1120
Size_t GetYsizeUser() const
Definition TCanvas.h:153
Int_t GetSelectedY() const
Definition TCanvas.h:143
void ls(Option_t *option="") const override
List all pads.
Definition TCanvas.cxx:1492
void RaiseWindow()
Raise canvas window.
Definition TCanvas.cxx:1732
void Build()
Build a canvas. Called by all constructors.
Definition TCanvas.cxx:582
Int_t GetSelectedX() const
Definition TCanvas.h:142
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:1531
void SetClickSelected(TObject *obj)
Definition TCanvas.h:206
TVirtualPad * GetPadSave() const override
Definition TCanvas.h:138
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2468
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TCanvas.cxx:1102
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition TCanvas.cxx:1755
TContextMenu * GetContextMenu() const
Definition TCanvas.h:132
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition TCanvas.cxx:766
Size_t GetYsizeReal() const
Definition TCanvas.h:155
UInt_t GetWw() const override
Definition TCanvas.h:162
Bool_t OpaqueMoving() const override
Definition TCanvas.h:178
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition TCanvas.h:57
UInt_t GetWh() const override
Definition TCanvas.h:163
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
Definition TCanvas.cxx:1600
void Flush()
Flush canvas buffers.
Definition TCanvas.cxx:1134
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:144
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:2550
void SetSelected(TObject *obj) override
Set selected canvas.
Definition TCanvas.cxx:2138
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition TCanvas.cxx:1523
virtual ~TCanvas()
Canvas destructor.
Definition TCanvas.cxx:672
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition TCanvas.h:67
Int_t GetEvent() const override
Definition TCanvas.h:134
void Closed() override
Emit Closed signal.
Definition TCanvas.cxx:774
Int_t GetDoubleBuffer() const
Definition TCanvas.h:133
void SetWindowPosition(Int_t x, Int_t y)
Set canvas window position.
Definition TCanvas.cxx:2156
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:2071
Int_t fEvent
! Type of current or last handled event
Definition TCanvas.h:45
Bool_t GetShowEventStatus() const
Definition TCanvas.h:147
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:1949
void Delete(Option_t *="") override
Delete this object.
Definition TCanvas.h:119
Bool_t UseGL() const
Definition TCanvas.h:224
@ kResizeOpaque
Definition TCanvas.h:94
@ kShowToolTips
Definition TCanvas.h:96
@ kShowToolBar
Definition TCanvas.h:91
@ kMoveOpaque
Definition TCanvas.h:93
@ kIsGrayscale
Definition TCanvas.h:95
@ kShowEventStatus
Definition TCanvas.h:88
@ kAutoExec
Definition TCanvas.h:89
@ kMenuBar
Definition TCanvas.h:90
@ kShowEditor
Definition TCanvas.h:92
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition TCanvas.cxx:1747
virtual void ToggleToolBar()
Toggle toolbar.
Definition TCanvas.cxx:2421
void SetRetained(Bool_t retained=kTRUE)
Definition TCanvas.h:215
Bool_t OpaqueResizing() const override
Definition TCanvas.h:179
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition TCanvas.cxx:915
void ResetDrawn()
Definition TCanvas.h:190
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:1023
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:4521
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 GUI Provides painting of main ROOT6 classes in web ...
Definition TWebCanvas.h:34
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
th1 Draw()