Logo ROOT  
Reference Guide
TGScrollBar.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 10/01/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 /**************************************************************************
12 
13  This source is based on Xclass95, a Win95-looking GUI toolkit.
14  Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15 
16  Xclass95 is free software; you can redistribute it and/or
17  modify it under the terms of the GNU Library General Public
18  License as published by the Free Software Foundation; either
19  version 2 of the License, or (at your option) any later version.
20 
21 **************************************************************************/
22 
23 //////////////////////////////////////////////////////////////////////////
24 // //
25 // TGScrollBar and TGScrollBarElement //
26 // //
27 // The classes in this file implement scrollbars. Scrollbars can be //
28 // either placed horizontal or vertical. A scrollbar contains three //
29 // TGScrollBarElements: The "head", "tail" and "slider". The head and //
30 // tail are fixed at either end and have the typical arrows in them. //
31 // //
32 // The TGHScrollBar will generate the following event messages: //
33 // kC_HSCROLL, kSB_SLIDERPOS, position, 0 //
34 // kC_HSCROLL, kSB_SLIDERTRACK, position, 0 //
35 // //
36 // The TGVScrollBar will generate the following event messages: //
37 // kC_VSCROLL, kSB_SLIDERPOS, position, 0 //
38 // kC_VSCROLL, kSB_SLIDERTRACK, position, 0 //
39 // //
40 //////////////////////////////////////////////////////////////////////////
41 
42 #include "TGScrollBar.h"
43 #include "TGResourcePool.h"
44 #include "TGPicture.h"
45 #include "TImage.h"
46 #include "TSystem.h"
47 #include "TTimer.h"
48 #include "TEnv.h"
49 #include "TVirtualX.h"
50 
51 #include <iostream>
52 
53 
56 
61 
62 
63 ////////////////////////////////////////////////////////////////////////////////
64 
65 class TSBRepeatTimer : public TTimer {
66 private:
67  TGScrollBar *fScrollBar; // scroll bar
68  Int_t fSmallInc; // step
69 public:
70  TSBRepeatTimer(TGScrollBar *s, Long_t ms, Int_t inc) : TTimer(ms, kTRUE)
71  { fScrollBar = s; fSmallInc = inc; }
72 
73  Bool_t Notify();
74  Int_t GetSmallInc() const { return fSmallInc; }
75 };
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Notify when timer times out and reset the timer.
79 
80 Bool_t TSBRepeatTimer::Notify()
81 {
82  fScrollBar->HandleTimer(this);
83  Reset();
84  return kFALSE;
85 }
86 
87 ////////////////////////////////////////////////////////////////////////////////
88 /// Constructor.
89 
91  UInt_t w, UInt_t h, UInt_t options, Pixel_t back) :
92  TGFrame(p, w, h, options | kOwnBackground, back)
93 {
94  fPic = fPicN = pic;
95  fState = kButtonUp;
96  fPicD = 0;
97  fStyle = 0;
98  if ((gClient->GetStyle() > 1) || (p && p->InheritsFrom("TGScrollBar")))
99  fStyle = gClient->GetStyle();
100 
102  fHighColor = gClient->GetResourcePool()->GetHighLightColor();
104 }
105 
106 ////////////////////////////////////////////////////////////////////////////////
107 /// destructor
108 
110 {
111  if (fPicD) {
113  }
114 }
115 
116 ////////////////////////////////////////////////////////////////////////////////
117 /// Change state of scrollbar element (either up or down).
118 
120 {
121  if (state != fState) {
122  switch (state) {
123  case kButtonDown:
126  break;
127  case kButtonUp:
128  case kButtonDisabled:
131  break;
132  }
133  fState = state;
134  fClient->NeedRedraw(this);
135  }
136 }
137 
138 ////////////////////////////////////////////////////////////////////////////////
139 /// Enable/Disable scroll bar button chaging the state.
140 
142 {
143  if (on) {
144  if (fState == kButtonUp) {
145  return;
146  }
148  fPic = fPicN;
149  } else {
150  if (fState == kButtonDisabled) {
151  return;
152  }
154 
155  if (!fPicD) {
156  TImage *img = TImage::Create();
157  if (!img) return;
158  TImage *img2 = TImage::Create();
159  if (!img2) {
160  if (img) delete img;
161  return;
162  }
163  TString back = gEnv->GetValue("Gui.BackgroundColor", "#c0c0c0");
164  img2->FillRectangle(back.Data(), 0, 0, fPic->GetWidth(), fPic->GetHeight());
165  img->SetImage(fPicN->GetPicture(), fPicN->GetMask());
166  Pixmap_t mask = img->GetMask();
167  img2->Merge(img, "overlay");
168 
169  TString name = "disbl_";
170  name += fPic->GetName();
171  fPicD = fClient->GetPicturePool()->GetPicture(name.Data(), img2->GetPixmap(),
172  mask);
173  delete img;
174  delete img2;
175  }
176  fPic = fPicD;
177  }
178  fClient->NeedRedraw(this);
179 }
180 
181 ////////////////////////////////////////////////////////////////////////////////
182 /// Draw border around scollbar element.
183 
185 {
186  switch (fOptions & (kSunkenFrame | kRaisedFrame)) {
187  case kSunkenFrame: // pressed
188  gVirtualX->DrawLine(fId, GetBlackGC()(), 0, 0, fWidth-2, 0);
189  gVirtualX->DrawLine(fId, GetBlackGC()(), 0, 0, 0, fHeight-2);
190  gVirtualX->DrawLine(fId, GetShadowGC()(), 1, 1, fWidth-3, 1);
191  gVirtualX->DrawLine(fId, GetShadowGC()(), 1, 1, 1, fHeight-3);
192 
193  gVirtualX->DrawLine(fId, GetWhiteGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
194  gVirtualX->DrawLine(fId, GetWhiteGC()(), fWidth-1, fHeight-1, fWidth-1, 1);
195  gVirtualX->DrawLine(fId, GetBckgndGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
196  gVirtualX->DrawLine(fId, GetBckgndGC()(), fWidth-2, fHeight-2, fWidth-2, 2);
197 
198  if (fPic) {
199  int x = (fWidth - fPic->GetWidth()) >> 1;
200  int y = (fHeight - fPic->GetHeight()) >> 1;
201  fPic->Draw(fId, GetBckgndGC()(), x+1, y+1); // 3, 3
202  }
203  break;
204 
205  case kRaisedFrame: // normal
206  case kButtonDisabled:
207  if (fStyle > 0) {
208  // new modern (flat) version
209  if (fBackground == fHighColor) {
210  gVirtualX->DrawRectangle(fId, GetShadowGC()(), 0, 0, fWidth-1, fHeight-1);
211  }
212  else {
213  if (fPic == 0)
214  gVirtualX->DrawRectangle(fId, GetShadowGC()(), 0, 0, fWidth-1, fHeight-1);
215  else
216  gVirtualX->DrawRectangle(fId, GetBckgndGC()(), 0, 0, fWidth-1, fHeight-1);
217  }
218  if (fParent && fParent->InheritsFrom("TGHScrollBar")) {
219  if (fWidth > 20) {
220  gVirtualX->DrawLine(fId, GetShadowGC()(), (fWidth/2)-3, 4, (fWidth/2)-3, fHeight-5);
221  gVirtualX->DrawLine(fId, GetShadowGC()(), (fWidth/2), 4, (fWidth/2), fHeight-5);
222  gVirtualX->DrawLine(fId, GetShadowGC()(), (fWidth/2)+3, 4, (fWidth/2)+3, fHeight-5);
223  }
224  }
225  else if (fParent && fParent->InheritsFrom("TGVScrollBar")) {
226  if (fHeight > 20) {
227  gVirtualX->DrawLine(fId, GetShadowGC()(), 4, (fHeight/2)-3, fWidth-5, (fHeight/2)-3);
228  gVirtualX->DrawLine(fId, GetShadowGC()(), 4, (fHeight/2) , fWidth-5, (fHeight/2));
229  gVirtualX->DrawLine(fId, GetShadowGC()(), 4, (fHeight/2)+3, fWidth-5, (fHeight/2)+3);
230  }
231  }
232  else { // not used in a scroll bar (e.g. in a combo box)
233  gVirtualX->DrawRectangle(fId, GetShadowGC()(), 0, 0, fWidth-1, fHeight-1);
234  }
235  }
236  else {
237  gVirtualX->DrawLine(fId, GetBckgndGC()(), 0, 0, fWidth-2, 0);
238  gVirtualX->DrawLine(fId, GetBckgndGC()(), 0, 0, 0, fHeight-2);
239  gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 1, fWidth-3, 1);
240  gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 1, 1, fHeight-3);
241 
242  gVirtualX->DrawLine(fId, GetShadowGC()(), 1, fHeight-2, fWidth-2, fHeight-2);
243  gVirtualX->DrawLine(fId, GetShadowGC()(), fWidth-2, fHeight-2, fWidth-2, 1);
244  gVirtualX->DrawLine(fId, GetBlackGC()(), 0, fHeight-1, fWidth-1, fHeight-1);
245  gVirtualX->DrawLine(fId, GetBlackGC()(), fWidth-1, fHeight-1, fWidth-1, 0);
246  }
247  if (fPic) {
248  int x = (fWidth - fPic->GetWidth()) >> 1;
249  int y = (fHeight - fPic->GetHeight()) >> 1;
250  fPic->Draw(fId, GetBckgndGC()(), x, y); // 2, 2
251  }
252  break;
253 
254  default:
255  break;
256  }
257 }
258 
259 ////////////////////////////////////////////////////////////////////////////////
260 /// Handle mouse crossing event.
261 
263 {
264  if (fStyle > 0) {
265  TGScrollBarElement *el = 0;
266  TGScrollBar *bar = 0;
267  if ((event->fType == kEnterNotify) && (fState != kButtonDisabled)) {
269  } else {
271  }
272  if (event->fType == kLeaveNotify) {
274  }
275  gVirtualX->SetWindowBackground(fId, fBgndColor);
277  DrawBorder();
278  if (fParent && fParent->InheritsFrom("TGScrollBar")) {
279  bar = (TGScrollBar *)fParent;
280  if ((el = bar->GetHead()) != this) {
282  el->DrawBorder();
283  }
284  if ((el = bar->GetTail()) != this) {
286  el->DrawBorder();
287  }
288  if ((el = bar->GetSlider()) != this) {
290  el->DrawBorder();
291  }
292  }
293  }
294  return kTRUE;
295 }
296 
297 ////////////////////////////////////////////////////////////////////////////////
298 /// Constructor.
299 
301  UInt_t options, Pixel_t back) :
302  TGFrame(p, w, h, options | kOwnBackground, back),
303  fX0(0), fY0(0), fXp(0), fYp(0), fDragging(kFALSE), fGrabPointer(kTRUE),
304  fRange(0), fPsize(0), fPos(0), fSliderSize(0), fSliderRange(0),
305  fSmallInc(1), fHead(0), fTail(0), fSlider(0), fHeadPic(0),
306  fTailPic(0), fRepeat(0), fSubw()
307 {
309 
311  fHighColor = gClient->GetResourcePool()->GetHighLightColor();
312 
313  fMsgWindow = p;
314  if (gClient->GetStyle() == 0)
316  SetWindowName();
318 }
319 
320 ////////////////////////////////////////////////////////////////////////////////
321 /// Delete a scrollbar (either horizontal or vertical).
322 
324 {
325  delete fHead;
326  delete fTail;
327  delete fSlider;
330  if (fRepeat) { delete fRepeat; fRepeat = 0; }
331 }
332 
333 ////////////////////////////////////////////////////////////////////////////////
334 /// Handle mouse crossing event.
335 
337 {
338  if (gClient->GetStyle() > 0) {
339  if (event->fType == kEnterNotify) {
341  } else {
343  }
344  if (event->fType == kLeaveNotify) {
346  }
350  fHead->DrawBorder();
351  fTail->DrawBorder();
352  fSlider->DrawBorder();
353  }
354  return kTRUE;
355 }
356 
357 ////////////////////////////////////////////////////////////////////////////////
358 /// Handle repeat timer for horizontal or vertical scrollbar. Every time
359 /// timer times out we move slider.
360 
362 {
363  // shorten time out time to 50 milli seconds
364  t->SetTime(50);
365 
366  Window_t dum1, dum2;
367  Event_t ev;
368 
369  ev.fCode = kButton1;
370  ev.fType = kButtonPress;
371  ev.fUser[0] = fSubw;
372 
373  if (IsAccelerated()) {
374  ++fSmallInc;
375  if (fSmallInc > 100) fSmallInc = 100;
376  }
377 
378  gVirtualX->QueryPointer(fId, dum1, dum2, ev.fXRoot, ev.fYRoot, ev.fX, ev.fY,
379  ev.fState);
380 
381  HandleButton(&ev);
382 
383  return kTRUE;
384 }
385 
386 ////////////////////////////////////////////////////////////////////////////////
387 /// Static method returning scrollbar background pixmap.
388 
390 {
391  static Bool_t init = kFALSE;
392  if (!init) {
393  fgBckgndPixmap = gClient->GetResourcePool()->GetCheckeredPixmap();
394  init = kTRUE;
395  }
396  return fgBckgndPixmap;
397 }
398 
399 ////////////////////////////////////////////////////////////////////////////////
400 /// Static method returning the scrollbar width.
401 
403 {
404  return fgScrollBarWidth;
405 }
406 
407 ////////////////////////////////////////////////////////////////////////////////
408 /// Change background color
409 
411 {
413  fHead->ChangeBackground(back);
414  fTail->ChangeBackground(back);
415  fSlider->ChangeBackground(back);
416 }
417 
418 ////////////////////////////////////////////////////////////////////////////////
419 /// Create a horizontal scrollbar widget.
420 
422  UInt_t options, ULong_t back) :
423  TGScrollBar(p, w, h, options, back)
424 {
425  fHeadPic = fClient->GetPicture("arrow_left.xpm");
426  fTailPic = fClient->GetPicture("arrow_right.xpm");
427 
428  if (!fHeadPic || !fTailPic) {
429  Error("TGHScrollBar", "arrow_*.xpm not found");
430  return;
431  }
433  kRaisedFrame);
435  kRaisedFrame);
436  fSlider = new TGScrollBarElement(this, 0, fgScrollBarWidth, 50,
437  kRaisedFrame);
438 
441 
442  fDragging = kFALSE;
444  fPos = 0;
445 
446  fRange = TMath::Max((Int_t) w - (fgScrollBarWidth << 1), 1);
447  fPsize = fRange >> 1;
448 
449  fSliderSize = 50;
450  fSliderRange = 1;
451 
456 }
457 
458 ////////////////////////////////////////////////////////////////////////////////
459 /// Layout and move horizontal scrollbar components.
460 
462 {
463  // Should also recalculate the slider size and range, etc.
464  fHead->Move(0, 0);
468 
469  if (fSlider->GetX() != fX0) {
470  fSlider->Move(fX0, 0);
473  }
474 }
475 
476 ////////////////////////////////////////////////////////////////////////////////
477 /// Handle a mouse button event in a horizontal scrolbar.
478 
480 {
481  Int_t newpos;
482 
483  if (event->fCode == kButton4) {
484  if (!fHead->IsEnabled()) {
485  return kFALSE;
486  }
487  //scroll left
488  newpos = fPos - fPsize;
489  if (newpos<0) newpos = 0;
490  SetPosition(newpos);
491  return kTRUE;
492  }
493  if (event->fCode == kButton5) {
494  if (!fTail->IsEnabled()) {
495  return kFALSE;
496  }
497  // scroll right
498  newpos = fPos + fPsize;
499  SetPosition(newpos);
500  return kTRUE;
501  }
502 
503  if (event->fType == kButtonPress) {
504  if (event->fCode == kButton3) {
505  fX0 = event->fX - fSliderSize/2;
509  fPos = (Int_t)pos;
510 
511  fPos = TMath::Max(fPos, 0);
513  fSlider->Move(fX0, 0);
514 
517  return kTRUE;
518  }
519 
520  // fUser[0] contains the subwindow (child) in which the event occured
521  // (see GX11Gui.cxx)
522  Window_t subw = (Window_t)event->fUser[0];
523 
524  if (subw == fSlider->GetId()) {
525  fXp = event->fX - fX0;
526  fYp = event->fY - fY0;
527  fDragging = kTRUE;
528 
529  } else {
530 
531  if (!fRepeat)
532  fRepeat = new TSBRepeatTimer(this, 400, fSmallInc); // 500
533  fRepeat->Reset();
535  fSubw = subw;
536 
537  if (subw == fHead->GetId()) {
538  //if (!fHead->IsEnabled()) {
539  // return kFALSE;
540  //}
542  fPos -= fSmallInc;
543  } else if (subw == fTail->GetId()) {
544  //if (!fTail->IsEnabled()) {
545  // return kFALSE;
546  // }
548  fPos += fSmallInc;
549  } else if (event->fX > fgScrollBarWidth && event->fX < fX0)
550  fPos -= fPsize;
551  else if (event->fX > fX0+fSliderSize && event->fX < (Int_t)fWidth-fgScrollBarWidth)
552  fPos += fPsize;
553 
554  fPos = TMath::Max(fPos, 0);
556 
558 
561 
562  fSlider->Move(fX0, 0);
563 
566  }
567 
568  // last argument kFALSE forces all specified events to this window
569  if (fGrabPointer && !fClient->IsEditable())
572  kTRUE, kFALSE);
573  } else {
576 
577  if (fRepeat) {
578  fRepeat->Remove();
579  fRepeat->SetTime(400); // might have been shortened in HandleTimer()
580  fSmallInc = ((TSBRepeatTimer*)fRepeat)->GetSmallInc();
581  }
582 
583  fDragging = kFALSE;
584 
585  fPos = TMath::Max(fPos, 0);
587 
590 
591  if (fGrabPointer)
592  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
593  }
594  return kTRUE;
595 }
596 
597 ////////////////////////////////////////////////////////////////////////////////
598 /// Handle mouse motion event in a horizontal scrollbar.
599 
601 {
602  if (fDragging) {
603  fX0 = event->fX - fXp;
604  fY0 = event->fY - fYp;
605 
608  fSlider->Move(fX0, 0);
610  fPos = (Int_t)pos;
611 
612  fPos = TMath::Max(fPos, 0);
614 
617  }
618  return kTRUE;
619 }
620 
621 ////////////////////////////////////////////////////////////////////////////////
622 /// Set range of horizontal scrollbar.
623 
624 void TGHScrollBar::SetRange(Int_t range, Int_t page_size)
625 {
626  fRange = TMath::Max(range, 1);
627  fPsize = TMath::Max(page_size, 0);
628  fPos = TMath::Max(fPos, 0);
630 
632  fRange, (UInt_t) 6);
634 
636  (UInt_t) 1);
637 
641 
642  fSlider->Move(fX0, 0);
645 
646  // fPos = (fX0 - fgScrollBarWidth) * (fRange-fPsize) / fSliderRange;
647 
652 }
653 
654 ////////////////////////////////////////////////////////////////////////////////
655 /// Set logical slider position of horizontal scrollbar.
656 
658 {
659  fPos = TMath::Max(pos, 0);
660  fPos = TMath::Min(pos, fRange-fPsize);
661 
665 
666  fSlider->Move(fX0, 0);
669 
672 }
673 
674 
675 ////////////////////////////////////////////////////////////////////////////////
676 /// Create a vertical scrollbar.
677 
679  UInt_t options, ULong_t back) :
680  TGScrollBar(p, w, h, options, back)
681 {
682  fHeadPic = fClient->GetPicture("arrow_up.xpm");
683  fTailPic = fClient->GetPicture("arrow_down.xpm");
684 
685  if (!fHeadPic || !fTailPic) {
686  Error("TGVScrollBar", "arrow_*.xpm not found");
687  return;
688  }
690  kRaisedFrame);
692  kRaisedFrame);
693  fSlider = new TGScrollBarElement(this, 0, fgScrollBarWidth, 50,
694  kRaisedFrame);
695 
698 
699  fDragging = kFALSE;
701  fPos = 0;
702 
703  fRange = TMath::Max((Int_t) h - (fgScrollBarWidth << 1), 1);
704  fPsize = fRange >> 1;
705 
706  fSliderSize = 50;
707  fSliderRange = 1;
708 
713 }
714 
715 ////////////////////////////////////////////////////////////////////////////////
716 /// Layout and move vertical scrollbar components.
717 
719 {
720  // Should recalculate fSliderSize, fSliderRange, fX0, fY0, etc. too...
721  fHead->Move(0, 0);
725 
726  if (fSlider->GetY() != fY0) {
727  fSlider->Move(0, fY0);
730  }
731 }
732 
733 ////////////////////////////////////////////////////////////////////////////////
734 /// Handle mouse button event in vertical scrollbar.
735 
737 {
738  Int_t newpos;
739 
740  if (event->fCode == kButton4) {
741  if (!fHead->IsEnabled()) {
742  return kFALSE;
743  }
744  //scroll up
745  newpos = fPos - fPsize;
746  if (newpos<0) newpos = 0;
747  SetPosition(newpos);
748  return kTRUE;
749  }
750  if (event->fCode == kButton5) {
751  if (!fTail->IsEnabled()) {
752  return kFALSE;
753  }
754 
755  // scroll down
756  newpos = fPos + fPsize;
757  SetPosition(newpos);
758  return kTRUE;
759  }
760 
761  if (event->fType == kButtonPress) {
762  if (event->fCode == kButton3) {
763  fY0 = event->fY - fSliderSize/2;
767  fPos = (Int_t)pos;
768 
769  fPos = TMath::Max(fPos, 0);
771  fSlider->Move(0, fY0);
772 
775  return kTRUE;
776  }
777 
778  // fUser[0] contains the subwindow (child) in which the event occured
779  // (see GX11Gui.cxx)
780  Window_t subw = (Window_t)event->fUser[0];
781 
782  if (subw == fSlider->GetId()) {
783  fXp = event->fX - fX0;
784  fYp = event->fY - fY0;
785  fDragging = kTRUE;
786 
787  } else {
788 
789  if (!fRepeat)
790  fRepeat = new TSBRepeatTimer(this, 400, fSmallInc); // 500
791  fRepeat->Reset();
793  fSubw = subw;
794 
795  if (subw == fHead->GetId()) {
796  //if (!fHead->IsEnabled()) {
797  // return kFALSE;
798  // }
800  fPos -= fSmallInc;
801  } else if (subw == fTail->GetId()) {
802  //if (!fTail->IsEnabled()) {
803  // return kFALSE;
804  //}
806  fPos += fSmallInc;
807  } else if (event->fY > fgScrollBarWidth && event->fY < fY0)
808  fPos -= fPsize;
809  else if (event->fY > fY0+fSliderSize && event->fY < (Int_t)fHeight-fgScrollBarWidth)
810  fPos += fPsize;
811 
812  fPos = TMath::Max(fPos, 0);
814 
816  fY0 = (Int_t)y0;
817 
820 
821  fSlider->Move(0, fY0);
822 
825  }
826 
827  // last argument kFALSE forces all specified events to this window
828  if (fGrabPointer && !fClient->IsEditable())
831  kTRUE, kFALSE);
832  } else {
835 
836  if (fRepeat) {
837  fRepeat->Remove();
838  fRepeat->SetTime(400); // might have been shortened in HandleTimer()
839  fSmallInc = ((TSBRepeatTimer*)fRepeat)->GetSmallInc();
840  }
841 
842  fDragging = kFALSE;
843 
844  fPos = TMath::Max(fPos, 0);
846 
849 
850  if (fGrabPointer) {
851  gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer
852  }
853  }
854  return kTRUE;
855 }
856 
857 ////////////////////////////////////////////////////////////////////////////////
858 /// Handle mouse motion in a vertical scrollbar.
859 
861 {
862  if (fDragging) {
863  fX0 = event->fX - fXp;
864  fY0 = event->fY - fYp;
865 
868  fSlider->Move(0, fY0);
870  fPos = (Int_t)pos;
871 
872  fPos = TMath::Max(fPos, 0);
874 
877  }
878  return kTRUE;
879 }
880 
881 ////////////////////////////////////////////////////////////////////////////////
882 /// Set range of vertical scrollbar.
883 
884 void TGVScrollBar::SetRange(Int_t range, Int_t page_size)
885 {
886  fRange = TMath::Max(range, 1);
887  fPsize = TMath::Max(page_size, 0);
888  fPos = TMath::Max(fPos, 0);
890 
892  fRange, (UInt_t) 6);
894 
896  (UInt_t)1);
897 
899  fY0 = (Int_t)y0;
902 
903  fSlider->Move(0, fY0);
906 
907  // fPos = (fY0 - fgScrollBarWidth) * (fRange-fPsize) / fSliderRange;
908 
909 
914 }
915 
916 ////////////////////////////////////////////////////////////////////////////////
917 /// Set logical slider position of vertical scrollbar.
918 
920 {
921  fPos = TMath::Max(pos, 0);
922  fPos = TMath::Min(pos, fRange-fPsize);
923 
925  fY0 = (Int_t)y0;
928 
929  fSlider->Move(0, fY0);
932 
935 }
936 
937 ////////////////////////////////////////////////////////////////////////////////
938 /// Save an horizontal scrollbar as a C++ statement(s) on output stream out.
939 
940 void TGHScrollBar::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
941 {
942  if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
943 
944  out <<" TGHScrollBar *";
945  out << GetName() << " = new TGHScrollBar(" << fParent->GetName()
946  << "," << GetWidth() << "," << GetHeight();
947 
949  if (!GetOptions()) {
950  out <<");" << std::endl;
951  } else {
952  out << "," << GetOptionString() <<");" << std::endl;
953  }
954  } else {
955  out << "," << GetOptionString() << ",ucolor);" << std::endl;
956  }
957  if (option && strstr(option, "keep_names"))
958  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
959 
960  out << " " << GetName() <<"->SetRange(" << GetRange() << "," << GetPageSize() << ");" << std::endl;
961  out << " " << GetName() <<"->SetPosition(" << GetPosition() << ");" << std::endl;
962 }
963 
964 ////////////////////////////////////////////////////////////////////////////////
965 /// Save an vertical scrollbar as a C++ statement(s) on output stream out.
966 
967 void TGVScrollBar::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
968 {
969  if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
970 
971  out<<" TGVScrollBar *";
972  out << GetName() <<" = new TGVScrollBar("<< fParent->GetName()
973  << "," << GetWidth() << "," << GetHeight();
974 
976 
977  if (!GetOptions()) {
978  out <<");" << std::endl;
979  } else {
980  out << "," << GetOptionString() <<");" << std::endl;
981  }
982  } else {
983  out << "," << GetOptionString() << ",ucolor);" << std::endl;
984  }
985  if (option && strstr(option, "keep_names"))
986  out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
987 
988  out << " " << GetName() <<"->SetRange(" << GetRange() << "," << GetPageSize() << ");" << std::endl;
989  out << " " << GetName() <<"->SetPosition(" << GetPosition() << ");" << std::endl;
990 }
TGWindow::SetWindowName
virtual void SetWindowName(const char *name=0)
Set window name.
Definition: TGWindow.cxx:118
TGHScrollBar::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal scrollbar as a C++ statement(s) on output stream out.
Definition: TGScrollBar.cxx:940
Event_t::fType
EGEventType fType
Definition: GuiTypes.h:174
TGHScrollBar::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in a horizontal scrollbar.
Definition: TGScrollBar.cxx:600
TGScrollBar::fSubw
Window_t fSubw
Definition: TGScrollBar.h:103
TGScrollBar::IsAccelerated
Bool_t IsAccelerated() const
Definition: TGScrollBar.h:141
Event_t::fState
UInt_t fState
Definition: GuiTypes.h:180
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:250
TGVScrollBar::SetRange
virtual void SetRange(Int_t range, Int_t page_size)
Set range of vertical scrollbar.
Definition: TGScrollBar.cxx:884
TGScrollBar::fBgndColor
Pixel_t fBgndColor
Definition: TGScrollBar.h:105
Event_t::fY
Int_t fY
Definition: GuiTypes.h:177
Event_t::fX
Int_t fX
Definition: GuiTypes.h:177
TGWindow
Definition: TGWindow.h:31
TGScrollBarElement::SetEnabled
virtual void SetEnabled(Bool_t on=kTRUE)
Enable/Disable scroll bar button chaging the state.
Definition: TGScrollBar.cxx:141
kSB_SLIDERPOS
@ kSB_SLIDERPOS
Definition: WidgetMessageTypes.h:49
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Pixmap_t
Handle_t Pixmap_t
Definition: GuiTypes.h:29
TGVScrollBar::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion in a vertical scrollbar.
Definition: TGScrollBar.cxx:860
TGScrollBar::fTail
TGScrollBarElement * fTail
Definition: TGScrollBar.h:98
TGVScrollBar
Definition: TGScrollBar.h:183
TGScrollBar::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TGScrollBar.cxx:336
kSB_SLIDERTRACK
@ kSB_SLIDERTRACK
Definition: WidgetMessageTypes.h:48
TGPicture
Definition: TGPicture.h:36
kAnyModifier
const Mask_t kAnyModifier
Definition: GuiTypes.h:209
TGScrollBar
Definition: TGScrollBar.h:80
TImage::Merge
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
Definition: TImage.h:172
Option_t
const char Option_t
Definition: RtypesCore.h:66
TMath::Max
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
TGScrollBar::GetPageSize
virtual Int_t GetPageSize() const
Definition: TGScrollBar.h:133
TGPicture::GetWidth
UInt_t GetWidth() const
Definition: TGPicture.h:63
kLeaveNotify
@ kLeaveNotify
Definition: GuiTypes.h:60
kPointerMotionMask
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:162
TImage::Create
static TImage * Create()
Create an image.
Definition: TImage.cxx:35
TGScrollBar::fSlider
TGScrollBarElement * fSlider
Definition: TGScrollBar.h:99
TGScrollBar::GetScrollBarWidth
static Int_t GetScrollBarWidth()
Static method returning the scrollbar width.
Definition: TGScrollBar.cxx:402
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
TGScrollBar::fHead
TGScrollBarElement * fHead
Definition: TGScrollBar.h:97
TGScrollBarElement::fPicN
const TGPicture * fPicN
Definition: TGScrollBar.h:57
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
kAnyButton
@ kAnyButton
Definition: GuiTypes.h:213
kButtonDown
@ kButtonDown
Definition: TGButton.h:54
TString::Data
const char * Data() const
Definition: TString.h:369
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGPicture.h
TGFrame::fWidth
UInt_t fWidth
Definition: TGFrame.h:112
TGScrollBarElement::fPic
const TGPicture * fPic
Definition: TGScrollBar.h:56
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TGWindow::kEditDisableLayout
@ kEditDisableLayout
Definition: TGWindow.h:61
TGPicture::GetMask
Pixmap_t GetMask() const
Definition: TGPicture.h:66
TGScrollBarElement
Definition: TGScrollBar.h:48
kButton4
@ kButton4
Definition: GuiTypes.h:214
BatchHelpers::init
EvaluateInfo init(std::vector< RooRealProxy > parameters, std::vector< ArrayWrapper * > wrappers, std::vector< double * > arrays, size_t begin, size_t batchSize)
kButtonUp
@ kButtonUp
Definition: TGButton.h:53
TGWindow::kEditDisable
@ kEditDisable
Definition: TGWindow.h:58
TGFrame::fOptions
UInt_t fOptions
Definition: TGFrame.h:119
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TGClient::IsEditable
Bool_t IsEditable() const
Definition: TGClient.h:98
Int_t
int Int_t
Definition: RtypesCore.h:45
TGScrollBar::fPsize
Int_t fPsize
Definition: TGScrollBar.h:92
TGVScrollBar::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an vertical scrollbar as a C++ statement(s) on output stream out.
Definition: TGScrollBar.cxx:967
TGVScrollBar::SetPosition
virtual void SetPosition(Int_t pos)
Set logical slider position of vertical scrollbar.
Definition: TGScrollBar.cxx:919
TImage
An abstract interface to image processing library.
Definition: TImage.h:29
TGScrollBar::fGrabPointer
Bool_t fGrabPointer
Definition: TGScrollBar.h:90
kEnterNotify
@ kEnterNotify
Definition: GuiTypes.h:60
TGPicture::Draw
void Draw(Option_t *="")
Default Draw method for all objects.
Definition: TGPicture.h:57
x
Double_t x[n]
Definition: legend1.C:17
TGWindow::kEditDisableHeight
@ kEditDisableHeight
Definition: TGWindow.h:63
kButton1
@ kButton1
Definition: GuiTypes.h:213
TEnv::GetValue
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
TGVScrollBar::Layout
virtual void Layout()
Layout and move vertical scrollbar components.
Definition: TGScrollBar.cxx:718
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:668
TGScrollBar::fTailPic
const TGPicture * fTailPic
Definition: TGScrollBar.h:101
TVirtualX.h
TGClient::FreePicture
void FreePicture(const TGPicture *pic)
Free picture resource.
Definition: TGClient.cxx:309
TGWindow::SetBackgroundPixmap
virtual void SetBackgroundPixmap(Pixmap_t pixmap)
set background pixmap
Definition: TGWindow.cxx:229
TTimer.h
TEnv.h
TGScrollBarElement::fStyle
Int_t fStyle
Definition: TGScrollBar.h:61
TGFrame::GetBlackGC
static const TGGC & GetBlackGC()
Get black graphics context.
Definition: TGFrame.cxx:720
TString
Basic string class.
Definition: TString.h:136
TGScrollBar::fHeadPic
const TGPicture * fHeadPic
Definition: TGScrollBar.h:100
TGFrame
Definition: TGFrame.h:105
TGeant4Unit::bar
static constexpr double bar
Definition: TGeant4SystemOfUnits.h:221
TGScrollBar::fDragging
Bool_t fDragging
Definition: TGScrollBar.h:89
kButtonPressMask
const Mask_t kButtonPressMask
Definition: GuiTypes.h:160
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:47
kC_VSCROLL
@ kC_VSCROLL
Definition: WidgetMessageTypes.h:43
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
TGClient::GetPicturePool
TGPicturePool * GetPicturePool() const
Definition: TGClient.h:135
kOwnBackground
@ kOwnBackground
Definition: GuiTypes.h:391
TSystem::AddTimer
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
Definition: TSystem.cxx:472
TGScrollBar::TGScrollBar
TGScrollBar(const TGScrollBar &)
bool
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:167
TGFrame::GetWidth
UInt_t GetWidth() const
Definition: TGFrame.h:249
TGWindow::kEditDisableBtnEnable
@ kEditDisableBtnEnable
Definition: TGWindow.h:65
TImage.h
TGFrame::GetOptionString
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
Definition: TGFrame.cxx:2465
TGFrame::GetOptions
virtual UInt_t GetOptions() const
Definition: TGFrame.h:222
gClient
#define gClient
Definition: TGClient.h:166
TGHScrollBar::SetRange
virtual void SetRange(Int_t range, Int_t page_size)
Set range of horizontal scrollbar.
Definition: TGScrollBar.cxx:624
TGScrollBarElement::fPicD
const TGPicture * fPicD
Definition: TGScrollBar.h:58
TGVScrollBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical scrollbar.
Definition: TGScrollBar.cxx:736
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:324
kNone
const Handle_t kNone
Definition: GuiTypes.h:87
TGFrame::GetHilightGC
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:740
TGScrollBar::GetBckgndPixmap
static Pixmap_t GetBckgndPixmap()
Static method returning scrollbar background pixmap.
Definition: TGScrollBar.cxx:389
TGFrame::ChangeBackground
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition: TGFrame.cxx:278
TGScrollBar::GetPosition
virtual Int_t GetPosition() const
Definition: TGScrollBar.h:132
TTimer
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TGScrollBarElement::TGScrollBarElement
TGScrollBarElement(const TGScrollBarElement &)
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGPicturePool::GetPicture
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
Definition: TGPicture.cxx:80
TGScrollBarElement::fState
Int_t fState
Definition: TGScrollBar.h:55
TGHScrollBar::Layout
virtual void Layout()
Layout and move horizontal scrollbar components.
Definition: TGScrollBar.cxx:461
TGWindow::kEditDisableGrab
@ kEditDisableGrab
Definition: TGWindow.h:60
TSystem.h
TGScrollBar::PageSizeChanged
virtual void PageSizeChanged(Int_t range)
Definition: TGScrollBar.h:150
TGScrollBar::GetRange
virtual Int_t GetRange() const
Definition: TGScrollBar.h:134
h
#define h(i)
Definition: RSha256.hxx:106
TGWidget::fMsgWindow
const TGWindow * fMsgWindow
Definition: TGWidget.h:60
kButton3
@ kButton3
Definition: GuiTypes.h:213
TGWindow::GetName
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:317
TGScrollBar::HandleTimer
virtual Bool_t HandleTimer(TTimer *t)
Handle repeat timer for horizontal or vertical scrollbar.
Definition: TGScrollBar.cxx:361
TGScrollBar::~TGScrollBar
virtual ~TGScrollBar()
Delete a scrollbar (either horizontal or vertical).
Definition: TGScrollBar.cxx:323
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:590
TGHScrollBar
Definition: TGScrollBar.h:160
TImage::FillRectangle
virtual void FillRectangle(const char *=0, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
Definition: TImage.h:192
TGHScrollBar::SetPosition
virtual void SetPosition(Int_t pos)
Set logical slider position of horizontal scrollbar.
Definition: TGScrollBar.cxx:657
TGScrollBar::fgScrollBarWidth
static Int_t fgScrollBarWidth
Definition: TGScrollBar.h:109
TGObject::fId
Handle_t fId
Definition: TGObject.h:36
Event_t::fCode
UInt_t fCode
Definition: GuiTypes.h:179
TGFrame::SendMessage
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:630
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TGScrollBar::fAccelerated
Bool_t fAccelerated
Definition: TGScrollBar.h:104
TGScrollBar::fRepeat
TTimer * fRepeat
Definition: TGScrollBar.h:102
TImage::GetMask
virtual Pixmap_t GetMask()
Definition: TImage.h:236
kButtonPress
@ kButtonPress
Definition: GuiTypes.h:59
Long_t
long Long_t
Definition: RtypesCore.h:54
TGScrollBarElement::fBgndColor
Pixel_t fBgndColor
Definition: TGScrollBar.h:59
TGScrollBar::fYp
Int_t fYp
Definition: TGScrollBar.h:88
kButtonReleaseMask
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:161
TTimer::Remove
void Remove()
Definition: TTimer.h:85
TGFrame::SaveUserColor
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Definition: TGFrame.cxx:2438
TGScrollBar::fRange
Int_t fRange
Definition: TGScrollBar.h:91
TGScrollBar::fPos
Int_t fPos
Definition: TGScrollBar.h:93
TGScrollBarElement::~TGScrollBarElement
virtual ~TGScrollBarElement()
destructor
Definition: TGScrollBar.cxx:109
TGClient::GetPicture
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:290
TGScrollBarElement::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle mouse crossing event.
Definition: TGScrollBar.cxx:262
Window_t
Handle_t Window_t
Definition: GuiTypes.h:28
TGScrollBar::fgBckgndPixmap
static Pixmap_t fgBckgndPixmap
Definition: TGScrollBar.h:108
y
Double_t y[n]
Definition: legend1.C:17
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TTimer::SetTime
void SetTime(Long_t milliSec)
Definition: TTimer.h:90
TGScrollBar::fSliderRange
Int_t fSliderRange
Definition: TGScrollBar.h:95
Event_t::fXRoot
Int_t fXRoot
Definition: GuiTypes.h:178
TGFrame::GetX
Int_t GetX() const
Definition: TGFrame.h:256
TGFrame::GetBckgndGC
static const TGGC & GetBckgndGC()
Get background color graphics context.
Definition: TGFrame.cxx:760
TGScrollBar::RangeChanged
virtual void RangeChanged(Int_t range)
Definition: TGScrollBar.h:149
Event_t::fYRoot
Int_t fYRoot
Definition: GuiTypes.h:178
kRaisedFrame
@ kRaisedFrame
Definition: GuiTypes.h:384
TGVScrollBar::TGVScrollBar
TGVScrollBar(const TGWindow *p=0, UInt_t w=2, UInt_t h=4, UInt_t options=kVerticalFrame, Pixel_t back=GetDefaultFrameBackground())
Create a vertical scrollbar.
Definition: TGScrollBar.cxx:678
TMath::Min
Short_t Min(Short_t a, Short_t b)
Definition: TMathBase.h:180
unsigned int
TGScrollBarElement::SetState
virtual void SetState(Int_t state)
Change state of scrollbar element (either up or down).
Definition: TGScrollBar.cxx:119
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
TGScrollBarElement::fHighColor
Pixel_t fHighColor
Definition: TGScrollBar.h:60
TGClient::NeedRedraw
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:373
TGObject::fClient
TGClient * fClient
Definition: TGObject.h:37
TGPicture::GetPicture
Pixmap_t GetPicture() const
Definition: TGPicture.h:65
TGFrame::Move
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:578
TGScrollBarElement::DrawBorder
virtual void DrawBorder()
Draw border around scollbar element.
Definition: TGScrollBar.cxx:184
TGHScrollBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle a mouse button event in a horizontal scrolbar.
Definition: TGScrollBar.cxx:479
TGWindow::SetEditDisabled
virtual void SetEditDisabled(UInt_t on=kEditDisable)
Definition: TGWindow.h:114
TGHScrollBar::TGHScrollBar
TGHScrollBar(const TGWindow *p=0, UInt_t w=4, UInt_t h=2, UInt_t options=kHorizontalFrame, Pixel_t back=GetDefaultFrameBackground())
Create a horizontal scrollbar widget.
Definition: TGScrollBar.cxx:421
TGScrollBar::fSmallInc
Int_t fSmallInc
Definition: TGScrollBar.h:96
TImage::GetPixmap
virtual Pixmap_t GetPixmap()
Definition: TImage.h:235
Event_t
Definition: GuiTypes.h:173
name
char name[80]
Definition: TGX11.cxx:110
TGPicture::GetName
const char * GetName() const
Returns name of object.
Definition: TGPicture.h:62
TGScrollBar::ChangeBackground
virtual void ChangeBackground(Pixel_t back)
Change background color.
Definition: TGScrollBar.cxx:410
TTimer::Notify
virtual Bool_t Notify()
Notify when timer times out.
Definition: TTimer.cxx:143
kButton5
@ kButton5
Definition: GuiTypes.h:214
TGScrollBarElement::IsEnabled
virtual Bool_t IsEnabled() const
Definition: TGScrollBar.h:73
TGFrame::GetY
Int_t GetY() const
Definition: TGFrame.h:257
TGFrame::GetShadowGC
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:750
kC_HSCROLL
@ kC_HSCROLL
Definition: WidgetMessageTypes.h:42
TImage::SetImage
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=0)
Definition: TImage.h:116
TGWindow::kEditDisableWidth
@ kEditDisableWidth
Definition: TGWindow.h:64
TGResourcePool.h
TGScrollBar::fX0
Int_t fX0
Definition: TGScrollBar.h:87
kDefaultScrollBarWidth
@ kDefaultScrollBarWidth
Definition: GuiTypes.h:85
TGFrame::GetWhiteGC
static const TGGC & GetWhiteGC()
Get white graphics context.
Definition: TGFrame.cxx:730
TGeant4Unit::ms
static constexpr double ms
Definition: TGeant4SystemOfUnits.h:163
TGFrame::fHeight
UInt_t fHeight
Definition: TGFrame.h:113
TGFrame::fBackground
Pixel_t fBackground
Definition: TGFrame.h:120
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:166
TGWindow::fEditDisabled
UInt_t fEditDisabled
Definition: TGWindow.h:40
TGScrollBar::fSliderSize
Int_t fSliderSize
Definition: TGScrollBar.h:94
TGScrollBar::PositionChanged
virtual void PositionChanged(Int_t pos)
Definition: TGScrollBar.h:148
TGScrollBar::HandleButton
virtual Bool_t HandleButton(Event_t *event)=0
TGScrollBar::fY0
Int_t fY0
Definition: TGScrollBar.h:87
TTimer::Reset
void Reset()
Reset the timer.
Definition: TTimer.cxx:157
TGPicture::GetHeight
UInt_t GetHeight() const
Definition: TGPicture.h:64
Event_t::fUser
Long_t fUser[5]
Definition: GuiTypes.h:186
TGScrollBar.h
TGScrollBar::fXp
Int_t fXp
Definition: TGScrollBar.h:88
MK_MSG
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Definition: WidgetMessageTypes.h:110
TGWindow::fParent
const TGWindow * fParent
Definition: TGWindow.h:36
kButtonDisabled
@ kButtonDisabled
Definition: TGButton.h:56
int
TGScrollBar::fHighColor
Pixel_t fHighColor
Definition: TGScrollBar.h:106
TGFrame::DoRedraw
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:415