41 :
TWbox(
x1,y1,
x2,y2,color,bordersize,bordermode)
60 const Int_t kMaxDiff = 5;
61 const Int_t kMinSize = 20;
63 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
64 static Int_t px1p, px2p, py1p, py2p;
65 static Bool_t pL, pR, pTop, pBot, pINSIDE;
80 if (pxpadmax-pxpadmin > pypadmin-pypadmax) vertical =
kFALSE;
125 pL = pR = pTop = pBot = pINSIDE =
kFALSE;
127 if (vertical && (px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
129 pxold = pxl; pyold = pyl; pTop =
kTRUE;
133 if (vertical && (px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
135 pxold = pxt; pyold = pyt; pBot =
kTRUE;
139 if (!vertical && (py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
141 pxold = pxl; pyold = pyl; pL =
kTRUE;
145 if (!vertical && (py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
147 pxold = pxt; pyold = pyt; pR =
kTRUE;
151 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
152 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
153 pxold = px; pyold = py; pINSIDE =
kTRUE;
161 if ( pL || pR || pTop || pBot)
164 if ( !pL && !pR && !pTop && !pBot && !pINSIDE)
176 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
177 if (py2 < py2p) { py2 = py2p; wy = py2; }
183 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
184 if (py1 > py1p) { py1 = py1p; wy = py1; }
190 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
191 if (px1 < px1p) { px1 = px1p; wx = px1; }
197 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
198 if (px2 > px2p) { px2 = px2p; wx = px2; }
203 Int_t dx = px - pxold;
204 Int_t dy = py - pyold;
205 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
206 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
207 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
208 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
209 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
222 if ((pINSIDE && opaque) || (
fResizing && ropaque)) {
232 if (pTop || pBot || pL || pR || pINSIDE) {
246 if (pTop || pBot || pL || pR )
static const double x2[5]
static const double x1[5]
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void Modify()
Change current line attributes if necessary.
Double_t fX1
X of 1st point.
Double_t fY2
Y of 2nd point.
Double_t fX2
X of 2nd point.
Double_t fY1
Y of 1st point.
Bool_t fResizing
! True if box is being resized
Mother of all ROOT objects.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
The moving box in a TSlider.
virtual ~TSliderBox()
SliderBox default destructor.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Interaction with a slider.
TSlider * fSlider
Pointer to slider.
TSliderBox()
SliderBox default constructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual const char * GetMethod() const
virtual void SetMaximum(Double_t max=1)
TObject * GetObject() const
virtual void SetMinimum(Double_t min=0)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t YtoAbsPixel(Double_t y) const =0
virtual Double_t GetX2() const =0
virtual Int_t XtoAbsPixel(Double_t x) const =0
virtual Double_t GetY1() const =0
virtual Double_t GetY2() const =0
virtual Short_t GetBorderSize() const =0
virtual Double_t GetX1() const =0
A TBox with a bordersize and a bordermode.