215 void SetTitle(
const char *title=
"")
override;
#define ClassDefOverride(name, id)
Manages canvas attributes.
Using a TBrowser one can browse all ROOT objects.
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
void Init()
Initialize the TCanvas members. Called by all constructors.
UInt_t fCw
Width of the canvas along X (pixels)
void EmbedInto(Int_t winid, Int_t ww, Int_t wh)
Embedded a canvas into a TRootEmbeddedCanvas.
void SetWindowSize(UInt_t ww, UInt_t wh)
Set canvas window size.
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.
void Browse(TBrowser *b) override
Browse.
UInt_t GetWindowHeight() const
TObject * GetClickSelected() const
virtual void EditorBar()
Get editor bar.
static TCanvas * MakeDefCanvas()
Static function to build a default canvas.
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
TVirtualPad * GetClickSelectedPad() const
Size_t fYsizeReal
Current size of canvas along Y in CM.
void Constructor()
Canvas default constructor.
void SetClickSelectedPad(TPad *pad)
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
TCanvas(const TCanvas &canvas)=delete
Int_t fWindowTopX
Top X position of window (in pixels)
void SetSelectedPad(TPad *pad)
void SetDoubleBuffer(Int_t mode=1) override
Set Double Buffer On/Off.
void SetHighLightColor(Color_t col)
virtual void ToggleToolTips()
Toggle tooltip display.
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
TCanvas & operator=(const TCanvas &rhs)=delete
void UseCurrentStyle() override
Force a copy of current style for all objects in canvas.
void Iconify()
Iconify canvas.
Int_t GetWindowTopX()
Returns current top x position of window on screen.
Bool_t IsWeb() const
Is web canvas.
virtual void ToggleEventStatus()
Toggle event statusbar.
void Destructor()
Actual canvas destructor.
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
TCanvasImp * GetCanvasImp() const override
Bool_t IsRetained() const override
void SetSupportGL(Bool_t support)
void DeleteCanvasPainter()
assert on IsBatch() == false?
TPad * fPadSave
! Pointer to saved pad in HandleInput
static Bool_t SupportAlpha()
Static function returning "true" if transparency is supported.
Bool_t fBatch
! True when in batchmode
Bool_t fUseGL
! True when rendering is with GL
Int_t GetEventY() const override
Int_t fEventX
! Last X mouse position in canvas
Bool_t IsBatch() const override
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.
Size_t fXsizeReal
Current size of canvas along X in CM.
Bool_t HasMenuBar() const
TVirtualPadPainter * GetCanvasPainter()
Access and (probably) creation of pad painter.
virtual void HighlightConnect(const char *slot)
This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
void Close(Option_t *option="") override
Close canvas.
void SetFixedAspectRatio(Bool_t fixed=kTRUE) override
Fix canvas aspect ratio to current value if fixed is true.
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Color_t GetHighLightColor() const override
Bool_t GetShowToolBar() const
void DrawEventStatus(Int_t event, Int_t x, Int_t y, TObject *selected)
Report name and title of primitive below the cursor.
Bool_t IsFolder() const override
Is folder ?
UInt_t fWindowWidth
Width of window (including borders, etc.)
TVirtualPadPainter * fPainter
! Canvas (pad) painter.
void CopyPixmaps() override
Copy the canvas pixmap of the pad to the canvas.
Bool_t IsGrayscale()
Check whether this canvas is to be drawn in grayscale mode.
TPad * fClickSelectedPad
! Pad containing currently click-selected object
Bool_t fUpdating
! True when Updating the canvas
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
void SetCanvasImp(TCanvasImp *i)
Color_t fHighLightColor
Highlight color of active pad.
Size_t GetXsizeUser() const
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Emit ProcessedEvent() signal.
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
TObject * GetSelected() const override
Size_t GetXsizeReal() const
Int_t GetEventX() const override
Size_t fXsizeUser
User specified size of canvas along X in CM.
Int_t fEventY
! Last Y mouse position in canvas
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
UInt_t fWindowHeight
Height of window (including menubar, borders, etc.)
Int_t GetWindowTopY()
Returns current top y position of window on screen.
void SetPadSave(TPad *pad)
Bool_t GetShowEditor() const
TObject * fClickSelected
! Currently click-selected object
void SetCanvasSize(UInt_t ww, UInt_t wh) override
Set Width and Height of canvas to ww and wh respectively.
TPad * fSelectedPad
! Pad containing currently selected object
virtual void Selected(TVirtualPad *pad, TObject *obj, Int_t event)
Emit Selected() signal.
Bool_t GetAutoExec() const
Int_t fSelectedX
! X of selected object
virtual void ToggleEditor()
Toggle editor.
TVirtualPad * GetSelectedPad() const override
virtual void Picked(TPad *selpad, TObject *selected, Int_t event)
Emit Picked() signal.
TObject * fSelected
! Currently selected object
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitives in this canvas in C++ macro file with GUI.
void SetCursor(ECursor cursor) override
Set cursor.
Bool_t GetShowToolTips() const
Int_t fCanvasID
! Canvas identifier
void SetGrayscale(Bool_t set=kTRUE)
Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
void SetTitle(const char *title="") override
Set canvas title.
UInt_t fCh
Height of the canvas along Y (pixels)
const char * GetDISPLAY() const
TContextMenu * fContextMenu
! Context menu pointer
Int_t GetCanvasID() const override
TAttCanvas fCatt
Canvas attributes.
void SetName(const char *name="") override
Set canvas name. In case name is an empty string, a default name is set.
UInt_t GetWindowWidth() const
Bool_t fRetained
Retain structure flag.
void DisconnectWidget()
Used by friend class TCanvasImp.
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Size_t GetYsizeUser() const
Int_t GetSelectedY() const
void ls(Option_t *option="") const override
List all pads.
void RaiseWindow()
Raise canvas window.
void Build()
Build a canvas. Called by all constructors.
Int_t GetSelectedX() const
Int_t fWindowTopY
Top Y position of window (in pixels)
void Paint(Option_t *option="") override
Paint canvas.
void SetClickSelected(TObject *obj)
TVirtualPad * GetPadSave() const override
void Update() override
Update canvas pad buffers.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
void RunAutoExec()
Execute the list of TExecs in the current pad.
TContextMenu * GetContextMenu() const
virtual void Cleared(TVirtualPad *pad)
Emit pad Cleared signal.
Size_t GetYsizeReal() const
UInt_t GetWw() const override
Bool_t OpaqueMoving() const override
TCanvasImp * fCanvasImp
! Window system specific canvas implementation
UInt_t GetWh() const override
virtual void Highlighted(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
Emit Highlighted() signal.
void Flush()
Flush canvas buffers.
Size_t fYsizeUser
User specified size of canvas along Y in CM.
Int_t fDoubleBuffer
Double buffer flag (0=off, 1=on)
Option_t * GetSelectedOpt() const
void ForceUpdate()
Force canvas update.
void CreatePainter()
Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpaint...
void SetSelected(TObject *obj) override
Set selected canvas.
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
virtual ~TCanvas()
Canvas destructor.
static Bool_t fgIsFolder
Indicates if canvas can be browsed as a folder.
Int_t GetEvent() const override
void Closed() override
Emit Closed signal.
Int_t GetDoubleBuffer() const
void SetWindowPosition(Int_t x, Int_t y)
Set canvas window position.
TString fDISPLAY
Name of destination screen.
bool SetRealAspectRatio(const Int_t axis=1)
Function to resize a canvas so that the plot inside is shown in real aspect ratio.
Int_t fEvent
! Type of current or last handled event
Bool_t GetShowEventStatus() const
TString fSelectedOpt
! Drawing option of selected object
Int_t fSelectedY
! Y of selected object
Bool_t fDrawn
! Set to True when the Draw method is called
void SetBatch(Bool_t batch=kTRUE) override
Toggle batch mode.
void Delete(Option_t *="") override
Delete this object.
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
virtual void ToggleToolBar()
Toggle toolbar.
void SetRetained(Bool_t retained=kTRUE)
Bool_t OpaqueResizing() const override
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
This class defines an abstract interface to a generic command line interpreter.
Wrapper around a TObject so it can be stored in a TList.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
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...
The most important graphics class in the ROOT system.
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
const char * Data() const
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.