TBox
class description - source file - inheritance tree
public:
TBox TBox()
TBox TBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
TBox TBox(const TBox& box)
virtual void ~TBox()
static TClass* Class()
virtual void Copy(TObject& box)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Draw(Option_t* option)
virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Double_t GetX1() const
Double_t GetX2() const
Double_t GetY1() const
Double_t GetY2() const
virtual void HideToolTip(Int_t event)
virtual TClass* IsA() const
Bool_t IsBeingResized() const
virtual void ls(Option_t* option) const
virtual void Paint(Option_t* option)
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t* option)
virtual void Print(Option_t* option) const
virtual void SavePrimitive(ofstream& out, Option_t* option)
virtual void SetToolTipText(const char* text, Long_t delayms = 1000)
virtual void SetX1(Double_t x1)
virtual void SetX2(Double_t x2)
virtual void SetY1(Double_t y1)
virtual void SetY2(Double_t y2)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TObject* fTip !tool tip associated with box
protected:
Double_t fX1 X of 1st point
Double_t fY1 Y of 1st point
Double_t fX2 X of 2nd point
Double_t fY2 Y of 2nd point
Bool_t fResizing !True if box is being resized
See also
-
TPave, TWbox
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(Double_t x1, Double_t y1, Double_t x2, Double_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(Double_t x1, Double_t y1,Double_t x2, Double_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 *) const
*-*-*-*-*-*-*-*-*-*-*-*List this box with its attributes*-*-*-*-*-*-*-*-*
*-* =================================
void Paint(Option_t *)
*-*-*-*-*-*-*-*-*-*-*Paint this box with its current attributes*-*-*-*-*-*-*
*-* ==========================================
void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *)
*-*-*-*-*-*-*-*-*-*-*Draw this box with new coordinates*-*-*-*-*-*-*-*-*-*
*-* ==================================
void Print(Option_t *) const
*-*-*-*-*-*-*-*-*-*-*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.
void Streamer(TBuffer &R__b)
Stream an object of class TBox.
Inline Functions
Bool_t IsBeingResized() const
Double_t GetX1() const
Double_t GetX2() const
Double_t GetY1() const
Double_t GetY2() const
void SetX1(Double_t x1)
void SetX2(Double_t x2)
void SetY1(Double_t y1)
void SetY2(Double_t y2)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
Author: Rene Brun 12/12/94
Last update: root/graf:$Name: $:$Id: TBox.cxx,v 1.5 2000/12/13 15:13:50 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
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.