Logo ROOT  
Reference Guide
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
19#include "TString.h"
20
21#include "TCanvasImp.h"
22
23class TContextMenu;
24class TControlBar;
25class TBrowser;
26
27class TCanvas : public TPad {
28
29friend class TCanvasImp;
30friend class TThread;
31friend class TInterpreter;
32
33protected:
34 TAttCanvas fCatt; ///< Canvas attributes
35 TString fDISPLAY; ///< Name of destination screen
36 Size_t fXsizeUser; ///< User specified size of canvas along X in CM
37 Size_t fYsizeUser; ///< User specified size of canvas along Y in CM
38 Size_t fXsizeReal; ///< Current size of canvas along X in CM
39 Size_t fYsizeReal; ///< Current size of canvas along Y in CM
40 Color_t fHighLightColor; ///< Highlight color of active pad
41 Int_t fDoubleBuffer; ///< Double buffer flag (0=off, 1=on)
42 Int_t fWindowTopX; ///< Top X position of window (in pixels)
43 Int_t fWindowTopY; ///< Top Y position of window (in pixels)
44 UInt_t fWindowWidth; ///< Width of window (including borders, etc.)
45 UInt_t fWindowHeight; ///< Height of window (including menubar, borders, etc.)
46 UInt_t fCw; ///< Width of the canvas along X (pixels)
47 UInt_t fCh; ///< Height of the canvas along Y (pixels)
48 Int_t fEvent; ///<! Type of current or last handled event
49 Int_t fEventX; ///<! Last X mouse position in canvas
50 Int_t fEventY; ///<! Last Y mouse position in canvas
51 Int_t fCanvasID; ///<! Canvas identifier
52 TObject *fSelected; ///<! Currently selected object
53 TObject *fClickSelected; ///<! Currently click-selected object
54 Int_t fSelectedX; ///<! X of selected object
55 Int_t fSelectedY; ///<! Y of selected object
56 TString fSelectedOpt; ///<! Drawing option of selected object
57 TPad *fSelectedPad; ///<! Pad containing currently selected object
58 TPad *fClickSelectedPad;///<! Pad containing currently click-selected object
59 TPad *fPadSave; ///<! Pointer to saved pad in HandleInput
60 TCanvasImp *fCanvasImp; ///<! Window system specific canvas implementation
61 TContextMenu *fContextMenu; ///<! Context menu pointer
62 Bool_t fBatch; ///<! True when in batchmode
63 Bool_t fUpdating; ///<! True when Updating the canvas
64 Bool_t fRetained; ///< Retain structure flag
65 Bool_t fUseGL; ///<! True when rendering is with GL
66 Bool_t fDrawn; ///<! Set to True when the Draw method is called
67 //
68 TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
69
70 static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
71
72private:
73 TCanvas(const TCanvas &canvas); // cannot copy canvas, use TObject::Clone()
74 TCanvas &operator=(const TCanvas &rhs); // idem
75 void Build();
76 void CopyPixmaps();
77 void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
78 void RunAutoExec();
79
80 //Initialize PadPainter.
81 void CreatePainter();
82
83protected:
84 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
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 virtual ~TCanvas();
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,
115 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
116 void Destructor();
117
118 TVirtualPad *cd(Int_t subpadnumber=0);
119 virtual void Browse(TBrowser *b);
120 void Clear(Option_t *option="");
121 void Close(Option_t *option="");
122 virtual void Delete(Option_t * = "") { MayNotUse("Delete()"); }
123 void DisconnectWidget(); // used by TCanvasImp
124 virtual void Draw(Option_t *option="");
125 virtual TObject *DrawClone(Option_t *option="") const; // *MENU*
126 virtual TObject *DrawClonePad(); // *MENU*
127 virtual void EditorBar();
128 void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
129 void EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
130 void FeedbackMode(Bool_t set);
131 void Flush();
132 void UseCurrentStyle(); // *MENU*
134 const char *GetDISPLAY() const {return fDISPLAY.Data();}
137 Int_t GetEvent() const { return fEvent; }
138 Int_t GetEventX() const { return fEventX; }
139 Int_t GetEventY() const { return fEventY; }
141 TVirtualPad *GetPadSave() const { return fPadSave; }
142 void ClearPadSave() { fPadSave = 0; }
143 TObject *GetSelected() const {return fSelected;}
145 Int_t GetSelectedX() const {return fSelectedX;}
146 Int_t GetSelectedY() const {return fSelectedY;}
154 Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
159 Int_t GetCanvasID() const {return fCanvasID;}
165 UInt_t GetWw() const { return fCw; }
166 UInt_t GetWh() const { return fCh; }
167 virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
168 {wtopx=GetWindowTopX(); wtopy=fWindowTopY; ww=fWindowWidth; wh=fWindowHeight;}
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);
173 Bool_t IsBatch() const { return fBatch; }
174 Bool_t IsDrawn() { return fDrawn; }
175 Bool_t IsFolder() const;
177 Bool_t IsRetained() const { return fRetained; }
178 Bool_t IsWeb() const { return fCanvasImp ? fCanvasImp->IsWeb() : kFALSE; }
179 virtual void ls(Option_t *option="") const;
180 void MoveOpaque(Int_t set=1);
183 virtual void Paint(Option_t *option="");
184 virtual TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) { return TPad::Pick(px, py, pickobj); }
185 virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
186 virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *SIGNAL*
187 virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y); // *SIGNAL*
188 virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected); // *SIGNAL*
189 virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event); // *SIGNAL*
190 virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
191 virtual void Closed(); // *SIGNAL*
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 = "");
198 virtual void SetCursor(ECursor cursor);
199 virtual void SetDoubleBuffer(Int_t mode=1);
200 virtual void SetName(const char *name="");
201 virtual void SetFixedAspectRatio(Bool_t fixed = kTRUE); // *TOGGLE*
202 void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
205 {
206 if (fBatch)
207 SetCanvasSize((ww + fCw) / 2, (wh + fCh) / 2);
208 else if (fCanvasImp)
209 fCanvasImp->SetWindowSize(ww, wh);
210 }
212 void SetCanvasSize(UInt_t ww, UInt_t wh); // *MENU*
214 void SetSelected(TObject *obj);
216 void SetSelectedPad(TPad *pad) { fSelectedPad = pad; }
218 void Show() { if (fCanvasImp) fCanvasImp->Show(); }
219 virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
220 void SetBatch(Bool_t batch=kTRUE);
221 static void SetFolder(Bool_t isfolder=kTRUE);
222 void SetPadSave(TPad *pad) {fPadSave = pad;}
223 bool SetRealAspectRatio(const Int_t axis = 1); // *MENU*
224 void SetRetained(Bool_t retained=kTRUE) { fRetained=retained;}
225 void SetTitle(const char *title="");
226 virtual void ToggleEventStatus();
227 virtual void ToggleAutoExec();
228 virtual void ToggleToolBar();
229 virtual void ToggleEditor();
230 virtual void ToggleToolTips();
231 virtual void Update();
232
233 Bool_t UseGL() const { return fUseGL; }
234 void SetSupportGL(Bool_t support) {fUseGL = support;}
236 void DeleteCanvasPainter();
237
238 static TCanvas *MakeDefCanvas();
239 static Bool_t SupportAlpha();
240
241 ClassDef(TCanvas,8) //Graphics canvas
242};
243
244#endif
EEventType
Definition: Buttons.h:15
int Int_t
Definition: CPyCppyy.h:43
unsigned int UInt_t
Definition: CPyCppyy.h:44
ECursor
Definition: GuiTypes.h:371
#define b(i)
Definition: RSha256.hxx:100
float Size_t
Definition: RtypesCore.h:85
const Bool_t kFALSE
Definition: RtypesCore.h:90
bool Bool_t
Definition: RtypesCore.h:61
short Color_t
Definition: RtypesCore.h:81
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
#define BIT(n)
Definition: Rtypes.h:83
char name[80]
Definition: TGX11.cxx:109
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
virtual void Show()
Definition: TCanvasImp.h:66
virtual void Iconify()
Definition: TCanvasImp.h:59
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvasImp.h:90
virtual Bool_t IsWeb() const
Definition: TCanvasImp.h:45
virtual void RaiseWindow()
Definition: TCanvasImp.h:96
virtual void SetWindowSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:91
virtual void ForceUpdate()
Definition: TCanvasImp.h:57
The Canvas class.
Definition: TCanvas.h:27
void Init()
Initialize the TCanvas members. Called by all constructors.
Definition: TCanvas.cxx:520
UInt_t fCw
Width of the canvas along X (pixels)
Definition: TCanvas.h:46
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
Definition: TCanvas.cxx:1032
Bool_t IsRetained() const
Is pad retained ?
Definition: TCanvas.h:177
TVirtualPad * GetSelectedPad() const
Definition: TCanvas.h:148
void SetWindowSize(UInt_t ww, UInt_t wh)
Definition: TCanvas.h:204
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:2014
UInt_t GetWindowHeight() const
Definition: TCanvas.h:164
virtual void EditorBar()
Get editor bar.
Definition: TCanvas.cxx:1023
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition: TCanvas.cxx:1474
TVirtualPad * GetPadSave() const
Definition: TCanvas.h:141
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:1058
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition: TCanvas.h:39
UInt_t GetWh() const
Get Wh.
Definition: TCanvas.h:166
void Constructor()
Canvas default constructor.
Definition: TCanvas.cxx:180
void SetClickSelectedPad(TPad *pad)
Definition: TCanvas.h:217
@ 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
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition: TCanvas.cxx:2366
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
Definition: TCanvas.cxx:1953
Int_t fWindowTopX
Top X position of window (in pixels)
Definition: TCanvas.h:42
void SetSelectedPad(TPad *pad)
Definition: TCanvas.h:216
Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
Definition: TCanvas.h:182
void SetHighLightColor(Color_t col)
Definition: TCanvas.h:213
virtual void ToggleToolTips()
Toggle tooltip display.
Definition: TCanvas.cxx:2408
virtual void Draw(Option_t *option="")
Draw a canvas.
Definition: TCanvas.cxx:838
Bool_t IsDrawn()
Definition: TCanvas.h:174
void Iconify()
Definition: TCanvas.h:172
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition: TCanvas.cxx:1186
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TCanvas.cxx:1095
Bool_t IsWeb() const
Definition: TCanvas.h:178
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition: TCanvas.cxx:2375
virtual void SetName(const char *name="")
Set canvas name. In case name is an empty string, a default name is set.
Definition: TCanvas.cxx:2022
void Destructor()
Actual canvas destructor.
Definition: TCanvas.cxx:677
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
Definition: TCanvas.h:167
TVirtualPad * GetClickSelectedPad() const
Definition: TCanvas.h:149
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
Definition: TCanvas.cxx:1975
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:720
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix canvas aspect ratio to current value if fixed is true.
Definition: TCanvas.cxx:1992
void SetSupportGL(Bool_t support)
Definition: TCanvas.h:234
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition: TCanvas.cxx:2546
TPad * fPadSave
! Pointer to saved pad in HandleInput
Definition: TCanvas.h:59
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition: TCanvas.cxx:2420
Bool_t fBatch
! True when in batchmode
Definition: TCanvas.h:62
Bool_t fUseGL
! True when rendering is with GL
Definition: TCanvas.h:65
Int_t fEventX
! Last X mouse position in canvas
Definition: TCanvas.h:49
TCanvas(const TCanvas &canvas)
virtual void Paint(Option_t *option="")
Paint canvas.
Definition: TCanvas.cxx:1513
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition: TCanvas.h:38
Bool_t HasMenuBar() const
Definition: TCanvas.h:170
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition: TCanvas.cxx:2536
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
Definition: TCanvas.cxx:1601
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition: TCanvas.cxx:1638
Int_t GetEventY() const
Get Y event.
Definition: TCanvas.h:139
Color_t GetHighLightColor() const
Get highlight color.
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:957
UInt_t fWindowWidth
Width of window (including borders, etc.)
Definition: TCanvas.h:44
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition: TCanvas.h:68
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this canvas A new canvas is created that is a clone of this canvas.
Definition: TCanvas.cxx:885
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition: TCanvas.cxx:2492
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Definition: TCanvas.h:58
void SetSelected(TObject *obj)
Set selected canvas.
Definition: TCanvas.cxx:2132
Bool_t fUpdating
! True when Updating the canvas
Definition: TCanvas.h:63
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition: TCanvas.cxx:1786
void SetCanvasImp(TCanvasImp *i)
Definition: TCanvas.h:211
Int_t GetEvent() const
Get Event.
Definition: TCanvas.h:137
Color_t fHighLightColor
Highlight color of active pad.
Definition: TCanvas.h:40
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:2167
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition: TCanvas.cxx:1623
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition: TCanvas.cxx:1210
Size_t GetXsizeReal() const
Definition: TCanvas.h:157
Int_t GetEventX() const
Get X event.
Definition: TCanvas.h:138
Bool_t IsFolder() const
Is folder ?
Definition: TCanvas.cxx:1454
Bool_t IsBatch() const
Is pad in batch mode ?
Definition: TCanvas.h:173
Size_t fXsizeUser
User specified size of canvas along X in CM.
Definition: TCanvas.h:36
Int_t fEventY
! Last Y mouse position in canvas
Definition: TCanvas.h:50
virtual void ls(Option_t *option="") const
List all pads.
Definition: TCanvas.cxx:1462
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Definition: TCanvas.h:45
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition: TCanvas.cxx:1197
void SetPadSave(TPad *pad)
Definition: TCanvas.h:222
Bool_t GetShowEditor() const
Definition: TCanvas.h:152
TObject * fClickSelected
! Currently click-selected object
Definition: TCanvas.h:53
void Show()
Definition: TCanvas.h:218
Int_t GetCanvasID() const
Get canvas identifier.
Definition: TCanvas.h:159
virtual void Delete(Option_t *="")
Delete this object.
Definition: TCanvas.h:122
TPad * fSelectedPad
! Pad containing currently selected object
Definition: TCanvas.h:57
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Definition: TCanvas.cxx:1609
Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
Definition: TCanvas.h:181
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2433
Bool_t GetAutoExec() const
Definition: TCanvas.h:154
Int_t fSelectedX
! X of selected object
Definition: TCanvas.h:54
virtual void ToggleEditor()
Toggle editor.
Definition: TCanvas.cxx:2397
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition: TCanvas.cxx:1563
TObject * fSelected
! Currently selected object
Definition: TCanvas.h:52
void UseCurrentStyle()
Force a copy of current style for all objects in canvas.
Definition: TCanvas.cxx:1161
void SetTitle(const char *title="")
Set canvas title.
Definition: TCanvas.cxx:2141
Bool_t GetShowToolTips() const
Definition: TCanvas.h:153
Int_t fCanvasID
! Canvas identifier
Definition: TCanvas.h:51
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
Definition: TCanvas.cxx:2501
virtual void SetCursor(ECursor cursor)
Set cursor.
Definition: TCanvas.cxx:1966
UInt_t fCh
Height of the canvas along Y (pixels)
Definition: TCanvas.h:47
TContextMenu * fContextMenu
! Context menu pointer
Definition: TCanvas.h:61
TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
Definition: TCanvas.h:160
TAttCanvas fCatt
Canvas attributes.
Definition: TCanvas.h:34
UInt_t GetWindowWidth() const
Definition: TCanvas.h:163
Bool_t fRetained
Retain structure flag.
Definition: TCanvas.h:64
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition: TCanvas.cxx:2483
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition: TCanvas.cxx:1113
Size_t GetYsizeUser() const
Definition: TCanvas.h:156
UInt_t GetWw() const
Get Ww.
Definition: TCanvas.h:165
Int_t GetSelectedY() const
Definition: TCanvas.h:146
void RaiseWindow()
Definition: TCanvas.h:192
void Build()
Build a canvas. Called by all constructors.
Definition: TCanvas.cxx:569
virtual void Closed()
Emit Closed signal.
Definition: TCanvas.cxx:761
void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this canvas in C++ macro file with GUI.
Definition: TCanvas.cxx:1741
Int_t GetSelectedX() const
Definition: TCanvas.h:145
Int_t fWindowTopY
Top Y position of window (in pixels)
Definition: TCanvas.h:43
TCanvas & operator=(const TCanvas &rhs)
void SetClickSelected(TObject *obj)
Definition: TCanvas.h:215
void Close(Option_t *option="")
Close canvas.
Definition: TCanvas.cxx:771
TContextMenu * GetContextMenu() const
Definition: TCanvas.h:135
void CopyPixmaps()
Copy the canvas pixmap of the pad to the canvas.
Definition: TCanvas.cxx:820
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition: TCanvas.cxx:1730
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition: TCanvas.cxx:753
Size_t GetYsizeReal() const
Definition: TCanvas.h:158
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition: TCanvas.h:184
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition: TCanvas.h:60
TObject * GetClickSelected() const
Definition: TCanvas.h:144
TObject * GetSelected() const
Get selected.
Definition: TCanvas.h:143
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
Definition: TCanvas.cxx:1582
void Flush()
Flush canvas buffers.
Definition: TCanvas.cxx:1127
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Definition: TCanvas.h:37
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Definition: TCanvas.h:41
virtual void Browse(TBrowser *b)
Browse.
Definition: TCanvas.cxx:667
void ForceUpdate()
Definition: TCanvas.h:133
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:701
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
Definition: TCanvas.cxx:2515
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition: TCanvas.cxx:1505
virtual ~TCanvas()
Canvas destructor.
Definition: TCanvas.cxx:659
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition: TCanvas.h:70
Int_t GetDoubleBuffer() const
Definition: TCanvas.h:136
void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvas.h:203
TString fDISPLAY
Name of destination screen.
Definition: TCanvas.h:35
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:2065
Int_t fEvent
! Type of current or last handled event
Definition: TCanvas.h:48
Bool_t GetShowEventStatus() const
Definition: TCanvas.h:150
TString fSelectedOpt
! Drawing option of selected object
Definition: TCanvas.h:56
Int_t fSelectedY
! Y of selected object
Definition: TCanvas.h:55
Bool_t fDrawn
! Set to True when the Draw method is called
Definition: TCanvas.h:66
Bool_t UseGL() const
Definition: TCanvas.h:233
Option_t * GetSelectedOpt() const
Definition: TCanvas.h:147
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition: TCanvas.cxx:1722
virtual void ToggleToolBar()
Toggle toolbar.
Definition: TCanvas.cxx:2386
void SetRetained(Bool_t retained=kTRUE)
Definition: TCanvas.h:224
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition: TCanvas.cxx:902
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
Definition: TCanvas.cxx:1937
void ResetDrawn()
Definition: TCanvas.h:193
const char * GetDISPLAY() const
Definition: TCanvas.h:134
This class provides an interface to context sensitive popup menus.
Definition: TContextMenu.h:40
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:22
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:61
Mother of all ROOT objects.
Definition: TObject.h:37
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:187
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:944
The most important graphics class in the ROOT system.
Definition: TPad.h:29
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition: TPad.cxx:4507
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
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