TPad


class description - source file - inheritance tree

class TPad : public TVirtualPad

    private:
TPad TPad(TPad& pad) void CopyBackgroundPixmap(Int_t x, Int_t y) void CopyBackgroundPixmaps(TPad* start, TPad* stop, Int_t x, Int_t y) TPad& operator=(TPad& rhs) public:
TPad TPad() TPad TPad(Text_t* name, Text_t* title, Float_t xlow, Float_t ylow, Float_t xup, Float_t yup, Color_t color = -1, Short_t bordersize = -1, Short_t bordermode = -2) virtual void ~TPad() virtual void AbsCoordinates(Bool_t set) virtual Float_t AbsPixeltoX(Int_t px) virtual void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Axis_t& x, Axis_t& y) virtual Float_t AbsPixeltoY(Int_t py) virtual void Browse(TBrowser* b) virtual void cd(Int_t subpadnumber = 0) TClass* Class() virtual void Clear(Option_t* option) virtual Int_t Clip(Float_t* x, Float_t* y, Float_t xclipl, Float_t yclipb, Float_t xclipr, Float_t yclipt) virtual Int_t ClippingCode(Float_t x, Float_t y, Float_t xcl1, Float_t ycl1, Float_t xcl2, Float_t ycl2) virtual void Close(Option_t* option) virtual void CloseToolTip(TGToolTip* tip) virtual void CopyPixmap() virtual void CopyPixmaps() void CreateNewArrow(Int_t event, Int_t px, Int_t py) void CreateNewEllipse(Int_t event, Int_t px, Int_t py, Int_t mode) void CreateNewPad(Int_t event, Int_t px, Int_t py) void CreateNewPave(Int_t event, Int_t px, Int_t py, Int_t mode) void CreateNewPolyLine(Int_t event, Int_t px, Int_t py, Int_t mode) void CreateNewText(Int_t event, Int_t px, Int_t py) virtual TGToolTip* CreateToolTip(TBox* b, char* text, Long_t delayms) virtual void DeleteToolTip(TGToolTip* tip) 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) virtual void Draw(Option_t* option) virtual void DrawClassObject(TObject* obj, Option_t* option) virtual TH1F* DrawFrame(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax, Text_t* title) virtual void DrawLine(Float_t x1, Float_t y1, Float_t x2, Float_t y2) virtual void DrawLineNDC(Float_t u1, Float_t v1, Float_t u2, Float_t v2) virtual void DrawText(Float_t x, Float_t y, Text_t* text) virtual void DrawTextNDC(Float_t u, Float_t v, Text_t* text) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual Float_t GetAbsHNDC() virtual Float_t GetAbsWNDC() virtual Float_t GetAbsXlowNDC() virtual Float_t GetAbsYlowNDC() virtual TCanvas* GetCanvas() virtual Int_t GetCanvasID() virtual Int_t GetEvent() virtual Int_t GetEventX() virtual Int_t GetEventY() virtual TFrame* GetFrame() virtual Bool_t GetGridx() virtual Bool_t GetGridy() virtual Color_t GetHighLightColor() virtual Float_t GetHNDC() virtual TList* GetListOfPrimitives() virtual Int_t GetLogx() virtual Int_t GetLogy() virtual Int_t GetLogz() virtual TVirtualPad* GetMother() virtual const Text_t* GetName() Int_t GetNumber() virtual Int_t GetPadPaint() virtual void GetPadPar(Float_t& xlow, Float_t& ylow, Float_t& xup, Float_t& yup) virtual TObject* GetPadPointer() virtual TVirtualPad* GetPadSave() virtual Float_t GetPhi() virtual Int_t GetPixmapID() virtual TObject* GetPrimitive(Text_t* name) virtual void GetRange(Float_t& x1, Float_t& y1, Float_t& x2, Float_t& y2) virtual void GetRangeAxis(Axis_t& xmin, Axis_t& ymin, Axis_t& xmax, Axis_t& ymax) virtual TObject* GetSelected() virtual TVirtualPad* GetSelectedPad() virtual Float_t GetTheta() virtual Int_t GetTickx() virtual Int_t GetTicky() virtual const Text_t* GetTitle() virtual Float_t GetUxmax() virtual Float_t GetUxmin() virtual Float_t GetUymax() virtual Float_t GetUymin() virtual TView* GetView() virtual TPadView3D* GetView3D() virtual TVirtualPad* GetVirtCanvas() virtual UInt_t GetWh() virtual Float_t GetWNDC() virtual UInt_t GetWw() virtual Float_t GetXlowNDC() virtual Float_t GetYlowNDC() virtual void HighLight(Color_t col = kRed, Bool_t set = kTRUE) virtual void InspectObject(TObject* obj) virtual TClass* IsA() virtual Bool_t IsBatch() virtual Bool_t IsFolder() virtual Bool_t IsModified() virtual Bool_t IsRetained() virtual void ls(Option_t* option) virtual void Modified(Bool_t flag = 1) virtual Bool_t OpaqueMoving() virtual Bool_t OpaqueResizing() virtual Float_t PadtoX(Float_t x) virtual Float_t PadtoY(Float_t y) virtual void Paint(Option_t* option) virtual void PaintBox(Float_t x1, Float_t y1, Float_t x2, Float_t y2, Option_t* option) virtual void PaintFillArea(Int_t n, Float_t* x, Float_t* y, Option_t* option) virtual void PaintLine(Float_t x1, Float_t y1, Float_t x2, Float_t y2) virtual void PaintLine3D(Float_t* p1, Float_t* p2) virtual void PaintLineNDC(Coord_t u1, Coord_t v1, Coord_t u2, Coord_t v2) virtual void PaintModified() virtual void PaintPadFrame(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax) virtual void PaintPolyLine(Int_t n, Float_t* x, Float_t* y, Option_t* option) virtual void PaintPolyLine3D(Int_t n, Float_t* p) virtual void PaintPolyLineNDC(Int_t n, Float_t* x, Float_t* y, Option_t* option) virtual void PaintPolyMarker(Int_t n, Float_t* x, Float_t* y, Option_t* option) virtual void PaintText(Float_t x, Float_t y, Text_t* text) virtual void PaintTextNDC(Float_t u, Float_t v, Text_t* text) virtual TPad* Pick(Int_t px, Int_t py, TObjLink*& pickobj) virtual Float_t PixeltoX(Int_t px) virtual void PixeltoXY(Int_t xpixel, Int_t ypixel, Axis_t& x, Axis_t& y) virtual Float_t PixeltoY(Int_t py) virtual void Pop() virtual void Print(Text_t* filename) virtual void Print(Text_t* filename, Option_t* option) virtual void Range(Float_t x1, Float_t y1, Float_t x2, Float_t y2) virtual void RangeAxis(Axis_t xmin, Axis_t ymin, Axis_t xmax, Axis_t ymax) virtual void RecursiveRemove(TObject* obj) virtual void RedrawAxis() virtual void ResetToolTip(TGToolTip* tip) virtual void ResetView3D(TPadView3D* view = 0) virtual void ResizePad(Option_t* option) virtual void SaveAs(Text_t* filename) virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetBorderMode(Short_t bordermode) virtual void SetBorderSize(Short_t bordersize) virtual void SetCanvasSize(UInt_t ww, UInt_t wh) virtual void SetCursor(ECursor cursor) virtual void SetDoubleBuffer(Int_t mode = 1) virtual void SetDrawOption(Option_t* option) virtual void SetFillStyle(Style_t fstyle) 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 SetLogx(Int_t value = 1) virtual void SetLogy(Int_t value = 1) virtual void SetLogz(Int_t value = 1) virtual void SetName(Text_t* name) virtual void SetNumber(Int_t number) virtual void SetPad(Text_t* name, Text_t* title, Float_t xlow, Float_t ylow, Float_t xup, Float_t yup, Color_t color = 35, Short_t bordersize = 5, Short_t bordermode = -1) virtual void SetPad(Float_t xlow, Float_t ylow, Float_t xup, Float_t yup) virtual void SetPhi(Float_t phi = 30) virtual void SetSelected(TObject* obj) virtual void SetTheta(Float_t theta = 30) 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(Text_t* title) virtual void SetView(TView* view) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual void Update() virtual void UseCurrentStyle() virtual Int_t UtoAbsPixel(Float_t u) virtual Int_t UtoPixel(Float_t u) virtual Int_t VtoAbsPixel(Float_t v) virtual Int_t VtoPixel(Float_t v) virtual void x3d(Option_t* option) virtual Int_t XtoAbsPixel(Axis_t x) virtual Float_t XtoPad(Axis_t x) virtual Int_t XtoPixel(Axis_t x) virtual void XYtoAbsPixel(Axis_t x, Axis_t y, Int_t& xpixel, Int_t& ypixel) virtual void XYtoPixel(Axis_t x, Axis_t y, Int_t& xpixel, Int_t& ypixel) virtual Int_t YtoAbsPixel(Axis_t y) virtual Float_t YtoPad(Axis_t y) virtual Int_t YtoPixel(Axis_t y)

Data Members

protected:
Int_t fLogx (=0 if X linear scale, =1 if log scale) Int_t fLogy (=0 if Y linear scale, =1 if log scale) Int_t fLogz (=0 if Z linear scale, =1 if log scale) Float_t fXtoAbsPixelk Conversion coefficient for X World to absolute pixel Float_t fXtoPixelk Conversion coefficient for X World to pixel Float_t fXtoPixel xpixel = fXtoPixelk + fXtoPixel*xworld Float_t fYtoAbsPixelk Conversion coefficient for Y World to absolute pixel Float_t fYtoPixelk Conversion coefficient for Y World to pixel Float_t fYtoPixel ypixel = fYtoPixelk + fYtoPixel*yworld Float_t fUtoAbsPixelk Conversion coefficient for U NDC to absolute pixel Float_t fUtoPixelk Conversion coefficient for U NDC to pixel Float_t fUtoPixel xpixel = fUtoPixelk + fUtoPixel*undc Float_t fVtoAbsPixelk Conversion coefficient for Y World to absolute pixel Float_t fVtoPixelk Conversion coefficient for Y World to pixel Float_t fVtoPixel ypixel = fVtoPixelk + fVtoPixel*vndc Float_t fAbsPixeltoXk Conversion coefficient for absolute pixel to X World Float_t fPixeltoXk Conversion coefficient for pixel to X World Float_t fPixeltoX xworld = fPixeltoXk + fPixeltoX*xpixel Float_t fAbsPixeltoYk Conversion coefficient for absolute pixel to Y World Float_t fPixeltoYk Conversion coefficient for pixel to Y World Float_t fPixeltoY yworld = fPixeltoYk + fPixeltoY*ypixel Float_t fXlowNDC X bottom left corner of pad in NDC [0,1] Float_t fYlowNDC Y bottom left corner of pad in NDC [0,1] Float_t fWNDC Width of pad along X in NDC Float_t fHNDC Height of pad along Y in NDC Float_t fAbsXlowNDC Absolute X top left corner of pad in NDC [0,1] Float_t fAbsYlowNDC Absolute Y top left corner of pad in NDC [0,1] Float_t fAbsWNDC Absolute Width of pad along X in NDC Float_t fAbsHNDC Absolute Height of pad along Y in NDC Float_t fUxmin Minimum value on the X axis Float_t fUymin Minimum value on the Y axis Float_t fUxmax Maximum value on the X axis Float_t fUymax Maximum value on the Y axis TPad* fMother pointer to mother of the list TCanvas* fCanvas !Pointer to mother canvas Int_t fPixmapID Off-screen pixmap identifier TList* fPrimitives List of primitives (subpads) TString fName Pad name TString fTitle Pad title Int_t fPadPaint Set to 1 while painting the pad Bool_t fModified Set to true when pad is modified Bool_t fGridx Set to true if grid along X Bool_t fGridy Set to true if grid along Y Int_t fTickx Set to 1 if tick marks along X Int_t fTicky Set to 1 if tick marks along Y TFrame* fFrame Pointer to 2-D frame (if one exists) TView* fView Pointer to 3-D view (if one exists) Float_t fTheta theta angle to view as lego/surface Float_t fPhi phi angle to view as lego/surface TObject* fPadPointer free pointer Int_t fNumber pad number identifier Bool_t fAbsCoord Use absolute coordinates TPadView3D* fPadView3D 3D View of this TPad


See also

TButton, TCanvas, TSlider

Class Description

  The Pad class is 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 an 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
  when the canvas receives a signal to be painted.
  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.

  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 TLine::DistancetoPrimitive, TLine::ExecuteEvent
              TBox::DistancetoPrimitive,  TBox::ExecuteEvent
              TH1::DistancetoPrimitive,   TH1::ExecuteEvent

  A Pad supports linear and log scales coordinate systems.
  The transformation coefficients are explained in TPad::ResizePad.
  An example of pads hierarchy is shown below:

/*

*/



TPad(): TVirtualPad()
*-*-*-*-*-*-*-*-*-*-*Pad default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================

TPad(const Text_t *name, const Text_t *title, Float_t xlow, Float_t ylow, Float_t xup, Float_t yup, Color_t color, Short_t bordersize, Short_t bordermode) : TVirtualPad(name,title,xlow,ylow,xup,yup,color,bordersize,bordermode)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*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.

  xlow [0,1] is the position of the bottom left point of the pad
             expressed in the mother pad reference system
  ylow [0,1] is the Y position of this point.
  xup  [0,1] is the x position of the top right point of the pad
             expressed in the mother pad reference system
  yup  [0,1] is the Y position of this point.

  See TWbox::TWbox for the other parameters.


~TPad()
*-*-*-*-*-*-*-*-*-*-*Pad destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============

void Browse(TBrowser *b)

void cd(Int_t subpadnumber)
*-*-*-*-*-*-*-*-*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 subpads.
  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.

void Clear(Option_t *option)
*-*-*-*-*-*-*-*-*Delete all pad primitives*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              =========================

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.
 If Clip ==0 the segment is outside the boundary.

 _Input parameters:

  x[2], y[2] : Segment coordinates
  xclipl, yclipb, xclipr, yclipt : Clipping boundary

 _Output parameters:

  x[2], y[2] : New segment coordinates

 If clipped != 0 after a call to this function, the
 line has been clipped.


Int_t ClippingCode(Float_t x, Float_t y, Float_t xcl1, Float_t ycl1, Float_t xcl2, Float_t ycl2)
   Compute the endpoint codes for TPad::Clip.

void Close(Option_t *)
*-*-*-*-*-*-*-*-*Delete all primitives in pad and pad itself*-*-*-*-*-*-*
*-*              ============================
   NB. Pad cannot be used anymore after this call


void CopyPixmap()
*-*-*-*-*-*-*-*-*Copy the pixmap of the pad to the canvas*-*-*-*-*-*-*
*-*              ========================================

void CopyPixmaps()
*-*-*-*-*-*-*-*-*Copy the sub-pixmaps of the pad to the canvas*-*-*-*-*-*-*
*-*              =============================================

void CreateNewArrow(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Create a new arrow in this pad*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============================

  Function called by TPad::ExecuteEvent when the action "Create NewArrow"
  has been selected in the Canvas pulldown menu.

  Click left button to indicate arrow starting position.
  Release left button to terminate the arrow.



void CreateNewEllipse(Int_t event, Int_t px, Int_t py, Int_t mode)
*-*-*-*-*-*-*-*-*-*-*Create a new arc/ellipse in this pad*-*-*-*-*-*-*-*-*-*
*-*                  ====================================

  Function called by TPad::ExecuteEvent when the action "Create NewEllipse"
  has been selected in the Canvas pulldown menu.

  Click left button to indicate arrow starting position.
  Release left button to terminate the arrow.


void CreateNewPad(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Create a new pad in this pad*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================

  Function called by TPad::ExecuteEvent when the action "Create NewPad"
  has been selected in the Canvas pulldown menu.

  Click left button to indicate one corner of the pad
  Click left button to indicate the opposite corner

  The new pad is inserted in the pad where the first point is selected.


void CreateNewPave(Int_t event, Int_t px, Int_t py, Int_t mode)
*-*-*-*-*-*-*-*-*-*Create a new pavetext in this pad*-*-*-*-*-*-*-*-*-*-*
*-*                =================================

  Function called by TPad::ExecuteEvent when the action "Create NewPaveText"
  has been selected in the Canvas pulldown menu.

  Click left button to indicate one corner of the pavelabel.
  Release left button at the opposite corner.


void CreateNewPolyLine(Int_t event, Int_t px, Int_t py, Int_t mode)
*-*-*-*-*-*-*-*-*-*Create a new PolyLine*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                ======================
  Click left button to indicate a new point
  Click right button to close the polyline
  mode = 0 normal polyline
  mode = 0 smooth polyline
 This function is called when the item NewPolyLine is selected in the
 canvas pulldown menu.


void CreateNewText(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*Create a new TText at the cursor position*-*-*-*-*-*-*-*
*-*                =========================================
  Click left button to indicate the text position
 This function is called when the item NewText is selected in the
 canvas pulldown menu.


void Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t color)
*-*-*-*-*-*-*-*-*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

    ...............................................................
    .                               .                             .
    .                               .                             .
    .                               .                             .
    .           c1_1                .           c1_2              .
    .                               .                             .
    .                               .                             .
    .                               .                             .
    ...............................................................
    .                               .                             .
    .                               .                             .
    .                               .                             .
    .           c1_3                .           c1_4              .
    .                               .                             .
    .                               .                             .
    .                               .                             .
    ...............................................................
    .                               .                             .
    .                               .                             .
    .                               .                             .
    .           c1_5                .           c1_6              .
    .                               .                             .
    .                               .                             .
    ...............................................................


    Once a pad is divided into subpads, 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.


void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*Draw Pad in Current pad (re-parent pad if necessary)*-*-*-*
*-*              ====================================================

void DrawClassObject(TObject *classobj, Option_t *option)
 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.
 The following picture is the class inheritance tree of class TPaveLabel:

   /*
   
   */


TH1F* DrawFrame(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax, Text_t *title)
  Draw a pad frame
  Compute real pad range taking into account all margins
  Use services of TH1F class

void DrawLine(Float_t x1, Float_t y1, Float_t x2, Float_t y2)
*-*-*-*-*-*-*-*-*Draw line in CurrentPad World coordinates*-*-*-*-*-*-*-*
*-*              =========================================

void DrawLineNDC(Float_t u1, Float_t v1, Float_t u2, Float_t v2)
*-*-*-*-*-*-*-*-*Draw line in CurrentPad NDC coordinates*-*-*-*-*-*-*-*
*-*              =======================================

void DrawText(Float_t x, Float_t y, const Text_t *text)
*-*-*-*-*-*-*-*-*Draw text in CurrentPad World coordinates*-*-*-*-*-*-*-*
*-*              =========================================

void DrawTextNDC(Float_t u, Float_t v, const Text_t *text)
*-*-*-*-*-*-*-*-*Draw text in CurrentPad NDC coordinates*-*-*-*-*-*-*-*
*-*              =======================================

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================
  This member function must be implemented to realize the action
  corresponding to the mouse click on the object in the canvas


Int_t GetCanvasID() const

Int_t GetEvent() const

Int_t GetEventX() const

Int_t GetEventY() const

TVirtualPad* GetVirtCanvas()

Color_t GetHighLightColor() const

TObject* GetSelected()

TVirtualPad* GetSelectedPad() const

TVirtualPad* GetPadSave() const

UInt_t GetWh()

UInt_t GetWw()

Bool_t IsBatch()

Bool_t IsRetained()

Bool_t OpaqueMoving() const

Bool_t OpaqueResizing() const

void SetCanvasSize(UInt_t ww, UInt_t wh)

void SetCursor(ECursor cursor)

void SetDoubleBuffer(Int_t mode)

void SetSelected(TObject *obj)

void Update()

TFrame* GetFrame()

TObject* GetPrimitive(const Text_t *name)

void GetRange(Float_t &x1, Float_t &y1, Float_t &x2, Float_t &y2)
*-*-*-*-*-*-*-*Return pad world coordinates range*-*-*-*-*-*-*-*-*-*-*-*-*
*-*            ==================================

void GetRangeAxis(Axis_t &xmin, Axis_t &ymin, Axis_t &xmax, Axis_t &ymax)
*-*-*-*-*-*-*-*Return pad axis coordinates range*-*-*-*-*-*-*-*-*-*-*-*-*
*-*            ==================================

void HighLight(Color_t color, Bool_t set)

void InspectObject(TObject *obj)
 Dump contents of obj in a graphics canvas.
 Same action as TObject::Dump but in a graphical form.
 In addition pointers to other objects can be followed.

 The following picture is the Inspect of a histogram object:

   /*
   
   */


void ls(Option_t *option)
*-*-*-*-*-*-*-*-*-*List all primitives in pad*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                ==========================

Float_t PadtoX(Axis_t x) const

Float_t PadtoY(Axis_t y) const

Float_t XtoPad(Axis_t x) const

Float_t YtoPad(Axis_t y) const

void Paint(Option_t *option)
*-*-*-*-*-*-*-*-*-*Paint all primitives in pad*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                ===========================

void PaintPadFrame(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax)
*-*-*-*-*-*-*-*-*-*Paint histogram/graph frame*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                ===========================

void PaintModified()
*-*-*-*-*-*-*Traverse pad hierarchy and (re)paint only modified pads*-*-*-*
*-*          =======================================================

void PaintBox(Float_t x1, Float_t y1, Float_t x2, Float_t y2, Option_t *)
*-*-*-*-*-*-*-*-*Paint box in CurrentPad World coordinates*-*-*-*-*-*-*-*-*-*
*-*              =========================================

void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y)
 Copy pixmaps of pads laying below pad "stop" into pad "stop". This
 gives the effect of pad "stop" being transparent.

void CopyBackgroundPixmap(Int_t x, Int_t y)
 Copy pixmap of this pad as background of the current pad.

void PaintFillArea(Int_t n, Float_t *x, Float_t *y, Option_t *)
*-*-*-*-*-*-*-*-*Paint fill area in CurrentPad World coordinates*-*-*-*-*-*-*
*-*              ===============================================

void PaintLine(Float_t x1, Float_t y1, Float_t x2, Float_t y2)
*-*-*-*-*-*-*-*-*Paint line in CurrentPad World coordinates*-*-*-*-*-*-*-*
*-*              ==========================================

void PaintLineNDC(Coord_t u1, Coord_t v1,Coord_t u2, Coord_t v2)
*-*-*-*-*-*-*-*Draw a line with coordinates in NDC*-*-*-*-*-*-*-*-*-*-*-*-*
*-*            ===================================

void PaintLine3D(Float_t *p1, Float_t *p2)
*-*-*-*-*-*-*-*-*Paint 3-D line in the CurrentPad*-*-*-*-*-*-*-*-*-*-*
*-*              ================================

void PaintPolyLine(Int_t n, Float_t *x, Float_t *y, Option_t *)
*-*-*-*-*-*-*-*-*Paint polyline in CurrentPad World coordinates*-*-*-*-*-*-*
*-*              ==============================================

void PaintPolyLineNDC(Int_t n, Float_t *x, Float_t *y, Option_t *)
*-*-*-*-*-*-*-*-*Paint polyline in CurrentPad NDC coordinates*-*-*-*-*-*-*
*-*              ============================================

void PaintPolyLine3D(Int_t n, Float_t *p)
*-*-*-*-*-*-*-*-*Paint 3-D polyline in the CurrentPad*-*-*-*-*-*-*-*-*-*-*
*-*              ====================================

void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *)
*-*-*-*-*-*-*-*-*Paint polymarker in CurrentPad World coordinates*-*-*-*-*-*
*-*              ================================================

void PaintText(Float_t x, Float_t y, const Text_t *text)
*-*-*-*-*-*-*-*-*Paint text in CurrentPad World coordinates*-*-*-*-*-*-*-*
*-*              ==========================================

void PaintTextNDC(Float_t u, Float_t v, const Text_t *text)
*-*-*-*-*-*-*-*-*Paint text in CurrentPad NDC coordinates*-*-*-*-*-*-*-*
*-*              ========================================

TPad* Pick(Int_t px, Int_t py, TObjLink *&pickobj)
*-*-*-*-*-*-*-*-*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 subpads
  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.


void Pop()
*-*-*-*-*-*-*-*-*-*-*Pop pad to the top of the stack*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ===============================

void Print(const Text_t *filename)
*-*-*-*-*Old interface. Use SaveAs instead*-*-*-*-*-*
*-*      =================================


void Print(const Text_t *filename, Option_t *option)
*-*-*-*-*Save Pad contents on a file in various formats*-*-*-*-*-*
*-*      ==============================================

   if option  =  0   - as "ps"
               "ps"  - Postscript file is produced
               "eps" - an Encapsulated Postscript file is produced
               "gif" - a GIF file is produced
               "cxx" - a C++ macro file is produced

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


void Range(Float_t x1, Float_t y1, Float_t x2, Float_t y2)
*-*-*-*-*-*-*-*-*-*-*Set world coordinate system for the pad*-*-*-*-*-*-*
*-*                  =======================================

void RangeAxis(Axis_t xmin, Axis_t ymin, Axis_t xmax, Axis_t ymax)
*-*-*-*-*-*-*-*-*-*-*Set axis coordinate system for the pad*-*-*-*-*-*-*
*-*                  =======================================
  The axis coordinate system is a subset of the world coordinate system
  xmin,ymin are 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


void RecursiveRemove(TObject *obj)
*-*-*-*-*-*-*-*Recursively remove object from a pad and its subpads*-*-*-*-*
*-*            ====================================================

void RedrawAxis()
  Redraw the frame axis
  Redrawing axis may be necessary in case of superimposed histograms
  when one or more histograms have a fill color


void ResizePad(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Compute pad conversion coefficients*-*-*-*-*-*-*-*-*
*-*                  ===================================

   Conversion from x to px & y to py
   =================================

       x - xmin     px - pxlow              xrange  = xmax-xmin
       --------  =  ----------      with
        xrange        pxrange               pxrange = pxmax-pxmin

               pxrange(x-xmin)
   ==>  px =   ---------------  + pxlow   = fXtoPixelk + fXtoPixel * x
                    xrange

   ==>  fXtoPixelk = pxlow - pxrange*xmin/xrange
        fXtoPixel  = pxrange/xrange
           where  pxlow   = fAbsXlowNDC*fCw
                  pxrange = fAbsWNDC*fCw


       y - ymin     py - pylow              yrange  = ymax-ymin
       --------  =  ----------      with
        yrange        pyrange               pyrange = pymax-pymin

               pyrange(y-ymin)
   ==>  py =   ---------------  + pylow   = fYtoPixelk + fYtoPixel * y
                    yrange

   ==>  fYtoPixelk = pylow - pyrange*ymin/yrange
        fYtoPixel  = pyrange/yrange
           where  pylow   = (1-fAbsYlowNDC)*fCh
                  pyrange = -fAbsHNDC*fCh

-  Conversion from px to x & py to y
   =================================

             xrange(px-pxlow)
   ==>  x =  ----------------  + xmin  = fPixeltoXk + fPixeltoX * px
                 pxrange
-
   ==>  fPixeltoXk = xmin - pxlow*xrange/pxrange
        fPixeltoX  = xrange/pxrange

             yrange(py-pylow)
   ==>  y =  ----------------  + ymin  = fPixeltoYk + fPixeltoY * py
                 pyrange
-
   ==>  fPixeltoYk = ymin - pylow*yrange/pyrange
        fPixeltoY  = yrange/pyrange

-----------------------------------------------------------------------

  Computation of the coefficients in case of LOG scales
- =====================================================

   A, Conversion from pixel coordinates to world coordinates

       Log(x) - Log(xmin)      Log(x/xmin)       px - pxlow
  u = --------------------- =  -------------  =  -----------
      Log(xmax) - Log(xmin)    Log(xmax/xmin)     pxrange

  ==> Log(x/xmin) = u*Log(xmax/xmin)
      x = xmin*exp(u*Log(xmax/xmin)
   Let alfa = Log(xmax/xmin)/fAbsWNDC

      x = xmin*exp(-alfa*pxlow) + exp(alfa*px)
      x = fPixeltoXk*exp(fPixeltoX*px)
  ==> fPixeltoXk = xmin*exp(-alfa*pxlow)
      fPixeltoX  = alfa

       Log(y) - Log(ymin)      Log(y/ymin)       pylow - py
  v = --------------------- =  -------------  =  -----------
      Log(ymax) - Log(ymin)    Log(ymax/ymin)     pyrange

   Let beta = Log(ymax/ymin)/pyrange
      Log(y/ymin) = beta*pylow - beta*py
      y/ymin = exp(beta*pylow - beta*py)
      y = ymin*exp(beta*pylow)*exp(-beta*py)
  ==> y = fPixeltoYk*exp(fPixeltoY*py)
      fPixeltoYk = ymin*exp(beta*pylow)
      fPixeltoY  = -beta

-  B, 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)
  ==> fXtoPixelk = pxlow -Log(xmin)/alfa
  ==> fXtoPixel  = 1/alfa

  py = pylow - Log(y/ymin)/beta
     = fYtoPixelk + fYtoPixel*Log(y)
  ==> fYtoPixelk = pylow - Log(ymin)/beta
      fYtoPixel  = 1/beta


void SaveAs(const Text_t *filename)
*-*-*-*-*Save Pad contents on a  file in 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 .C or .cxx, a C++ macro file is produced
   if filename contains .root, a Root file is produced


void SavePrimitive(ofstream &out, Option_t *)
*-*-*-*-*-*Save primitives in this pad on the C++ source file out*-*-*-*-*-*
*-*        ======================================================

void SetFillStyle(Style_t fstyle)
 Overrride TAttFill::FillStyle for TPad because we want to handle style=0
 as style 4000.

void SetLogx(Int_t value)
*-*-*-*-*-*-*-*-*Set Lin/Log scale for X
*-*              ========================

void SetLogy(Int_t value)
*-*-*-*-*-*-*-*-*Set Lin/Log scale for Y
*-*              ========================

void SetLogz(Int_t value)
*-*-*-*-*-*-*-*-*Set Lin/Log scale for Z
*-*              ========================

void SetPad(Float_t xlow, Float_t ylow, Float_t xup, Float_t yup)
*-*-*-*-*-*-*-*-*Set canvas range for pad*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              ========================

void SetPad(const Text_t *name, const Text_t *title, Float_t xlow, Float_t ylow, Float_t xup, Float_t yup, Color_t color, Short_t bordersize, Short_t bordermode)
*-*-*-*-*-*-*-*-*Set all pad parameters*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              ======================

void Streamer(TBuffer &b)
*-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              =========================================

void UseCurrentStyle()
*-*-*-*-*-*Force a copy of current style for all objects in pad*-*-*-*-*
*-*        ====================================================

TGToolTip* CreateToolTip(const TBox *box, const char *text, Long_t delayms)
 Create a tool tip and return its pointer.

void DeleteToolTip(TGToolTip *tip)
 Delete tool tip object.

void ResetToolTip(TGToolTip *tip)
 Reset tool tip, i.e. within time specified in CreateToolTip the
 tool tip will pop up.

void CloseToolTip(TGToolTip *tip)
 Hide tool tip.

void x3d(Option_t *option)
*-*-*-*-*-*Invokes the x3d package to view the content of a pad*-*-*-*-*-*-*
*-*        ====================================================



Inline Functions


                TPad& operator=(TPad& rhs)
                 TPad TPad(Text_t* name, Text_t* title, Float_t xlow, Float_t ylow, Float_t xup, Float_t yup, Color_t color = -1, Short_t bordersize = -1, Short_t bordermode = -2)
                 void AbsCoordinates(Bool_t set)
              Float_t AbsPixeltoX(Int_t px)
              Float_t AbsPixeltoY(Int_t py)
                 void AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Axis_t& x, Axis_t& y)
                 void GetPadPar(Float_t& xlow, Float_t& ylow, Float_t& xup, Float_t& yup)
              Float_t GetXlowNDC()
              Float_t GetYlowNDC()
              Float_t GetWNDC()
              Float_t GetHNDC()
              Float_t GetAbsXlowNDC()
              Float_t GetAbsYlowNDC()
              Float_t GetAbsWNDC()
              Float_t GetAbsHNDC()
              Float_t GetPhi()
              Float_t GetTheta()
              Float_t GetUxmin()
              Float_t GetUymin()
              Float_t GetUxmax()
              Float_t GetUymax()
               Bool_t GetGridx()
               Bool_t GetGridy()
                Int_t GetNumber()
                Int_t GetTickx()
                Int_t GetTicky()
               TList* GetListOfPrimitives()
             TObject* GetPadPointer()
               TView* GetView()
          TPadView3D* GetView3D()
                Int_t GetLogx()
                Int_t GetLogy()
                Int_t GetLogz()
         TVirtualPad* GetMother()
        const Text_t* GetName()
        const Text_t* GetTitle()
             TCanvas* GetCanvas()
                Int_t GetPadPaint()
                Int_t GetPixmapID()
               Bool_t IsFolder()
               Bool_t IsModified()
                 void Modified(Bool_t flag = 1)
              Float_t PixeltoX(Int_t px)
              Float_t PixeltoY(Int_t py)
                 void PixeltoXY(Int_t xpixel, Int_t ypixel, Axis_t& x, Axis_t& y)
                 void ResetView3D(TPadView3D* view = 0)
                 void SetBorderMode(Short_t bordermode)
                 void SetBorderSize(Short_t bordersize)
                 void SetDrawOption(Option_t* option)
                 void SetGrid(Int_t valuex = 1, Int_t valuey = 1)
                 void SetGridx(Int_t value = 1)
                 void SetGridy(Int_t value = 1)
                 void SetNumber(Int_t number)
                 void SetName(Text_t* name)
                 void SetTicks(Int_t valuex = 1, Int_t valuey = 1)
                 void SetTickx(Int_t value = 1)
                 void SetTicky(Int_t value = 1)
                 void SetTitle(Text_t* title)
                 void SetTheta(Float_t theta = 30)
                 void SetPhi(Float_t phi = 30)
                 void SetView(TView* view)
                Int_t UtoAbsPixel(Float_t u)
                Int_t VtoAbsPixel(Float_t v)
                Int_t UtoPixel(Float_t u)
                Int_t VtoPixel(Float_t v)
                Int_t XtoAbsPixel(Axis_t x)
                Int_t YtoAbsPixel(Axis_t y)
                Int_t XtoPixel(Axis_t x)
                Int_t YtoPixel(Axis_t y)
                 void XYtoAbsPixel(Axis_t x, Axis_t y, Int_t& xpixel, Int_t& ypixel)
                 void XYtoPixel(Axis_t x, Axis_t y, Int_t& xpixel, Int_t& ypixel)
              TClass* Class()
              TClass* IsA()
                 void ShowMembers(TMemberInspector& insp, char* parent)


Author: Rene Brun 12/12/94
Last update: 2.22/09 13/07/99 12.37.42 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.