25 #ifndef ROOT_TVirtualPad
28 #ifndef ROOT_TAttBBox2D
174 virtual void AddExec(
const char *
name,
const char *command);
334 virtual void SetPad(
const char *
name,
const char *title,
349 virtual void SetTitle(
const char *title=
"") {fTitle = title;}
Double_t PadtoY(Double_t y) const
Convert y from pad to Y.
virtual TCanvasImp * GetCanvasImp() const
Get canvas implementation pointer if any.
Double_t PadtoX(Double_t x) const
Convert x from pad to X.
virtual TObject * GetSelected() const
Get selected.
virtual void SetGridx(Int_t value=1)
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.
virtual void SetTickx(Int_t value=1)
Double_t GetUxmin() const
void PaintLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2)
Paint line in normalized coordinates.
virtual void DrawClassObject(const TObject *obj, Option_t *option="")
Draw class inheritance tree of the class to which obj belongs.
TList * fPrimitives
Pointer to mother canvas.
virtual TObject * GetPrimitive(const char *name) const
Get primitive.
virtual void ResizePad(Option_t *option="")
Compute pad conversion coefficients.
virtual TCanvas * GetCanvas() const
Double_t GetAbsWNDC() const
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area)...
virtual void SetDrawOption(Option_t *option="")
Set drawing option for object.
This class displays a legend box (TPaveText) containing several legend entries.
virtual void ResetView3D(TObject *view=0)
virtual void DrawCrosshair()
Function called to draw a crosshair in the canvas.
virtual void SetBatch(Bool_t batch=kTRUE)
Set pad in batch mode.
virtual void SetTheta(Double_t theta=30)
virtual void Paint(Option_t *option="")
Paint all primitives in pad.
virtual Int_t GetEventX() const
Get X event.
Int_t XtoAbsPixel(Double_t x) const
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y)
Copy pixmaps of pads laying below pad "stop" into pad "stop".
Double_t GetAbsYlowNDC() const
TList * GetListOfExecs() const
void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Paint histogram/graph frame.
virtual void SetVertical(Bool_t vert=kTRUE)
Set pad vertical (default) or horizontal.
void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
virtual void RangeChanged()
virtual void SetSelected(TObject *obj)
Set selected.
void PaintPolyLineNDC(Int_t n, Double_t *x, Double_t *y, Option_t *option="")
Paint polyline in CurrentPad NDC coordinates.
TH1F * DrawFrame(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.
Double_t PixeltoX(Int_t px)
virtual void SetBBoxCenter(const TPoint &p)
Set center of the Pad.
virtual void SetFixedAspectRatio(Bool_t fixed=kTRUE)
Fix pad aspect ratio to current value if fixed is true.
virtual void SetBorderMode(Short_t bordermode)
virtual UInt_t GetWw() const
Get Ww.
virtual ~TPad()
Pad destructor.
virtual Bool_t IsRetained() const
Is pad retained ?
virtual void CopyPixmap()
Copy the pixmap of the pad to the canvas.
Bool_t HasFixedAspectRatio() const
Double_t GetUymax() const
Double_t GetAbsXlowNDC() const
Int_t UtoPixel(Double_t u) const
static const char * filename()
Double_t GetAspectRatio() const
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.
virtual void GetRangeAxis(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)
Return pad axis coordinates range.
void PaintBorder(Color_t color, Bool_t tops)
Paint the pad border.
1-D histogram with a float per channel (see TH1 documentation)}
Int_t VtoAbsPixel(Double_t v) const
virtual Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
virtual void Update()
Update pad.
virtual void PaintModified()
Traverse pad hierarchy and (re)paint only modified pads.
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the Pad.
virtual Int_t Clip(Float_t *x, Float_t *y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt)
Clipping routine: Cohen Sutherland algorithm.
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
virtual Short_t GetBorderMode() const
Double_t YtoPad(Double_t y) const
Convert y from Y to pad.
Bool_t IsModified() const
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a pad and its sub-pads.
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 coo...
virtual void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this pad.
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.
const char * Data() const
virtual TVirtualViewer3D * GetViewer3D(Option_t *type="")
Create/obtain handle to 3D viewer.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
static const double x2[5]
Double_t GetYlowNDC() const
void PaintDate()
Paint the current date and time if the option date is on.
virtual Int_t GetEvent() const
Get Event.
virtual void Close(Option_t *option="")
Delete all primitives in pad and pad itself.
virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
TFrame * GetFrame()
Get frame.
virtual Int_t GetEventY() const
Get Y event.
void HighLight(Color_t col=kRed, Bool_t set=kTRUE)
Highlight pad.
static Int_t GetMaxPickDistance()
Static function (see also TPad::SetMaxPickDistance)
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
void PaintTextNDC(Double_t u, Double_t v, const char *text)
Paint text in CurrentPad NDC coordinates.
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.
TCanvas * fCanvas
pointer to mother of the list
virtual void SetCrosshair(Int_t crhair=1)
Set crosshair active/inactive.
virtual TLegend * BuildLegend(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.
static double p2(double t, double a, double b, double c)
virtual void SaveAs(const char *filename="", Option_t *option="") const
Save Pad contents in a file in one of various formats.
virtual void SetBBoxX1(const Int_t x)
Set lefthandside of BoundingBox to a value (resize in x direction on left)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a box.
virtual TObject * GetPadPointer() const
static void DrawColorTable()
Static function to Display Color Table in a pad.
Abstract 3D shapes viewer.
virtual void XYtoPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
virtual void RedrawAxis(Option_t *option="")
Redraw the frame axis Redrawing axis may be necessary in case of superimposed histograms when one or ...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void SetGLDevice(Int_t dev)
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
Int_t YtoAbsPixel(Double_t y) const
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Double_t GetXlowNDC() const
void SetCanvas(TCanvas *c)
virtual void SetEditable(Bool_t mode=kTRUE)
Set pad editable yes/no If a pad is not editable:
virtual void XYtoAbsPixel(Double_t x, Double_t y, Int_t &xpixel, Int_t &ypixel) const
void Emit(const char *signal)
Acitvate signal without args.
virtual Int_t GetCanvasID() const
Get canvas identifier.
const char * GetName() const
Returns name of object.
virtual Color_t GetHighLightColor() const
Get highlight color.
virtual void CopyPixmaps()
Copy the sub-pixmaps of the pad to the canvas.
virtual TVirtualPad * GetVirtCanvas() const
Get virtual canvas.
void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polyline in CurrentPad World coordinates.
virtual void AddExec(const char *name, const char *command)
Add a new TExec object to the list of Execs.
TObject * fPadView3D
free pointer
Using a TBrowser one can browse all ROOT objects.
TVirtualPad * GetSelectedPad() const
Get selected pad.
virtual TObject * FindObject(const char *name) const
Search if object named name is inside this pad or in pads inside this pad.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetDoubleBuffer(Int_t mode=1)
Set double buffer mode ON or OFF.
virtual void SetAttLinePS(Color_t color, Style_t style, Width_t lwidth)
Set postscript line attributes.
virtual void SetCursor(ECursor cursor)
Set cursor type.
virtual void DeleteToolTip(TObject *tip)
Delete tool tip object.
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...
Class to manage histogram axis.
virtual void CloseToolTip(TObject *tip)
Hide tool tip.
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
virtual void SetAttFillPS(Color_t color, Style_t style)
Set postscript fill area attributes.
virtual void DeleteExec(const char *name)
Remove TExec name from the list of Execs.
virtual void SetTicky(Int_t value=1)
virtual TPoint GetBBoxCenter()
Return the center of the Pad as TPoint in pixels.
virtual Bool_t HasCrosshair() const
Return kTRUE if the crosshair has been activated (via SetCrosshair).
virtual void ls(Option_t *option="") const
List all primitives in pad.
virtual void UseCurrentStyle()
Force a copy of current style for all objects in pad.
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
TView * fView
Pointer to 2-D frame (if one exists)
void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option="")
Paint polymarker in CurrentPad World coordinates.
void CopyBackgroundPixmap(Int_t x, Int_t y)
Copy pixmap of this pad as background of the current pad.
Double_t GetAbsHNDC() const
virtual void SetView(TView *view=0)
Set the current TView. Delete previous view if view=0.
Bool_t TestBit(UInt_t f) const
The most important graphics class in the ROOT system.
virtual Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
virtual void ResetToolTip(TObject *tip)
Reset tool tip, i.e.
virtual void SetAttMarkerPS(Color_t color, Style_t style, Size_t msize)
Set postscript marker attributes.
virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Double_t &y)
virtual Short_t GetBorderSize() const
void AbsCoordinates(Bool_t set)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitives in this pad on the C++ source file out.
virtual void SetPhi(Double_t phi=30)
void PaintLine3D(Float_t *p1, Float_t *p2)
Paint 3-D line in the CurrentPad.
virtual void SetViewer3D(TVirtualViewer3D *viewer3d)
Double_t GetUxmax() const
static double p1(double t, double a, double b)
virtual void StartEditing()
virtual void SetCopyGLDevice(Bool_t copy)
virtual void SetCanvasSize(UInt_t ww, UInt_t wh)
Set canvas size.
virtual TVirtualPadPainter * GetPainter()
Get pad painter from TCanvas.
TVirtualPad * GetPadSave() const
Get save pad.
virtual TVirtualPad * GetMother() const
TObject * GetView3D() const
const char * GetTitle() const
Returns title of object.
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.
Int_t XtoPixel(Double_t x) const
virtual void HideToolTip(Int_t event)
Hide tool tip depending on the event type.
Int_t GetPadPaint() const
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="")
Paint box in CurrentPad World coordinates.
virtual void SetTitle(const char *title="")
static const double x1[5]
Int_t GetCrosshair() const
Return the crosshair type (from the mother canvas) crosshair type = 0 means no crosshair.
Int_t GetGLDevice()
Get GL device.
virtual void SetGridy(Int_t value=1)
void DestroyExternalViewer3D()
Current 3D viewer.
Wrapper around a TObject so it can be stored in a TList.
virtual Bool_t IsEditable() const
virtual void SetFillStyle(Style_t fstyle)
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
Bool_t fCopyGLDevice
OpenGL off-screen pixmap identifier.
Double_t XtoPad(Double_t x) const
Convert x from X to pad.
virtual void GetRange(Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
Return pad world coordinates range.
Double_t GetUymin() const
Double_t PixeltoY(Int_t py)
virtual Bool_t IsBatch() const
Is pad in batch mode ?
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
TPad & operator=(const TPad &rhs)
virtual TObject * WaitPrimitive(const char *pname="", const char *emode="")
Loop and sleep until a primitive with name=pname is found in the pad.
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.
virtual void SetTicks(Int_t valuex=1, Int_t valuey=1)
TVirtualViewer3D * fViewer3D
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
virtual void SetName(const char *name)
Mother of all ROOT objects.
void Clear(Option_t *option="")
Delete all pad primitives.
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.
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
virtual void Browse(TBrowser *b)
Browse pad.
TList * GetListOfPrimitives() const
virtual void RecordPave(const TObject *obj)
Emit RecordPave() signal.
Int_t YtoPixel(Double_t y) const
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.
Abstract base class for elements drawn in the editor.
Double_t GetTheta() const
virtual void AutoExec()
Execute the list of Execs when a pad event occurs.
virtual void ReleaseViewer3D(Option_t *type="")
Release current (external) viewer.
void PaintPolyLine3D(Int_t n, Double_t *p)
Paint 3-D polyline in the CurrentPad.
virtual Bool_t HasViewer3D() const
Double_t AbsPixeltoX(Int_t px)
virtual TObject * CreateToolTip(const TBox *b, const char *text, Long_t delayms)
Create a tool tip and return its pointer.
virtual void Pop()
Pop pad to the top of the stack.
ULong_t Hash() const
Return hash value for this object.
virtual void SetAttTextPS(Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
Set postscript text attributes.
TObject * fPadPointer
Pointer to 3-D view (if one exists)
virtual Rectangle_t GetBBox()
Return the bounding Box of the Pad.
virtual void RangeAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Set axis coordinate system for the pad.
virtual void SetNumber(Int_t number)
virtual Bool_t IsVertical() const
virtual void SetBorderSize(Short_t bordersize)
Draw all kinds of Arrows.
Int_t fGLDevice
Off-screen pixmap identifier.
RooCmdArg FillStyle(Style_t style)
static void SetMaxPickDistance(Int_t maxPick=5)
static function to set the maximum Pick Distance fgMaxPickDistance This parameter is used in TPad::Pi...
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 ...
virtual void SetLogz(Int_t value=1)
Set Lin/Log scale for Z.
Double_t fX1
tool tip associated with box
Int_t GetPixmapID() const
virtual void x3d(Option_t *type="")
Deprecated: use TPad::GetViewer3D() instead.
void PaintLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Paint line in CurrentPad World coordinates.
Double_t AbsPixeltoY(Int_t py)
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Int_t VtoPixel(Double_t v) const
virtual UInt_t GetWh() const
Get Wh.
virtual void SetBBoxCenterY(const Int_t y)
Set Y coordinate of the center of the Pad.
virtual void RangeAxisChanged()
void Modified(Bool_t flag=1)
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
static Int_t fgMaxPickDistance
3D View of this TPad
Int_t UtoAbsPixel(Double_t u) const
void PaintText(Double_t x, Double_t y, const char *text)
Paint text in CurrentPad World coordinates.
virtual void RecordLatex(const TObject *obj)
Emit RecordLatex() signal.
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode)
Draw Arrows to indicated equal distances of Objects with given BBoxes.
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.