library: libGraf #include "TBox.h" |
TBox
class description - source file - inheritance tree (.pdf)
public:
TBox()
TBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
TBox(const TBox& box)
virtual ~TBox()
static TClass* Class()
virtual void Copy(TObject& box) const
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
TBox& operator=(const TBox&)
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
public:
static const enum TBox:: kCannotMove
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) : TObject(box), TAttLine(box), TAttFill(box)
void Copy(TObject &obj) const
*-*-*-*-*-*-*-*-*-*-*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 (pL,pR,pTop,pBot), the box is rscaled
parallel to this edge (same as Motif window manager).
pA pTop pB
+--------------------------------------------+
| |
| |
| |
pL| pINSIDE |pR
| |
| |
| |
| |
+--------------------------------------------+
pD pBot 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)
TBox& operator=(const TBox&)
Author: Rene Brun 12/12/94
Last update: root/graf:$Name: $:$Id: TBox.cxx,v 1.18 2005/08/29 14:43:30 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - 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.