Logo ROOT   6.12/07
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 
16 
17 #include "TPad.h"
18 
19 #include "TAttCanvas.h"
20 
21 #include "TVirtualX.h"
22 
23 #include "TString.h"
24 
25 #include "TCanvasImp.h"
26 
27 class TContextMenu;
28 class TControlBar;
29 class TBrowser;
30 
31 class TCanvas : public TPad {
32 
33 friend class TCanvasImp;
34 friend class TThread;
35 friend class TInterpreter;
36 
37 protected:
38  TAttCanvas fCatt; ///< Canvas attributes
39  TString fDISPLAY; ///< Name of destination screen
40  Size_t fXsizeUser; ///< User specified size of canvas along X in CM
41  Size_t fYsizeUser; ///< User specified size of canvas along Y in CM
42  Size_t fXsizeReal; ///< Current size of canvas along X in CM
43  Size_t fYsizeReal; ///< Current size of canvas along Y in CM
44  Color_t fHighLightColor; ///< Highlight color of active pad
45  Int_t fDoubleBuffer; ///< Double buffer flag (0=off, 1=on)
46  Int_t fWindowTopX; ///< Top X position of window (in pixels)
47  Int_t fWindowTopY; ///< Top Y position of window (in pixels)
48  UInt_t fWindowWidth; ///< Width of window (including borders, etc.)
49  UInt_t fWindowHeight; ///< Height of window (including menubar, borders, etc.)
50  UInt_t fCw; ///< Width of the canvas along X (pixels)
51  UInt_t fCh; ///< Height of the canvas along Y (pixels)
52  Int_t fEvent; ///<! Type of current or last handled event
53  Int_t fEventX; ///<! Last X mouse position in canvas
54  Int_t fEventY; ///<! Last Y mouse position in canvas
55  Int_t fCanvasID; ///<! Canvas identifier
56  TObject *fSelected; ///<! Currently selected object
57  TObject *fClickSelected; ///<! Currently click-selected object
58  Int_t fSelectedX; ///<! X of selected object
59  Int_t fSelectedY; ///<! Y of selected object
60  TString fSelectedOpt; ///<! Drawing option of selected object
61  TPad *fSelectedPad; ///<! Pad containing currently selected object
62  TPad *fClickSelectedPad;///<! Pad containing currently click-selected object
63  TPad *fPadSave; ///<! Pointer to saved pad in HandleInput
64  TCanvasImp *fCanvasImp; ///<! Window system specific canvas implementation
65  TContextMenu *fContextMenu; ///<! Context menu pointer
66  Bool_t fBatch; ///<! True when in batchmode
67  Bool_t fUpdating; ///<! True when Updating the canvas
68  Bool_t fRetained; ///< Retain structure flag
69  Bool_t fUseGL; ///<! True when rendering is with GL
70  Bool_t fDrawn; ///<! Set to True when the Draw method is called
71  //
72  TVirtualPadPainter *fPainter; ///<! Canvas (pad) painter.
73 
74  static Bool_t fgIsFolder; ///< Indicates if canvas can be browsed as a folder
75 
76 private:
77  TCanvas(const TCanvas &canvas); // cannot copy canvas, use TObject::Clone()
78  TCanvas &operator=(const TCanvas &rhs); // idem
79  void Build();
80  void CopyPixmaps();
81  void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected);
82  void RunAutoExec();
83 
84  //Initialize PadPainter.
85  void CreatePainter();
86 
87 protected:
88  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
89  //-- used by friend TThread class
90  void Init();
91 
92 public:
93  // TCanvas status bits
94  enum {
96  kAutoExec = BIT(16),
97  kMenuBar = BIT(17),
104  };
105 
106  TCanvas(Bool_t build=kTRUE);
107  TCanvas(const char *name, const char *title="", Int_t form=1);
108  TCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
109  TCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy,
110  Int_t ww, Int_t wh);
111  TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid);
112  virtual ~TCanvas();
113 
114  //-- used by friend TThread class
115  void Constructor();
116  void Constructor(const char *name, const char *title, Int_t form);
117  void Constructor(const char *name, const char *title, Int_t ww, Int_t wh);
118  void Constructor(const char *name, const char *title,
119  Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
120  void Destructor();
121 
122  TVirtualPad *cd(Int_t subpadnumber=0);
123  virtual void Browse(TBrowser *b);
124  void Clear(Option_t *option="");
125  void Close(Option_t *option="");
126  virtual void Delete(Option_t * = "") { MayNotUse("Delete()"); }
127  void DisconnectWidget(); // used by TCanvasImp
128  virtual void Draw(Option_t *option="");
129  virtual TObject *DrawClone(Option_t *option="") const; // *MENU*
130  virtual TObject *DrawClonePad(); // *MENU*
131  virtual void EditorBar();
132  void EmbedInto(Int_t winid, Int_t ww, Int_t wh);
133  void EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
134  void FeedbackMode(Bool_t set);
135  void Flush();
136  void UseCurrentStyle(); // *MENU*
137  void ForceUpdate() { if (fCanvasImp) fCanvasImp->ForceUpdate(); }
138  const char *GetDISPLAY() const {return fDISPLAY.Data();}
141  Int_t GetEvent() const { return fEvent; }
142  Int_t GetEventX() const { return fEventX; }
143  Int_t GetEventY() const { return fEventY; }
145  TVirtualPad *GetPadSave() const { return fPadSave; }
146  void ClearPadSave() { fPadSave = 0; }
147  TObject *GetSelected() const {return fSelected;}
149  Int_t GetSelectedX() const {return fSelectedX;}
150  Int_t GetSelectedY() const {return fSelectedY;}
151  Option_t *GetSelectedOpt() const {return fSelectedOpt.Data();}
158  Bool_t GetAutoExec() const { return TestBit(kAutoExec); }
159  Size_t GetXsizeUser() const {return fXsizeUser;}
160  Size_t GetYsizeUser() const {return fYsizeUser;}
161  Size_t GetXsizeReal() const {return fXsizeReal;}
162  Size_t GetYsizeReal() const {return fYsizeReal;}
163  Int_t GetCanvasID() const {return fCanvasID;}
164  TCanvasImp *GetCanvasImp() const {return fCanvasImp;}
167  UInt_t GetWindowWidth() const { return fWindowWidth; }
169  UInt_t GetWw() const { return fCw; }
170  UInt_t GetWh() const { return fCh; }
171  virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
172  {wtopx=GetWindowTopX(); wtopy=fWindowTopY; ww=fWindowWidth; wh=fWindowHeight;}
173  virtual void HandleInput(EEventType button, Int_t x, Int_t y);
174  Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
175  void Iconify() { if (fCanvasImp) fCanvasImp->Iconify(); }
176  Bool_t IsBatch() const { return fBatch; }
177  Bool_t IsDrawn() { return fDrawn; }
178  Bool_t IsFolder() const;
180  Bool_t IsRetained() const { return fRetained; }
181  virtual void ls(Option_t *option="") const;
182  void MoveOpaque(Int_t set=1);
183  Bool_t OpaqueMoving() const { return TestBit(kMoveOpaque); }
185  virtual void Paint(Option_t *option="");
186  virtual TPad *Pick(Int_t px, Int_t py, TObjLink *&pickobj) { return TPad::Pick(px, py, pickobj); }
187  virtual TPad *Pick(Int_t px, Int_t py, TObject *prevSelObj);
188  virtual void Picked(TPad *selpad, TObject *selected, Int_t event); // *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  virtual void Closed(); // *SIGNAL*
193  void RaiseWindow() { if (fCanvasImp) fCanvasImp->RaiseWindow(); }
194  void ResetDrawn() { fDrawn=kFALSE; }
195  virtual void Resize(Option_t *option="");
196  void ResizeOpaque(Int_t set=1);
197  void SaveSource(const char *filename="", Option_t *option="");
198  void SavePrimitive(std::ostream &out, Option_t *option = "");
199  virtual void SetCursor(ECursor cursor);
200  virtual void SetDoubleBuffer(Int_t mode=1);
201  virtual void SetFixedAspectRatio(Bool_t fixed = kTRUE); // *TOGGLE*
202  void SetGrayscale(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsGrayscale
203  void SetWindowPosition(Int_t x, Int_t y) { if (fCanvasImp) fCanvasImp->SetWindowPosition(x, y); }
204  void SetWindowSize(UInt_t ww, UInt_t wh) { if (fCanvasImp) fCanvasImp->SetWindowSize(ww, wh); }
205  void SetCanvasImp(TCanvasImp *i) { fCanvasImp = i; }
206  void SetCanvasSize(UInt_t ww, UInt_t wh); // *MENU*
207  void SetHighLightColor(Color_t col) { fHighLightColor = col; }
208  void SetSelected(TObject *obj);
209  void SetClickSelected(TObject *obj) { fClickSelected = obj; }
210  void SetSelectedPad(TPad *pad) { fSelectedPad = pad; }
211  void SetClickSelectedPad(TPad *pad) { fClickSelectedPad = pad; }
212  void Show() { if (fCanvasImp) fCanvasImp->Show(); }
213  virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
214  void SetBatch(Bool_t batch=kTRUE);
215  static void SetFolder(Bool_t isfolder=kTRUE);
216  void SetPadSave(TPad *pad) {fPadSave = pad;}
217  void SetRetained(Bool_t retained=kTRUE) { fRetained=retained;}
218  void SetTitle(const char *title="");
219  virtual void ToggleEventStatus();
220  virtual void ToggleAutoExec();
221  virtual void ToggleToolBar();
222  virtual void ToggleEditor();
223  virtual void ToggleToolTips();
224  virtual void Update();
225 
226  Bool_t UseGL() const { return fUseGL; }
227  void SetSupportGL(Bool_t support) {fUseGL = support;}
229  void DeleteCanvasPainter();
230 
231  static TCanvas *MakeDefCanvas();
232  static Bool_t SupportAlpha();
233 
234  ClassDef(TCanvas,8) //Graphics canvas
235 };
236 
237 #endif
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TCanvas.cxx:1053
void RunAutoExec()
Execute the list of TExecs in the current pad.
Definition: TCanvas.cxx:1655
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
Definition: TCanvas.cxx:1016
Bool_t GetShowToolBar() const
Definition: TCanvas.h:155
Option_t * GetSelectedOpt() const
Definition: TCanvas.h:151
void SetCanvasImp(TCanvasImp *i)
Definition: TCanvas.h:205
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Definition: TCanvas.cxx:1071
Bool_t GetShowEditor() const
Definition: TCanvas.h:156
This class defines an abstract interface to a generic command line interpreter.
Definition: TInterpreter.h:60
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Definition: TCanvas.cxx:1534
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:22
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition: TCanvas.cxx:1463
TPad * fSelectedPad
! Pad containing currently selected object
Definition: TCanvas.h:61
virtual void SetCursor(ECursor cursor)
Set cursor.
Definition: TCanvas.cxx:1891
void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvas.h:203
TCanvas(const TCanvas &canvas)
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area)...
Definition: TCanvasImp.h:30
TVirtualPad * GetSelectedPad() const
Definition: TCanvas.h:152
Int_t fEvent
! Type of current or last handled event
Definition: TCanvas.h:52
TContextMenu * fContextMenu
! Context menu pointer
Definition: TCanvas.h:65
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition: TCanvas.cxx:2190
void RaiseWindow()
Definition: TCanvas.h:193
Bool_t fDrawn
! Set to True when the Draw method is called
Definition: TCanvas.h:70
void ResetDrawn()
Definition: TCanvas.h:194
Bool_t fUseGL
! True when rendering is with GL
Definition: TCanvas.h:69
TPad * fPadSave
! Pointer to saved pad in HandleInput
Definition: TCanvas.h:63
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
Definition: TCanvas.cxx:2351
float Float_t
Definition: RtypesCore.h:53
Size_t fYsizeReal
Current size of canvas along Y in CM.
Definition: TCanvas.h:43
float Size_t
Definition: RtypesCore.h:83
void SetTitle(const char *title="")
Set canvas title.
Definition: TCanvas.cxx:1956
const char Option_t
Definition: RtypesCore.h:62
virtual void SetWindowPosition(Int_t x, Int_t y)
Definition: TCanvasImp.h:89
void SetSupportGL(Bool_t support)
Definition: TCanvas.h:227
Int_t GetCanvasID() const
Get canvas identifier.
Definition: TCanvas.h:163
void Build()
Build a canvas. Called by all constructors.
Definition: TCanvas.cxx:561
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
Definition: TCanvas.h:72
#define BIT(n)
Definition: Rtypes.h:78
TObject * fSelected
! Currently selected object
Definition: TCanvas.h:56
TObject * GetSelected() const
Get selected.
Definition: TCanvas.h:147
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Definition: TCanvas.h:74
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Definition: TCanvas.cxx:688
Int_t fCanvasID
! Canvas identifier
Definition: TCanvas.h:55
EEventType
Definition: Buttons.h:15
TVirtualPad * GetPadSave() const
Definition: TCanvas.h:145
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
Size_t GetYsizeUser() const
Definition: TCanvas.h:160
virtual void ToggleToolTips()
Toggle tooltip display.
Definition: TCanvas.cxx:2223
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Definition: TCanvas.h:41
Basic string class.
Definition: TString.h:125
Int_t fWindowTopX
Top X position of window (in pixels)
Definition: TCanvas.h:46
Int_t fSelectedX
! X of selected object
Definition: TCanvas.h:58
Bool_t GetShowEventStatus() const
Definition: TCanvas.h:154
int Int_t
Definition: RtypesCore.h:41
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
Definition: TCanvas.cxx:1982
bool Bool_t
Definition: RtypesCore.h:59
TObject * GetClickSelected() const
Definition: TCanvas.h:148
void Constructor()
Canvas default constructor.
Definition: TCanvas.cxx:172
ECursor
Definition: TVirtualX.h:44
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:954
void Iconify()
Definition: TCanvas.h:175
void ClearPadSave()
Definition: TCanvas.h:146
void Flush()
Flush canvas buffers.
Definition: TCanvas.cxx:1085
TCanvas & operator=(const TCanvas &rhs)
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition: TCanvas.h:186
Bool_t IsDrawn()
Definition: TCanvas.h:177
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
Definition: TCanvas.cxx:1548
void SetClickSelected(TObject *obj)
Definition: TCanvas.h:209
virtual void RaiseWindow()
Definition: TCanvasImp.h:95
Bool_t GetShowToolTips() const
Definition: TCanvas.h:157
Size_t fXsizeReal
Current size of canvas along X in CM.
Definition: TCanvas.h:42
virtual void Browse(TBrowser *b)
Browse.
Definition: TCanvas.cxx:654
TString fSelectedOpt
! Drawing option of selected object
Definition: TCanvas.h:60
Double_t x[n]
Definition: legend1.C:17
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Definition: TCanvas.cxx:1155
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix canvas aspect ratio to current value if fixed is true.
Definition: TCanvas.cxx:1917
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Definition: TCanvas.cxx:740
virtual void Paint(Option_t *option="")
Paint canvas.
Definition: TCanvas.cxx:1471
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition: TCanvas.cxx:1563
Manages canvas attributes.
Definition: TAttCanvas.h:17
UInt_t GetWindowHeight() const
Definition: TCanvas.h:168
virtual void Show()
Definition: TCanvasImp.h:65
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Definition: TCanvas.h:62
UInt_t GetWw() const
Get Ww.
Definition: TCanvas.h:169
TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
Definition: TCanvas.h:164
void DeleteCanvasPainter()
assert on IsBatch() == false?
Definition: TCanvas.cxx:2361
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:707
void SetSelectedPad(TPad *pad)
Definition: TCanvas.h:210
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:933
virtual ~TCanvas()
Canvas destructor.
Definition: TCanvas.cxx:646
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:49
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:1939
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition: TCanvas.cxx:1711
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Definition: TPad.cxx:4445
virtual void ls(Option_t *option="") const
List all pads.
Definition: TCanvas.cxx:1420
short Color_t
Definition: RtypesCore.h:79
Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
Definition: TCanvas.h:183
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Definition: TCanvas.cxx:2235
Size_t GetYsizeReal() const
Definition: TCanvas.h:162
Int_t GetEventX() const
Get X event.
Definition: TCanvas.h:142
Int_t GetSelectedY() const
Definition: TCanvas.h:150
Bool_t fRetained
Retain structure flag.
Definition: TCanvas.h:68
Int_t GetEvent() const
Get Event.
Definition: TCanvas.h:141
void SetRetained(Bool_t retained=kTRUE)
Definition: TCanvas.h:217
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
UInt_t fCw
Width of the canvas along X (pixels)
Definition: TCanvas.h:50
void DisconnectWidget()
Used by friend class TCanvasImp.
Definition: TCanvas.cxx:2298
void CopyPixmaps()
Copy the canvas pixmap of the pad to the canvas.
Definition: TCanvas.cxx:808
virtual void ToggleToolBar()
Toggle toolbar.
Definition: TCanvas.cxx:2201
Int_t fSelectedY
! Y of selected object
Definition: TCanvas.h:59
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition: TCanvas.cxx:1647
Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
Definition: TCanvas.h:184
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Definition: TCanvas.h:49
UInt_t GetWh() const
Get Wh.
Definition: TCanvas.h:170
virtual void ForceUpdate()
Definition: TCanvasImp.h:56
This class provides an interface to context sensitive popup menus.
Definition: TContextMenu.h:40
virtual void Iconify()
Definition: TCanvasImp.h:58
TString fDISPLAY
Name of destination screen.
Definition: TCanvas.h:39
unsigned int UInt_t
Definition: RtypesCore.h:42
The most important graphics class in the ROOT system.
Definition: TPad.h:29
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
Definition: TCanvas.cxx:2330
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
Definition: TCanvas.cxx:1432
Size_t GetXsizeReal() const
Definition: TCanvas.h:161
virtual void ToggleEditor()
Toggle editor.
Definition: TCanvas.cxx:2212
Bool_t fUpdating
! True when Updating the canvas
Definition: TCanvas.h:67
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition: TCanvas.cxx:2181
void Destructor()
Actual canvas destructor.
Definition: TCanvas.cxx:664
Color_t GetHighLightColor() const
Get highlight color.
Definition: TCanvas.h:144
const Bool_t kFALSE
Definition: RtypesCore.h:88
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Definition: TCanvas.cxx:1144
TAttCanvas fCatt
Canvas attributes.
Definition: TCanvas.h:38
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
Definition: TCanvas.h:64
The Canvas class.
Definition: TCanvas.h:31
Bool_t IsFolder() const
Is folder ?
Definition: TCanvas.cxx:1412
void SetClickSelectedPad(TPad *pad)
Definition: TCanvas.h:211
TContextMenu * GetContextMenu() const
Definition: TCanvas.h:139
TVirtualPad * GetClickSelectedPad() const
Definition: TCanvas.h:153
UInt_t GetWindowWidth() const
Definition: TCanvas.h:167
const char * GetDISPLAY() const
Definition: TCanvas.h:138
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
Definition: TCanvas.cxx:1878
Bool_t IsBatch() const
Is pad in batch mode ?
Definition: TCanvas.h:176
Double_t y[n]
Definition: legend1.C:17
void Init()
Initialize the TCanvas members. Called by all constructors.
Definition: TCanvas.cxx:512
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
Definition: TCanvas.cxx:2307
Color_t fHighLightColor
Highlight color of active pad.
Definition: TCanvas.h:44
Size_t fXsizeUser
User specified size of canvas along X in CM.
Definition: TCanvas.h:40
Size_t GetXsizeUser() const
Definition: TCanvas.h:159
void SetWindowSize(UInt_t ww, UInt_t wh)
Definition: TCanvas.h:204
virtual void SetWindowSize(UInt_t w, UInt_t h)
Definition: TCanvasImp.h:90
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:873
void SetPadSave(TPad *pad)
Definition: TCanvas.h:216
Int_t fWindowTopY
Top Y position of window (in pixels)
Definition: TCanvas.h:47
Int_t GetEventY() const
Get Y event.
Definition: TCanvas.h:143
Mother of all ROOT objects.
Definition: TObject.h:37
void UseCurrentStyle()
Force a copy of current style for all objects in canvas.
Definition: TCanvas.cxx:1119
void ForceUpdate()
Definition: TCanvas.h:137
virtual void Draw(Option_t *option="")
Draw a canvas.
Definition: TCanvas.cxx:826
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Definition: TCanvas.h:45
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
Definition: TCanvas.cxx:1900
void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this canvas in C++ macro file with GUI.
Definition: TCanvas.cxx:1666
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
Definition: TCanvas.cxx:899
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
Definition: TCanvas.cxx:990
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
Definition: TCanvas.h:171
Int_t fEventX
! Last X mouse position in canvas
Definition: TCanvas.h:53
void SetSelected(TObject *obj)
Set selected canvas.
Definition: TCanvas.cxx:1947
Bool_t HasMenuBar() const
Definition: TCanvas.h:174
void Show()
Definition: TCanvas.h:212
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
void Close(Option_t *option="")
Close canvas.
Definition: TCanvas.cxx:758
virtual void EditorBar()
Get editor bar.
Definition: TCanvas.cxx:981
virtual void Delete(Option_t *="")
Delete this object.
Definition: TCanvas.h:126
Bool_t IsRetained() const
Is pad retained ?
Definition: TCanvas.h:180
TObject * fClickSelected
! Currently click-selected object
Definition: TCanvas.h:57
Int_t fEventY
! Last Y mouse position in canvas
Definition: TCanvas.h:54
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
Definition: TCanvas.cxx:1862
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition: TCanvas.cxx:1168
Bool_t UseGL() const
Definition: TCanvas.h:226
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2248
Bool_t fBatch
! True when in batchmode
Definition: TCanvas.h:66
Int_t GetDoubleBuffer() const
Definition: TCanvas.h:140
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual void Closed()
Emit Closed signal.
Definition: TCanvas.cxx:748
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
char name[80]
Definition: TGX11.cxx:109
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
Definition: TCanvas.cxx:1520
UInt_t fCh
Height of the canvas along Y (pixels)
Definition: TCanvas.h:51
Bool_t GetAutoExec() const
Definition: TCanvas.h:158
UInt_t fWindowWidth
Width of window (including borders, etc.)
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:2316
void SetHighLightColor(Color_t col)
Definition: TCanvas.h:207
Int_t GetSelectedX() const
Definition: TCanvas.h:149
const char * Data() const
Definition: TString.h:345