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 | Private Attributes | List of all members
TPad Class Reference

The most important graphics class in the ROOT system.

A Pad is contained in a Canvas.

A Pad may contain other pads (unlimited pad hierarchy).

A pad is a linked list of primitives of any type (graphics objects, histograms, detectors, tracks, etc.).

Adding a new element into a pad is in general performed by the Draw member function of the object classes.

It is important to realize that the pad is a linked list of references to the original object. For example, in case of a histogram, the histogram.Draw() operation only stores a reference to the histogram object and not a graphical representation of this histogram. When the mouse is used to change (say the bin content), the bin content of the original histogram is changed.

The convention used in ROOT is that a Draw operation only adds a reference to the object. The effective drawing is performed when the canvas receives a signal to be painted.

gpad_pad1.png

This signal is generally sent when typing carriage return in the command input or when a graphical operation has been performed on one of the pads of this canvas. When a Canvas/Pad is repainted, the member function Paint for all objects in the Pad linked list is invoked.

gpad_pad2.png

When the mouse is moved on the Pad, The member function DistancetoPrimitive is called for all the elements in the pad. DistancetoPrimitive returns the distance in pixels to this object.

When the object is within the distance window, the member function ExecuteEvent is called for this object.

In ExecuteEvent, move, changes can be performed on the object.

For examples of DistancetoPrimitive and ExecuteEvent functions, see classes

A Pad supports linear and log scales coordinate systems. The transformation coefficients are explained in TPad::ResizePad.

Definition at line 46 of file TPad.h.

Public Types

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

 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 void Browse (TBrowser *b)
 Browse pad. 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 Close (Option_t *option="")
 Delete all primitives in pad and pad itself. More...
 
virtual void Closed ()
 
virtual void CopyPixmap ()
 Copy the pixmap of the pad to the canvas. More...
 
virtual void CopyPixmaps ()
 Copy the sub-pixmaps 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 Draw (Option_t *option="")
 Draw Pad in Current pad (re-parent pad if necessary). 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 void UseCurrentStyle ()
 Force a copy of current style for all objects in 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...
 
virtual Int_t GetCanvasID () const
 Get canvas identifier. More...
 
virtual TCanvasImpGetCanvasImp () const
 Get canvas implementation pointer if any. More...
 
TFrameGetFrame ()
 Get frame. More...
 
virtual Int_t GetEvent () const
 Get Event. More...
 
virtual Int_t GetEventX () const
 Get X event. More...
 
virtual Int_t GetEventY () const
 Get Y event. More...
 
virtual Color_t GetHighLightColor () const
 Get highlight color. 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
 
virtual UInt_t GetWw () const
 Get Ww. More...
 
virtual UInt_t GetWh () const
 Get Wh. More...
 
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 TObjectGetSelected () const
 Get selected. 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 IsBatch () const
 Is pad in batch mode ? More...
 
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 IsRetained () const
 Is pad retained ? More...
 
virtual Bool_t IsVertical () const
 
virtual void ls (Option_t *option="") const
 List all primitives in pad. More...
 
void Modified (Bool_t flag=1)
 
virtual Bool_t OpaqueMoving () const
 Is pad moving in opaque mode ? More...
 
virtual Bool_t OpaqueResizing () const
 Is pad resizing in opaque mode ? More...
 
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...
 
virtual void Paint (Option_t *option="")
 Paint all primitives in pad. 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...
 
virtual TPadPick (Int_t px, Int_t py, TObjLink *&pickobj)
 Search for an object at pixel position px,py. 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 SetCanvasSize (UInt_t ww, UInt_t wh)
 Set canvas size. More...
 
virtual void SetCrosshair (Int_t crhair=1)
 Set crosshair active/inactive. More...
 
virtual void SetCursor (ECursor cursor)
 Set cursor type. More...
 
virtual void SetDoubleBuffer (Int_t mode=1)
 Set double buffer mode ON or OFF. 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 SetFixedAspectRatio (Bool_t fixed=kTRUE)
 Fix pad aspect ratio to current value if fixed is true. 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 SetSelected (TObject *obj)
 Set selected. More...
 
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 SetTitle (const char *title="")
 
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...
 
virtual void Update ()
 Update pad. 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 Delete (Option_t *option="")
 Delete this object. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. 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 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

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 ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event. 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...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save primitives in this pad on the C++ source file out. More...
 
virtual void SetBatch (Bool_t batch=kTRUE)
 Set pad in batch mode. 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

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

 TPad (const TPad &pad)
 
TPadoperator= (const TPad &rhs)
 
void CopyBackgroundPixmap (Int_t x, Int_t y)
 Copy pixmap of this pad as background of the current pad. More...
 
void CopyBackgroundPixmaps (TPad *start, TPad *stop, Int_t x, Int_t y)
 Copy pixmaps of pads laying below pad "stop" into pad "stop". More...
 
void DrawDist (Rectangle_t aBBox, Rectangle_t bBBox, char mode)
 Draw Arrows to indicated equal distances of Objects with given BBoxes. More...
 

Private Attributes

TObjectfTip
 

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

+ Inheritance diagram for TPad:
+ Collaboration diagram for TPad:

Member Enumeration Documentation

anonymous enum
Enumerator
kFraming 
kHori 
kClipFrame 
kPrintingPS 
kCannotMove 
kClearAfterCR 

Definition at line 156 of file TPad.h.

Constructor & Destructor Documentation

TPad::TPad ( const TPad pad)
private
TPad::TPad ( )

Referenced by Divide(), and ShowGuidelines().

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.

A pad is a linked list of primitives. A pad is contained in a canvas. It may contain other pads. A pad has attributes. When a pad is created, the attributes defined in the current style are copied to the pad attributes.

Parameters
[in]namepad name
[in]titlepad title
[in]xlow[0,1] is the position of the bottom left point of the pad expressed in the mother pad reference system
[in]ylow[0,1] is the Y position of this point.
[in]xup[0,1] is the x position of the top right point of the pad expressed in the mother pad reference system
[in]yup[0,1] is the Y position of this point.
[in]colorpad color
[in]bordersizeborder size in pixels
[in]bordermodeborder mode
  • bordermode = -1 box looks as it is behind the screen
  • bordermode = 0 no special effects
  • bordermode = 1 box looks as it is in front of the screen

Definition at line 238 of file TPad.cxx.

TPad::~TPad ( )
virtual

Pad destructor.

Definition at line 326 of file TPad.cxx.

Member Function Documentation

void TPad::AbsCoordinates ( Bool_t  set)
inlinevirtual

Implements TVirtualPad.

Definition at line 170 of file TPad.h.

Referenced by HighLight().

Double_t TPad::AbsPixeltoX ( Int_t  px)
inlinevirtual
void TPad::AbsPixeltoXY ( Int_t  xpixel,
Int_t  ypixel,
Double_t x,
Double_t y 
)
inlinevirtual

Definition at line 415 of file TPad.h.

Double_t TPad::AbsPixeltoY ( Int_t  py)
inlinevirtual

Implements TVirtualPad.

Definition at line 172 of file TPad.h.

Referenced by AbsPixeltoXY(), ExecuteEvent(), ExecuteEventAxis(), TColorWheel::GetColor(), Pick(), and SetAttTextPS().

void TPad::AddExec ( const char *  name,
const char *  command 
)
virtual

Add a new TExec object to the list of Execs.

When an event occurs in the pad (mouse click, etc) the list of C++ commands in the list of Execs are executed via TPad::AutoExec.

When a pad event occurs (mouse move, click, etc) all the commands contained in the fExecs list are executed in the order found in the list.

This facility is activated by default. It can be deactivated by using the canvas "Option" menu.

The following examples of TExec commands are provided in the tutorials: macros exec1.C and exec2.C.

### Example1 of use of exec1.C

Root > TFile f("hsimple.root")
Root > hpx.Draw()
Root > c1.AddExec("ex1",".x exec1.C")

At this point you can use the mouse to click on the contour of the histogram hpx. When the mouse is clicked, the bin number and its contents are printed.

### Example2 of use of exec1.C

Root > TFile f("hsimple.root")
Root > hpxpy.Draw()
Root > c1.AddExec("ex2",".x exec2.C")

When moving the mouse in the canvas, a second canvas shows the projection along X of the bin corresponding to the Y position of the mouse. The resulting histogram is fitted with a gaussian. A "dynamic" line shows the current bin position in Y. This more elaborated example can be used as a starting point to develop more powerful interactive applications exploiting the C++ interpreter as a development engine.

Implements TVirtualPad.

Definition at line 378 of file TPad.cxx.

void TPad::AutoExec ( )
virtual

Execute the list of Execs when a pad event occurs.

Definition at line 388 of file TPad.cxx.

void TPad::Browse ( TBrowser b)
virtual

Browse pad.

Reimplemented from TObject.

Reimplemented in TCanvas.

Definition at line 403 of file TPad.cxx.

TLegend * TPad::BuildLegend ( Double_t  x1 = 0.5,
Double_t  y1 = 0.67,
Double_t  x2 = 0.88,
Double_t  y2 = 0.88,
const char *  title = "" 
)
virtual

Build a legend from the graphical objects in the pad.

A simple method to build automatically a TLegend from the primitives in a TPad. Only those deriving from TAttLine, TAttMarker and TAttFill are added, excluding TPave and TFrame derived classes. x1, y1, x2, y2 are the TLegend coordinates. title is the legend title. By default it is " ". The caller program owns the returned TLegend.

If the pad contains some TMultiGraph or THStack the individual graphs or histograms in them are added to the TLegend.

Implements TVirtualPad.

Definition at line 422 of file TPad.cxx.

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

Set Current pad.

When a canvas/pad is divided via TPad::Divide, one can directly set the current path to one of the subdivisions. See TPad::Divide for the convention to number sub-pads.

Returns the new current pad, or 0 in case of failure.

For example:

c1.Divide(2,3); // create 6 pads (2 divisions along x, 3 along y).

To set the current pad to the bottom right pad, do

c1.cd(6);

Note1: c1.cd() is equivalent to c1.cd(0) and sets the current pad to c1 itself.

Note2: after a statement like c1.cd(6), the global variable gPad points to the current pad. One can use gPad to set attributes of the current pad.

Note3: One can get a pointer to one of the sub-pads of pad with: TPad subpad = (TPad)pad->GetPad(subpadnumber);

Implements TVirtualPad.

Definition at line 514 of file TPad.cxx.

Referenced by ApplicationWindow::ApplicationWindow(), TMVA::boostcontrolplots(), Browse(), BuildLegend(), TCanvas::cd(), Clear(), Close(), Divide(), TProofProgressDialog::DoPlotRateGraph(), RooStats::LikelihoodIntervalPlot::Draw(), TMVA::draw_activation(), TCanvas::DrawClonePad(), DrawFrame(), TQRootCanvas::dropEvent(), TProofPerfAnalysis::EventDist(), ApplicationWindow::execute(), TTreeViewer::ExecuteDraw(), TButton::ExecuteEvent(), TProofPerfAnalysis::FileDist(), TProofPerfAnalysis::FileProcPlot(), TProofPerfAnalysis::FileRatePlot(), TCanvas::Flush(), TRootEmbeddedCanvas::HandleDNDPosition(), TRootCanvas::HandleDNDPosition(), TCanvas::HandleInput(), TQRootCanvas::mousePressEvent(), TCreatePrimitives::Pad(), Paint(), PaintModified(), TMVA::TMVAGlob::plot_logo(), Print(), TProofPerfAnalysis::RatePlot(), RedrawAxis(), TCanvas::Resize(), ResizePad(), TGroupButton::SavePrimitive(), TSlider::SavePrimitive(), TButton::SavePrimitive(), SavePrimitive(), ShowGuidelines(), TPad(), and TProofPerfAnalysis::WorkerActivity().

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

Delete all pad primitives.

If the bit kClearAfterCR has been set for this pad, the Clear function will execute only after having pressed a CarriageReturn Set the bit with mypad->SetBit(TPad::kClearAfterCR)

Implements TVirtualPad.

Definition at line 543 of file TPad.cxx.

Referenced by TCanvas::Clear(), and DrawClassObject().

Int_t TPad::Clip ( Float_t x,
Float_t y,
Float_t  xclipl,
Float_t  yclipb,
Float_t  xclipr,
Float_t  yclipt 
)
virtual

Clipping routine: Cohen Sutherland algorithm.

  • If Clip ==2 the segment is outside the boundary.
  • If Clip ==1 the segment has one point outside the boundary.
  • If Clip ==0 the segment is inside the boundary.
Parameters
[in]x[],y[]Segment coordinates (2 points)
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]x[],y[]New segment coordinates( 2 points)

Definition at line 586 of file TPad.cxx.

Referenced by PaintLine(), and PaintPolyLine().

Int_t TPad::Clip ( Double_t x,
Double_t y,
Double_t  xclipl,
Double_t  yclipb,
Double_t  xclipr,
Double_t  yclipt 
)
virtual

Clipping routine: Cohen Sutherland algorithm.

  • If Clip ==2 the segment is outside the boundary.
  • If Clip ==1 the segment has one point outside the boundary.
  • If Clip ==0 the segment is inside the boundary.
Parameters
[in]x[],y[]Segment coordinates (2 points)
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]x[],y[]New segment coordinates(2 points)

Definition at line 657 of file TPad.cxx.

Int_t TPad::ClippingCode ( Double_t  x,
Double_t  y,
Double_t  xcl1,
Double_t  ycl1,
Double_t  xcl2,
Double_t  ycl2 
)
virtual

Compute the endpoint codes for TPad::Clip.

Definition at line 728 of file TPad.cxx.

Referenced by Clip().

Int_t TPad::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 
)
virtual

Clip polygon using the Sutherland-Hodgman algorithm.

Parameters
[in]nNumber of points in the polygon to be clipped
[in]x[n],y[n]Polygon do be clipped vertices
[in]xclipl,yclipb,xclipr,ycliptClipping boundary
[out]nnNumber of points in xc and yc
[out]xc,ycClipped polygon vertices. The Int_t returned by this function is the number of points in the clipped polygon. These vectors must be allocated by the calling function. A size of 2*n for each is enough.

Sutherland and Hodgman's polygon-clipping algorithm uses a divide-and-conquer strategy: It solves a series of simple and identical problems that, when combined, solve the overall problem. The simple problem is to clip a polygon against a single infinite clip edge. Four clip edges, each defining one boundary of the clip rectangle, successively clip a polygon against a clip rectangle.

Steps of Sutherland-Hodgman's polygon-clipping algorithm:

  • Polygons can be clipped against each edge of the window one at a time. Windows/edge intersections, if any, are easy to find since the X or Y coordinates are already known.
  • Vertices which are kept after clipping against one window edge are saved for clipping against the remaining edges.
  • Note that the number of vertices usually changes and will often increases.

The clip boundary determines a visible and invisible region. The edges from vertex i to vertex i+1 can be one of four types:

  • Case 1 : Wholly inside visible region - save endpoint
  • Case 2 : Exit visible region - save the intersection
  • Case 3 : Wholly outside visible region - save nothing
  • Case 4 : Enter visible region - save intersection and endpoint

Definition at line 777 of file TPad.cxx.

Referenced by PaintFillArea().

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

Delete all primitives in pad and pad itself.

Pad cannot be used anymore after this call. Emits signal "Closed()".

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 898 of file TPad.cxx.

Referenced by TCanvas::Close(), and ~TPad().

virtual void TPad::Closed ( )
inlinevirtual

Reimplemented in TCanvas.

Definition at line 185 of file TPad.h.

Referenced by Close().

void TPad::CloseToolTip ( TObject tip)
virtual

Hide tool tip.

Implements TVirtualPad.

Definition at line 6307 of file TPad.cxx.

Referenced by ~TPad().

void TPad::CopyBackgroundPixmap ( Int_t  x,
Int_t  y 
)
private

Copy pixmap of this pad as background of the current pad.

Definition at line 3335 of file TPad.cxx.

Referenced by PaintBox().

void TPad::CopyBackgroundPixmaps ( TPad start,
TPad stop,
Int_t  x,
Int_t  y 
)
private

Copy pixmaps of pads laying below pad "stop" into pad "stop".

This gives the effect of pad "stop" being transparent.

Definition at line 3318 of file TPad.cxx.

Referenced by PaintBox().

void TPad::CopyPixmap ( )
virtual

Copy the pixmap of the pad to the canvas.

Implements TVirtualPad.

Definition at line 956 of file TPad.cxx.

Referenced by TCanvas::CopyPixmaps().

void TPad::CopyPixmaps ( )
virtual

Copy the sub-pixmaps of the pad to the canvas.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 970 of file TPad.cxx.

Referenced by TCanvas::CopyPixmaps().

TObject * TPad::CreateToolTip ( const TBox b,
const char *  text,
Long_t  delayms 
)
virtual

Create a tool tip and return its pointer.

Implements TVirtualPad.

Definition at line 6275 of file TPad.cxx.

Referenced by SetToolTipText().

void TPad::DeleteExec ( const char *  name)
virtual

Remove TExec name from the list of Execs.

Implements TVirtualPad.

Definition at line 986 of file TPad.cxx.

void TPad::DeleteToolTip ( TObject tip)
virtual

Delete tool tip object.

Implements TVirtualPad.

Definition at line 6285 of file TPad.cxx.

Referenced by SetToolTipText(), and ~TPad().

void TPad::DestroyExternalViewer3D ( )
protected

Current 3D viewer.

Int_t TPad::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
protectedvirtual

Compute distance from point px,py to a box.

Compute the closest distance of approach from point px,py to the edges of this pad. The distance is computed in pixels units.

Reimplemented from TObject.

Definition at line 1002 of file TPad.cxx.

Referenced by Pick().

void TPad::Divide ( Int_t  nx = 1,
Int_t  ny = 1,
Float_t  xmargin = 0.01,
Float_t  ymargin = 0.01,
Int_t  color = 0 
)
virtual

Automatic pad generation by division.

  • The current canvas is divided in nx by ny equal divisions (pads).
  • xmargin is the space along x between pads in percent of canvas.
  • ymargin is the space along y between pads in percent of canvas.
  • color is the color of the new pads. If 0, color is the canvas color.

Pads are automatically named canvasname_n where n is the division number starting from top left pad.

Example if canvasname=c1 , nx=2, ny=3:

gpad_pad3.png

Once a pad is divided into sub-pads, one can set the current pad to a subpad with a given division number as illustrated above with TPad::cd(subpad_number).

For example, to set the current pad to c1_4, one can do:

c1->cd(4)

Note1: c1.cd() is equivalent to c1.cd(0) and sets the current pad to c1 itself.

Note2: after a statement like c1.cd(6), the global variable gPad points to the current pad. One can use gPad to set attributes of the current pad.

Note3: in case xmargin <=0 and ymargin <= 0, there is no space between pads. The current pad margins are recomputed to optimize the layout.

Implements TVirtualPad.

Reimplemented in TInspectCanvas, TButton, and TDialogCanvas.

Definition at line 1077 of file TPad.cxx.

Referenced by TSpider::AddVariable(), TGeoChecker::CheckBoundaryErrors(), TMVA::correlationscatters(), TMVA::correlationscattersMultiClass(), TSpider::DeleteVariable(), DivideSquare(), TProofProgressDialog::DoPlotRateGraph(), TSpider::Draw(), TProofBenchRunCPU::DrawPerfPlots(), TProofBenchRunDataRead::DrawPerfProfiles(), TProofPerfAnalysis::EventDist(), TProofPerfAnalysis::FileDist(), TProofPerfAnalysis::FileProcPlot(), TProofPerfAnalysis::FileRatePlot(), fit2DHist(), fit3DHist(), TMVA::likelihoodrefs(), matrixOperations_do(), TSessionViewer::OnCascadeMenu(), piRandom(), pirndm(), TProofPerfAnalysis::RatePlot(), TMVA::rulevisCorr(), TMVA::rulevisHists(), TProofBenchRunCPU::Run(), TProofBenchRunDataRead::Run(), TUnfold::ScanLcurve(), TSpider::SetNx(), TSpider::SetNy(), simanTSP(), TSelHist::Terminate(), testAnalyticalIntegrals(), testGraphFit(), testInterpolation(), testQuasiRandom(), testSphere(), unuranDiscrete(), unuranDistr(), unuranGraf(), unuranGraf2D(), unuranHist(), unuranMulti2D(), unuranMultiDim(), TMVA::variables(), TMVA::variablesMultiClass(), and TProofPerfAnalysis::WorkerActivity().

void TPad::DivideSquare ( Int_t  n,
Float_t  xmargin = 0.01,
Float_t  ymargin = 0.01,
Int_t  color = 0 
)
virtual

"n" is the total number of sub-pads.

The number of sub-pads along the X and Y axis are computed according to the square root of n.

Definition at line 1176 of file TPad.cxx.

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

Draw Pad in Current pad (re-parent pad if necessary).

Implements TVirtualPad.

Reimplemented in TCanvas, and TButton.

Definition at line 1196 of file TPad.cxx.

Referenced by ApplicationWindow::ApplicationWindow(), Divide(), RooStats::LikelihoodIntervalPlot::Draw(), TMVA::draw_activation(), TCreatePrimitives::Pad(), TMVA::TMVAGlob::plot_logo(), and ShowGuidelines().

void TPad::DrawClassObject ( const TObject classobj,
Option_t option = "" 
)
virtual

Draw class inheritance tree of the class to which obj belongs.

If a class B inherits from a class A, description of B is drawn on the right side of description of A.

Member functions overridden by B are shown in class A with a blue line crossing-out the corresponding member function.

Implements TVirtualPad.

Definition at line 1229 of file TPad.cxx.

void TPad::DrawColorTable ( )
static

Static function to Display Color Table in a pad.

Definition at line 1524 of file TPad.cxx.

void TPad::DrawCrosshair ( )
virtual

Function called to draw a crosshair in the canvas.

Example:

Root > TFile f("hsimple.root");
Root > hpxpy.Draw();

When moving the mouse in the canvas, a crosshair is drawn

  • if the canvas fCrosshair = 1 , the crosshair spans the full canvas
  • if the canvas fCrosshair > 1 , the crosshair spans only the pad

Definition at line 1430 of file TPad.cxx.

Referenced by AutoExec().

void TPad::DrawDist ( Rectangle_t  aBBox,
Rectangle_t  bBBox,
char  mode 
)
private

Draw Arrows to indicated equal distances of Objects with given BBoxes.

Used by ShowGuidelines

Definition at line 5462 of file TPad.cxx.

Referenced by ShowGuidelines().

TH1F * TPad::DrawFrame ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax,
const char *  title = "" 
)
virtual

Draw an empty pad frame with X and Y axis.

Parameters
[in]xminX axis lower limit
[in]xmaxX axis upper limit
[in]yminY axis lower limit
[in]ymaxY axis upper limit
[in]titlePad title.If title is of the form "stringt;stringx;stringy" the pad title is set to stringt, the x axis title to stringx, the y axis title to stringy.

Implements TVirtualPad.

Definition at line 1479 of file TPad.cxx.

Referenced by alignment(), DrawFrame(), and TMVA::regression_averagedevs().

virtual void TPad::EventPave ( )
inlinevirtual

Definition at line 399 of file TPad.h.

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

Execute action corresponding to one event.

This member function is called when a TPad object is clicked.

If the mouse is clicked in one of the 4 corners of the pad (pA,pB,pC,pD) the pad is resized with the rubber rectangle.

If the mouse is clicked inside the pad, the pad is moved.

If the mouse is clicked on the 4 edges (pL,pR,pTop,pBot), the pad is scaled parallel to this edge.

gpad_pad4.png

Note that this function duplicates on purpose the functionality already implemented in TBox::ExecuteEvent. If somebody modifies this function, may be similar changes should also be applied to TBox::ExecuteEvent.

Reimplemented from TObject.

Reimplemented in TCanvas, TButton, and TGroupButton.

Definition at line 1587 of file TPad.cxx.

Referenced by TGroupButton::ExecuteEvent(), TButton::ExecuteEvent(), and TCanvas::ExecuteEvent().

void TPad::ExecuteEventAxis ( Int_t  event,
Int_t  px,
Int_t  py,
TAxis axis 
)
virtual

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.

The axis range is set between the position where the mouse is pressed and the position where it is released.

If the mouse position is outside the current axis range when it is released the axis is unzoomed with the corresponding proportions.

Note that the mouse does not need to be in the pad or even canvas when it is released.

Implements TVirtualPad.

Definition at line 2161 of file TPad.cxx.

TObject * TPad::FindObject ( const char *  name) const
virtual

Search if object named name is inside this pad or in pads inside this pad.

In case name is in several sub-pads the first one is returned.

Reimplemented from TObject.

Definition at line 2495 of file TPad.cxx.

Referenced by TStyleManager::DoApplyOn(), DrawFrame(), TInspectCanvas::GoBackward(), TInspectCanvas::GoForward(), TInspectCanvas::Inspector(), UseCurrentStyle(), and WaitPrimitive().

TObject * TPad::FindObject ( const TObject obj) const
virtual

Search if obj is in pad or in pads inside this pad.

In case obj is in several sub-pads the first one is returned.

Reimplemented from TObject.

Definition at line 2516 of file TPad.cxx.

Double_t TPad::GetAbsHNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 222 of file TPad.h.

Referenced by PaintBorder(), and ResizePad().

Double_t TPad::GetAbsWNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 221 of file TPad.h.

Referenced by PaintBorder(), and ResizePad().

Double_t TPad::GetAbsXlowNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 219 of file TPad.h.

Referenced by ResizePad().

Double_t TPad::GetAbsYlowNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 220 of file TPad.h.

Referenced by ResizePad().

Double_t TPad::GetAspectRatio ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 223 of file TPad.h.

Rectangle_t TPad::GetBBox ( )
virtual

Return the bounding Box of the Pad.

Implements TAttBBox2D.

Definition at line 6456 of file TPad.cxx.

TPoint TPad::GetBBoxCenter ( )
virtual

Return the center of the Pad as TPoint in pixels.

Implements TAttBBox2D.

Definition at line 6470 of file TPad.cxx.

virtual Short_t TPad::GetBorderMode ( ) const
inlinevirtual
virtual Short_t TPad::GetBorderSize ( ) const
inlinevirtual
virtual TCanvas* TPad::GetCanvas ( ) const
inlinevirtual
Int_t TPad::GetCanvasID ( ) const
virtual

Get canvas identifier.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2535 of file TPad.cxx.

Referenced by Print().

TCanvasImp * TPad::GetCanvasImp ( ) const
virtual

Get canvas implementation pointer if any.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2543 of file TPad.cxx.

Int_t TPad::GetCrosshair ( ) const

Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.

Definition at line 5847 of file TPad.cxx.

Referenced by AutoExec(), DrawCrosshair(), GetCrosshair(), and HasCrosshair().

Int_t TPad::GetEvent ( ) const
virtual

Get Event.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2551 of file TPad.cxx.

Referenced by DrawCrosshair(), and WaitPrimitive().

Int_t TPad::GetEventX ( ) const
virtual

Get X event.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2559 of file TPad.cxx.

Referenced by DrawCrosshair().

Int_t TPad::GetEventY ( ) const
virtual

Get Y event.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2567 of file TPad.cxx.

Referenced by DrawCrosshair().

TFrame * TPad::GetFrame ( )
virtual
Int_t TPad::GetGLDevice ( )
virtual

Get GL device.

Implements TVirtualPad.

Definition at line 6423 of file TPad.cxx.

Referenced by Paint(), and TPad().

Bool_t TPad::GetGridx ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 230 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), SavePrimitive(), and TPadEditor::SetModel().

Bool_t TPad::GetGridy ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 231 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), SavePrimitive(), and TPadEditor::SetModel().

Color_t TPad::GetHighLightColor ( ) const
virtual

Get highlight color.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2583 of file TPad.cxx.

Referenced by TCanvas::Flush().

Double_t TPad::GetHNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 216 of file TPad.h.

Referenced by ls(), and Pick().

TList* TPad::GetListOfExecs ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 241 of file TPad.h.

TList* TPad::GetListOfPrimitives ( ) const
inlinevirtual
Int_t TPad::GetLogx ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 251 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), ExecuteEventAxis(), SavePrimitive(), and TPadEditor::SetModel().

Int_t TPad::GetLogy ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 252 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), ExecuteEventAxis(), SavePrimitive(), and TPadEditor::SetModel().

Int_t TPad::GetLogz ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 253 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), ExecuteEventAxis(), SavePrimitive(), and TPadEditor::SetModel().

Int_t TPad::GetMaxPickDistance ( )
static

Static function (see also TPad::SetMaxPickDistance)

Definition at line 2591 of file TPad.cxx.

virtual TVirtualPad* TPad::GetMother ( ) const
inlinevirtual
const char* TPad::GetName ( ) const
inlinevirtual
Int_t TPad::GetNumber ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 232 of file TPad.h.

TVirtualPad * TPad::GetPad ( Int_t  subpadnumber) const
virtual
Int_t TPad::GetPadPaint ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 260 of file TPad.h.

void TPad::GetPadPar ( Double_t xlow,
Double_t ylow,
Double_t xup,
Double_t yup 
)
virtual

Return lower and upper bounds of the pad in NDC coordinates.

Implements TVirtualPad.

Definition at line 2795 of file TPad.cxx.

virtual TObject* TPad::GetPadPointer ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 245 of file TPad.h.

TVirtualPad * TPad::GetPadSave ( ) const
virtual

Get save pad.

Implements TVirtualPad.

Definition at line 2617 of file TPad.cxx.

TVirtualPadPainter * TPad::GetPainter ( )
virtual
Double_t TPad::GetPhi ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 224 of file TPad.h.

Referenced by SavePrimitive().

Int_t TPad::GetPixmapID ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 261 of file TPad.h.

Referenced by CopyBackgroundPixmap(), and Print().

TObject * TPad::GetPrimitive ( const char *  name) const
virtual

Get primitive.

Implements TVirtualPad.

Definition at line 2757 of file TPad.cxx.

Referenced by SavePrimitive().

void TPad::GetRange ( Double_t x1,
Double_t y1,
Double_t x2,
Double_t y2 
)
virtual

Return pad world coordinates range.

Implements TVirtualPad.

Definition at line 2806 of file TPad.cxx.

void TPad::GetRangeAxis ( Double_t xmin,
Double_t ymin,
Double_t xmax,
Double_t ymax 
)
virtual

Return pad axis coordinates range.

Implements TVirtualPad.

Definition at line 2817 of file TPad.cxx.

TObject * TPad::GetSelected ( ) const
virtual

Get selected.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2599 of file TPad.cxx.

TVirtualPad * TPad::GetSelectedPad ( ) const
virtual

Get selected pad.

Implements TVirtualPad.

Definition at line 2608 of file TPad.cxx.

Double_t TPad::GetTheta ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 225 of file TPad.h.

Referenced by SavePrimitive().

Int_t TPad::GetTickx ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 233 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), SavePrimitive(), and TPadEditor::SetModel().

Int_t TPad::GetTicky ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 234 of file TPad.h.

Referenced by TCanvas::DrawClonePad(), SavePrimitive(), and TPadEditor::SetModel().

const char* TPad::GetTitle ( ) const
inlinevirtual

Returns title of object.

This default method returns the class title (i.e. description). Classes that give objects a title should override this method.

Implements TVirtualPad.

Definition at line 256 of file TPad.h.

Referenced by BuildLegend(), Divide(), TGroupButton::ExecuteEvent(), TCanvas::HandleInput(), TCanvas::ls(), ls(), TButton::PaintModified(), TProofBenchRunCPU::Print(), TProofBenchRunDataRead::Print(), TGroupButton::SavePrimitive(), TSlider::SavePrimitive(), TButton::SavePrimitive(), SavePrimitive(), and TCanvas::SaveSource().

Double_t TPad::GetUxmax ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 228 of file TPad.h.

Referenced by TMVA::StatDialogMVAEffs::DrawHistograms(), and ExecuteEventAxis().

Double_t TPad::GetUxmin ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 226 of file TPad.h.

Referenced by ExecuteEventAxis().

Double_t TPad::GetUymax ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 229 of file TPad.h.

Referenced by TMVA::StatDialogMVAEffs::DrawHistograms(), and ExecuteEventAxis().

Double_t TPad::GetUymin ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 227 of file TPad.h.

Referenced by TMVA::StatDialogMVAEffs::DrawHistograms(), and ExecuteEventAxis().

TView* TPad::GetView ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 249 of file TPad.h.

Referenced by ExecuteEventAxis(), and SavePrimitive().

TObject* TPad::GetView3D ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 250 of file TPad.h.

TVirtualViewer3D * TPad::GetViewer3D ( Option_t type = "")
virtual

Create/obtain handle to 3D viewer.

Valid types are:

  • 'pad' - pad drawing via TViewer3DPad any others registered with plugin manager supporting TVirtualViewer3D If an invalid/null type is requested then the current viewer is returned (if any), otherwise a default 'pad' type is returned

Implements TVirtualPad.

Reimplemented in TEvePad.

Definition at line 6335 of file TPad.cxx.

Referenced by Paint(), PaintModified(), and x3d().

TVirtualPad * TPad::GetVirtCanvas ( ) const
virtual

Get virtual canvas.

Implements TVirtualPad.

Definition at line 2575 of file TPad.cxx.

Referenced by TInspectCanvas::InspectObject().

UInt_t TPad::GetWh ( ) const
virtual

Get Wh.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2626 of file TPad.cxx.

Referenced by DrawCrosshair(), PaintBorder(), and Pick().

Double_t TPad::GetWNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 215 of file TPad.h.

Referenced by ls().

UInt_t TPad::GetWw ( ) const
virtual

Get Ww.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2634 of file TPad.cxx.

Referenced by PaintBorder(), and Pick().

Double_t TPad::GetX1 ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 235 of file TPad.h.

Double_t TPad::GetX2 ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 236 of file TPad.h.

Referenced by ExecuteEventAxis(), and Print().

Double_t TPad::GetXlowNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 213 of file TPad.h.

Referenced by Pick().

Double_t TPad::GetY1 ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 237 of file TPad.h.

Referenced by Print().

Double_t TPad::GetY2 ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 238 of file TPad.h.

Double_t TPad::GetYlowNDC ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 214 of file TPad.h.

Referenced by Pick().

Bool_t TPad::HasCrosshair ( ) const
virtual

Return kTRUE if the crosshair has been activated (via SetCrosshair).

Implements TVirtualPad.

Definition at line 5838 of file TPad.cxx.

Referenced by TPadEditor::SetModel().

Bool_t TPad::HasFixedAspectRatio ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 265 of file TPad.h.

Referenced by ExecuteEvent(), and TPadEditor::SetModel().

ULong_t TPad::Hash ( ) const
inlinevirtual

Return hash value for this object.

Reimplemented from TObject.

Definition at line 262 of file TPad.h.

virtual Bool_t TPad::HasViewer3D ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 384 of file TPad.h.

void TPad::HideToolTip ( Int_t  event)
protectedvirtual

Hide tool tip depending on the event type.

Typically tool tips are hidden when event is not a kMouseEnter and not a kMouseMotion event.

Definition at line 2644 of file TPad.cxx.

Referenced by TButton::ExecuteEvent(), and ExecuteEvent().

void TPad::HighLight ( Color_t  color = kRed,
Bool_t  set = kTRUE 
)
virtual

Highlight pad.

do not highlight when printing on Postscript

Implements TVirtualPad.

Definition at line 2829 of file TPad.cxx.

Referenced by CopyPixmap(), and TCanvas::Flush().

Bool_t TPad::IsBatch ( ) const
virtual

Is pad in batch mode ?

Implements TVirtualPad.

Reimplemented in TCanvas, and TEvePad.

Definition at line 2653 of file TPad.cxx.

Referenced by PaintBorder(), and Print().

virtual Bool_t TPad::IsEditable ( ) const
inlinevirtual
Bool_t TPad::IsFolder ( ) const
inlinevirtual

Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).

Reimplemented from TObject.

Definition at line 268 of file TPad.h.

Bool_t TPad::IsModified ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 269 of file TPad.h.

Referenced by PaintModified().

Bool_t TPad::IsRetained ( ) const
virtual

Is pad retained ?

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2661 of file TPad.cxx.

virtual Bool_t TPad::IsVertical ( ) const
inlinevirtual

Implements TVirtualPad.

Definition at line 271 of file TPad.h.

Referenced by ExecuteEventAxis().

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

List all primitives in pad.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2864 of file TPad.cxx.

Referenced by TCanvas::ls().

void TPad::Modified ( Bool_t  flag = 1)
inlinevirtual
Bool_t TPad::OpaqueMoving ( ) const
virtual

Is pad moving in opaque mode ?

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2669 of file TPad.cxx.

Referenced by ExecuteEvent().

Bool_t TPad::OpaqueResizing ( ) const
virtual

Is pad resizing in opaque mode ?

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2677 of file TPad.cxx.

Referenced by ExecuteEvent().

TPad& TPad::operator= ( const TPad rhs)
private
Double_t TPad::PadtoX ( Double_t  x) const
virtual

Convert x from pad to X.

Implements TVirtualPad.

Definition at line 2878 of file TPad.cxx.

Referenced by ExecuteEventAxis().

Double_t TPad::PadtoY ( Double_t  y) const
virtual

Convert y from pad to Y.

Implements TVirtualPad.

Definition at line 2887 of file TPad.cxx.

Referenced by ExecuteEventAxis().

void TPad::Paint ( Option_t option = "")
virtual

Paint all primitives in pad.

Implements TVirtualPad.

Reimplemented in TCanvas, TButton, and TSlider.

Definition at line 2920 of file TPad.cxx.

Referenced by Draw(), TSlider::Paint(), TButton::Paint(), TCanvas::Paint(), and Print().

void TPad::PaintBorder ( Color_t  color,
Bool_t  tops 
)
protected

Paint the pad border.

Draw first a box as a normal filled box

Definition at line 2982 of file TPad.cxx.

Referenced by TCanvas::Build(), Clear(), HighLight(), Paint(), and PaintModified().

void TPad::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 
)
protectedvirtual

Paint a frame border with Postscript.

Implements TVirtualPad.

Definition at line 3078 of file TPad.cxx.

Referenced by PaintBorder().

void TPad::PaintBox ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2,
Option_t option = "" 
)
virtual

Paint box in CurrentPad World coordinates.

  • if option[0] = 's' the box is forced to be paint with style=0
  • if option[0] = 'l' the box contour is drawn

Implements TVirtualPad.

Definition at line 3224 of file TPad.cxx.

Referenced by PaintBorder().

void TPad::PaintDate ( )
protected

Paint the current date and time if the option date is on.

Definition at line 3087 of file TPad.cxx.

Referenced by Paint(), and PaintModified().

void TPad::PaintFillArea ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
virtual

Implements TVirtualPad.

Definition at line 3344 of file TPad.cxx.

void TPad::PaintFillArea ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
virtual

Paint fill area in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3352 of file TPad.cxx.

void TPad::PaintFillAreaHatches ( Int_t  nn,
Double_t xx,
Double_t yy,
Int_t  FillStyle 
)

This function paints hatched fill area according to the FillStyle value The convention for the Hatch is the following:

FillStyle = 3ijk

  • i (1-9) : specify the space between each hatch 1 = minimum 9 = maximum the final spacing is i*GetHatchesSpacing(). The hatches spacing is set by SetHatchesSpacing()
  • j (0-9) : specify angle between 0 and 90 degrees
    • 0 = 0
    • 1 = 10
    • 2 = 20
    • 3 = 30
    • 4 = 45
    • 5 = Not drawn
    • 6 = 60
    • 7 = 70
    • 8 = 80
    • 9 = 90
  • k (0-9) : specify angle between 90 and 180 degrees
    • 0 = 180
    • 1 = 170
    • 2 = 160
    • 3 = 150
    • 4 = 135
    • 5 = Not drawn
    • 6 = 120
    • 7 = 110
    • 8 = 100
    • 9 = 90

Definition at line 3431 of file TPad.cxx.

Referenced by PaintBox(), and PaintFillArea().

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

Definition at line 3493 of file TPad.cxx.

Referenced by PaintFillAreaHatches().

void TPad::PaintLine ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2 
)
virtual

Paint line in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3645 of file TPad.cxx.

Referenced by PaintLine3D().

void TPad::PaintLine3D ( Float_t p1,
Float_t p2 
)
virtual

Paint 3-D line in the CurrentPad.

Implements TVirtualPad.

Definition at line 3690 of file TPad.cxx.

Referenced by PaintPolyLine3D().

void TPad::PaintLine3D ( Double_t p1,
Double_t p2 
)
virtual

Paint 3-D line in the CurrentPad.

Implements TVirtualPad.

Definition at line 3708 of file TPad.cxx.

void TPad::PaintLineNDC ( Double_t  u1,
Double_t  v1,
Double_t  u2,
Double_t  v2 
)
virtual

Paint line in normalized coordinates.

Implements TVirtualPad.

Definition at line 3670 of file TPad.cxx.

void TPad::PaintModified ( )
virtual

Traverse pad hierarchy and (re)paint only modified pads.

Implements TVirtualPad.

Reimplemented in TButton.

Definition at line 3137 of file TPad.cxx.

Referenced by TButton::PaintModified(), TEvePad::Update(), and TCanvas::Update().

void TPad::PaintPadFrame ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax 
)
virtual

Paint histogram/graph frame.

Implements TVirtualPad.

Definition at line 3118 of file TPad.cxx.

void TPad::PaintPolyLine ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
virtual

Paint polyline in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3726 of file TPad.cxx.

void TPad::PaintPolyLine ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
virtual

Paint polyline in CurrentPad World coordinates.

If option[0] == 'C' no clipping

Implements TVirtualPad.

Definition at line 3773 of file TPad.cxx.

void TPad::PaintPolyLine3D ( Int_t  n,
Double_t p 
)
virtual

Paint 3-D polyline in the CurrentPad.

Implements TVirtualPad.

Definition at line 3848 of file TPad.cxx.

void TPad::PaintPolyLineNDC ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
virtual

Paint polyline in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 3824 of file TPad.cxx.

void TPad::PaintPolyMarker ( Int_t  n,
Float_t x,
Float_t y,
Option_t option = "" 
)
virtual

Paint polymarker in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3862 of file TPad.cxx.

void TPad::PaintPolyMarker ( Int_t  n,
Double_t x,
Double_t y,
Option_t option = "" 
)
virtual

Paint polymarker in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3893 of file TPad.cxx.

void TPad::PaintText ( Double_t  x,
Double_t  y,
const char *  text 
)
virtual

Paint text in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3924 of file TPad.cxx.

void TPad::PaintText ( Double_t  x,
Double_t  y,
const wchar_t *  text 
)
virtual

Paint text in CurrentPad World coordinates.

Implements TVirtualPad.

Definition at line 3937 of file TPad.cxx.

void TPad::PaintTextNDC ( Double_t  u,
Double_t  v,
const char *  text 
)
virtual

Paint text in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 3950 of file TPad.cxx.

void TPad::PaintTextNDC ( Double_t  u,
Double_t  v,
const wchar_t *  text 
)
virtual

Paint text in CurrentPad NDC coordinates.

Implements TVirtualPad.

Definition at line 3967 of file TPad.cxx.

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

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 in TCanvas.

Definition at line 3994 of file TPad.cxx.

Referenced by Pick().

Double_t TPad::PixeltoX ( Int_t  px)
inlinevirtual

Implements TVirtualPad.

Definition at line 423 of file TPad.h.

Referenced by PixeltoXY(), and TSlider::TSlider().

void TPad::PixeltoXY ( Int_t  xpixel,
Int_t  ypixel,
Double_t x,
Double_t y 
)
inlinevirtual

Definition at line 439 of file TPad.h.

Double_t TPad::PixeltoY ( Int_t  py)
inlinevirtual

Implements TVirtualPad.

Definition at line 431 of file TPad.h.

Referenced by PixeltoXY(), and TSlider::TSlider().

void TPad::Pop ( )
virtual

Pop pad to the top of the stack.

Implements TVirtualPad.

Definition at line 4104 of file TPad.cxx.

Referenced by ExecuteEvent().

void TPad::Print ( const char *  filename = "") const
virtual

Save Pad contents in a file in one of various formats.

  • if filename is "", the file produced is padname.ps
  • if filename starts with a dot, the padname is added in front
  • if filename contains .eps, an Encapsulated Postscript file is produced
  • if filename contains .gif, a GIF file is produced
  • if filename contains .gif+NN, an animated GIF file is produced See comments in TASImage::WriteImage for meaning of NN and other .gif suffix variants
  • if filename contains .C or .cxx, a C++ macro file is produced
  • if filename contains .root, a Root file is produced
  • if filename contains .xml, a XML file is produced

See comments in TPad::SaveAs or the TPad::Print function below

Implements TVirtualPad.

Definition at line 4138 of file TPad.cxx.

Referenced by compareFunctions(), TMVA::TMVAGlob::imgconv(), pirndm(), and SaveAs().

void TPad::Print ( const char *  filenam,
Option_t option 
)
virtual

Save Canvas contents in a file in one of various formats.

option can be:

  • 0 - as "ps"
  • "ps" - Postscript file is produced (see special cases below)
  • "Portrait" - Postscript file is produced (Portrait)
  • "Landscape" - Postscript file is produced (Landscape)
  • "Title:" - The character string after "Title:" becomes a table
  • of content entry (for PDF files).
  • "eps" - an Encapsulated Postscript file is produced
  • "Preview" - an Encapsulated Postscript file with preview is produced.
  • "pdf" - a PDF file is produced
  • "svg" - a SVG file is produced
  • "tex" - a TeX file is produced
  • "gif" - a GIF file is produced
  • "gif+NN" - an animated GIF file is produced, where NN is delay in 10ms units NOTE: See other variants for looping animation in TASImage::WriteImage
  • "xpm" - a XPM file is produced
  • "png" - a PNG file is produced
  • "jpg" - a JPEG file is produced. NOTE: JPEG's lossy compression will make all sharp edges fuzzy.
    • "tiff" - a TIFF file is produced
    • "cxx" - a C++ macro file is produced
    • "xml" - a XML file
    • "root" - a ROOT binary file

filename = 0 - filename is defined by the GetName and its extension is defined with the option

When Postscript output is selected (ps, eps), the canvas is saved to filename.ps or filename.eps. The aspect ratio of the canvas is preserved on the Postscript file. When the "ps" option is selected, the Postscript page will be landscape format if the canvas is in landscape format, otherwise portrait format is selected.

The physical size of the Postscript page is the one selected in the current style. This size can be modified via TStyle::SetPaperSize.

Examples:

where TStyle::kA4 and TStyle::kUSLetter are defined in the enum EPaperSize in TStyle.h

An alternative is to call:

gStyle->SetPaperSize(20,26); same as kA4
or gStyle->SetPaperSize(20,24); same as kUSLetter

The above numbers take into account some margins and are in centimeters.

The "Preview" option allows to generate a preview (in the TIFF format) within the Encapsulated Postscript file. This preview can be used by programs like MSWord to visualize the picture on screen. The "Preview" option relies on the epstool command (http://www.cs.wisc.edu/~ghost/gsview/epstool.htm).

Example:

canvas->Print("example.eps","Preview");

To generate a Postscript file containing more than one picture, see class TPostScript.

Writing several canvases to the same Postscript or PDF file:

  • if the Postscript or PDF file name finishes with "(", the file is not closed
  • if the Postscript or PDF file name finishes with ")" and the file has been opened with "(", the file is closed.

Example:

{
TCanvas c1("c1");
h1.Draw();
c1.Print("c1.ps("); //write canvas and keep the ps file open
h2.Draw();
c1.Print("c1.ps"); canvas is added to "c1.ps"
h3.Draw();
c1.Print("c1.ps)"); canvas is added to "c1.ps" and ps file is closed
}

In the previous example replacing "ps" by "pdf" will create a multi-pages PDF file.

Note that the following sequence writes the canvas to "c1.ps" and closes the ps file.:

TCanvas c1("c1");
h1.Draw();
c1.Print("c1.ps");

The TCanvas::Print("file.ps(") mechanism is very useful, but it can be a little inconvenient to have the action of opening/closing a file being atomic with printing a page. Particularly if pages are being generated in some loop one needs to detect the special cases of first and last page and then munge the argument to Print() accordingly.

The "[" and "]" can be used instead of "(" and ")".

Example:

c1.Print("file.ps["); // No actual print, just open file.ps
for (int i=0; i<10; ++i) {
// fill canvas for context i
// ...
c1.Print("file.ps"); // actually print canvas to file
}// end loop
c1.Print("file.ps]"); // No actual print, just close.

As before, the same macro is valid for PDF files.

It is possible to print a canvas into an animated GIF file by specifying the file name as "myfile.gif+" or "myfile.gif+NN", where NN*10ms is delay between the subimages' display. If NN is omitted the delay between subimages is zero. Each picture is added in the animation thanks to a loop similar to the following one:

for (int i=0; i<10; ++i) {
// fill canvas for context i
// ...
c1.Print("file.gif+5"); // print canvas to GIF file with 50ms delays
}// end loop

The delay between each frame must be specified in each Print() statement. If the file "myfile.gif" already exists, the new frame are appended at the end of the file. To avoid this, delete it first with gSystem->Unlink(myfile.gif); If you want the gif file to repeat or loop forever, check TASImage::WriteImage documentation

Implements TVirtualPad.

Definition at line 4293 of file TPad.cxx.

void TPad::Range ( Double_t  x1,
Double_t  y1,
Double_t  x2,
Double_t  y2 
)
virtual
void TPad::RangeAxis ( Double_t  xmin,
Double_t  ymin,
Double_t  xmax,
Double_t  ymax 
)
virtual

Set axis coordinate system for the pad.

The axis coordinate system is a subset of the world coordinate system xmin,ymin is the origin of the current coordinate system, xmax is the end of the X axis, ymax is the end of the Y axis. By default a margin of 10 per cent is left on all sides of the pad Emits signal "RangeAxisChanged()", in the slot get the axis range via GetRangeAxis().

Implements TVirtualPad.

Definition at line 4665 of file TPad.cxx.

virtual void TPad::RangeAxisChanged ( )
inlinevirtual

Definition at line 310 of file TPad.h.

Referenced by RangeAxis().

virtual void TPad::RangeChanged ( )
inlinevirtual

Definition at line 308 of file TPad.h.

Referenced by ExecuteEvent(), and Range().

void TPad::RecordLatex ( const TObject obj)
virtual

Emit RecordLatex() signal.

Definition at line 6439 of file TPad.cxx.

void TPad::RecordPave ( const TObject obj)
virtual

Emit RecordPave() signal.

Definition at line 6431 of file TPad.cxx.

void TPad::RecursiveRemove ( TObject obj)
virtual

Recursively remove object from a pad and its sub-pads.

Implements TVirtualPad.

Reimplemented in TInspectCanvas, and TDialogCanvas.

Definition at line 4685 of file TPad.cxx.

Referenced by TDialogCanvas::RecursiveRemove(), and TInspectCanvas::RecursiveRemove().

void TPad::RedrawAxis ( Option_t option = "")
virtual

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.

By default, if the pad has the options gridx or/and gridy activated, the grid is not drawn by this function. if option="g" is specified, this will force the drawing of the grid on top of the picture

Implements TVirtualPad.

Definition at line 4709 of file TPad.cxx.

void TPad::ReleaseViewer3D ( Option_t type = "")
virtual

Release current (external) viewer.

Implements TVirtualPad.

Definition at line 6407 of file TPad.cxx.

void TPad::ResetToolTip ( TObject tip)
virtual

Reset tool tip, i.e.

within time specified in CreateToolTip the tool tip will pop up.

Implements TVirtualPad.

Definition at line 6296 of file TPad.cxx.

Referenced by ExecuteEvent().

virtual void TPad::ResetView3D ( TObject view = 0)
inlinevirtual

Implements TVirtualPad.

Definition at line 313 of file TPad.h.

void TPad::ResizePad ( Option_t option = "")
virtual

Compute pad conversion coefficients.

Conversion from x to px

\[\frac{x-xmin}{xrange} = \frac{px-pxlow}{pxrange}\]

with:

\[ xrange = xmax-xmin \]

\[ pxrange = pxmax-pxmin \]

\[ \Rightarrow px = \frac{pxrange(x-xmin)}{xrange} + pxlow = fXtoPixelk + fXtoPixel \times x \]

\[ \Rightarrow fXtoPixelk = pxlow - pxrange \frac{xmin}{xrange} \]

\[ fXtoPixel = \frac{pxrange}{xrange} \]

where:

\[ pxlow = fAbsXlowNDC \times fCw \]

\[ pxrange = fAbsWNDC \times fCw \]

Conversion from y to py

\[\frac{y-ymin}{yrange} = \frac{py-pylow}{pyrange}\]

with:

\[ yrange = ymax-ymin \]

\[ pyrange = pymax-pymin \]

\[ \Rightarrow py = \frac{pyrange(y-xmin)}{yrange} + pylow = fYtoPixelk + fYtoPixel \times y \]

\[ \Rightarrow fYtoPixelk = pylow - pyrange \frac{ymin}{yrange} \]

\[ fYtoPixel = \frac{pyrange}{yrange} \]

where:

\[ pylow = fAbsYlowNDC \times fCh \]

\[ pyrange = fAbsHNDC \times fCh \]

Conversion from px to x

\[ \Rightarrow x = \frac{xrange(px-pxlow)}{pxrange}+ xmin = fPixeltoXk + fPixeltoX \times px \]

\[ \Rightarrow fPixeltoXk = xmin - pxlow \times\frac{xrange}{pxrange} \]

\[ fPixeltoX = \frac{xrange}{pxrange} \]

Conversion from py to y

\[ \Rightarrow y = \frac{yrange(py-pylow)}{pyrange}+ ymin = fPixeltoYk + fPixeltoY \times py \]

\[ \Rightarrow fPixeltoYk = ymin - pylow \times\frac{yrange}{pyrange} \]

\[ fPixeltoY = \frac{yrange}{pyrange} \]

Computation of the coefficients in case of LOG scales

Conversion from pixel coordinates to world coordinates

\[ u = \frac{Log(x) - Log(xmin)}{Log(xmax) - Log(xmin)} = \frac{Log(x/xmin)}{Log(xmax/xmin)} = \frac{px - pxlow}{pxrange} \]

\[ \Rightarrow Log(\frac{x}{xmin}) = u \times Log(\frac{xmax}{xmin}) \]

\[ x = xmin \times e^{(u \times Log(\frac{xmax}{xmin})} \]

Let:

\[ alfa = \frac{Log(\frac{xmax}{xmin})}{fAbsWNDC} \]

\[ x = xmin \times e^{(-alfa \times pxlow)} + e^{(alfa \times px)} \]

\[ x = fPixeltoXk \times e^{(fPixeltoX \times px)} \]

\[ ==> fPixeltoXk = xmin \times e^{(-alfa*pxlow)} \]

\[ fPixeltoX = alfa \]

\[ v = \frac{Log(y) - Log(ymin)}{Log(ymax) - Log(ymin)} = \frac{Log(y/ymin)}{Log(ymax/ymin)} = \frac{py - pylow}{pyrange} \]

Let:

\[ beta = Log(\frac{ymax}{ymin}) \]

\[ Log(\frac{y}{ymin}) = beta \times pylow - beta \times py \]

\[ \frac{y}{ymin} = e^{(beta \times pylow - beta \times py)} \]

\[ y = ymin \times e^{(beta \times pylow)} \times e^{(-beta \times py)}\]

\[ \Rightarrow y = fPixeltoYk \times e^{(fPixeltoY \times py)} \]

\[ fPixeltoYk = ymin \times e^{(beta \times pylow)} \]

\[ fPixeltoY = -beta \]

Conversion from World coordinates to pixel coordinates

\[ px = pxlow + u*pxrange \]

\[ = pxlow + Log(x/xmin)/alfa \]

\[ = pxlow -Log(xmin)/alfa + Log(x)/alfa \]

\[ = fXtoPixelk + fXtoPixel*Log(x) \]

\[ \Rightarrow fXtoPixelk = pxlow -Log(xmin)/alfa \]

\[ \Rightarrow fXtoPixel = 1/alfa \]

\[ py = pylow - Log(y/ymin)/beta \]

\[ = fYtoPixelk + fYtoPixel*Log(y) \]

\[ \Rightarrow fYtoPixelk = pylow - Log(ymin)/beta \]

\[ fYtoPixel = 1/beta \]

Implements TVirtualPad.

Definition at line 4877 of file TPad.cxx.

Referenced by TCanvas::Draw(), Draw(), ExecuteEvent(), Range(), TCanvas::Resize(), SetBBoxCenter(), SetBBoxCenterX(), SetBBoxCenterY(), SetBBoxX1(), SetBBoxX2(), SetBBoxY1(), SetBBoxY2(), TCanvas::SetCanvasSize(), and SetPad().

void TPad::SaveAs ( const char *  filename = "",
Option_t option = "" 
) const
virtual

Save Pad contents in a file in one of various formats.

  • if filename is "", the file produced is padname.ps
  • if filename starts with a dot, the padname is added in front
  • if filename contains .eps, an Encapsulated Postscript file is produced
  • if filename contains .pdf, a PDF file is produced
  • if filename contains .svg, a SVG file is produced
  • if filename contains .tex, a TeX file is produced
  • if filename contains .gif, a GIF file is produced
  • if filename contains .gif+NN, an animated GIF file is produced See comments in TASImage::WriteImage for meaning of NN and other .gif sufix variants
  • if filename contains .xpm, a XPM file is produced
  • if filename contains .png, a PNG file is produced
  • if filename contains .jpg, a JPEG file is produced NOTE: JPEG's lossy compression will make all sharp edges fuzzy.
  • if filename contains .tiff, a TIFF file is produced
  • if filename contains .C or .cxx, a C++ macro file is produced
  • if filename contains .root, a Root file is produced
  • if filename contains .xml, a XML file is produced

    See comments in TPad::Print for the Postscript formats

Implements TVirtualPad.

Definition at line 5009 of file TPad.cxx.

Referenced by RooStats::HypoTestInverterResult::CalculateEstimatedError(), ClassImp(), RooStats::HistFactory::FitModelAndPlot(), and TUnfold::ScanLcurve().

void TPad::SavePrimitive ( std::ostream &  out,
Option_t option = "" 
)
protectedvirtual

Save primitives in this pad on the C++ source file out.

Reimplemented from TObject.

Reimplemented in TCanvas, TButton, TSlider, and TGroupButton.

Definition at line 5070 of file TPad.cxx.

Referenced by TCanvas::SavePrimitive(), and TCanvas::SaveSource().

void TPad::SetAttFillPS ( Color_t  color,
Style_t  style 
)
virtual

Set postscript fill area attributes.

Implements TVirtualPad.

Definition at line 5400 of file TPad.cxx.

void TPad::SetAttLinePS ( Color_t  color,
Style_t  style,
Width_t  lwidth 
)
virtual

Set postscript line attributes.

Implements TVirtualPad.

Definition at line 5411 of file TPad.cxx.

void TPad::SetAttMarkerPS ( Color_t  color,
Style_t  style,
Size_t  msize 
)
virtual

Set postscript marker attributes.

Implements TVirtualPad.

Definition at line 5423 of file TPad.cxx.

void TPad::SetAttTextPS ( Int_t  align,
Float_t  angle,
Color_t  color,
Style_t  font,
Float_t  tsize 
)
virtual

Set postscript text attributes.

Implements TVirtualPad.

Definition at line 5435 of file TPad.cxx.

void TPad::SetBatch ( Bool_t  batch = kTRUE)
protectedvirtual

Set pad in batch mode.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2685 of file TPad.cxx.

void TPad::SetBBoxCenter ( const TPoint p)
virtual

Set center of the Pad.

Implements TAttBBox2D.

Definition at line 6484 of file TPad.cxx.

void TPad::SetBBoxCenterX ( const Int_t  x)
virtual

Set X coordinate of the center of the Pad.

Implements TAttBBox2D.

Definition at line 6494 of file TPad.cxx.

void TPad::SetBBoxCenterY ( const Int_t  y)
virtual

Set Y coordinate of the center of the Pad.

Implements TAttBBox2D.

Definition at line 6503 of file TPad.cxx.

void TPad::SetBBoxX1 ( const Int_t  x)
virtual

Set lefthandside of BoundingBox to a value (resize in x direction on left)

Implements TAttBBox2D.

Definition at line 6513 of file TPad.cxx.

void TPad::SetBBoxX2 ( const Int_t  x)
virtual

Set right hand side of BoundingBox to a value (resize in x direction on right)

Implements TAttBBox2D.

Definition at line 6524 of file TPad.cxx.

void TPad::SetBBoxY1 ( const Int_t  y)
virtual

Set top of BoundingBox to a value (resize in y direction on top)

Implements TAttBBox2D.

Definition at line 6533 of file TPad.cxx.

void TPad::SetBBoxY2 ( const Int_t  y)
virtual

Set bottom of BoundingBox to a value (resize in y direction on bottom)

Implements TAttBBox2D.

Definition at line 6543 of file TPad.cxx.

virtual void TPad::SetBorderMode ( Short_t  bordermode)
inlinevirtual
virtual void TPad::SetBorderSize ( Short_t  bordersize)
inlinevirtual
void TPad::SetCanvas ( TCanvas c)
inlinevirtual

Implements TVirtualPad.

Definition at line 318 of file TPad.h.

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

Set canvas size.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2693 of file TPad.cxx.

virtual void TPad::SetCopyGLDevice ( Bool_t  copy)
inlinevirtual

Implements TVirtualPad.

Definition at line 358 of file TPad.h.

void TPad::SetCrosshair ( Int_t  crhair = 1)
virtual

Set crosshair active/inactive.

  • If crhair != 0, a crosshair will be drawn in the pad and its sub-pads.
  • If the canvas crhair = 1 , the crosshair spans the full canvas.
  • If the canvas crhair > 1 , the crosshair spans only the pad.

Implements TVirtualPad.

Definition at line 5860 of file TPad.cxx.

Referenced by TPadEditor::DoCrosshair(), and SetCrosshair().

void TPad::SetCursor ( ECursor  cursor)
virtual

Set cursor type.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2701 of file TPad.cxx.

Referenced by TButton::ExecuteEvent(), ExecuteEvent(), and ExecuteEventAxis().

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

Set double buffer mode ON or OFF.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2709 of file TPad.cxx.

void TPad::SetDrawOption ( Option_t option = "")
inlinevirtual

Set drawing option for object.

This option only affects the drawing style and is stored in the option field of the TObjOptLink supporting a TPad's primitive list (TList). Note that it does not make sense to call object.SetDrawOption(option) before having called object.Draw().

Reimplemented from TObject.

Definition at line 531 of file TPad.h.

void TPad::SetEditable ( Bool_t  mode = kTRUE)
virtual

Set pad editable yes/no If a pad is not editable:

  • one cannot modify the pad and its objects via the mouse.
  • one cannot add new objects to the pad

Implements TVirtualPad.

Definition at line 5274 of file TPad.cxx.

Referenced by TPadEditor::DoEditable(), TSessionViewer::OnCascadeMenu(), SetEditable(), and TButton::TButton().

void TPad::SetFillStyle ( Style_t  fstyle)
virtual

Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.

Reimplemented from TAttFill.

Definition at line 5293 of file TPad.cxx.

Referenced by TCanvas::Build(), RooStats::LikelihoodIntervalPlot::Draw(), SetPad(), and ShowGuidelines().

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

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

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 5250 of file TPad.cxx.

Referenced by TPadEditor::DoFixedAspectRatio(), and SetPad().

virtual void TPad::SetGLDevice ( Int_t  dev)
inlinevirtual

Definition at line 357 of file TPad.h.

virtual void TPad::SetGrid ( Int_t  valuex = 1,
Int_t  valuey = 1 
)
inlinevirtual
virtual void TPad::SetGridx ( Int_t  value = 1)
inlinevirtual
virtual void TPad::SetGridy ( Int_t  value = 1)
inlinevirtual
void TPad::SetLogx ( Int_t  value = 1)
virtual

Set Lin/Log scale for X.

  • value = 0 X scale will be linear
  • value = 1 X scale will be logarithmic (base 10)
  • value > 1 reserved for possible support of base e or other

Implements TVirtualPad.

Reimplemented in TInspectCanvas, TButton, and TDialogCanvas.

Definition at line 5305 of file TPad.cxx.

Referenced by binarySearchTime(), TCanvas::Build(), TPadEditor::DoLogX(), TCanvas::DrawClonePad(), and TMemStatShow::Show().

void TPad::SetLogy ( Int_t  value = 1)
virtual

Set Lin/Log scale for Y.

  • value = 0 Y scale will be linear
  • value = 1 Y scale will be logarithmic (base 10)
  • value > 1 reserved for possible support of base e or other

Implements TVirtualPad.

Reimplemented in TInspectCanvas, TButton, and TDialogCanvas.

Definition at line 5318 of file TPad.cxx.

Referenced by TCanvas::Build(), TMVA::compareanapp(), compareFunctions(), TPadEditor::DoLogY(), TCanvas::DrawClonePad(), TMVA::probas(), TMVA::regression_averagedevs(), and TMemStatShow::Show().

void TPad::SetLogz ( Int_t  value = 1)
virtual

Set Lin/Log scale for Z.

Implements TVirtualPad.

Reimplemented in TInspectCanvas.

Definition at line 5328 of file TPad.cxx.

Referenced by TCanvas::Build(), TPadEditor::DoLogZ(), and TCanvas::DrawClonePad().

void TPad::SetMaxPickDistance ( Int_t  maxPick = 5)
static

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.

Setting a smaller value will make picking more precise but also more difficult

Definition at line 5875 of file TPad.cxx.

virtual void TPad::SetName ( const char *  name)
inlinevirtual

Implements TVirtualPad.

Reimplemented in TButton, and TDialogCanvas.

Definition at line 344 of file TPad.h.

Referenced by TCanvas::Constructor(), TCanvas::DrawClone(), TCanvas::SaveSource(), and TCanvas::TCanvas().

virtual void TPad::SetNumber ( Int_t  number)
inlinevirtual

Definition at line 333 of file TPad.h.

Referenced by Divide().

void TPad::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 
)
virtual

Set all pad parameters.

Implements TVirtualPad.

Definition at line 5367 of file TPad.cxx.

Referenced by TCanvas::Build(), TPad(), and TSlider::TSlider().

void TPad::SetPad ( Double_t  xlow,
Double_t  ylow,
Double_t  xup,
Double_t  yup 
)
virtual

Set canvas range for pad and resize the pad.

If the aspect ratio was fixed before the call it will be un-fixed.

Implements TVirtualPad.

Definition at line 5339 of file TPad.cxx.

virtual void TPad::SetPhi ( Double_t  phi = 30)
inlinevirtual

Implements TVirtualPad.

Definition at line 351 of file TPad.h.

void TPad::SetSelected ( TObject obj)
virtual

Set selected.

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 2717 of file TPad.cxx.

virtual void TPad::SetTheta ( Double_t  theta = 30)
inlinevirtual

Implements TVirtualPad.

Definition at line 350 of file TPad.h.

virtual void TPad::SetTicks ( Int_t  valuex = 1,
Int_t  valuey = 1 
)
inlinevirtual
virtual void TPad::SetTickx ( Int_t  value = 1)
inlinevirtual
virtual void TPad::SetTicky ( Int_t  value = 1)
inlinevirtual
virtual void TPad::SetTitle ( const char *  title = "")
inlinevirtual

Implements TVirtualPad.

Reimplemented in TCanvas.

Definition at line 349 of file TPad.h.

void TPad::SetToolTipText ( const char *  text,
Long_t  delayms = 1000 
)
virtual

Set tool tip text associated with this pad.

The delay is in milliseconds (minimum 250). To remove tool tip call method with text = 0.

Implements TVirtualPad.

Definition at line 5885 of file TPad.cxx.

Referenced by TInspectCanvas::InspectObject().

void TPad::SetVertical ( Bool_t  vert = kTRUE)
virtual

Set pad vertical (default) or horizontal.

Implements TVirtualPad.

Definition at line 5899 of file TPad.cxx.

void TPad::SetView ( TView view = 0)
virtual

Set the current TView. Delete previous view if view=0.

Implements TVirtualPad.

Definition at line 5391 of file TPad.cxx.

Referenced by ExecuteEventAxis().

virtual void TPad::SetViewer3D ( TVirtualViewer3D viewer3d)
inlinevirtual

Reimplemented from TVirtualPad.

Definition at line 355 of file TPad.h.

Referenced by TEveGeoPolyShape::Construct(), and TEveGeoNode::DumpShapeTree().

void TPad::ShowGuidelines ( TObject object,
const Int_t  event,
const char  mode = 'i',
const bool  cling = true 
)
virtual

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.

modes: t (Top), b (bottom), l (left), r (right), i (inside) in resize modes (t,b,l,r) only size arrows are sticky

in mode, the function gets the point on the element that is clicked to move (i) or resize (all others). The expected values are:

gpad_pad5.png

Implements TVirtualPad.

Definition at line 5546 of file TPad.cxx.

Referenced by ExecuteEvent().

virtual void TPad::StartEditing ( )
inlinevirtual

Definition at line 400 of file TPad.h.

void TPad::Update ( )
virtual
void TPad::UseCurrentStyle ( )
virtual

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

Reimplemented from TObject.

Reimplemented in TCanvas.

Definition at line 6117 of file TPad.cxx.

Referenced by TCanvas::UseCurrentStyle().

Int_t TPad::UtoAbsPixel ( Double_t  u) const
inlinevirtual

Implements TVirtualPad.

Definition at line 362 of file TPad.h.

Referenced by TMVA::TMVAGlob::plot_logo().

Int_t TPad::UtoPixel ( Double_t  u) const
inlinevirtual

Implements TVirtualPad.

Definition at line 447 of file TPad.h.

Referenced by Print().

Int_t TPad::VtoAbsPixel ( Double_t  v) const
inlinevirtual

Implements TVirtualPad.

Definition at line 363 of file TPad.h.

Referenced by TMVA::TMVAGlob::plot_logo().

Int_t TPad::VtoPixel ( Double_t  v) const
inlinevirtual

Implements TVirtualPad.

Definition at line 459 of file TPad.h.

Referenced by Print().

TObject * TPad::WaitPrimitive ( const char *  pname = "",
const char *  emode = "" 
)
virtual

Loop and sleep until a primitive with name=pname is found in the pad.

If emode is given, the editor is automatically set to emode, ie it is not required to have the editor control bar.

The possible values for emode are:

  • emode = "" (default). User will select the mode via the editor bar
  • emode = "Arc", "Line", "Arrow", "Button", "Diamond", "Ellipse",
  • emode = "Pad","pave", "PaveLabel","PaveText", "PavesText",
  • emode = "PolyLine", "CurlyLine", "CurlyArc", "Text", "Marker", "CutG"

If emode is specified and it is not valid, "PolyLine" is assumed. If emode is not specified or ="", an attempt is to use pname[1...]

for example if pname="TArc", emode="Arc" will be assumed. When this function is called within a macro, the macro execution is suspended until a primitive corresponding to the arguments is found in the pad.

If CRTL/C is typed in the pad, the function returns 0.

While this function is executing, one can use the mouse, interact with the graphics pads, use the Inspector, Browser, TreeViewer, etc.

Examples:

c1.WaitPrimitive(); // Return the first created primitive
// whatever it is.
// If a double-click with the mouse is executed
// in the pad or any key pressed, the function
// returns 0.
c1.WaitPrimitive("ggg"); // Set the editor in mode "PolyLine/Graph"
// Create a polyline, then using the context
// menu item "SetName", change the name
// of the created TGraph to "ggg"
c1.WaitPrimitive("TArc");// Set the editor in mode "Arc". Returns
// as soon as a TArc object is created.
c1.WaitPrimitive("lat","Text"); // Set the editor in Text/Latex mode.
// Create a text object, then Set its name to "lat"

The following macro waits for 10 primitives of any type to be created.

{
TCanvas c1("c1");
for (Int_t i=0;i<10;i++) {
obj = gPad->WaitPrimitive();
if (!obj) break;
printf("Loop i=%d, found objIsA=%s, name=%s\n",
i,obj->ClassName(),obj->GetName());
}
}

Implements TVirtualPad.

Definition at line 6235 of file TPad.cxx.

void TPad::x3d ( Option_t type = "")
virtual

Deprecated: use TPad::GetViewer3D() instead.

Reimplemented in TInspectCanvas, TButton, and TDialogCanvas.

Definition at line 6317 of file TPad.cxx.

Int_t TPad::XtoAbsPixel ( Double_t  x) const
inlinevirtual

Implements TVirtualPad.

Definition at line 471 of file TPad.h.

Referenced by DrawCrosshair(), TButton::ExecuteEvent(), ExecuteEvent(), ExecuteEventAxis(), and XYtoAbsPixel().

Double_t TPad::XtoPad ( Double_t  x) const
virtual

Convert x from X to pad.

Implements TVirtualPad.

Definition at line 2896 of file TPad.cxx.

Int_t TPad::XtoPixel ( Double_t  x) const
inlinevirtual

Implements TVirtualPad.

Definition at line 481 of file TPad.h.

Referenced by PaintBorder(), Print(), ResizePad(), and XYtoPixel().

void TPad::XYtoAbsPixel ( Double_t  x,
Double_t  y,
Int_t xpixel,
Int_t ypixel 
) const
inlinevirtual

Definition at line 515 of file TPad.h.

Referenced by CopyBackgroundPixmap(), CopyPixmap(), and PaintBox().

void TPad::XYtoPixel ( Double_t  x,
Double_t  y,
Int_t xpixel,
Int_t ypixel 
) const
inlinevirtual

Definition at line 523 of file TPad.h.

Int_t TPad::YtoAbsPixel ( Double_t  y) const
inlinevirtual

Implements TVirtualPad.

Definition at line 493 of file TPad.h.

Referenced by DrawCrosshair(), TButton::ExecuteEvent(), ExecuteEvent(), ExecuteEventAxis(), and XYtoAbsPixel().

Double_t TPad::YtoPad ( Double_t  y) const
virtual

Convert y from Y to pad.

Implements TVirtualPad.

Definition at line 2908 of file TPad.cxx.

Int_t TPad::YtoPixel ( Double_t  y) const
inlinevirtual

Implements TVirtualPad.

Definition at line 503 of file TPad.h.

Referenced by TGroupButton::ExecuteAction(), PaintBorder(), Print(), ResizePad(), and XYtoPixel().

Member Data Documentation

Bool_t TPad::fAbsCoord
protected

Definition at line 118 of file TPad.h.

Referenced by PixeltoX(), PixeltoY(), TPad(), UtoPixel(), VtoPixel(), XtoPixel(), and YtoPixel().

Double_t TPad::fAbsHNDC
protected

Definition at line 88 of file TPad.h.

Referenced by GetAbsHNDC(), ResizePad(), and TSlider::SetRange().

Double_t TPad::fAbsPixeltoXk
protected

Definition at line 71 of file TPad.h.

Referenced by PixeltoX(), and ResizePad().

Double_t TPad::fAbsPixeltoYk
protected

Definition at line 74 of file TPad.h.

Referenced by PixeltoY(), and ResizePad().

Double_t TPad::fAbsWNDC
protected

Definition at line 87 of file TPad.h.

Referenced by GetAbsWNDC(), ResizePad(), and TSlider::SetRange().

Double_t TPad::fAbsXlowNDC
protected

Definition at line 85 of file TPad.h.

Referenced by GetAbsXlowNDC(), and ResizePad().

Double_t TPad::fAbsYlowNDC
protected

Definition at line 86 of file TPad.h.

Referenced by GetAbsYlowNDC(), and ResizePad().

Double_t TPad::fAspectRatio
protected
Short_t TPad::fBorderMode
protected
Short_t TPad::fBorderSize
protected
TCanvas* TPad::fCanvas
protected
Bool_t TPad::fCopyGLDevice
protected

OpenGL off-screen pixmap identifier.

Definition at line 102 of file TPad.h.

Referenced by GetViewer3D(), and TPad().

Int_t TPad::fCrosshair
protected

Definition at line 111 of file TPad.h.

Referenced by GetCrosshair(), SetCrosshair(), and TPad().

Int_t TPad::fCrosshairPos
protected

Definition at line 112 of file TPad.h.

Referenced by Clear(), DrawCrosshair(), SetCrosshair(), and TPad().

Bool_t TPad::fEditable
protected

Definition at line 119 of file TPad.h.

Referenced by IsEditable(), SetEditable(), and TPad().

Bool_t TPad::fEmbeddedGL
protected

Definition at line 103 of file TPad.h.

Referenced by GetViewer3D(), Pick(), and TPad().

TList* TPad::fExecs
protected

Definition at line 124 of file TPad.h.

Referenced by AddExec(), AutoExec(), DeleteExec(), GetListOfExecs(), TPad(), and ~TPad().

Bool_t TPad::fFixedAspectRatio
protected
TFrame* TPad::fFrame
protected

Definition at line 127 of file TPad.h.

Referenced by Clear(), Close(), GetFrame(), PaintPadFrame(), SavePrimitive(), and TPad().

Int_t TPad::fGLDevice
protected

Off-screen pixmap identifier.

Definition at line 101 of file TPad.h.

Referenced by TCanvas::DeleteCanvasPainter(), TCanvas::Flush(), GetGLDevice(), TCanvas::TCanvas(), and TPad().

Int_t TPad::fgMaxPickDistance = 5
staticprotected

3D View of this TPad

Definition at line 131 of file TPad.h.

Referenced by GetMaxPickDistance(), Pick(), and SetMaxPickDistance().

Bool_t TPad::fGridx
protected

Definition at line 116 of file TPad.h.

Referenced by GetGridx(), and TPad().

Bool_t TPad::fGridy
protected

Definition at line 117 of file TPad.h.

Referenced by GetGridy(), and TPad().

Double_t TPad::fHNDC
protected
Int_t TPad::fLogx
protected
Int_t TPad::fLogy
protected
Int_t TPad::fLogz
protected

Definition at line 109 of file TPad.h.

Referenced by GetLogz(), SetLogz(), TPad(), and UseCurrentStyle().

Bool_t TPad::fModified
protected

Definition at line 115 of file TPad.h.

Referenced by IsModified(), Modified(), RecursiveRemove(), TButton::TButton(), and TPad().

TPad* TPad::fMother
protected
TString TPad::fName
protected

Definition at line 125 of file TPad.h.

Referenced by TDialogCanvas::SetName(), TButton::SetName(), and SetPad().

Int_t TPad::fNumber
protected

Definition at line 104 of file TPad.h.

Referenced by GetNumber(), and TPad().

Int_t TPad::fPadPaint
protected

Definition at line 110 of file TPad.h.

Referenced by Clear(), GetPadPaint(), Paint(), PaintModified(), and TPad().

TObject* TPad::fPadPointer
protected

Pointer to 3-D view (if one exists)

Definition at line 129 of file TPad.h.

Referenced by GetPadPointer(), Pick(), and TPad().

TObject* TPad::fPadView3D
protected

free pointer

Definition at line 130 of file TPad.h.

Referenced by GetView3D(), and TPad().

Double_t TPad::fPhi
protected

Definition at line 96 of file TPad.h.

Referenced by GetPhi(), and TPad().

Double_t TPad::fPixeltoX
protected

Definition at line 73 of file TPad.h.

Referenced by AbsPixeltoX(), PixeltoX(), and ResizePad().

Double_t TPad::fPixeltoXk
protected

Definition at line 72 of file TPad.h.

Referenced by PixeltoX(), and ResizePad().

Double_t TPad::fPixeltoY
protected

Definition at line 76 of file TPad.h.

Referenced by AbsPixeltoY(), PixeltoY(), and ResizePad().

Double_t TPad::fPixeltoYk
protected

Definition at line 75 of file TPad.h.

Referenced by PixeltoY(), and ResizePad().

Int_t TPad::fPixmapID
protected
TList* TPad::fPrimitives
protected
Double_t TPad::fTheta
protected

Definition at line 95 of file TPad.h.

Referenced by GetTheta(), and TPad().

Int_t TPad::fTickx
protected

Definition at line 105 of file TPad.h.

Referenced by GetTickx(), TPad(), and UseCurrentStyle().

Int_t TPad::fTicky
protected

Definition at line 106 of file TPad.h.

Referenced by GetTicky(), TPad(), and UseCurrentStyle().

TObject* TPad::fTip
private

Definition at line 49 of file TPad.h.

Referenced by ExecuteEvent(), HideToolTip(), SetToolTipText(), TPad(), and ~TPad().

TString TPad::fTitle
protected

Definition at line 126 of file TPad.h.

Referenced by SetPad(), and TCanvas::SetTitle().

Double_t TPad::fUtoAbsPixelk
protected

Definition at line 64 of file TPad.h.

Referenced by ResizePad(), and UtoPixel().

Double_t TPad::fUtoPixel
protected

Definition at line 66 of file TPad.h.

Referenced by ResizePad(), and UtoPixel().

Double_t TPad::fUtoPixelk
protected

Definition at line 65 of file TPad.h.

Referenced by ResizePad().

Double_t TPad::fUxmax
protected
Double_t TPad::fUxmin
protected
Double_t TPad::fUymax
protected
Double_t TPad::fUymin
protected
TView* TPad::fView
protected

Pointer to 2-D frame (if one exists)

Definition at line 128 of file TPad.h.

Referenced by Clear(), Close(), GetView(), PaintLine3D(), PaintPolyLine3D(), Pick(), RecursiveRemove(), ResizePad(), SetLogx(), SetLogy(), SetLogz(), SetView(), and TPad().

TVirtualViewer3D* TPad::fViewer3D
protected
Double_t TPad::fVtoAbsPixelk
protected

Definition at line 67 of file TPad.h.

Referenced by ResizePad(), and VtoPixel().

Double_t TPad::fVtoPixel
protected

Definition at line 69 of file TPad.h.

Referenced by ResizePad(), and VtoPixel().

Double_t TPad::fVtoPixelk
protected

Definition at line 68 of file TPad.h.

Referenced by ResizePad(), and VtoPixel().

Double_t TPad::fWNDC
protected
Double_t TPad::fX1
protected
Double_t TPad::fX2
protected
Double_t TPad::fXlowNDC
protected
Double_t TPad::fXtoAbsPixelk
protected

Definition at line 57 of file TPad.h.

Referenced by ResizePad(), XtoAbsPixel(), and XtoPixel().

Double_t TPad::fXtoPixel
protected

Definition at line 59 of file TPad.h.

Referenced by ResizePad(), XtoAbsPixel(), and XtoPixel().

Double_t TPad::fXtoPixelk
protected

Definition at line 58 of file TPad.h.

Referenced by ResizePad(), and XtoPixel().

Double_t TPad::fXUpNDC
protected

Definition at line 80 of file TPad.h.

Referenced by ExecuteEvent(), and SetBBoxX1().

Double_t TPad::fY1
protected
Double_t TPad::fY2
protected
Double_t TPad::fYlowNDC
protected
Double_t TPad::fYtoAbsPixelk
protected

Definition at line 60 of file TPad.h.

Referenced by ResizePad(), YtoAbsPixel(), and YtoPixel().

Double_t TPad::fYtoPixel
protected

Definition at line 62 of file TPad.h.

Referenced by ResizePad(), YtoAbsPixel(), and YtoPixel().

Double_t TPad::fYtoPixelk
protected

Definition at line 61 of file TPad.h.

Referenced by ResizePad(), and YtoPixel().

Double_t TPad::fYUpNDC
protected

Definition at line 81 of file TPad.h.

Referenced by ExecuteEvent(), and SetBBoxY2().


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