Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCanvas Class Reference

The Canvas class.

A Canvas is an area mapped to a window directly under the control of the display manager. A ROOT session may have several canvases open at any given time.

A Canvas may be subdivided into independent graphical areas: the Pads. A canvas has a default pad which has the name of the canvas itself. An example of a Canvas layout is sketched in the picture below.

This canvas contains two pads named P1 and P2. Both Canvas, P1 and P2 can be moved, grown, shrunk using the normal rules of the Display manager.

Once objects have been drawn in a canvas, they can be edited/moved by pointing directly to them. The cursor shape is changed to suggest the type of action that one can do on this object. Clicking with the right mouse button on an object pops-up a contextmenu with a complete list of actions possible on this object.

A graphical editor may be started from the canvas "View" menu under the menu entry "Toolbar".

An interactive HELP is available by clicking on the HELP button at the top right of the canvas. It gives a short explanation about the canvas' menus.

A canvas may be automatically divided into pads via TPad::Divide.

At creation time, no matter if in interactive or batch mode, the constructor defines the size of the canvas window (including the size of the window manager's decoration). To define precisely the graphics area size of a canvas in the interactive mode, the following four lines of code should be used:

{
Double_t w = 600;
Double_t h = 600;
auto c = new TCanvas("c", "c", w, h);
c->SetWindowSize(w + (w - c->GetWw()), h + (h - c->GetWh()));
}
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
The Canvas class.
Definition TCanvas.h:23

and in the batch mode simply do:

c->SetCanvasSize(w,h);

If the canvas size exceeds the window size, scroll bars will be added to the canvas This allows to display very large canvases (even bigger than the screen size). The Following example shows how to proceed.

{
auto c = new TCanvas("c","c");
c->SetCanvasSize(1500, 1500);
c->SetWindowSize(500, 500);
}

Definition at line 23 of file TCanvas.h.

Public Types

enum  {
  kShowEventStatus = (1ULL << ( 15 )) , kAutoExec = (1ULL << ( 16 )) , kMenuBar = (1ULL << ( 17 )) , kShowToolBar = (1ULL << ( 18 )) ,
  kShowEditor = (1ULL << ( 19 )) , kMoveOpaque = (1ULL << ( 20 )) , kResizeOpaque = (1ULL << ( 21 )) , kIsGrayscale = (1ULL << ( 22 )) ,
  kShowToolTips = (1ULL << ( 23 ))
}
 
- Public Types inherited from TPad
enum  {
  kFraming = (1ULL << ( 6 )) , kHori = (1ULL << ( 9 )) , kClipFrame = (1ULL << ( 10 )) , kPrintingPS = (1ULL << ( 11 )) ,
  kCannotMove = (1ULL << ( 12 )) , kClearAfterCR = (1ULL << ( 14 ))
}
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 

Public Member Functions

 TCanvas (Bool_t build=kTRUE)
 Canvas default constructor.
 
 TCanvas (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
 Create a new canvas.
 
 TCanvas (const char *name, const char *title, Int_t ww, Int_t wh)
 Create a new canvas at a random position.
 
 TCanvas (const char *name, const char *title="", Int_t form=1)
 Create a new canvas with a predefined size form.
 
 TCanvas (const char *name, Int_t ww, Int_t wh, Int_t winid)
 Create an embedded canvas, i.e.
 
 ~TCanvas () override
 Canvas destructor.
 
void Browse (TBrowser *b) override
 Browse.
 
TVirtualPadcd (Int_t subpadnumber=0) override
 Set current canvas & pad.
 
void Clear (Option_t *option="") override
 Remove all primitives from the canvas.
 
virtual void Cleared (TVirtualPad *pad)
 Emit pad Cleared signal.
 
void ClearPadSave ()
 
void Close (Option_t *option="") override
 Close canvas.
 
void Closed () override
 Emit Closed signal.
 
void Constructor ()
 Canvas default constructor.
 
void Constructor (const char *name, const char *title, Int_t form)
 Create a new canvas with a predefined size form.
 
void Constructor (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
 Create a new canvas.
 
void Constructor (const char *name, const char *title, Int_t ww, Int_t wh)
 Create a new canvas at a random position.
 
void Delete (Option_t *="") override
 Delete this object.
 
void DeleteCanvasPainter ()
 assert on IsBatch() == false?
 
void Destructor ()
 Actual canvas destructor.
 
void DisconnectWidget ()
 Used by friend class TCanvasImp.
 
void Draw (Option_t *option="") override
 Draw a canvas.
 
TObjectDrawClone (Option_t *option="") const override
 Draw a clone of this canvas A new canvas is created that is a clone of this canvas.
 
virtual TObjectDrawClonePad ()
 Draw a clone of this canvas into the current pad In an interactive session, select the destination/current pad with the middle mouse button, then point to the canvas area to select the canvas context menu item DrawClonePad.
 
virtual void EditorBar ()
 Get editor bar.
 
void EmbedInto (Int_t winid, Int_t ww, Int_t wh)
 Embedded a canvas into a TRootEmbeddedCanvas.
 
void EnterLeave (TPad *prevSelPad, TObject *prevSelObj)
 Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the currently selected object.
 
void FeedbackMode (Bool_t set)
 Turn rubberband feedback mode on or off.
 
void Flush ()
 Flush canvas buffers.
 
void ForceUpdate ()
 Force canvas update.
 
Bool_t GetAutoExec () const
 
Int_t GetCanvasID () const override
 
TCanvasImpGetCanvasImp () const override
 
TVirtualPadPainterGetCanvasPainter ()
 Access and (probably) creation of pad painter.
 
virtual void GetCanvasPar (Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
 
TObjectGetClickSelected () const
 
TVirtualPadGetClickSelectedPad () const
 
TContextMenuGetContextMenu () const
 
const char * GetDISPLAY () const
 
Int_t GetDoubleBuffer () const
 
Int_t GetEvent () const override
 
Int_t GetEventX () const override
 
Int_t GetEventY () const override
 
Color_t GetHighLightColor () const override
 
TVirtualPadGetPadSave () const override
 
TObjectGetSelected () const override
 
Option_tGetSelectedOpt () const
 
TVirtualPadGetSelectedPad () const override
 
Int_t GetSelectedX () const
 
Int_t GetSelectedY () const
 
Bool_t GetShowEditor () const
 
Bool_t GetShowEventStatus () const
 
Bool_t GetShowToolBar () const
 
Bool_t GetShowToolTips () const
 
UInt_t GetWh () const override
 
UInt_t GetWindowHeight () const
 
Int_t GetWindowTopX ()
 Returns current top x position of window on screen.
 
Int_t GetWindowTopY ()
 Returns current top y position of window on screen.
 
UInt_t GetWindowWidth () const
 
UInt_t GetWw () const override
 
Size_t GetXsizeReal () const
 
Size_t GetXsizeUser () const
 
Size_t GetYsizeReal () const
 
Size_t GetYsizeUser () const
 
virtual void HandleInput (EEventType button, Int_t x, Int_t y)
 Handle Input Events.
 
Bool_t HasMenuBar () const
 
virtual void HighlightConnect (const char *slot)
 This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.
 
virtual void Highlighted (TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)
 Emit Highlighted() signal.
 
void Iconify ()
 Iconify canvas.
 
TClassIsA () const override
 
Bool_t IsBatch () const override
 
Bool_t IsDrawn () const
 
Bool_t IsFolder () const override
 Is folder ?
 
Bool_t IsGrayscale ()
 Check whether this canvas is to be drawn in grayscale mode.
 
Bool_t IsRetained () const override
 
Bool_t IsUpdated () const
 
Bool_t IsWeb () const override
 Is web canvas.
 
void ls (Option_t *option="") const override
 List all pads.
 
void MoveOpaque (Int_t set=1)
 Set option to move objects/pads in a canvas.
 
Bool_t OpaqueMoving () const override
 
Bool_t OpaqueResizing () const override
 
void Paint (Option_t *option="") override
 Paint canvas.
 
virtual TPadPick (Int_t px, Int_t py, TObject *prevSelObj)
 Prepare for pick, call TPad::Pick() and when selected object is different from previous then emit Picked() signal.
 
TPadPick (Int_t px, Int_t py, TObjLink *&pickobj) override
 Search for an object at pixel position px,py.
 
virtual void Picked (TPad *selpad, TObject *selected, Int_t event)
 Emit Picked() signal.
 
virtual void ProcessedEvent (Int_t event, Int_t x, Int_t y, TObject *selected)
 Emit ProcessedEvent() signal.
 
void RaiseWindow ()
 Raise canvas window.
 
void ResetDrawn ()
 
void ResetUpdated ()
 
virtual void Resize (Option_t *option="")
 Recompute canvas parameters following a X11 Resize.
 
void ResizeOpaque (Int_t set=1)
 Set option to resize objects/pads in a canvas.
 
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitives in this canvas in C++ macro file with GUI.
 
void SaveSource (const char *filename="", Option_t *option="")
 Save primitives in this canvas as a C++ macro file.
 
virtual void Selected (TVirtualPad *pad, TObject *obj, Int_t event)
 Emit Selected() signal.
 
void SetBatch (Bool_t batch=kTRUE) override
 Toggle batch mode.
 
void SetCanvasImp (TCanvasImp *i)
 
void SetCanvasSize (UInt_t ww, UInt_t wh) override
 Set Width and Height of canvas to ww and wh respectively.
 
void SetClickSelected (TObject *obj)
 
void SetClickSelectedPad (TPad *pad)
 
void SetCursor (ECursor cursor) override
 Set cursor.
 
void SetDoubleBuffer (Int_t mode=1) override
 Set Double Buffer On/Off.
 
void SetFixedAspectRatio (Bool_t fixed=kTRUE) override
 Fix canvas aspect ratio to current value if fixed is true.
 
void SetGrayscale (Bool_t set=kTRUE)
 Set whether this canvas should be painted in grayscale, and re-paint it if necessary.
 
void SetHighLightColor (Color_t col)
 
void SetName (const char *name="") override
 Set canvas name.
 
void SetPadSave (TPad *pad)
 
bool SetRealAspectRatio (const Int_t axis=1)
 Function to resize a canvas so that the plot inside is shown in real aspect ratio.
 
void SetRetained (Bool_t retained=kTRUE)
 
void SetSelected (TObject *obj) override
 Set selected canvas.
 
void SetSelectedPad (TPad *pad)
 
void SetSupportGL (Bool_t support)
 
void SetTitle (const char *title="") override
 Set canvas title.
 
void SetWindowPosition (Int_t x, Int_t y)
 Set canvas window position.
 
void SetWindowSize (UInt_t ww, UInt_t wh)
 Set canvas window size.
 
void Show ()
 Show canvas.
 
virtual void Size (Float_t xsizeuser=0, Float_t ysizeuser=0)
 Set the canvas scale in centimeters.
 
void Streamer (TBuffer &) override
 Stream a class object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void ToggleAutoExec ()
 Toggle pad auto execution of list of TExecs.
 
virtual void ToggleEditor ()
 Toggle editor.
 
virtual void ToggleEventStatus ()
 Toggle event statusbar.
 
virtual void ToggleToolBar ()
 Toggle toolbar.
 
virtual void ToggleToolTips ()
 Toggle tooltip display.
 
void Update () override
 Update canvas pad buffers.
 
void UpdateAsync () override
 Asynchronous pad update.
 
void UseCurrentStyle () override
 Force a copy of current style for all objects in canvas.
 
Bool_t UseGL () const
 
- Public Member Functions inherited from TPad
 TPad ()
 Pad default constructor.
 
 TPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2)
 Pad constructor.
 
 ~TPad () override
 Pad destructor.
 
void AbsCoordinates (Bool_t set) override
 
Double_t AbsPixeltoX (Int_t px) override
 
virtual void AbsPixeltoXY (Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
 Convert absolute pixel into X/Y coordinates.
 
Double_t AbsPixeltoY (Int_t py) override
 
void Add (TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
 Add an object to list of primitives with speicified draw option When.
 
void AddExec (const char *name, const char *command) override
 Add a new TExec object to the list of Execs.
 
void AddFirst (TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
 Add an object as first in list of primitives with speicified draw option When.
 
virtual void AutoExec ()
 Execute the list of Execs when a pad event occurs.
 
void Browse (TBrowser *b) override
 Browse pad.
 
TLegendBuildLegend (Double_t x1=0.3, Double_t y1=0.21, Double_t x2=0.3, Double_t y2=0.21, const char *title="", Option_t *option="") override
 Build a legend from the graphical objects in the pad.
 
TVirtualPadcd (Int_t subpadnumber=0) override
 Set Current pad.
 
void Clear (Option_t *option="") override
 Delete all pad primitives.
 
Int_t Clip (Double_t *x, Double_t *y, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt) override
 Clipping routine: Cohen Sutherland algorithm.
 
virtual Int_t Clip (Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt)
 Clipping routine: Cohen Sutherland algorithm.
 
virtual Int_t ClippingCode (Double_t x, Double_t y, Double_t xcl1, Double_t ycl1, Double_t xcl2, Double_t ycl2)
 Compute the endpoint codes for TPad::Clip.
 
virtual Int_t ClipPolygon (Int_t n, Double_t *x, Double_t *y, Int_t nn, Double_t *xc, Double_t *yc, Double_t xclipl, Double_t yclipb, Double_t xclipr, Double_t yclipt)
 Clip polygon using the Sutherland-Hodgman algorithm.
 
void Close (Option_t *option="") override
 Delete all primitives in pad and pad itself.
 
void CloseToolTip (TObject *tip) override
 Hide tool tip.
 
void CopyPixmap () override
 Copy the pixmap of the pad to the canvas.
 
void CopyPixmaps () override
 Copy the sub-pixmaps of the pad to the canvas.
 
TObjectCreateToolTip (const TBox *b, const char *text, Long_t delayms) override
 Create a tool tip and return its pointer.
 
void DeleteExec (const char *name) override
 Remove TExec name from the list of Execs.
 
void DeleteToolTip (TObject *tip) override
 Delete tool tip object.
 
void Divide (Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
 Automatic pad generation by division.
 
virtual void DivideSquare (Int_t n, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
 "n" is the total number of sub-pads.
 
void Draw (Option_t *option="") override
 Draw Pad in Current pad (re-parent pad if necessary).
 
void DrawClassObject (const TObject *obj, Option_t *option="") override
 Draw class inheritance tree of the class to which obj belongs.
 
void DrawCollideGrid ()
 This method draws the collide grid on top of the canvas.
 
virtual void DrawCrosshair ()
 Function called to draw a crosshair in the canvas.
 
TH1FDrawFrame (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title="") override
 Draw an empty pad frame with X and Y axis.
 
virtual void EventPave ()
 
void ExecuteEventAxis (Int_t event, Int_t px, Int_t py, TAxis *axis) override
 Execute action corresponding to one event for a TAxis object (called by TAxis::ExecuteEvent.) This member function is called when an axis is clicked with the locator.
 
TObjectFindObject (const char *name) const override
 Search if object named name is inside this pad or in pads inside this pad.
 
TObjectFindObject (const TObject *obj) const override
 Search if obj is in pad or in pads inside this pad.
 
Double_t GetAbsHNDC () const override
 
Double_t GetAbsWNDC () const override
 
Double_t GetAbsXlowNDC () const override
 
Double_t GetAbsYlowNDC () const override
 
Double_t GetAspectRatio () const override
 
Rectangle_t GetBBox () override
 Return the bounding Box of the Pad.
 
TPoint GetBBoxCenter () override
 Return the center of the Pad as TPoint in pixels.
 
Short_t GetBorderMode () const override
 
Short_t GetBorderSize () const override
 
TCanvasGetCanvas () const override
 
Int_t GetCanvasID () const override
 Get canvas identifier.
 
TCanvasImpGetCanvasImp () const override
 Get canvas implementation pointer if any.
 
Int_t GetCrosshair () const
 Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
 
Int_t GetEvent () const override
 Get Event.
 
Int_t GetEventX () const override
 Get X event.
 
Int_t GetEventY () const override
 Get Y event.
 
TFrameGetFrame () override
 Get frame.
 
Int_t GetGLDevice () override
 Get GL device.
 
Bool_t GetGridx () const override
 
Bool_t GetGridy () const override
 
Color_t GetHighLightColor () const override
 Get highlight color.
 
Double_t GetHNDC () const override
 Get height of pad along Y in Normalized Coordinates (NDC)
 
TListGetListOfExecs () const override
 
TListGetListOfPrimitives () const override
 
Int_t GetLogx () const override
 
Int_t GetLogy () const override
 
Int_t GetLogz () const override
 
TVirtualPadGetMother () const override
 
const char * GetName () const override
 Returns name of object.
 
Int_t GetNumber () const override
 
TVirtualPadGetPad (Int_t subpadnumber) const override
 Get a pointer to subpadnumber of this pad.
 
Int_t GetPadPaint () const override
 
void GetPadPar (Double_t &xlow, Double_t &ylow, Double_t &xup, Double_t &yup) override
 Return lower and upper bounds of the pad in NDC coordinates.
 
TObjectGetPadPointer () const override
 
TVirtualPadGetPadSave () const override
 Get save pad.
 
TVirtualPadPainterGetPainter () override
 Get pad painter from TCanvas.
 
Double_t GetPhi () const override
 
Int_t GetPixmapID () const override
 
TObjectGetPrimitive (const char *name) const override
 Get primitive.
 
void GetRange (Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2) override
 Return pad world coordinates range.
 
void GetRangeAxis (Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) override
 Return pad axis coordinates range.
 
TObjectGetSelected () const override
 Get selected.
 
TVirtualPadGetSelectedPad () const override
 Get selected pad.
 
Double_t GetTheta () const override
 
Int_t GetTickx () const override
 
Int_t GetTicky () const override
 
const char * GetTitle () const override
 Returns title of object.
 
Double_t GetUxmax () const override
 Returns the maximum x-coordinate value visible on the pad. If log axis the returned value is in decades.
 
Double_t GetUxmin () const override
 Returns the minimum x-coordinate value visible on the pad. If log axis the returned value is in decades.
 
Double_t GetUymax () const override
 Returns the maximum y-coordinate value visible on the pad. If log axis the returned value is in decades.
 
Double_t GetUymin () const override
 Returns the minimum y-coordinate value visible on the pad. If log axis the returned value is in decades.
 
TViewGetView () const override
 
TObjectGetView3D () const override
 
TVirtualViewer3DGetViewer3D (Option_t *type="") override
 Create/obtain handle to 3D viewer.
 
TVirtualPadGetVirtCanvas () const override
 Get virtual canvas.
 
UInt_t GetWh () const override
 Get Wh.
 
Double_t GetWNDC () const override
 Get width of pad along X in Normalized Coordinates (NDC)
 
UInt_t GetWw () const override
 Get Ww.
 
Double_t GetX1 () const override
 
Double_t GetX2 () const override
 
Double_t GetXlowNDC () const override
 
Double_t GetY1 () const override
 
Double_t GetY2 () const override
 
Double_t GetYlowNDC () const override
 
Bool_t HasCrosshair () const override
 Return kTRUE if the crosshair has been activated (via SetCrosshair).
 
Bool_t HasFixedAspectRatio () const override
 
ULong_t Hash () const override
 Return hash value for this object.
 
Bool_t HasViewer3D () const override
 
void HighLight (Color_t col=kRed, Bool_t set=kTRUE) override
 Highlight pad.
 
Int_t IncrementPaletteColor (Int_t i, TString opt) override
 Increment (i==1) or set (i>1) the number of autocolor in the pad.
 
TClassIsA () const override
 
Bool_t IsBatch () const override
 Is pad in batch mode ?
 
Bool_t IsEditable () const override
 
Bool_t IsFolder () const override
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
Bool_t IsModified () const override
 
Bool_t IsRetained () const override
 Is pad retained ?
 
Bool_t IsVertical () const override
 
Bool_t IsWeb () const override
 Is web ?
 
void ls (Option_t *option="") const override
 List all primitives in pad.
 
void Modified (Bool_t flag=true) override
 Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
 
void ModifiedUpdate () override
 Short cut to call Modified() and Update() in a single call.
 
Int_t NextPaletteColor () override
 Get the next autocolor in the pad.
 
Bool_t OpaqueMoving () const override
 Is pad moving in opaque mode ?
 
Bool_t OpaqueResizing () const override
 Is pad resizing in opaque mode ?
 
Double_t PadtoX (Double_t x) const override
 Convert x from pad to X.
 
Double_t PadtoY (Double_t y) const override
 Convert y from pad to Y.
 
void Paint (Option_t *option="") override
 Paint all primitives in pad.
 
void PaintBox (Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="") override
 Paint box in CurrentPad World coordinates.
 
void PaintFillArea (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint fill area in CurrentPad World coordinates.
 
void PaintFillArea (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
 
void PaintFillAreaHatches (Int_t n, Double_t *x, Double_t *y, Int_t FillStyle)
 This function paints hatched fill area according to the FillStyle value The convention for the Hatch is the following:
 
void PaintFillAreaNDC (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint fill area in CurrentPad NDC coordinates.
 
void PaintHatches (Double_t dy, Double_t angle, Int_t nn, Double_t *xx, Double_t *yy)
 This routine draw hatches inclined with the angle "angle" and spaced of "dy" in normalized device coordinates in the surface defined by n,xx,yy.
 
void PaintLine (Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
 Paint line in CurrentPad World coordinates.
 
void PaintLine3D (Double_t *p1, Double_t *p2) override
 Paint 3-D line in the CurrentPad.
 
void PaintLine3D (Float_t *p1, Float_t *p2) override
 Paint 3-D line in the CurrentPad.
 
void PaintLineNDC (Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
 Paint line in normalized coordinates.
 
void PaintModified () override
 Traverse pad hierarchy and (re)paint only modified pads.
 
void PaintPadFrame (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
 Paint histogram/graph frame.
 
void PaintPolyLine (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polyline in CurrentPad World coordinates.
 
void PaintPolyLine (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
 Paint polyline in CurrentPad World coordinates.
 
void PaintPolyLine3D (Int_t n, Double_t *p) override
 Paint 3-D polyline in the CurrentPad.
 
void PaintPolyLineNDC (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polyline in CurrentPad NDC coordinates.
 
void PaintPolyMarker (Int_t n, Double_t *x, Double_t *y, Option_t *option="") override
 Paint polymarker in CurrentPad World coordinates.
 
void PaintPolyMarker (Int_t n, Float_t *x, Float_t *y, Option_t *option="") override
 Paint polymarker in CurrentPad World coordinates.
 
void PaintText (Double_t x, Double_t y, const char *text) override
 Paint text in CurrentPad World coordinates.
 
void PaintText (Double_t x, Double_t y, const wchar_t *text) override
 Paint text in CurrentPad World coordinates.
 
void PaintTextNDC (Double_t u, Double_t v, const char *text) override
 Paint text in CurrentPad NDC coordinates.
 
void PaintTextNDC (Double_t u, Double_t v, const wchar_t *text) override
 Paint text in CurrentPad NDC coordinates.
 
Double_t PixeltoX (Int_t px) override
 Convert pixel to X coordinate.
 
virtual void PixeltoXY (Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
 Convert pixel to X/Y coordinates.
 
Double_t PixeltoY (Int_t py) override
 Convert pixel to Y coordinate.
 
Bool_t PlaceBox (TObject *o, Double_t w, Double_t h, Double_t &xl, Double_t &yb, Option_t *option="lb") override
 Place a box in NDC space.
 
void Pop () override
 Pop pad to the top of the stack.
 
void Print (const char *filename, Option_t *option) override
 Save Canvas contents in a file in one of various formats.
 
void Print (const char *filename="") const override
 This method is equivalent to SaveAs("filename"). See TPad::SaveAs for details.
 
void Range (Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
 Set world coordinate system for the pad.
 
void RangeAxis (Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax) override
 Set axis coordinate system for the pad.
 
virtual void RangeChanged ()
 
virtual void RecordLatex (const TObject *obj)
 Emit RecordLatex() signal.
 
virtual void RecordPave (const TObject *obj)
 Emit RecordPave() signal.
 
void RecursiveRemove (TObject *obj) override
 Recursively remove object from a pad and its sub-pads.
 
void RedrawAxis (Option_t *option="") override
 Redraw the frame axis.
 
void ReleaseViewer3D (Option_t *type="") override
 Release current (external) viewer.
 
TObjectRemove (TObject *obj, Bool_t modified=kTRUE) override
 Remove object from list of primitives When.
 
void ResetToolTip (TObject *tip) override
 Reset tool tip, i.e.
 
void ResetView3D (TObject *view=nullptr) override
 
virtual void Resized ()
 
void ResizePad (Option_t *option="") override
 Compute pad conversion coefficients.
 
void SaveAs (const char *filename="", Option_t *option="") const override
 Save the pad content in a file.
 
void SetAttFillPS (Color_t color, Style_t style) override
 Set postscript fill area attributes.
 
void SetAttLinePS (Color_t color, Style_t style, Width_t lwidth) override
 Set postscript line attributes.
 
void SetAttMarkerPS (Color_t color, Style_t style, Size_t msize) override
 Set postscript marker attributes.
 
void SetAttTextPS (Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize) override
 Set postscript text attributes.
 
void SetBBoxCenter (const TPoint &p) override
 Set center of the Pad.
 
void SetBBoxCenterX (const Int_t x) override
 Set X coordinate of the center of the Pad.
 
void SetBBoxCenterY (const Int_t y) override
 Set Y coordinate of the center of the Pad.
 
void SetBBoxX1 (const Int_t x) override
 Set lefthandside of BoundingBox to a value (resize in x direction on left)
 
void SetBBoxX2 (const Int_t x) override
 Set right hand side of BoundingBox to a value (resize in x direction on right)
 
void SetBBoxY1 (const Int_t y) override
 Set top of BoundingBox to a value (resize in y direction on top)
 
void SetBBoxY2 (const Int_t y) override
 Set bottom of BoundingBox to a value (resize in y direction on bottom)
 
void SetBorderMode (Short_t bordermode) override
 
void SetBorderSize (Short_t bordersize) override
 
void SetCanvas (TCanvas *c) override
 
void SetCanvasSize (UInt_t ww, UInt_t wh) override
 Set canvas size.
 
void SetCopyGLDevice (Bool_t copy) override
 
void SetCrosshair (Int_t crhair=1) override
 Set crosshair active/inactive.
 
void SetCursor (ECursor cursor) override
 Set cursor type.
 
void SetDoubleBuffer (Int_t mode=1) override
 Set double buffer mode ON or OFF.
 
void SetDrawOption (Option_t *="") override
 Set drawing option for object.
 
void SetEditable (Bool_t mode=kTRUE) override
 Set pad editable yes/no If a pad is not editable:
 
void SetFillStyle (Style_t fstyle) override
 Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
 
void SetFixedAspectRatio (Bool_t fixed=kTRUE) override
 Fix pad aspect ratio to current value if fixed is true.
 
virtual void SetGLDevice (Int_t dev)
 
void SetGrid (Int_t valuex=1, Int_t valuey=1) override
 
void SetGridx (Int_t value=1) override
 
void SetGridy (Int_t value=1) override
 
void SetLogx (Int_t value=1) override
 Set Lin/Log scale for X.
 
void SetLogy (Int_t value=1) override
 Set Lin/Log scale for Y.
 
void SetLogz (Int_t value=1) override
 Set Lin/Log scale for Z.
 
void SetName (const char *name) override
 
virtual void SetNumber (Int_t number)
 
void SetPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=35, Short_t bordersize=5, Short_t bordermode=-1) override
 Set all pad parameters.
 
void SetPad (Double_t xlow, Double_t ylow, Double_t xup, Double_t yup) override
 Set canvas range for pad and resize the pad.
 
void SetPhi (Double_t phi=30) override
 
void SetSelected (TObject *obj) override
 Set selected.
 
void SetTheta (Double_t theta=30) override
 
void SetTicks (Int_t valuex=1, Int_t valuey=1) override
 
void SetTickx (Int_t value=1) override
 
void SetTicky (Int_t value=1) override
 
void SetTitle (const char *title="") override
 
void SetToolTipText (const char *text, Long_t delayms=1000) override
 Set tool tip text associated with this pad.
 
void SetVertical (Bool_t vert=kTRUE) override
 Set pad vertical (default) or horizontal.
 
void SetView (TView *view=nullptr) override
 Set the current TView. Delete previous view if view=0.
 
void SetViewer3D (TVirtualViewer3D *viewer3d) override
 
void ShowGuidelines (TObject *object, const Int_t event, const char mode='i', const bool cling=true) override
 Shows lines to indicate if a TAttBBox2D object is aligned to the center or to another object, shows distance arrows if two objects on screen have the same distance to another object Call from primitive in Execute Event, in ButtonMotion after the new coordinates have been set, to 'stick' once when button is up to delete lines.
 
virtual void StartEditing ()
 
void Streamer (TBuffer &) override
 Stream a class object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void Update () override
 Update pad.
 
void UpdateAsync () override
 Asynchronous pad update.
 
void UseCurrentStyle () override
 Force a copy of current style for all objects in pad.
 
Int_t UtoAbsPixel (Double_t u) const override
 Convert X NDC to absolute pixel.
 
Int_t UtoPixel (Double_t u) const override
 Convert X NDC to pixel.
 
Int_t VtoAbsPixel (Double_t v) const override
 Convert Y NDC to absolute pixel.
 
Int_t VtoPixel (Double_t v) const override
 Convert Y NDC to pixel.
 
TObjectWaitPrimitive (const char *pname="", const char *emode="") override
 Loop and sleep until a primitive with name=pname is found in the pad.
 
virtual void x3d (Option_t *type="")
 Deprecated: use TPad::GetViewer3D() instead.
 
Int_t XtoAbsPixel (Double_t x) const override
 Convert X coordinate to absolute pixel.
 
Double_t XtoPad (Double_t x) const override
 Convert x from X to pad.
 
Int_t XtoPixel (Double_t x) const override
 Convert X coordinate to pixel.
 
virtual void XYtoAbsPixel (Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
 Convert X/Y into absolute pixel coordinates.
 
virtual void XYtoPixel (Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
 Convert X/Y into pixel coordinates.
 
Int_t YtoAbsPixel (Double_t y) const override
 Convert Y coordinate to absolute pixel.
 
Double_t YtoPad (Double_t y) const override
 Convert y from Y to pad.
 
Int_t YtoPixel (Double_t y) const override
 Convert Y coordinate to pixel.
 
- Public Member Functions inherited from TVirtualPad
 TVirtualPad ()
 VirtualPad default constructor.
 
 TVirtualPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=19, Short_t bordersize=4, Short_t bordermode=1)
 VirtualPad constructor.
 
virtual ~TVirtualPad ()
 VirtualPad destructor.
 
TClassIsA () const override
 
Bool_t IsBeingResized () const
 
virtual Bool_t PadInHighlightMode () const
 Should always return false, unless you can highlight selected object in pad.
 
virtual Bool_t PadInSelectionMode () const
 Should always return false unless you have non-standard picking.
 
virtual void PopTopLevelSelectable ()
 Does nothing, unless you implement your own picking.
 
virtual void PushSelectableObject (TObject *obj)
 Does nothing, unless you implement your own picking.
 
virtual void PushTopLevelSelectable (TObject *top)
 Does nothing, unless you implement your own picking.
 
virtual void RangeAxisChanged ()
 
void Streamer (TBuffer &) override
 Stream an object of class TVirtualPad.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void UnZoomed ()
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () 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 class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
void ResetBit (UInt_t f)
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor.
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor.
 
virtual ~TAttLine ()
 AttLine destructor.
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine.
 
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
 Compute distance from point px,py to a line.
 
virtual Color_t GetLineColor () const
 Return the line color.
 
virtual Style_t GetLineStyle () const
 Return the line style.
 
virtual Width_t GetLineWidth () const
 Return the line width.
 
virtual void Modify ()
 Change current line attributes if necessary.
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values.
 
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
 Save line attributes as C++ statement(s) on output stream out.
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes.
 
virtual void SetLineColor (Color_t lcolor)
 Set the line color.
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color.
 
virtual void SetLineStyle (Style_t lstyle)
 Set the line style.
 
virtual void SetLineWidth (Width_t lwidth)
 Set the line width.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TAttFill
 TAttFill ()
 AttFill default constructor.
 
 TAttFill (Color_t fcolor, Style_t fstyle)
 AttFill normal constructor.
 
virtual ~TAttFill ()
 AttFill destructor.
 
void Copy (TAttFill &attfill) const
 Copy this fill attributes to a new TAttFill.
 
virtual Color_t GetFillColor () const
 Return the fill area color.
 
virtual Style_t GetFillStyle () const
 Return the fill area style.
 
virtual Bool_t IsTransparent () const
 
virtual void Modify ()
 Change current fill area attributes if necessary.
 
virtual void ResetAttFill (Option_t *option="")
 Reset this fill attributes to default values.
 
virtual void SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
 Save fill attributes as C++ statement(s) on output stream out.
 
virtual void SetFillAttributes ()
 Invoke the DialogCanvas Fill attributes.
 
virtual void SetFillColor (Color_t fcolor)
 Set the fill area color.
 
virtual void SetFillColorAlpha (Color_t fcolor, Float_t falpha)
 Set a transparent fill color.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TAttPad
 TAttPad ()
 Constructor.
 
virtual ~TAttPad ()
 Destructor.
 
virtual void Copy (TAttPad &attpad) const
 copy function
 
Float_t GetAfile () const
 
Float_t GetAstat () const
 
Float_t GetBottomMargin () const
 
Int_t GetFrameBorderMode () const
 
Width_t GetFrameBorderSize () const
 
Color_t GetFrameFillColor () const
 
Style_t GetFrameFillStyle () const
 
Color_t GetFrameLineColor () const
 
Style_t GetFrameLineStyle () const
 
Width_t GetFrameLineWidth () const
 
Float_t GetLeftMargin () const
 
Float_t GetRightMargin () const
 
Float_t GetTopMargin () const
 
Float_t GetXfile () const
 
Float_t GetXstat () const
 
Float_t GetYfile () const
 
Float_t GetYstat () const
 
virtual void ResetAttPad (Option_t *option="")
 Reset pad attributes.
 
virtual void SetAfile (Float_t afile)
 
virtual void SetAstat (Float_t astat)
 
virtual void SetBottomMargin (Float_t bottommargin)
 Set Pad bottom margin in fraction of the pad height.
 
void SetFrameBorderMode (Int_t mode=1)
 
void SetFrameBorderSize (Width_t size=1)
 
void SetFrameFillColor (Color_t color=1)
 
void SetFrameFillStyle (Style_t styl=0)
 
void SetFrameLineColor (Color_t color=1)
 
void SetFrameLineStyle (Style_t styl=0)
 
void SetFrameLineWidth (Width_t width=1)
 
virtual void SetLeftMargin (Float_t leftmargin)
 Set Pad left margin in fraction of the pad width.
 
virtual void SetMargin (Float_t left, Float_t right, Float_t bottom, Float_t top)
 Set all margins.
 
virtual void SetRightMargin (Float_t rightmargin)
 Set Pad right margin in fraction of the pad width.
 
virtual void SetTopMargin (Float_t topmargin)
 Set Pad top margin in fraction of the pad height.
 
virtual void SetXfile (Float_t xfile)
 
virtual void SetXstat (Float_t xstat)
 
virtual void SetYfile (Float_t yfile)
 
virtual void SetYstat (Float_t ystat)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TQObject
 TQObject ()
 TQObject Constructor.
 
virtual ~TQObject ()
 TQObject Destructor.
 
Bool_t AreSignalsBlocked () const
 
Bool_t BlockSignals (Bool_t b)
 
virtual void ChangedBy (const char *method)
 
void CollectClassSignalLists (TList &list, TClass *cls)
 Collect class signal lists from class cls and all its base-classes.
 
Bool_t Connect (const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Non-static method is used to connect from the signal of this object to the receiver slot.
 
virtual void Connected (const char *)
 
virtual void Destroyed ()
 
Bool_t Disconnect (const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects signal of this object from slot of receiver.
 
virtual void Disconnected (const char *)
 
void Emit (const char *signal)
 Activate signal without args.
 
template<typename T >
void Emit (const char *signal, const T &arg)
 Activate signal with single parameter.
 
template<typename... T>
void EmitVA (const char *signal_name, Int_t, const T &... params)
 Emit a signal with a varying number of arguments.
 
TListGetListOfClassSignals () const
 Returns pointer to list of signals of this class.
 
TListGetListOfConnections () const
 
TListGetListOfSignals () const
 
virtual Bool_t HasConnection (const char *signal_name) const
 Return true if there is any object connected to this signal.
 
virtual void HighPriority (const char *signal_name, const char *slot_name=nullptr)
 
virtual void LowPriority (const char *signal_name, const char *slot_name=nullptr)
 
virtual void Message (const char *msg)
 
virtual Int_t NumberOfConnections () const
 Return number of connections for this object.
 
virtual Int_t NumberOfSignals () const
 Return number of signals for this object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TAttBBox2D
virtual ~TAttBBox2D ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TCanvasMakeDefCanvas ()
 Static function to build a default canvas.
 
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 number - like "image%03d.png".
 
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.
 
static Bool_t SupportAlpha ()
 Static function returning "true" if transparency is supported.
 
- Static Public Member Functions inherited from TPad
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static void DrawColorTable ()
 Static function to Display Color Table in a pad.
 
static Int_t GetMaxPickDistance ()
 Static function (see also TPad::SetMaxPickDistance)
 
static void SetMaxPickDistance (Int_t maxPick=5)
 static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pick to select an object if its DistancetoPrimitive returns a value < fgMaxPickDistance The default value is 5 pixels.
 
- Static Public Member Functions inherited from TVirtualPad
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TVirtualPad *& Pad ()
 Return the current pad for the current thread.
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Static Public Member Functions inherited from TAttLine
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TAttFill
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TAttPad
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TQObject
static Bool_t AreAllSignalsBlocked ()
 Returns true if all signals are blocked.
 
static Bool_t BlockAllSignals (Bool_t b)
 Block or unblock all signals. Returns the previous block status.
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static Bool_t Connect (const char *sender_class, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 This method allows to make a connection from any object of the same class to a single slot.
 
static Bool_t Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver.
 
static const char * DeclFileName ()
 
static Bool_t Disconnect (const char *class_name, const char *signal, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects "class signal".
 
static Bool_t Disconnect (TQObject *sender, const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
 Disconnects signal in object sender from slot_method in object receiver.
 
- Static Public Member Functions inherited from TAttBBox2D
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

void ExecuteEvent (Int_t event, Int_t px, Int_t py) override
 Execute action corresponding to one event.
 
void Init ()
 Initialize the TCanvas members. Called by all constructors.
 
- Protected Member Functions inherited from TPad
void DestroyExternalViewer3D ()
 
Int_t DistancetoPrimitive (Int_t px, Int_t py) override
 Compute distance from point px,py to a box.
 
void ExecuteEvent (Int_t event, Int_t px, Int_t py) override
 Execute action corresponding to one event.
 
virtual void HideToolTip (Int_t event)
 Hide tool tip depending on the event type.
 
void PaintBorder (Color_t color, Bool_t tops)
 Paint the pad border.
 
void PaintBorderPS (Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t bmode, Int_t bsize, Int_t dark, Int_t light) override
 Paint a frame border with Postscript.
 
void PaintDate ()
 Paint the current date and time if the option Date is set on via gStyle->SetOptDate() Paint the current file name if the option File is set on via gStyle->SetOptFile()
 
void SavePrimitive (std::ostream &out, Option_t *option="") override
 Save primitives in this pad on the C++ source file out.
 
void SetBatch (Bool_t batch=kTRUE) override
 Set pad in batch mode.
 
- Protected Member Functions inherited from TVirtualPad
void * GetSender () override
 true when resizing the pad
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 
- Protected Member Functions inherited from TQObject
virtual const char * GetSenderClassName () const
 

Protected Attributes

Bool_t fBatch
 ! True when in batchmode
 
Int_t fCanvasID
 ! Canvas identifier
 
TCanvasImpfCanvasImp
 ! Window system specific canvas implementation
 
TAttCanvas fCatt
 Canvas attributes.
 
UInt_t fCh
 Height of the canvas along Y (pixels)
 
TObjectfClickSelected
 ! Currently click-selected object
 
TPadfClickSelectedPad
 ! Pad containing currently click-selected object
 
TContextMenufContextMenu
 ! Context menu pointer
 
UInt_t fCw
 Width of the canvas along X (pixels)
 
TString fDISPLAY
 Name of destination screen.
 
Int_t fDoubleBuffer
 Double buffer flag (0=off, 1=on)
 
Bool_t fDrawn
 ! Set to True when the Draw method is called
 
Int_t fEvent
 ! Type of current or last handled event
 
Int_t fEventX
 ! Last X mouse position in canvas
 
Int_t fEventY
 ! Last Y mouse position in canvas
 
Color_t fHighLightColor
 Highlight color of active pad.
 
TPadfPadSave
 ! Pointer to saved pad in HandleInput
 
TVirtualPadPainterfPainter
 ! Canvas (pad) painter.
 
Bool_t fRetained
 Retain structure flag.
 
TObjectfSelected
 ! Currently selected object
 
TString fSelectedOpt
 ! Drawing option of selected object
 
TPadfSelectedPad
 ! Pad containing currently selected object
 
Int_t fSelectedX
 ! X of selected object
 
Int_t fSelectedY
 ! Y of selected object
 
Bool_t fUpdated
 ! Set to True when Update method was called
 
Bool_t fUpdating
 ! True when Updating the canvas
 
Bool_t fUseGL
 ! True when rendering is with GL
 
UInt_t fWindowHeight
 Height of window (including menubar, borders, etc.)
 
Int_t fWindowTopX
 Top X position of window (in pixels)
 
Int_t fWindowTopY
 Top Y position of window (in pixels)
 
UInt_t fWindowWidth
 Width of window (including borders, etc.)
 
Size_t fXsizeReal
 Current size of canvas along X in CM.
 
Size_t fXsizeUser
 User specified size of canvas along X in CM.
 
Size_t fYsizeReal
 Current size of canvas along Y in CM.
 
Size_t fYsizeUser
 User specified size of canvas along Y in CM.
 
- Protected Attributes inherited from TPad
Bool_t fAbsCoord
 Use absolute coordinates.
 
Double_t fAbsHNDC
 Absolute Height of pad along Y in NDC.
 
Double_t fAbsPixeltoXk
 Conversion coefficient for absolute pixel to X World.
 
Double_t fAbsPixeltoYk
 Conversion coefficient for absolute pixel to Y World.
 
Double_t fAbsWNDC
 Absolute Width of pad along X in NDC.
 
Double_t fAbsXlowNDC
 Absolute X top left corner of pad in NDC [0,1].
 
Double_t fAbsYlowNDC
 Absolute Y top left corner of pad in NDC [0,1].
 
Double_t fAspectRatio
 ratio of w/h in case of fixed ratio
 
Short_t fBorderMode
 Bordermode (-1=down, 0 = no border, 1=up)
 
Short_t fBorderSize
 pad bordersize in pixels
 
TCanvasfCanvas {nullptr}
 ! Pointer to mother canvas
 
Int_t fCGnx
 ! Size of the collide grid along x
 
Int_t fCGny
 ! Size of the collide grid along y
 
std::vector< Bool_tfCollideGrid
 ! Grid used to find empty space when adding a box (Legend) in a pad
 
Bool_t fCopyGLDevice
 !
 
Int_t fCrosshair
 Crosshair type (0 if no crosshair requested)
 
Int_t fCrosshairPos
 Position of crosshair.
 
Bool_t fEditable
 True if canvas is editable.
 
Bool_t fEmbeddedGL
 !
 
TListfExecs {nullptr}
 List of commands to be executed when a pad event occurs.
 
Bool_t fFixedAspectRatio
 True if fixed aspect ratio.
 
TFramefFrame {nullptr}
 ! Pointer to 2-D frame (if one exists)
 
Int_t fGLDevice
 ! OpenGL off-screen pixmap identifier
 
Bool_t fGridx
 Set to true if grid along X.
 
Bool_t fGridy
 Set to true if grid along Y.
 
Double_t fHNDC
 Height of pad along Y in Normalized Coordinates (NDC)
 
Int_t fLogx
 (=0 if X linear scale, =1 if log scale)
 
Int_t fLogy
 (=0 if Y linear scale, =1 if log scale)
 
Int_t fLogz
 (=0 if Z linear scale, =1 if log scale)
 
Bool_t fModified
 Set to true when pad is modified.
 
TPadfMother {nullptr}
 ! pointer to mother of the list
 
TString fName
 Pad name.
 
Int_t fNextPaletteColor
 Next automatic color.
 
Int_t fNumber
 pad number identifier
 
Int_t fNumPaletteColor
 Number of objects with an automatic color.
 
Int_t fPadPaint
 Set to 1 while painting the pad.
 
TObjectfPadPointer {nullptr}
 ! free pointer
 
TObjectfPadView3D {nullptr}
 ! 3D View of this TPad
 
Double_t fPhi
 phi angle to view as lego/surface
 
Double_t fPixeltoX
 xworld = fPixeltoXk + fPixeltoX*xpixel
 
Double_t fPixeltoXk
 Conversion coefficient for pixel to X World.
 
Double_t fPixeltoY
 yworld = fPixeltoYk + fPixeltoY*ypixel
 
Double_t fPixeltoYk
 Conversion coefficient for pixel to Y World.
 
Int_t fPixmapID
 ! Off-screen pixmap identifier
 
TListfPrimitives {nullptr}
 ->List of primitives (subpads)
 
Double_t fTheta
 theta angle to view as lego/surface
 
Int_t fTickx
 Set to 1 if tick marks along X.
 
Int_t fTicky
 Set to 1 if tick marks along Y.
 
TString fTitle
 Pad title.
 
Double_t fUtoAbsPixelk
 Conversion coefficient for U NDC to absolute pixel.
 
Double_t fUtoPixel
 xpixel = fUtoPixelk + fUtoPixel*undc
 
Double_t fUtoPixelk
 Conversion coefficient for U NDC to pixel.
 
Double_t fUxmax
 Maximum value on the X axis.
 
Double_t fUxmin
 Minimum value on the X axis.
 
Double_t fUymax
 Maximum value on the Y axis.
 
Double_t fUymin
 Minimum value on the Y axis.
 
TViewfView {nullptr}
 ! Pointer to 3-D view (if one exists)
 
TVirtualViewer3DfViewer3D {nullptr}
 ! Current 3D viewer
 
Double_t fVtoAbsPixelk
 Conversion coefficient for V NDC to absolute pixel.
 
Double_t fVtoPixel
 ypixel = fVtoPixelk + fVtoPixel*vndc
 
Double_t fVtoPixelk
 Conversion coefficient for V NDC to pixel.
 
Double_t fWNDC
 Width of pad along X in Normalized Coordinates (NDC)
 
Double_t fX1
 X of lower X coordinate.
 
Double_t fX2
 X of upper X coordinate.
 
Double_t fXlowNDC
 X bottom left corner of pad in NDC [0,1].
 
Double_t fXtoAbsPixelk
 Conversion coefficient for X World to absolute pixel.
 
Double_t fXtoPixel
 xpixel = fXtoPixelk + fXtoPixel*xworld
 
Double_t fXtoPixelk
 Conversion coefficient for X World to pixel.
 
Double_t fXUpNDC
 
Double_t fY1
 Y of lower Y coordinate.
 
Double_t fY2
 Y of upper Y coordinate.
 
Double_t fYlowNDC
 Y bottom left corner of pad in NDC [0,1].
 
Double_t fYtoAbsPixelk
 Conversion coefficient for Y World to absolute pixel.
 
Double_t fYtoPixel
 ypixel = fYtoPixelk + fYtoPixel*yworld
 
Double_t fYtoPixelk
 Conversion coefficient for Y World to pixel.
 
Double_t fYUpNDC
 
- Protected Attributes inherited from TVirtualPad
Bool_t fResizing
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 Line color.
 
Style_t fLineStyle
 Line style.
 
Width_t fLineWidth
 Line width.
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 Fill area color.
 
Style_t fFillStyle
 Fill area style.
 
- Protected Attributes inherited from TAttPad
Float_t fAfile
 Alignment for the file name.
 
Float_t fAstat
 Alignment for the statistics.
 
Float_t fBottomMargin
 BottomMargin.
 
Int_t fFrameBorderMode
 Pad frame border mode.
 
Width_t fFrameBorderSize
 Pad frame border size.
 
Color_t fFrameFillColor
 Pad frame fill color.
 
Style_t fFrameFillStyle
 Pad frame fill style.
 
Color_t fFrameLineColor
 Pad frame line color.
 
Style_t fFrameLineStyle
 Pad frame line style.
 
Width_t fFrameLineWidth
 Pad frame line width.
 
Float_t fLeftMargin
 LeftMargin.
 
Float_t fRightMargin
 RightMargin.
 
Float_t fTopMargin
 TopMargin.
 
Float_t fXfile
 X position where to draw the file name.
 
Float_t fXstat
 X position where to draw the statistics.
 
Float_t fYfile
 Y position where to draw the file name.
 
Float_t fYstat
 Y position where to draw the statistics.
 
- Protected Attributes inherited from TQObject
TListfListOfConnections
 list of signals from this object
 
TListfListOfSignals
 
Bool_t fSignalsBlocked
 list of connections to this object
 

Static Protected Attributes

static Bool_t fgIsFolder = kFALSE
 Indicates if canvas can be browsed as a folder.
 
- Static Protected Attributes inherited from TPad
static Int_t fgMaxPickDistance = 5
 Maximum Pick Distance.
 
- Static Protected Attributes inherited from TQObject
static Bool_t fgAllSignalsBlocked = kFALSE
 flag used for suppression of signals
 

Private Member Functions

 TCanvas (const TCanvas &canvas)=delete
 
void Build ()
 Build a canvas. Called by all constructors.
 
void CopyPixmaps () override
 Copy the canvas pixmap of the pad to the canvas.
 
void CreatePainter ()
 Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpainter").
 
void DrawEventStatus (Int_t event, Int_t x, Int_t y, TObject *selected)
 Report name and title of primitive below the cursor.
 
TCanvasoperator= (const TCanvas &rhs)=delete
 
void RunAutoExec ()
 Execute the list of TExecs in the current pad.
 

Friends

class TCanvasImp
 
class TInterpreter
 
class TThread
 
class TWebCanvas
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- Static Protected Member Functions inherited from TQObject
static Int_t CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot)
 Checking of consistency of sender/receiver methods/arguments.
 
static TString CompressName (const char *method_name)
 Removes "const" words and blanks from full (with prototype) method name and resolve any typedefs in the method signature.
 
static Bool_t ConnectToClass (const char *sender_class, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 This method allows to make connection from any object of the same class to the receiver object.
 
static Bool_t ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver.
 

#include <TCanvas.h>

Inheritance diagram for TCanvas:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kShowEventStatus 
kAutoExec 
kMenuBar 
kShowToolBar 
kShowEditor 
kMoveOpaque 
kResizeOpaque 
kIsGrayscale 
kShowToolTips 

Definition at line 88 of file TCanvas.h.

Constructor & Destructor Documentation

◆ TCanvas() [1/6]

TCanvas::TCanvas ( const TCanvas canvas)
privatedelete

◆ TCanvas() [2/6]

TCanvas::TCanvas ( Bool_t  build = kTRUE)

Canvas default constructor.

Definition at line 147 of file TCanvas.cxx.

◆ TCanvas() [3/6]

TCanvas::TCanvas ( const char *  name,
const char *  title = "",
Int_t  form = 1 
)

Create a new canvas with a predefined size form.

If form < 0 the menubar is not shown.

  • form = 1 700x500 at 10,10 (set by TStyle::SetCanvasDefH,W,X,Y)
  • form = 2 500x500 at 20,20
  • form = 3 500x500 at 30,30
  • form = 4 500x500 at 40,40
  • form = 5 500x500 at 50,50

If "name" starts with "gl" the canvas is ready to receive GL output.

Definition at line 269 of file TCanvas.cxx.

◆ TCanvas() [4/6]

TCanvas::TCanvas ( const char *  name,
const char *  title,
Int_t  ww,
Int_t  wh 
)

Create a new canvas at a random position.

Parameters
[in]namecanvas name
[in]titlecanvas title
[in]wwis the window size in pixels along X (if ww < 0 the menubar is not shown)
[in]whis the window size in pixels along Y

If "name" starts with "gl" the canvas is ready to receive GL output.

Definition at line 372 of file TCanvas.cxx.

◆ TCanvas() [5/6]

TCanvas::TCanvas ( const char *  name,
const char *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh 
)

Create a new canvas.

Parameters
[in]namecanvas name
[in]titlecanvas title
[in]wtopx,wtopyare the pixel coordinates of the top left corner of the canvas (if wtopx < 0) the menubar is not shown)
[in]wwis the window size in pixels along X
[in]whis the window size in pixels along Y

If "name" starts with "gl" the canvas is ready to receive GL output.

Definition at line 459 of file TCanvas.cxx.

◆ TCanvas() [6/6]

TCanvas::TCanvas ( const char *  name,
Int_t  ww,
Int_t  wh,
Int_t  winid 
)

Create an embedded canvas, i.e.

a canvas that is in a TGCanvas widget which is placed in a TGFrame. This ctor is only called via the TRootEmbeddedCanvas class.

If "name" starts with "gl" the canvas is ready to receive GL output.

Definition at line 223 of file TCanvas.cxx.

◆ ~TCanvas()

TCanvas::~TCanvas ( )
override

Canvas destructor.

Definition at line 677 of file TCanvas.cxx.

Member Function Documentation

◆ Browse()

void TCanvas::Browse ( TBrowser b)
overridevirtual

Browse.

Reimplemented from TObject.

Definition at line 685 of file TCanvas.cxx.

◆ Build()

void TCanvas::Build ( )
private

Build a canvas. Called by all constructors.

Definition at line 587 of file TCanvas.cxx.

◆ cd()

TVirtualPad * TCanvas::cd ( Int_t  subpadnumber = 0)
overridevirtual

Set current canvas & pad.

Returns the new current pad, or 0 in case of failure. See TPad::cd() for an explanation of the parameter.

Implements TVirtualPad.

Definition at line 719 of file TCanvas.cxx.

◆ Class()

static TClass * TCanvas::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TCanvas::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TCanvas::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 238 of file TCanvas.h.

◆ Clear()

void TCanvas::Clear ( Option_t option = "")
overridevirtual

Remove all primitives from the canvas.

If option "D" is specified, direct sub-pads are cleared but not deleted. This option is not recursive, i.e. pads in direct sub-pads are deleted.

Implements TVirtualPad.

Definition at line 737 of file TCanvas.cxx.

◆ Cleared()

void TCanvas::Cleared ( TVirtualPad pad)
virtual

Emit pad Cleared signal.

Definition at line 770 of file TCanvas.cxx.

◆ ClearPadSave()

void TCanvas::ClearPadSave ( )
inline

Definition at line 140 of file TCanvas.h.

◆ Close()

void TCanvas::Close ( Option_t option = "")
overridevirtual

Close canvas.

Delete window/pads data structure

Implements TVirtualPad.

Definition at line 788 of file TCanvas.cxx.

◆ Closed()

void TCanvas::Closed ( )
overridevirtual

Emit Closed signal.

Reimplemented from TPad.

Definition at line 778 of file TCanvas.cxx.

◆ Constructor() [1/4]

void TCanvas::Constructor ( )

Canvas default constructor.

Definition at line 191 of file TCanvas.cxx.

◆ Constructor() [2/4]

void TCanvas::Constructor ( const char *  name,
const char *  title,
Int_t  form 
)

Create a new canvas with a predefined size form.

If form < 0 the menubar is not shown.

  • form = 1 700x500 at 10,10 (set by TStyle::SetCanvasDefH,W,X,Y)
  • form = 2 500x500 at 20,20
  • form = 3 500x500 at 30,30
  • form = 4 500x500 at 40,40
  • form = 5 500x500 at 50,50

Definition at line 287 of file TCanvas.cxx.

◆ Constructor() [3/4]

void TCanvas::Constructor ( const char *  name,
const char *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh 
)

Create a new canvas.

Parameters
[in]namecanvas name
[in]titlecanvas title
[in]wtopx,wtopyare the pixel coordinates of the top left corner of the canvas (if wtopx < 0) the menubar is not shown)
[in]wwis the window size in pixels along X
[in]whis the window size in pixels along Y

Definition at line 478 of file TCanvas.cxx.

◆ Constructor() [4/4]

void TCanvas::Constructor ( const char *  name,
const char *  title,
Int_t  ww,
Int_t  wh 
)

Create a new canvas at a random position.

Parameters
[in]namecanvas name
[in]titlecanvas title
[in]wwis the window size in pixels along X (if ww < 0 the menubar is not shown)
[in]whis the window size in pixels along Y

Definition at line 389 of file TCanvas.cxx.

◆ CopyPixmaps()

void TCanvas::CopyPixmaps ( )
overrideprivatevirtual

Copy the canvas pixmap of the pad to the canvas.

Implements TVirtualPad.

Definition at line 836 of file TCanvas.cxx.

◆ CreatePainter()

void TCanvas::CreatePainter ( )
private

Probably, TPadPainter must be placed in a separate ROOT module - "padpainter" (the same as "histpainter").

But now, it's directly in a gpad dir, so, in case of default painter, no *.so should be loaded, no need in plugin managers. May change in future.

Definition at line 2595 of file TCanvas.cxx.

◆ DeclFileName()

static const char * TCanvas::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 238 of file TCanvas.h.

◆ Delete()

void TCanvas::Delete ( Option_t option = "")
inlineoverridevirtual

Delete this object.

Typically called as a command via the interpreter. Normally use "delete" operator when object has been allocated on the heap.

Reimplemented from TObject.

Definition at line 120 of file TCanvas.h.

◆ DeleteCanvasPainter()

void TCanvas::DeleteCanvasPainter ( )

assert on IsBatch() == false?

Definition at line 2626 of file TCanvas.cxx.

◆ Destructor()

void TCanvas::Destructor ( )

Actual canvas destructor.

Definition at line 695 of file TCanvas.cxx.

◆ DisconnectWidget()

void TCanvas::DisconnectWidget ( )

Used by friend class TCanvasImp.

Definition at line 2558 of file TCanvas.cxx.

◆ Draw()

void TCanvas::Draw ( Option_t option = "")
overridevirtual

Draw a canvas.

If a canvas with the name is already on the screen, the canvas is repainted. This function is useful when a canvas object has been saved in a Root file. One can then do:

Root > TFile::Open("file.root");
Root > canvas->Draw();
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4086

Implements TVirtualPad.

Definition at line 854 of file TCanvas.cxx.

◆ DrawClone()

TObject * TCanvas::DrawClone ( Option_t option = "") const
overridevirtual

Draw a clone of this canvas A new canvas is created that is a clone of this canvas.

Reimplemented from TObject.

Definition at line 907 of file TCanvas.cxx.

◆ DrawClonePad()

TObject * TCanvas::DrawClonePad ( )
virtual

Draw a clone of this canvas into the current pad In an interactive session, select the destination/current pad with the middle mouse button, then point to the canvas area to select the canvas context menu item DrawClonePad.

Note that the original canvas may have subpads.

Definition at line 924 of file TCanvas.cxx.

◆ DrawEventStatus()

void TCanvas::DrawEventStatus ( Int_t  event,
Int_t  px,
Int_t  py,
TObject selected 
)
private

Report name and title of primitive below the cursor.

This function is called when the option "Event Status" in the canvas menu "Options" is selected.

Definition at line 978 of file TCanvas.cxx.

◆ EditorBar()

void TCanvas::EditorBar ( )
virtual

Get editor bar.

Definition at line 1039 of file TCanvas.cxx.

◆ EmbedInto()

void TCanvas::EmbedInto ( Int_t  winid,
Int_t  ww,
Int_t  wh 
)

Embedded a canvas into a TRootEmbeddedCanvas.

This method is only called via TRootEmbeddedCanvas::AdoptCanvas.

Definition at line 1048 of file TCanvas.cxx.

◆ EnterLeave()

void TCanvas::EnterLeave ( TPad prevSelPad,
TObject prevSelObj 
)

Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the currently selected object.

Does nothing if the selected object does not change.

Definition at line 1074 of file TCanvas.cxx.

◆ ExecuteEvent()

void TCanvas::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
)
overrideprotectedvirtual

Execute action corresponding to one event.

This member function must be implemented to realize the action corresponding to the mouse click on the object in the canvas

Only handle mouse motion events in TCanvas, all other events are ignored for the time being

Reimplemented from TObject.

Definition at line 1110 of file TCanvas.cxx.

◆ FeedbackMode()

void TCanvas::FeedbackMode ( Bool_t  set)

Turn rubberband feedback mode on or off.

Definition at line 1128 of file TCanvas.cxx.

◆ Flush()

void TCanvas::Flush ( )

Flush canvas buffers.

Definition at line 1145 of file TCanvas.cxx.

◆ ForceUpdate()

void TCanvas::ForceUpdate ( )

Force canvas update.

Definition at line 1177 of file TCanvas.cxx.

◆ GetAutoExec()

Bool_t TCanvas::GetAutoExec ( ) const
inline

Definition at line 152 of file TCanvas.h.

◆ GetCanvasID()

Int_t TCanvas::GetCanvasID ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 157 of file TCanvas.h.

◆ GetCanvasImp()

TCanvasImp * TCanvas::GetCanvasImp ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 158 of file TCanvas.h.

◆ GetCanvasPainter()

TVirtualPadPainter * TCanvas::GetCanvasPainter ( )

Access and (probably) creation of pad painter.

Definition at line 2616 of file TCanvas.cxx.

◆ GetCanvasPar()

virtual void TCanvas::GetCanvasPar ( Int_t wtopx,
Int_t wtopy,
UInt_t ww,
UInt_t wh 
)
inlinevirtual

Definition at line 165 of file TCanvas.h.

◆ GetClickSelected()

TObject * TCanvas::GetClickSelected ( ) const
inline

Definition at line 142 of file TCanvas.h.

◆ GetClickSelectedPad()

TVirtualPad * TCanvas::GetClickSelectedPad ( ) const
inline

Definition at line 147 of file TCanvas.h.

◆ GetContextMenu()

TContextMenu * TCanvas::GetContextMenu ( ) const
inline

Definition at line 133 of file TCanvas.h.

◆ GetDISPLAY()

const char * TCanvas::GetDISPLAY ( ) const
inline

Definition at line 132 of file TCanvas.h.

◆ GetDoubleBuffer()

Int_t TCanvas::GetDoubleBuffer ( ) const
inline

Definition at line 134 of file TCanvas.h.

◆ GetEvent()

Int_t TCanvas::GetEvent ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 135 of file TCanvas.h.

◆ GetEventX()

Int_t TCanvas::GetEventX ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 136 of file TCanvas.h.

◆ GetEventY()

Int_t TCanvas::GetEventY ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 137 of file TCanvas.h.

◆ GetHighLightColor()

Color_t TCanvas::GetHighLightColor ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 138 of file TCanvas.h.

◆ GetPadSave()

TVirtualPad * TCanvas::GetPadSave ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 139 of file TCanvas.h.

◆ GetSelected()

TObject * TCanvas::GetSelected ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 141 of file TCanvas.h.

◆ GetSelectedOpt()

Option_t * TCanvas::GetSelectedOpt ( ) const
inline

Definition at line 145 of file TCanvas.h.

◆ GetSelectedPad()

TVirtualPad * TCanvas::GetSelectedPad ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 146 of file TCanvas.h.

◆ GetSelectedX()

Int_t TCanvas::GetSelectedX ( ) const
inline

Definition at line 143 of file TCanvas.h.

◆ GetSelectedY()

Int_t TCanvas::GetSelectedY ( ) const
inline

Definition at line 144 of file TCanvas.h.

◆ GetShowEditor()

Bool_t TCanvas::GetShowEditor ( ) const
inline

Definition at line 150 of file TCanvas.h.

◆ GetShowEventStatus()

Bool_t TCanvas::GetShowEventStatus ( ) const
inline

Definition at line 148 of file TCanvas.h.

◆ GetShowToolBar()

Bool_t TCanvas::GetShowToolBar ( ) const
inline

Definition at line 149 of file TCanvas.h.

◆ GetShowToolTips()

Bool_t TCanvas::GetShowToolTips ( ) const
inline

Definition at line 151 of file TCanvas.h.

◆ GetWh()

UInt_t TCanvas::GetWh ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 164 of file TCanvas.h.

◆ GetWindowHeight()

UInt_t TCanvas::GetWindowHeight ( ) const
inline

Definition at line 162 of file TCanvas.h.

◆ GetWindowTopX()

Int_t TCanvas::GetWindowTopX ( )

Returns current top x position of window on screen.

Definition at line 1210 of file TCanvas.cxx.

◆ GetWindowTopY()

Int_t TCanvas::GetWindowTopY ( )

Returns current top y position of window on screen.

Definition at line 1221 of file TCanvas.cxx.

◆ GetWindowWidth()

UInt_t TCanvas::GetWindowWidth ( ) const
inline

Definition at line 161 of file TCanvas.h.

◆ GetWw()

UInt_t TCanvas::GetWw ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 163 of file TCanvas.h.

◆ GetXsizeReal()

Size_t TCanvas::GetXsizeReal ( ) const
inline

Definition at line 155 of file TCanvas.h.

◆ GetXsizeUser()

Size_t TCanvas::GetXsizeUser ( ) const
inline

Definition at line 153 of file TCanvas.h.

◆ GetYsizeReal()

Size_t TCanvas::GetYsizeReal ( ) const
inline

Definition at line 156 of file TCanvas.h.

◆ GetYsizeUser()

Size_t TCanvas::GetYsizeUser ( ) const
inline

Definition at line 154 of file TCanvas.h.

◆ HandleInput()

void TCanvas::HandleInput ( EEventType  event,
Int_t  px,
Int_t  py 
)
virtual

Handle Input Events.

Handle input events, like button up/down in current canvas.

Definition at line 1234 of file TCanvas.cxx.

◆ HasMenuBar()

Bool_t TCanvas::HasMenuBar ( ) const
inline

Definition at line 168 of file TCanvas.h.

◆ HighlightConnect()

void TCanvas::HighlightConnect ( const char *  slot)
virtual

This is "simplification" for function TCanvas::Connect with Highlighted signal for specific slot.

Slot has to be defined "UserFunction(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y)" all parameters of UserFunction are taken from TCanvas::Highlighted

Definition at line 1631 of file TCanvas.cxx.

◆ Highlighted()

void TCanvas::Highlighted ( TVirtualPad pad,
TObject obj,
Int_t  x,
Int_t  y 
)
virtual

Emit Highlighted() signal.

  • pad is pointer to pad with highlighted histogram or graph
  • obj is pointer to highlighted histogram or graph
  • x is highlighted x bin for 1D histogram or highlighted x-th point for graph
  • y is highlighted y bin for 2D histogram (for 1D histogram or graph not in use)

Definition at line 1612 of file TCanvas.cxx.

◆ Iconify()

void TCanvas::Iconify ( )

Iconify canvas.

Definition at line 1479 of file TCanvas.cxx.

◆ Init()

void TCanvas::Init ( )
protected

Initialize the TCanvas members. Called by all constructors.

Definition at line 537 of file TCanvas.cxx.

◆ IsA()

TClass * TCanvas::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Reimplemented in TDialogCanvas, and TInspectCanvas.

Definition at line 238 of file TCanvas.h.

◆ IsBatch()

Bool_t TCanvas::IsBatch ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 171 of file TCanvas.h.

◆ IsDrawn()

Bool_t TCanvas::IsDrawn ( ) const
inline

Definition at line 172 of file TCanvas.h.

◆ IsFolder()

Bool_t TCanvas::IsFolder ( ) const
overridevirtual

Is folder ?

Reimplemented from TObject.

Definition at line 1488 of file TCanvas.cxx.

◆ IsGrayscale()

Bool_t TCanvas::IsGrayscale ( )

Check whether this canvas is to be drawn in grayscale mode.

Definition at line 2567 of file TCanvas.cxx.

◆ IsRetained()

Bool_t TCanvas::IsRetained ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 176 of file TCanvas.h.

◆ IsUpdated()

Bool_t TCanvas::IsUpdated ( ) const
inline

Definition at line 173 of file TCanvas.h.

◆ IsWeb()

Bool_t TCanvas::IsWeb ( ) const
overridevirtual

Is web canvas.

Reimplemented from TVirtualPad.

Definition at line 1496 of file TCanvas.cxx.

◆ ls()

void TCanvas::ls ( Option_t option = "") const
overridevirtual

List all pads.

Implements TVirtualPad.

Definition at line 1504 of file TCanvas.cxx.

◆ MakeDefCanvas()

TCanvas * TCanvas::MakeDefCanvas ( )
static

Static function to build a default canvas.

Definition at line 1516 of file TCanvas.cxx.

◆ MoveOpaque()

void TCanvas::MoveOpaque ( Int_t  set = 1)

Set option to move objects/pads in a canvas.

  • set = 1 (default) graphics objects are moved in opaque mode
  • set = 0 only the outline of objects is drawn when moving them

The option opaque produces the best effect. It requires however a a reasonably fast workstation or response time.

Definition at line 1535 of file TCanvas.cxx.

◆ OpaqueMoving()

Bool_t TCanvas::OpaqueMoving ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 180 of file TCanvas.h.

◆ OpaqueResizing()

Bool_t TCanvas::OpaqueResizing ( ) const
inlineoverridevirtual

Implements TVirtualPad.

Definition at line 181 of file TCanvas.h.

◆ operator=()

TCanvas & TCanvas::operator= ( const TCanvas rhs)
privatedelete

◆ Paint()

void TCanvas::Paint ( Option_t option = "")
overridevirtual

Paint canvas.

Implements TVirtualPad.

Definition at line 1543 of file TCanvas.cxx.

◆ Pick() [1/2]

TPad * TCanvas::Pick ( Int_t  px,
Int_t  py,
TObject prevSelObj 
)
virtual

Prepare for pick, call TPad::Pick() and when selected object is different from previous then emit Picked() signal.

Definition at line 1553 of file TCanvas.cxx.

◆ Pick() [2/2]

TPad * TCanvas::Pick ( Int_t  px,
Int_t  py,
TObjLink *&  pickobj 
)
inlineoverridevirtual

Search for an object at pixel position px,py.

Check if point is in this pad.

If yes, check if it is in one of the sub-pads

If found in the pad, compute closest distance of approach to each primitive.

If one distance of approach is found to be within the limit Distancemaximum the corresponding primitive is selected and the routine returns.

Reimplemented from TPad.

Definition at line 183 of file TCanvas.h.

◆ Picked()

void TCanvas::Picked ( TPad selpad,
TObject selected,
Int_t  event 
)
virtual

Emit Picked() signal.

Definition at line 1593 of file TCanvas.cxx.

◆ ProcessedEvent()

void TCanvas::ProcessedEvent ( Int_t  event,
Int_t  x,
Int_t  y,
TObject selected 
)
virtual

Emit ProcessedEvent() signal.

Definition at line 1653 of file TCanvas.cxx.

◆ RaiseWindow()

void TCanvas::RaiseWindow ( )

Raise canvas window.

Definition at line 1744 of file TCanvas.cxx.

◆ ResetDrawn()

void TCanvas::ResetDrawn ( )
inline

Definition at line 192 of file TCanvas.h.

◆ ResetUpdated()

void TCanvas::ResetUpdated ( )
inline

Definition at line 193 of file TCanvas.h.

◆ Resize()

void TCanvas::Resize ( Option_t option = "")
virtual

Recompute canvas parameters following a X11 Resize.

Definition at line 1668 of file TCanvas.cxx.

◆ ResizeOpaque()

void TCanvas::ResizeOpaque ( Int_t  set = 1)

Set option to resize objects/pads in a canvas.

  • set = 1 (default) graphics objects are resized in opaque mode
  • set = 0 only the outline of objects is drawn when resizing them

The option opaque produces the best effect. It requires however a a reasonably fast workstation or response time.

Definition at line 1759 of file TCanvas.cxx.

◆ RunAutoExec()

void TCanvas::RunAutoExec ( )
private

Execute the list of TExecs in the current pad.

Definition at line 1767 of file TCanvas.cxx.

◆ SaveAll()

Bool_t TCanvas::SaveAll ( const std::vector< TPad * > &  pads = {},
const char *  filename = "",
Option_t option = "" 
)
static

Save provided pads/canvases into the image file(s) Filename can include printf argument for image number - like "image%03d.png".

In this case images: "image000.png", "image001.png", "image002.png" will be created. If pattern is not provided - it will be automatically inserted before extension except PDF and ROOT files. In last case PDF or ROOT file will contain all pads. Parameter option only used when output into PDF/PS files If TCanvas::SaveAll() called without arguments - all existing canvases will be stored in allcanvases.pdf file.

Definition at line 2654 of file TCanvas.cxx.

◆ SavePrimitive()

void TCanvas::SavePrimitive ( std::ostream &  out,
Option_t option = "" 
)
overridevirtual

Save primitives in this canvas in C++ macro file with GUI.

Reimplemented from TObject.

Definition at line 1778 of file TCanvas.cxx.

◆ SaveSource()

void TCanvas::SaveSource ( const char *  filename = "",
Option_t option = "" 
)

Save primitives in this canvas as a C++ macro file.

This function loops on all the canvas primitives and for each primitive calls the object SavePrimitive function. When outputting floating point numbers, the default precision is 7 digits. The precision can be changed (via system.rootrc) by changing the value of the environment variable "Canvas.SavePrecision"

Definition at line 1822 of file TCanvas.cxx.

◆ Selected()

void TCanvas::Selected ( TVirtualPad pad,
TObject obj,
Int_t  event 
)
virtual

Emit Selected() signal.

Definition at line 1639 of file TCanvas.cxx.

◆ SetBatch()

void TCanvas::SetBatch ( Bool_t  batch = kTRUE)
overridevirtual

Toggle batch mode.

However, if the canvas is created without a window then batch mode always stays set.

Implements TVirtualPad.

Definition at line 1957 of file TCanvas.cxx.

◆ SetCanvasImp()

void TCanvas::SetCanvasImp ( TCanvasImp i)
inline

Definition at line 205 of file TCanvas.h.

◆ SetCanvasSize()

void TCanvas::SetCanvasSize ( UInt_t  ww,
UInt_t  wh 
)
overridevirtual

Set Width and Height of canvas to ww and wh respectively.

If ww and/or wh are greater than the current canvas window a scroll bar is automatically generated. Use this function to zoom in a canvas and navigate via the scroll bars. The Width and Height in this method are different from those given in the TCanvas constructors where these two dimension include the size of the window decoration whereas they do not in this method. When both ww==0 and wh==0, auto resize mode will be enabled again and canvas drawing area will automatically fit available window size

Implements TVirtualPad.

Definition at line 1975 of file TCanvas.cxx.

◆ SetClickSelected()

void TCanvas::SetClickSelected ( TObject obj)
inline

Definition at line 209 of file TCanvas.h.

◆ SetClickSelectedPad()

void TCanvas::SetClickSelectedPad ( TPad pad)
inline

Definition at line 211 of file TCanvas.h.

◆ SetCursor()

void TCanvas::SetCursor ( ECursor  cursor)
overridevirtual

Set cursor.

Implements TVirtualPad.

Definition at line 1989 of file TCanvas.cxx.

◆ SetDoubleBuffer()

void TCanvas::SetDoubleBuffer ( Int_t  mode = 1)
overridevirtual

Set Double Buffer On/Off.

Implements TVirtualPad.

Definition at line 1998 of file TCanvas.cxx.

◆ SetFixedAspectRatio()

void TCanvas::SetFixedAspectRatio ( Bool_t  fixed = kTRUE)
overridevirtual

Fix canvas aspect ratio to current value if fixed is true.

Implements TVirtualPad.

Definition at line 2016 of file TCanvas.cxx.

◆ SetFolder()

void TCanvas::SetFolder ( Bool_t  isfolder = kTRUE)
static

If isfolder=kTRUE, the canvas can be browsed like a folder by default a canvas is not browsable.

Definition at line 2038 of file TCanvas.cxx.

◆ SetGrayscale()

void TCanvas::SetGrayscale ( Bool_t  set = kTRUE)

Set whether this canvas should be painted in grayscale, and re-paint it if necessary.

Definition at line 2576 of file TCanvas.cxx.

◆ SetHighLightColor()

void TCanvas::SetHighLightColor ( Color_t  col)
inline

Definition at line 207 of file TCanvas.h.

◆ SetName()

void TCanvas::SetName ( const char *  name = "")
overridevirtual

Set canvas name.

In case name is an empty string, a default name is set. Canvas automatically marked as modified when SetName method called

Implements TVirtualPad.

Reimplemented in TDialogCanvas.

Definition at line 2047 of file TCanvas.cxx.

◆ SetPadSave()

void TCanvas::SetPadSave ( TPad pad)
inline

Definition at line 216 of file TCanvas.h.

◆ SetRealAspectRatio()

bool TCanvas::SetRealAspectRatio ( const Int_t  axis = 1)

Function to resize a canvas so that the plot inside is shown in real aspect ratio.

Parameters
[in]axis1 for resizing horizontally (x-axis) in order to get real aspect ratio, 2 for the resizing vertically (y-axis)
Returns
false if error is encountered, true otherwise
hpxpy->Draw();
c1->SetRealAspectRatio();
return c1
Definition legend1.C:41
  • For defining the concept of real aspect ratio, it is assumed that x and y axes are in same units, e.g. both in MeV or both in ns.
  • You can resize either the width of the canvas or the height, but not both at the same time
  • Call this function AFTER drawing AND zooming (SetUserRange) your TGraph or Histogram, otherwise it cannot infer your actual axes lengths
  • This function ensures that the TFrame has a real aspect ratio, this does not mean that the full pad (i.e. the canvas or png output) including margins has exactly the same ratio
  • This function does not work if the canvas is divided in several subpads

Definition at line 2079 of file TCanvas.cxx.

◆ SetRetained()

void TCanvas::SetRetained ( Bool_t  retained = kTRUE)
inline

Definition at line 218 of file TCanvas.h.

◆ SetSelected()

void TCanvas::SetSelected ( TObject obj)
overridevirtual

Set selected canvas.

Implements TVirtualPad.

Definition at line 2146 of file TCanvas.cxx.

◆ SetSelectedPad()

void TCanvas::SetSelectedPad ( TPad pad)
inline

Definition at line 210 of file TCanvas.h.

◆ SetSupportGL()

void TCanvas::SetSupportGL ( Bool_t  support)
inline

Definition at line 229 of file TCanvas.h.

◆ SetTitle()

void TCanvas::SetTitle ( const char *  title = "")
overridevirtual

Set canvas title.

Implements TVirtualPad.

Definition at line 2155 of file TCanvas.cxx.

◆ SetWindowPosition()

void TCanvas::SetWindowPosition ( Int_t  x,
Int_t  y 
)

Set canvas window position.

Definition at line 2164 of file TCanvas.cxx.

◆ SetWindowSize()

void TCanvas::SetWindowSize ( UInt_t  ww,
UInt_t  wh 
)

Set canvas window size.

Definition at line 2173 of file TCanvas.cxx.

◆ Show()

void TCanvas::Show ( )

Show canvas.

Definition at line 2212 of file TCanvas.cxx.

◆ Size()

void TCanvas::Size ( Float_t  xsize = 0,
Float_t  ysize = 0 
)
virtual

Set the canvas scale in centimeters.

This information is used by PostScript to set the page size.

Parameters
[in]xsizesize of the canvas in centimeters along X
[in]ysizesize of the canvas in centimeters along Y

if xsize and ysize are not equal to 0, then the scale factors will be computed to keep the ratio ysize/xsize independently of the canvas size (parts of the physical canvas will be unused).

if xsize = 0 and ysize is not zero, then xsize will be computed to fit to the current canvas scale. If the canvas is resized, a new value for xsize will be recomputed. In this case the aspect ratio is not preserved.

if both xsize = 0 and ysize = 0, then the scaling is automatic. the largest dimension will be allocated a size of 20 centimeters.

Definition at line 2201 of file TCanvas.cxx.

◆ Streamer()

void TCanvas::Streamer ( TBuffer b)
overridevirtual

Stream a class object.

Reimplemented from TObject.

Reimplemented in TDialogCanvas, and TInspectCanvas.

Definition at line 2221 of file TCanvas.cxx.

◆ StreamerNVirtual()

void TCanvas::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 238 of file TCanvas.h.

◆ SupportAlpha()

Bool_t TCanvas::SupportAlpha ( )
static

Static function returning "true" if transparency is supported.

Definition at line 2476 of file TCanvas.cxx.

◆ ToggleAutoExec()

void TCanvas::ToggleAutoExec ( )
virtual

Toggle pad auto execution of list of TExecs.

Definition at line 2422 of file TCanvas.cxx.

◆ ToggleEditor()

void TCanvas::ToggleEditor ( )
virtual

Toggle editor.

Definition at line 2453 of file TCanvas.cxx.

◆ ToggleEventStatus()

void TCanvas::ToggleEventStatus ( )
virtual

Toggle event statusbar.

Definition at line 2431 of file TCanvas.cxx.

◆ ToggleToolBar()

void TCanvas::ToggleToolBar ( )
virtual

Toggle toolbar.

Definition at line 2442 of file TCanvas.cxx.

◆ ToggleToolTips()

void TCanvas::ToggleToolTips ( )
virtual

Toggle tooltip display.

Definition at line 2464 of file TCanvas.cxx.

◆ Update()

void TCanvas::Update ( )
overridevirtual

Update canvas pad buffers.

Implements TVirtualPad.

Definition at line 2489 of file TCanvas.cxx.

◆ UpdateAsync()

void TCanvas::UpdateAsync ( )
overridevirtual

Asynchronous pad update.

In case of web-based canvas triggers update of the canvas on the client side, but does not wait that real update is completed. Avoids blocking of caller thread. Have to be used if called from other web-based widget to avoid logical dead-locks. In case of normal canvas just canvas->Update() is performed.

Implements TVirtualPad.

Definition at line 2545 of file TCanvas.cxx.

◆ UseCurrentStyle()

void TCanvas::UseCurrentStyle ( )
overridevirtual

Force a copy of current style for all objects in canvas.

Reimplemented from TObject.

Definition at line 1185 of file TCanvas.cxx.

◆ UseGL()

Bool_t TCanvas::UseGL ( ) const
inline

Definition at line 228 of file TCanvas.h.

Friends And Related Symbol Documentation

◆ TCanvasImp

friend class TCanvasImp
friend

Definition at line 25 of file TCanvas.h.

◆ TInterpreter

friend class TInterpreter
friend

Definition at line 28 of file TCanvas.h.

◆ TThread

friend class TThread
friend

Definition at line 27 of file TCanvas.h.

◆ TWebCanvas

friend class TWebCanvas
friend

Definition at line 26 of file TCanvas.h.

Member Data Documentation

◆ fBatch

Bool_t TCanvas::fBatch
protected

! True when in batchmode

Definition at line 59 of file TCanvas.h.

◆ fCanvasID

Int_t TCanvas::fCanvasID
protected

! Canvas identifier

Definition at line 48 of file TCanvas.h.

◆ fCanvasImp

TCanvasImp* TCanvas::fCanvasImp
protected

! Window system specific canvas implementation

Definition at line 57 of file TCanvas.h.

◆ fCatt

TAttCanvas TCanvas::fCatt
protected

Canvas attributes.

Definition at line 31 of file TCanvas.h.

◆ fCh

UInt_t TCanvas::fCh
protected

Height of the canvas along Y (pixels)

Definition at line 44 of file TCanvas.h.

◆ fClickSelected

TObject* TCanvas::fClickSelected
protected

! Currently click-selected object

Definition at line 50 of file TCanvas.h.

◆ fClickSelectedPad

TPad* TCanvas::fClickSelectedPad
protected

! Pad containing currently click-selected object

Definition at line 55 of file TCanvas.h.

◆ fContextMenu

TContextMenu* TCanvas::fContextMenu
protected

! Context menu pointer

Definition at line 58 of file TCanvas.h.

◆ fCw

UInt_t TCanvas::fCw
protected

Width of the canvas along X (pixels)

Definition at line 43 of file TCanvas.h.

◆ fDISPLAY

TString TCanvas::fDISPLAY
protected

Name of destination screen.

Definition at line 32 of file TCanvas.h.

◆ fDoubleBuffer

Int_t TCanvas::fDoubleBuffer
protected

Double buffer flag (0=off, 1=on)

Definition at line 38 of file TCanvas.h.

◆ fDrawn

Bool_t TCanvas::fDrawn
protected

! Set to True when the Draw method is called

Definition at line 63 of file TCanvas.h.

◆ fEvent

Int_t TCanvas::fEvent
protected

! Type of current or last handled event

Definition at line 45 of file TCanvas.h.

◆ fEventX

Int_t TCanvas::fEventX
protected

! Last X mouse position in canvas

Definition at line 46 of file TCanvas.h.

◆ fEventY

Int_t TCanvas::fEventY
protected

! Last Y mouse position in canvas

Definition at line 47 of file TCanvas.h.

◆ fgIsFolder

Bool_t TCanvas::fgIsFolder = kFALSE
staticprotected

Indicates if canvas can be browsed as a folder.

Definition at line 68 of file TCanvas.h.

◆ fHighLightColor

Color_t TCanvas::fHighLightColor
protected

Highlight color of active pad.

Definition at line 37 of file TCanvas.h.

◆ fPadSave

TPad* TCanvas::fPadSave
protected

! Pointer to saved pad in HandleInput

Definition at line 56 of file TCanvas.h.

◆ fPainter

TVirtualPadPainter* TCanvas::fPainter
protected

! Canvas (pad) painter.

Definition at line 66 of file TCanvas.h.

◆ fRetained

Bool_t TCanvas::fRetained
protected

Retain structure flag.

Definition at line 61 of file TCanvas.h.

◆ fSelected

TObject* TCanvas::fSelected
protected

! Currently selected object

Definition at line 49 of file TCanvas.h.

◆ fSelectedOpt

TString TCanvas::fSelectedOpt
protected

! Drawing option of selected object

Definition at line 53 of file TCanvas.h.

◆ fSelectedPad

TPad* TCanvas::fSelectedPad
protected

! Pad containing currently selected object

Definition at line 54 of file TCanvas.h.

◆ fSelectedX

Int_t TCanvas::fSelectedX
protected

! X of selected object

Definition at line 51 of file TCanvas.h.

◆ fSelectedY

Int_t TCanvas::fSelectedY
protected

! Y of selected object

Definition at line 52 of file TCanvas.h.

◆ fUpdated

Bool_t TCanvas::fUpdated
protected

! Set to True when Update method was called

Definition at line 64 of file TCanvas.h.

◆ fUpdating

Bool_t TCanvas::fUpdating
protected

! True when Updating the canvas

Definition at line 60 of file TCanvas.h.

◆ fUseGL

Bool_t TCanvas::fUseGL
protected

! True when rendering is with GL

Definition at line 62 of file TCanvas.h.

◆ fWindowHeight

UInt_t TCanvas::fWindowHeight
protected

Height of window (including menubar, borders, etc.)

Definition at line 42 of file TCanvas.h.

◆ fWindowTopX

Int_t TCanvas::fWindowTopX
protected

Top X position of window (in pixels)

Definition at line 39 of file TCanvas.h.

◆ fWindowTopY

Int_t TCanvas::fWindowTopY
protected

Top Y position of window (in pixels)

Definition at line 40 of file TCanvas.h.

◆ fWindowWidth

UInt_t TCanvas::fWindowWidth
protected

Width of window (including borders, etc.)

Definition at line 41 of file TCanvas.h.

◆ fXsizeReal

Size_t TCanvas::fXsizeReal
protected

Current size of canvas along X in CM.

Definition at line 35 of file TCanvas.h.

◆ fXsizeUser

Size_t TCanvas::fXsizeUser
protected

User specified size of canvas along X in CM.

Definition at line 33 of file TCanvas.h.

◆ fYsizeReal

Size_t TCanvas::fYsizeReal
protected

Current size of canvas along Y in CM.

Definition at line 36 of file TCanvas.h.

◆ fYsizeUser

Size_t TCanvas::fYsizeUser
protected

User specified size of canvas along Y in CM.

Definition at line 34 of file TCanvas.h.

Libraries for TCanvas:

The documentation for this class was generated from the following files: