ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends | List of all members
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.

gpad_canvas.png

This canvas contains two pads named P1 and P2. Both Canvas, P1 and P2 can be moved, grown, shrinked 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 canvas size 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;
TCanvas * c1 = new TCanvas("c", "c", w, h);
c->SetWindowSize(w + (w - c->GetWw()), h + (h - c->GetWh()));
}

and in the batch mode simply do:

c->SetCanvasSize(w,h);

Definition at line 48 of file TCanvas.h.

Public Types

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

Public Member Functions

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

Static Public Member Functions

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. More...
 
static TCanvasMakeDefCanvas ()
 Static function to build a default canvas. More...
 
static Bool_t SupportAlpha ()
 Static function returning "true" if transparency is supported. More...
 
- Static Public Member Functions inherited from TPad
static void DrawColorTable ()
 Static function to Display Color Table in a pad. More...
 
static Int_t GetMaxPickDistance ()
 Static function (see also TPad::SetMaxPickDistance) More...
 
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. More...
 
- Static Public Member Functions inherited from TVirtualPad
static TVirtualPad *& Pad ()
 Return the current pad for the current thread. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Static Public Member Functions inherited from TQObject
static Bool_t Connect (TQObject *sender, const char *signal, const char *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 
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. More...
 
static Bool_t Disconnect (TQObject *sender, const char *signal=0, void *receiver=0, const char *slot=0)
 Disconnects signal in object sender from slot_method in object receiver. More...
 
static Bool_t Disconnect (const char *class_name, const char *signal, void *receiver=0, const char *slot=0)
 Disconnects "class signal". More...
 
static Bool_t AreAllSignalsBlocked ()
 Returns true if all signals are blocked. More...
 
static Bool_t BlockAllSignals (Bool_t b)
 Block or unblock all signals. Returns the previous block status. More...
 

Protected Member Functions

virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event. More...
 
void Init ()
 Initialize the TCanvas members. Called by all constructors. More...
 
- Protected Member Functions inherited from TPad
void DestroyExternalViewer3D ()
 Current 3D viewer. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Compute distance from point px,py to a box. More...
 
virtual void HideToolTip (Int_t event)
 Hide tool tip depending on the event type. More...
 
void PaintBorder (Color_t color, Bool_t tops)
 Paint the pad border. More...
 
virtual 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)
 Paint a frame border with Postscript. More...
 
void PaintDate ()
 Paint the current date and time if the option date is on. More...
 
- Protected Member Functions inherited from TVirtualPad
virtual voidGetSender ()
 true when resizing the pad More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
- Protected Member Functions inherited from TQObject
virtual const char * GetSenderClassName () const
 

Protected Attributes

TAttCanvas fCatt
 
TString fDISPLAY
 
Size_t fXsizeUser
 
Size_t fYsizeUser
 
Size_t fXsizeReal
 
Size_t fYsizeReal
 
Color_t fHighLightColor
 
Int_t fDoubleBuffer
 
Int_t fWindowTopX
 
Int_t fWindowTopY
 
UInt_t fWindowWidth
 
UInt_t fWindowHeight
 
UInt_t fCw
 
UInt_t fCh
 
Int_t fEvent
 
Int_t fEventX
 Type of current or last handled event. More...
 
Int_t fEventY
 Last X mouse position in canvas. More...
 
Int_t fCanvasID
 Last Y mouse position in canvas. More...
 
TObjectfSelected
 Canvas identifier. More...
 
TObjectfClickSelected
 Currently selected object. More...
 
Int_t fSelectedX
 Currently click-selected object. More...
 
Int_t fSelectedY
 X of selected object. More...
 
TString fSelectedOpt
 Y of selected object. More...
 
TPadfSelectedPad
 Drawing option of selected object. More...
 
TPadfClickSelectedPad
 Pad containing currently selected object. More...
 
TPadfPadSave
 Pad containing currently click-selected object. More...
 
TCanvasImpfCanvasImp
 Pointer to saved pad in HandleInput. More...
 
TContextMenufContextMenu
 Window system specific canvas implementation. More...
 
Bool_t fBatch
 Context menu pointer. More...
 
Bool_t fUpdating
 True when in batchmode. More...
 
Bool_t fRetained
 True when Updating the canvas. More...
 
Bool_t fUseGL
 
Bool_t fDrawn
 True when rendering is with GL. More...
 
TVirtualPadPainterfPainter
 Set to True when the Draw method is called. More...
 
- Protected Attributes inherited from TPad
Double_t fX1
 tool tip associated with box More...
 
Double_t fY1
 
Double_t fX2
 
Double_t fY2
 
Double_t fXtoAbsPixelk
 
Double_t fXtoPixelk
 
Double_t fXtoPixel
 
Double_t fYtoAbsPixelk
 
Double_t fYtoPixelk
 
Double_t fYtoPixel
 
Double_t fUtoAbsPixelk
 
Double_t fUtoPixelk
 
Double_t fUtoPixel
 
Double_t fVtoAbsPixelk
 
Double_t fVtoPixelk
 
Double_t fVtoPixel
 
Double_t fAbsPixeltoXk
 
Double_t fPixeltoXk
 
Double_t fPixeltoX
 
Double_t fAbsPixeltoYk
 
Double_t fPixeltoYk
 
Double_t fPixeltoY
 
Double_t fXlowNDC
 
Double_t fYlowNDC
 
Double_t fXUpNDC
 
Double_t fYUpNDC
 
Double_t fWNDC
 
Double_t fHNDC
 
Double_t fAbsXlowNDC
 
Double_t fAbsYlowNDC
 
Double_t fAbsWNDC
 
Double_t fAbsHNDC
 
Double_t fUxmin
 
Double_t fUymin
 
Double_t fUxmax
 
Double_t fUymax
 
Double_t fTheta
 
Double_t fPhi
 
Double_t fAspectRatio
 
Int_t fPixmapID
 
Int_t fGLDevice
 Off-screen pixmap identifier. More...
 
Bool_t fCopyGLDevice
 OpenGL off-screen pixmap identifier. More...
 
Bool_t fEmbeddedGL
 
Int_t fNumber
 
Int_t fTickx
 
Int_t fTicky
 
Int_t fLogx
 
Int_t fLogy
 
Int_t fLogz
 
Int_t fPadPaint
 
Int_t fCrosshair
 
Int_t fCrosshairPos
 
Short_t fBorderSize
 
Short_t fBorderMode
 
Bool_t fModified
 
Bool_t fGridx
 
Bool_t fGridy
 
Bool_t fAbsCoord
 
Bool_t fEditable
 
Bool_t fFixedAspectRatio
 
TPadfMother
 
TCanvasfCanvas
 pointer to mother of the list More...
 
TListfPrimitives
 Pointer to mother canvas. More...
 
TListfExecs
 
TString fName
 
TString fTitle
 
TFramefFrame
 
TViewfView
 Pointer to 2-D frame (if one exists) More...
 
TObjectfPadPointer
 Pointer to 3-D view (if one exists) More...
 
TObjectfPadView3D
 free pointer More...
 
TVirtualViewer3DfViewer3D
 
- Protected Attributes inherited from TVirtualPad
Bool_t fResizing
 
- Protected Attributes inherited from TAttLine
Color_t fLineColor
 
Style_t fLineStyle
 
Width_t fLineWidth
 
- Protected Attributes inherited from TAttFill
Color_t fFillColor
 
Style_t fFillStyle
 
- Protected Attributes inherited from TAttPad
Float_t fLeftMargin
 
Float_t fRightMargin
 
Float_t fBottomMargin
 
Float_t fTopMargin
 
Float_t fXfile
 
Float_t fYfile
 
Float_t fAfile
 
Float_t fXstat
 
Float_t fYstat
 
Float_t fAstat
 
Color_t fFrameFillColor
 
Color_t fFrameLineColor
 
Style_t fFrameFillStyle
 
Style_t fFrameLineStyle
 
Width_t fFrameLineWidth
 
Width_t fFrameBorderSize
 
Int_t fFrameBorderMode
 
- Protected Attributes inherited from TQObject
TListfListOfSignals
 
TListfListOfConnections
 list of signals from this object More...
 
Bool_t fSignalsBlocked
 list of connections to this object More...
 

Static Protected Attributes

static Bool_t fgIsFolder = kFALSE
 Canvas (pad) painter. More...
 
- Static Protected Attributes inherited from TPad
static Int_t fgMaxPickDistance = 5
 3D View of this TPad More...
 
- Static Protected Attributes inherited from TQObject
static Bool_t fgAllSignalsBlocked = kFALSE
 flag used for suppression of signals More...
 

Private Member Functions

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

Friends

class TCanvasImp
 
class TThread
 
class TInterpreter
 

Additional Inherited Members

- Static Protected Member Functions inherited from TQObject
static Bool_t ConnectToClass (TQObject *sender, const char *signal, TClass *receiver_class, void *receiver, const char *slot)
 Create connection between sender and receiver. More...
 
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. More...
 
static Int_t CheckConnectArgs (TQObject *sender, TClass *sender_class, const char *signal, TClass *receiver_class, const char *slot)
 Checking of consitency of sender/receiver methods/arguments. More...
 
static TString CompressName (const char *method_name)
 

#include <ROOT/TCanvas.h>

+ Inheritance diagram for TCanvas:
+ Collaboration diagram for TCanvas:

Member Enumeration Documentation

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

Definition at line 111 of file TCanvas.h.

Constructor & Destructor Documentation

TCanvas::TCanvas ( const TCanvas canvas)
private

Referenced by MakeDefCanvas().

TCanvas::TCanvas ( Bool_t  build = kTRUE)
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 221 of file TCanvas.cxx.

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 canvas size in pixels along X (if ww < 0 the menubar is not shown)
[in]whis the canvas size in pixels along Y

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

Definition at line 324 of file TCanvas.cxx.

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 canvas size in pixels along X
[in]whis the canvas size in pixels along Y

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

Definition at line 406 of file TCanvas.cxx.

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 176 of file TCanvas.cxx.

TCanvas::~TCanvas ( )
virtual

Canvas destructor.

Definition at line 617 of file TCanvas.cxx.

Member Function Documentation

void TCanvas::Browse ( TBrowser b)
virtual

Browse.

Reimplemented from TPad.

Definition at line 625 of file TCanvas.cxx.

Referenced by TQRootCanvas::Browse().

void TCanvas::Build ( )
private

Build a canvas. Called by all constructors.

Definition at line 532 of file TCanvas.cxx.

Referenced by Constructor(), Draw(), EmbedInto(), and TCanvas().

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

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 659 of file TCanvas.cxx.

Referenced by TMVA::annconvergencetest(), ApplicationWindow::ApplicationWindow(), Browse(), TQRootCanvas::cd(), TGeoChecker::CheckBoundaryErrors(), Close(), compareFunctions(), TMVA::correlationscatters(), TMVA::correlationscattersMultiClass(), TProofProgressMemoryPlot::DoPlot(), TSpider::Draw(), TMVA::draw_activation(), DrawClonePad(), TProofBenchRunCPU::DrawPerfPlots(), TProofBenchRunDataRead::DrawPerfProfiles(), TProofPerfAnalysis::EventDist(), ApplicationWindow::execute(), TProofPerfAnalysis::FileDist(), TProofPerfAnalysis::FileProcPlot(), TProofPerfAnalysis::FileRatePlot(), TestDialog::FillHistos(), fit2DHist(), fit3DHist(), Flush(), HandleInput(), TMVA::TMVAGlob::imgconv(), TInspectCanvas::Inspector(), TProofPerfAnalysis::LatencyPlot(), TMVA::likelihoodrefs(), matrixOperations_do(), TSessionViewer::OnCascadeMenu(), TSpider::Paint(), piRandom(), pirndm(), TMVA::PlotCellTree(), TProofPerfAnalysis::RatePlot(), Resize(), TMVA::rulevisCorr(), TMVA::rulevisHists(), TProofBenchRunCPU::Run(), TProofBenchRunDataRead::Run(), SavePrimitive(), SaveSource(), TUnfold::ScanLcurve(), TSpider::SetDisplayAverage(), TSpider::SetNx(), TSpider::SetNy(), TSpider::SetSegmentDisplay(), simanTSP(), TSelHist::Terminate(), testAnalyticalIntegrals(), testBinomial(), testGraphFit(), testInterpolation(), testPoisson(), testProbVector(), testQuasiRandom(), testSphere(), unuranDistr(), unuranGraf(), unuranGraf2D(), unuranHist(), unuranMulti2D(), unuranMultiDim(), TSessionQueryFrame::UpdateHistos(), TMVA::variables(), TMVA::variablesMultiClass(), TProofPerfAnalysis::WorkerActivity(), and TSpider::~TSpider().

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

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 678 of file TCanvas.cxx.

Referenced by TSpider::AddVariable(), TProofProgressMemoryPlot::Clear(), TQRootCanvas::Clear(), TSpider::DeleteVariable(), TProofBenchRunCPU::DrawPerfPlots(), TProofBenchRunDataRead::DrawPerfProfiles(), TSessionViewer::OnCascadeMenu(), TSessionQueryFrame::ResetProgressDialog(), TProofBenchRunCPU::Run(), TProofBenchRunDataRead::Run(), TSpider::SetNx(), and TSpider::SetNy().

void TCanvas::Cleared ( TVirtualPad pad)
virtual

Emit pad Cleared signal.

Definition at line 711 of file TCanvas.cxx.

Referenced by TPad::Clear().

void TCanvas::ClearPadSave ( )
inline

Definition at line 163 of file TCanvas.h.

Referenced by TPad::Close().

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

Close canvas.

Delete window/pads data structure

Reimplemented from TPad.

Definition at line 729 of file TCanvas.cxx.

Referenced by TQRootCanvas::Close(), Destructor(), and TGroupButton::ExecuteEvent().

void TCanvas::Closed ( )
virtual

Emit Closed signal.

Reimplemented from TPad.

Definition at line 719 of file TCanvas.cxx.

Referenced by Close().

void TCanvas::Constructor ( )

Canvas default constructor.

Definition at line 144 of file TCanvas.cxx.

Referenced by TCanvas().

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 239 of file TCanvas.cxx.

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 canvas size in pixels along X (if ww < 0 the menubar is not shown)
[in]whis the canvas size in pixels along Y

Definition at line 341 of file TCanvas.cxx.

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 canvas size in pixels along X
[in]whis the canvas size in pixels along Y

Definition at line 425 of file TCanvas.cxx.

void TCanvas::CopyPixmaps ( )
privatevirtual

Copy the canvas pixmap of the pad to the canvas.

Reimplemented from TPad.

Definition at line 777 of file TCanvas.cxx.

Referenced by Flush().

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 2248 of file TCanvas.cxx.

Referenced by Constructor(), GetCanvasPainter(), and TCanvas().

virtual void TCanvas::Delete ( Option_t option = "")
inlinevirtual

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 143 of file TCanvas.h.

void TCanvas::DeleteCanvasPainter ( )

assert on IsBatch() == false?

Definition at line 2277 of file TCanvas.cxx.

Referenced by Close(), and TGColorDialog::CloseWindow().

void TCanvas::Destructor ( )

Actual canvas destructor.

Definition at line 635 of file TCanvas.cxx.

Referenced by ~TCanvas().

void TCanvas::DisconnectWidget ( )

Used by friend class TCanvasImp.

Definition at line 2216 of file TCanvas.cxx.

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

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 f("file.root");
Root > canvas.Draw();

Reimplemented from TPad.

Definition at line 795 of file TCanvas.cxx.

Referenced by Browse(), TQRootCanvas::Draw(), DrawClone(), TRecorderReplaying::Initialize(), TMVA::variables(), and TMVA::variablesMultiClass().

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

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

Reimplemented from TObject.

Definition at line 841 of file TCanvas.cxx.

Referenced by TQRootCanvas::DrawClone(), and 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 867 of file TCanvas.cxx.

Referenced by TQRootCanvas::DrawClonePad(), and TStylePreview::Update().

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 922 of file TCanvas.cxx.

Referenced by HandleInput().

void TCanvas::EditorBar ( )
virtual

Get editor bar.

Definition at line 949 of file TCanvas.cxx.

Referenced by TQRootCanvas::EditorBar().

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 958 of file TCanvas.cxx.

Referenced by TRootEmbeddedCanvas::AdoptCanvas().

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 984 of file TCanvas.cxx.

Referenced by TQRootCanvas::EnterLeave(), and HandleInput().

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

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 TPad.

Definition at line 1021 of file TCanvas.cxx.

void TCanvas::FeedbackMode ( Bool_t  set)
void TCanvas::Flush ( )

Flush canvas buffers.

Definition at line 1053 of file TCanvas.cxx.

Referenced by TQRootCanvas::Flush(), TPadPainter::SaveImage(), and Update().

void TCanvas::ForceUpdate ( )
inline

Definition at line 154 of file TCanvas.h.

Referenced by TQCanvasMenu::Execute(), and TQRootCanvas::ForceUpdate().

Bool_t TCanvas::GetAutoExec ( ) const
inline

Definition at line 175 of file TCanvas.h.

Referenced by TQRootCanvas::GetAutoExec().

Int_t TCanvas::GetCanvasID ( ) const
inlinevirtual

Get canvas identifier.

Reimplemented from TPad.

Definition at line 180 of file TCanvas.h.

Referenced by TRootContextMenu::Dialog(), TQRootCanvas::GetCanvasID(), TPad::GetCanvasID(), TPad::Print(), and TPadPainter::SaveImage().

TCanvasImp* TCanvas::GetCanvasImp ( ) const
inlinevirtual

Get canvas implementation pointer if any.

Reimplemented from TPad.

Definition at line 181 of file TCanvas.h.

Referenced by TRootContextMenu::Dialog(), TPad::GetCanvasImp(), and TMemStatShow::Show().

TVirtualPadPainter * TCanvas::GetCanvasPainter ( )

Access and (probably) creation of pad painter.

Definition at line 2267 of file TCanvas.cxx.

Referenced by Build(), and TPad::GetPainter().

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

Definition at line 188 of file TCanvas.h.

Referenced by TQRootCanvas::GetCanvasPar().

TObject* TCanvas::GetClickSelected ( ) const
inline

Definition at line 165 of file TCanvas.h.

Referenced by TPad::RecursiveRemove(), and TGedEditor::Show().

TVirtualPad* TCanvas::GetClickSelectedPad ( ) const
inline

Definition at line 170 of file TCanvas.h.

Referenced by TPad::Close(), and TGedEditor::Show().

TContextMenu* TCanvas::GetContextMenu ( ) const
inline

Definition at line 156 of file TCanvas.h.

Referenced by TQRootCanvas::GetContextMenu().

const char* TCanvas::GetDISPLAY ( ) const
inline

Definition at line 155 of file TCanvas.h.

Referenced by TQRootCanvas::GetDISPLAY().

Int_t TCanvas::GetDoubleBuffer ( ) const
inline

Definition at line 157 of file TCanvas.h.

Referenced by TQRootCanvas::GetDoubleBuffer().

Int_t TCanvas::GetEvent ( ) const
inlinevirtual

Get Event.

Reimplemented from TPad.

Definition at line 158 of file TCanvas.h.

Referenced by TQRootCanvas::GetEvent(), and TPad::GetEvent().

Int_t TCanvas::GetEventX ( ) const
inlinevirtual

Get X event.

Reimplemented from TPad.

Definition at line 159 of file TCanvas.h.

Referenced by TQRootCanvas::GetEventX(), and TPad::GetEventX().

Int_t TCanvas::GetEventY ( ) const
inlinevirtual

Get Y event.

Reimplemented from TPad.

Definition at line 160 of file TCanvas.h.

Referenced by TQRootCanvas::GetEventY(), and TPad::GetEventY().

Color_t TCanvas::GetHighLightColor ( ) const
inlinevirtual

Get highlight color.

Reimplemented from TPad.

Definition at line 161 of file TCanvas.h.

Referenced by TQRootCanvas::GetHighLightColor(), TPad::GetHighLightColor(), SavePrimitive(), and SaveSource().

TVirtualPad* TCanvas::GetPadSave ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 162 of file TCanvas.h.

Referenced by TPad::Close(), TQCanvasMenu::Execute(), TQRootCanvas::GetPadSave(), and TPad::GetPadSave().

TObject* TCanvas::GetSelected ( ) const
inlinevirtual

Get selected.

Reimplemented from TPad.

Definition at line 164 of file TCanvas.h.

Referenced by TQRootCanvas::GetSelected(), TPad::GetSelected(), TQRootCanvas::mousePressEvent(), and TPad::RecursiveRemove().

Option_t* TCanvas::GetSelectedOpt ( ) const
inline

Definition at line 168 of file TCanvas.h.

Referenced by TQRootCanvas::GetSelectedOpt().

TVirtualPad* TCanvas::GetSelectedPad ( ) const
inlinevirtual
Int_t TCanvas::GetSelectedX ( ) const
inline

Definition at line 166 of file TCanvas.h.

Int_t TCanvas::GetSelectedY ( ) const
inline

Definition at line 167 of file TCanvas.h.

Bool_t TCanvas::GetShowEditor ( ) const
inline

Definition at line 173 of file TCanvas.h.

Referenced by TGedEditor::GlobalSetModel(), and TGedEditor::Show().

Bool_t TCanvas::GetShowEventStatus ( ) const
inline

Definition at line 171 of file TCanvas.h.

Referenced by TQRootCanvas::GetShowEventStatus(), SavePrimitive(), and SaveSource().

Bool_t TCanvas::GetShowToolBar ( ) const
inline

Definition at line 172 of file TCanvas.h.

Referenced by SavePrimitive(), and SaveSource().

Bool_t TCanvas::GetShowToolTips ( ) const
inline

Definition at line 174 of file TCanvas.h.

Referenced by SavePrimitive(), and SaveSource().

UInt_t TCanvas::GetWh ( ) const
inlinevirtual
UInt_t TCanvas::GetWindowHeight ( ) const
inline
Int_t TCanvas::GetWindowTopX ( )

Returns current top x position of window on screen.

Definition at line 1112 of file TCanvas.cxx.

Referenced by TQRootCanvas::GetWindowTopX(), TStylePreview::MapTheWindow(), SaveSource(), TGedEditor::Show(), and TFitEditor::TFitEditor().

Int_t TCanvas::GetWindowTopY ( )

Returns current top y position of window on screen.

Definition at line 1123 of file TCanvas.cxx.

Referenced by TQRootCanvas::GetWindowTopY(), TStylePreview::MapTheWindow(), SaveSource(), TGedEditor::Show(), and TFitEditor::TFitEditor().

UInt_t TCanvas::GetWindowWidth ( ) const
inline
UInt_t TCanvas::GetWw ( ) const
inlinevirtual
Size_t TCanvas::GetXsizeReal ( ) const
inline

Definition at line 178 of file TCanvas.h.

Referenced by TQRootCanvas::GetXsizeReal().

Size_t TCanvas::GetXsizeUser ( ) const
inline

Definition at line 176 of file TCanvas.h.

Referenced by TQRootCanvas::GetXsizeUser().

Size_t TCanvas::GetYsizeReal ( ) const
inline

Definition at line 179 of file TCanvas.h.

Referenced by TQRootCanvas::GetYsizeReal().

Size_t TCanvas::GetYsizeUser ( ) const
inline

Definition at line 177 of file TCanvas.h.

Referenced by TQRootCanvas::GetYsizeUser().

void TCanvas::HandleInput ( EEventType  event,
Int_t  px,
Int_t  py 
)
virtual
Bool_t TCanvas::HasMenuBar ( ) const
inline

Definition at line 191 of file TCanvas.h.

Referenced by TQRootCanvas::HasMenuBar(), and SaveSource().

void TCanvas::Iconify ( )
inline

Definition at line 192 of file TCanvas.h.

Referenced by TQRootCanvas::Iconify().

void TCanvas::Init ( )
protected

Initialize the TCanvas members. Called by all constructors.

Definition at line 483 of file TCanvas.cxx.

Referenced by Constructor(), and TCanvas().

Bool_t TCanvas::IsBatch ( ) const
inlinevirtual

Is pad in batch mode ?

Reimplemented from TPad.

Definition at line 193 of file TCanvas.h.

Referenced by Build(), cd(), Close(), CopyPixmaps(), Flush(), TQRootCanvas::IsBatch(), TPad::IsBatch(), Resize(), SetCursor(), SetDoubleBuffer(), and Update().

Bool_t TCanvas::IsDrawn ( )
inline

Definition at line 194 of file TCanvas.h.

Bool_t TCanvas::IsFolder ( ) const
virtual

Is folder ?

Reimplemented from TObject.

Definition at line 1381 of file TCanvas.cxx.

Bool_t TCanvas::IsGrayscale ( )

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

Definition at line 2225 of file TCanvas.cxx.

Referenced by TPad::Paint(), TPad::PaintModified(), and SetGrayscale().

Bool_t TCanvas::IsRetained ( ) const
inlinevirtual

Is pad retained ?

Reimplemented from TPad.

Definition at line 197 of file TCanvas.h.

Referenced by TQRootCanvas::IsRetained(), and TPad::IsRetained().

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

List all pads.

Reimplemented from TPad.

Definition at line 1389 of file TCanvas.cxx.

Referenced by TQRootCanvas::ls().

TCanvas * TCanvas::MakeDefCanvas ( )
static

Static function to build a default canvas.

Definition at line 1401 of file TCanvas.cxx.

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 1432 of file TCanvas.cxx.

Referenced by TQRootCanvas::MoveOpaque().

Bool_t TCanvas::OpaqueMoving ( ) const
inlinevirtual

Is pad moving in opaque mode ?

Reimplemented from TPad.

Definition at line 200 of file TCanvas.h.

Referenced by TQRootCanvas::OpaqueMoving(), and TPad::OpaqueMoving().

Bool_t TCanvas::OpaqueResizing ( ) const
inlinevirtual

Is pad resizing in opaque mode ?

Reimplemented from TPad.

Definition at line 201 of file TCanvas.h.

Referenced by TQRootCanvas::OpaqueResizing(), and TPad::OpaqueResizing().

TCanvas& TCanvas::operator= ( const TCanvas rhs)
private
void TCanvas::Paint ( Option_t option = "")
virtual

Paint canvas.

Reimplemented from TPad.

Definition at line 1440 of file TCanvas.cxx.

Referenced by Draw(), Flush(), TQRootCanvas::Paint(), SetGrayscale(), and TMVA::StatDialogMVAEffs::UpdateCanvases().

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

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 203 of file TCanvas.h.

Referenced by TQRootCanvas::dropEvent(), HandleInput(), TQRootCanvas::mousePressEvent(), TQRootCanvas::Pick(), and Pick().

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 1449 of file TCanvas.cxx.

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

Emit Picked() signal.

Definition at line 1489 of file TCanvas.cxx.

Referenced by Pick().

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

Emit ProcessedEvent() signal.

Definition at line 1517 of file TCanvas.cxx.

Referenced by EnterLeave(), and HandleInput().

void TCanvas::RaiseWindow ( )
inline

Definition at line 210 of file TCanvas.h.

void TCanvas::ResetDrawn ( )
inline

Definition at line 211 of file TCanvas.h.

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

Recompute canvas parameters following a X11 Resize.

Definition at line 1532 of file TCanvas.cxx.

Referenced by ApplicationWindow::ApplicationWindow(), EmbedInto(), TQRootCanvas::paintEvent(), TQRootCanvas::Resize(), and Size().

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 1616 of file TCanvas.cxx.

Referenced by TQRootCanvas::ResizeOpaque().

void TCanvas::RunAutoExec ( )
private

Execute the list of TExecs in the current pad.

Definition at line 1624 of file TCanvas.cxx.

Referenced by EnterLeave(), and HandleInput().

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

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

Reimplemented from TPad.

Definition at line 1635 of file TCanvas.cxx.

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 1680 of file TCanvas.cxx.

Referenced by TPad::Print(), and TQRootCanvas::SaveSource().

void TCanvas::Selected ( TVirtualPad pad,
TObject obj,
Int_t  event 
)
virtual
void TCanvas::SetBatch ( Bool_t  batch = kTRUE)
virtual

Toggle batch mode.

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

Reimplemented from TPad.

Definition at line 1822 of file TCanvas.cxx.

Referenced by TPad::Print(), TPad::SetBatch(), and TQRootCanvas::SetBatch().

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

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.

Reimplemented from TPad.

Definition at line 1838 of file TCanvas.cxx.

Referenced by TQRootCanvas::SetCanvasSize(), and TPad::SetCanvasSize().

void TCanvas::SetClickSelected ( TObject obj)
inline

Definition at line 225 of file TCanvas.h.

Referenced by TPad::RecursiveRemove().

void TCanvas::SetClickSelectedPad ( TPad pad)
inline

Definition at line 227 of file TCanvas.h.

Referenced by TPad::Close().

void TCanvas::SetCursor ( ECursor  cursor)
virtual

Set cursor.

Reimplemented from TPad.

Definition at line 1851 of file TCanvas.cxx.

Referenced by TDialogCanvas::Apply(), TFitEditor::DoFit(), ExecuteEvent(), TQRootCanvas::SetCursor(), TPad::SetCursor(), and Update().

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

Set Double Buffer On/Off.

Reimplemented from TPad.

Definition at line 1860 of file TCanvas.cxx.

Referenced by Build(), FeedbackMode(), TQRootCanvas::SetDoubleBuffer(), and TPad::SetDoubleBuffer().

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

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

Reimplemented from TPad.

Definition at line 1877 of file TCanvas.cxx.

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 1899 of file TCanvas.cxx.

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 2234 of file TCanvas.cxx.

void TCanvas::SetHighLightColor ( Color_t  col)
inline

Definition at line 223 of file TCanvas.h.

Referenced by kalman_do(), and TQRootCanvas::SetHighLightColor().

void TCanvas::SetPadSave ( TPad pad)
inline

Definition at line 232 of file TCanvas.h.

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

Definition at line 233 of file TCanvas.h.

Referenced by TQRootCanvas::SetRetained().

void TCanvas::SetSelected ( TObject obj)
virtual

Set selected canvas.

Reimplemented from TPad.

Definition at line 1907 of file TCanvas.cxx.

Referenced by TQRootCanvas::mousePressEvent(), TPad::RecursiveRemove(), TQRootCanvas::SetSelected(), and TPad::SetSelected().

void TCanvas::SetSelectedPad ( TPad pad)
inline
void TCanvas::SetSupportGL ( Bool_t  support)
inline

Definition at line 243 of file TCanvas.h.

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

Set canvas title.

Reimplemented from TPad.

Definition at line 1916 of file TCanvas.cxx.

Referenced by Constructor(), and TQRootCanvas::SetTitle().

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

Definition at line 220 of file TCanvas.h.

Referenced by TQRootCanvas::SetWindowPosition().

void TCanvas::SetWindowSize ( UInt_t  ww,
UInt_t  wh 
)
inline
void TCanvas::Show ( )
inline
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 1942 of file TCanvas.cxx.

Referenced by TQRootCanvas::Size().

Bool_t TCanvas::SupportAlpha ( )
static
void TCanvas::ToggleAutoExec ( )
virtual

Toggle pad auto execution of list of TExecs.

Definition at line 2115 of file TCanvas.cxx.

Referenced by TQRootCanvas::ToggleAutoExec().

void TCanvas::ToggleEditor ( )
virtual

Toggle editor.

Definition at line 2146 of file TCanvas.cxx.

Referenced by TMVA::paracoor(), and TGedEditor::Show().

void TCanvas::ToggleEventStatus ( )
virtual

Toggle event statusbar.

Definition at line 2124 of file TCanvas.cxx.

Referenced by TColorWheel::Draw(), and TQRootCanvas::ToggleEventStatus().

void TCanvas::ToggleToolBar ( )
virtual

Toggle toolbar.

Definition at line 2135 of file TCanvas.cxx.

void TCanvas::ToggleToolTips ( )
virtual

Toggle tooltip display.

Definition at line 2157 of file TCanvas.cxx.

void TCanvas::Update ( )
virtual

Update canvas pad buffers.

Reimplemented from TPad.

Definition at line 2179 of file TCanvas.cxx.

Referenced by TMVA::annconvergencetest(), ApplicationWindow::ApplicationWindow(), TMVA::compareanapp(), TMVA::correlations(), TMVA::correlationscatters(), TMVA::correlationscattersMultiClass(), TMVA::correlationsMultiClass(), TMVA::deviations(), TStyleManager::DoApplyOn(), TProofProgressMemoryPlot::DoPlot(), DrawClone(), TMVA::StatDialogMVAEffs::DrawHistograms(), TProofPerfAnalysis::EventDist(), ApplicationWindow::execute(), TProofPerfAnalysis::FileDist(), TProofPerfAnalysis::FileProcPlot(), TProofPerfAnalysis::FileRatePlot(), TestDialog::FillHistos(), fit2DHist(), fit3DHist(), HandleInput(), TInspectCanvas::InspectObject(), TProofPerfAnalysis::LatencyPlot(), TMVA::likelihoodrefs(), matrixOperations_do(), TMVA::mvas(), TMVA::mvasMulticlass(), TSessionViewer::OnCascadeMenu(), TQRootCanvas::paintEvent(), TMVA::paracoor(), piRandom(), pirndm(), TMVA::plot_efficiencies(), TMVA::PlotNDimFoams(), TMVA::probas(), TRootCanvas::ProcessMessage(), TProofPerfAnalysis::RatePlot(), TMVA::regression_averagedevs(), TMVA::rulevisCorr(), TMVA::rulevisHists(), TSpider::SetDisplayAverage(), TSpider::SetSegmentDisplay(), TMemStatShow::Show(), TSelHist::Terminate(), testBinomial(), testDiff(), testGraphFit(), testPoisson(), testProbVector(), testSphere(), TGColorDialog::TGColorDialog(), unuranMultiDim(), TStylePreview::Update(), TQRootCanvas::Update(), TPad::Update(), TMVA::StatDialogMVAEffs::UpdateCanvases(), TSessionQueryFrame::UpdateHistos(), TASPaletteEditor::UpdateScreen(), and TProofPerfAnalysis::WorkerActivity().

void TCanvas::UseCurrentStyle ( )
virtual

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

Reimplemented from TPad.

Definition at line 1087 of file TCanvas.cxx.

Referenced by TStyleManager::DoApplyOn(), TStyleDialog::DoOK(), TStylePreview::Update(), and TQRootCanvas::UseCurrentStyle().

Bool_t TCanvas::UseGL ( ) const
inline

Friends And Related Function Documentation

friend class TCanvasImp
friend

Definition at line 50 of file TCanvas.h.

friend class TInterpreter
friend

Definition at line 52 of file TCanvas.h.

friend class TThread
friend

Definition at line 51 of file TCanvas.h.

Member Data Documentation

Bool_t TCanvas::fBatch
protected

Context menu pointer.

Definition at line 83 of file TCanvas.h.

Referenced by Close(), Constructor(), Draw(), EmbedInto(), SetBatch(), and TCanvas().

Int_t TCanvas::fCanvasID
protected

Last Y mouse position in canvas.

Definition at line 72 of file TCanvas.h.

Referenced by Build(), cd(), Clear(), Close(), Constructor(), DisconnectWidget(), DrawClonePad(), EmbedInto(), Flush(), Resize(), SetCursor(), SetDoubleBuffer(), and TCanvas().

TCanvasImp* TCanvas::fCanvasImp
protected
TAttCanvas TCanvas::fCatt
protected

Definition at line 55 of file TCanvas.h.

UInt_t TCanvas::fCh
protected
TObject* TCanvas::fClickSelected
protected

Currently selected object.

Definition at line 74 of file TCanvas.h.

Referenced by Clear(), Constructor(), Init(), and Pick().

TPad* TCanvas::fClickSelectedPad
protected

Pad containing currently selected object.

Definition at line 79 of file TCanvas.h.

Referenced by Clear(), Constructor(), Init(), and Pick().

TContextMenu* TCanvas::fContextMenu
protected

Window system specific canvas implementation.

Definition at line 82 of file TCanvas.h.

Referenced by Build(), Constructor(), Destructor(), DisconnectWidget(), HandleInput(), and Init().

UInt_t TCanvas::fCw
protected
TString TCanvas::fDISPLAY
protected

Definition at line 56 of file TCanvas.h.

Referenced by Init().

Int_t TCanvas::fDoubleBuffer
protected

Definition at line 62 of file TCanvas.h.

Referenced by cd(), HandleInput(), and SetDoubleBuffer().

Bool_t TCanvas::fDrawn
protected

True when rendering is with GL.

Definition at line 87 of file TCanvas.h.

Referenced by Draw(), and Init().

Int_t TCanvas::fEvent
protected

Definition at line 69 of file TCanvas.h.

Referenced by EnterLeave(), HandleInput(), Init(), and Pick().

Int_t TCanvas::fEventX
protected

Type of current or last handled event.

Definition at line 70 of file TCanvas.h.

Referenced by EnterLeave(), HandleInput(), and Init().

Int_t TCanvas::fEventY
protected

Last X mouse position in canvas.

Definition at line 71 of file TCanvas.h.

Referenced by EnterLeave(), HandleInput(), and Init().

Bool_t TCanvas::fgIsFolder = kFALSE
staticprotected

Canvas (pad) painter.

Definition at line 91 of file TCanvas.h.

Referenced by Browse(), IsFolder(), and SetFolder().

Color_t TCanvas::fHighLightColor
protected

Definition at line 61 of file TCanvas.h.

Referenced by Init().

TPad* TCanvas::fPadSave
protected

Pad containing currently click-selected object.

Definition at line 80 of file TCanvas.h.

Referenced by Constructor(), HandleInput(), and Init().

TVirtualPadPainter* TCanvas::fPainter
protected

Set to True when the Draw method is called.

Definition at line 89 of file TCanvas.h.

Referenced by CreatePainter(), DeleteCanvasPainter(), Destructor(), Flush(), GetCanvasPainter(), SetDoubleBuffer(), and TCanvas().

Bool_t TCanvas::fRetained
protected

True when Updating the canvas.

Definition at line 85 of file TCanvas.h.

Referenced by Init().

TObject* TCanvas::fSelected
protected

Canvas identifier.

Definition at line 73 of file TCanvas.h.

Referenced by Clear(), Constructor(), EnterLeave(), HandleInput(), Init(), Pick(), and SetSelected().

TString TCanvas::fSelectedOpt
protected

Y of selected object.

Definition at line 77 of file TCanvas.h.

Referenced by Pick().

TPad* TCanvas::fSelectedPad
protected

Drawing option of selected object.

Definition at line 78 of file TCanvas.h.

Referenced by Clear(), Constructor(), EnterLeave(), HandleInput(), Init(), and Pick().

Int_t TCanvas::fSelectedX
protected

Currently click-selected object.

Definition at line 75 of file TCanvas.h.

Referenced by Init(), and Pick().

Int_t TCanvas::fSelectedY
protected

X of selected object.

Definition at line 76 of file TCanvas.h.

Referenced by Init(), and Pick().

Bool_t TCanvas::fUpdating
protected

True when in batchmode.

Definition at line 84 of file TCanvas.h.

Referenced by Constructor(), EmbedInto(), Init(), TCanvas(), and Update().

Bool_t TCanvas::fUseGL
protected

Definition at line 86 of file TCanvas.h.

Referenced by CreatePainter(), and TCanvas().

UInt_t TCanvas::fWindowHeight
protected
Int_t TCanvas::fWindowTopX
protected
Int_t TCanvas::fWindowTopY
protected
UInt_t TCanvas::fWindowWidth
protected
Size_t TCanvas::fXsizeReal
protected

Definition at line 59 of file TCanvas.h.

Referenced by Build(), Init(), and Resize().

Size_t TCanvas::fXsizeUser
protected

Definition at line 57 of file TCanvas.h.

Referenced by Init(), Resize(), and Size().

Size_t TCanvas::fYsizeReal
protected

Definition at line 60 of file TCanvas.h.

Referenced by Build(), Init(), and Resize().

Size_t TCanvas::fYsizeUser
protected

Definition at line 58 of file TCanvas.h.

Referenced by Init(), Resize(), and Size().


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