40 :
TWbox(x1,y1,x2,y2,color,bordersize,bordermode)
59 const Int_t kMaxDiff = 5;
60 const Int_t kMinSize = 20;
62 static Int_t px1, px2, py1, py2, pxl, pyl, pxt, pyt, pxold, pyold;
63 static Int_t px1p, px2p, py1p, py2p;
64 static Bool_t pL, pR, pTop, pBot, pINSIDE;
79 if (pxpadmax-pxpadmin > pypadmin-pypadmax) vertical =
kFALSE;
124 pL = pR = pTop = pBot = pINSIDE =
kFALSE;
126 if (vertical && (px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
128 pxold = pxl; pyold = pyl; pTop =
kTRUE;
132 if (vertical && (px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
134 pxold = pxt; pyold = pyt; pBot =
kTRUE;
138 if (!vertical && (py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
140 pxold = pxl; pyold = pyl; pL =
kTRUE;
144 if (!vertical && (py > pyl+kMaxDiff && py < pyt-kMaxDiff) &&
146 pxold = pxt; pyold = pyt; pR =
kTRUE;
150 if ((px > pxl+kMaxDiff && px < pxt-kMaxDiff) &&
151 (py > pyl+kMaxDiff && py < pyt-kMaxDiff)) {
152 pxold = px; pyold = py; pINSIDE =
kTRUE;
160 if ( pL || pR || pTop || pBot)
163 if ( !pL && !pR && !pTop && !pBot && !pINSIDE)
175 if (py2 > py1-kMinSize) { py2 = py1-kMinSize; wy = py2; }
176 if (py2 < py2p) { py2 = py2p; wy = py2; }
182 if (py1 < py2+kMinSize) { py1 = py2+kMinSize; wy = py1; }
183 if (py1 > py1p) { py1 = py1p; wy = py1; }
189 if (px1 > px2-kMinSize) { px1 = px2-kMinSize; wx = px1; }
190 if (px1 < px1p) { px1 = px1p; wx = px1; }
196 if (px2 < px1+kMinSize) { px2 = px1+kMinSize; wx = px2; }
197 if (px2 > px2p) { px2 = px2p; wx = px2; }
202 Int_t dx = px - pxold;
203 Int_t dy = py - pyold;
204 px1 += dx; py1 += dy; px2 += dx; py2 += dy;
205 if (px1 < px1p) { dx = px1p - px1; px1 += dx; px2 += dx; wx = px+dx; }
206 if (px2 > px2p) { dx = px2 - px2p; px1 -= dx; px2 -= dx; wx = px-dx; }
207 if (py1 > py1p) { dy = py1 - py1p; py1 -= dy; py2 -= dy; wy = py-dy; }
208 if (py2 < py2p) { dy = py2p - py2; py1 += dy; py2 += dy; wy = py+dy; }
221 if ((pINSIDE && opaque) || (
fResizing && ropaque)) {
231 if (pTop || pBot || pL || pR || pINSIDE) {
245 if (pTop || pBot || pL || pR )
virtual const char * GetMethod() const
virtual void SetMaximum(Double_t max=1)
virtual void Modify()
Change current line attributes if necessary.
TObject * GetObject() const
The moving box in a TSlider.
virtual Double_t GetX1() const =0
static const double x2[5]
TVirtualPad is an abstract base class for the Pad and Canvas classes.
A TBox with a bordersize and a bordermode.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Interaction with a slider.
virtual Short_t GetBorderSize() const =0
virtual Double_t GetY2() const =0
virtual ~TSliderBox()
SliderBox default destructor.
virtual Int_t XtoAbsPixel(Double_t x) const =0
virtual Color_t GetFillColor() const
Double_t fX1
tool tip associated with box
virtual Double_t GetY1() const =0
virtual Int_t YtoAbsPixel(Double_t y) const =0
static const double x1[5]
virtual void SetMinimum(Double_t min=0)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
Mother of all ROOT objects.
virtual Double_t GetX2() const =0
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.