TBox


class description - source file - inheritance tree

class TBox : public TObject, public TAttLine, public TAttFill


    protected:
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) public:
TBox TBox(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2) TBox TBox() TBox TBox(const TBox& box) virtual void ~TBox() TClass* Class() virtual void Copy(TObject& box) virtual void Draw(Option_t* option) virtual void DrawBox(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2) Coord_t GetX1() const Coord_t GetX2() const Coord_t GetY1() const Coord_t GetY2() const virtual void HideToolTip(Int_t event) virtual TClass* IsA() const Bool_t IsBeingResized() const virtual void ls(Option_t* option) virtual void Paint(Option_t* option) virtual void PaintBox(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2, Option_t* option) virtual void Print(Option_t* option) virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetToolTipText(const char* text, Long_t delayms = 1000) virtual void SetX1(Coord_t x1) virtual void SetX2(Coord_t x2) virtual void SetY1(Coord_t y1) virtual void SetY2(Coord_t y2) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

private:
TObject* fTip !tool tip associated with box protected:
Coord_t fX1 X of 1st point Coord_t fY1 Y of 1st point Coord_t fX2 X of 2nd point Coord_t fY2 Y of 2nd point Bool_t fResizing !True if box is being resized


See also

TPave, TWbox

Class Description

 A box is defined by :
   - Its bottom left coordinates x1,y1
   - Its top right coordinates x2,y2

 A box has line attributes (see TAttLine)
   and fill area attributes (see TAttFill).


/*

*/



TBox(): TObject(), TAttLine(), TAttFill()
*-*-*-*-*-*-*-*-*-*-*Box default constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================

TBox(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2) : TObject(), TAttLine(), TAttFill()
*-*-*-*-*-*-*-*-*-*-*Box standard constructor-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

~TBox()
*-*-*-*-*-*-*-*-*-*-*Box destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============

TBox(const TBox &box)

void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*Copy a Box*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==========

Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a box*-*-*-*-*-*
*-*                  ==========================================
  Compute the closest distance of approach from point px,py to the
  edges of this box.
  The distance is computed in pixels units.


void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Draw this box with its current attributes*-*-*-*-*-*-*
*-*                  =========================================

void DrawBox(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2)
*-*-*-*-*-*-*-*-*-*-*Draw this box with new coordinates*-*-*-*-*-*-*-*-*-*
*-*                  ==================================

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================
  This member function is called when a BOX/WBOX/PAD object is clicked.

  If the mouse is clicked in one of the 4 corners of the box (PA,PB,PC,PD)
  the box is resized with the rubber rectangle.

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

  If the mouse is clicked on the 4 edges (L,R,T,B), the box is rscaled
  parallel to this edge (same as Motif window manager).

    PA                    T                       PB
     +--------------------------------------------+
     |                                            |
     |                                            |
     |                                            |
    L|                  INSIDE                    |R
     |                                            |
     |                                            |
     |                                            |
     |                                            |
     +--------------------------------------------+
    PD                    B                      PC

  Note that this function is duplicated on purpose by TPad::ExecuteEvent.
  If somebody modifies this function, may be similar changes should also
  be applied to TPad::ExecuteEvent.

void HideToolTip(Int_t event)
 Hide tool tip depending on the event type. Typically tool tips
 are hidden when event is not a kMouseEnter and not a kMouseMotion
 event.

void ls(Option_t *)
*-*-*-*-*-*-*-*-*-*-*-*List this box with its attributes*-*-*-*-*-*-*-*-*
*-*                    =================================

void Paint(Option_t *)
*-*-*-*-*-*-*-*-*-*-*Paint this box with its current attributes*-*-*-*-*-*-*
*-*                  ==========================================

void PaintBox(Coord_t x1, Coord_t y1, Coord_t x2, Coord_t y2, Option_t *)
*-*-*-*-*-*-*-*-*-*-*Draw this box with new coordinates*-*-*-*-*-*-*-*-*-*
*-*                  ==================================

void Print(Option_t *)
*-*-*-*-*-*-*-*-*-*-*Dump this box with its attributes*-*-*-*-*-*-*-*-*-*
*-*                  =================================

void SavePrimitive(ofstream &out, Option_t *)
 Save primitive as a C++ statement(s) on output stream out

void SetToolTipText(const char *text, Long_t delayms)
 Set tool tip text associated with this box. The delay is in
 milliseconds (minimum 250). To remove tool tip call method with
 text = 0.



Inline Functions


             Bool_t IsBeingResized() const
            Coord_t GetX1() const
            Coord_t GetX2() const
            Coord_t GetY1() const
            Coord_t GetY2() const
               void SetX1(Coord_t x1)
               void SetX2(Coord_t x2)
               void SetY1(Coord_t y1)
               void SetY2(Coord_t y2)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)


Author: Rene Brun 12/12/94
Last update: 2.23/04 04/10/99 14.39.48 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.