128   if (min > max) min = max;
 
  131   if (max - min < eps) {
 
  153            stype  = 
"kDoubleScaleNo";
 
  155            stype += 
" | kDoubleScaleNo";
 
  159            stype  = 
"kDoubleScaleDownRight";
 
  161            stype += 
" | kDoubleScaleDownRight";
 
  165            stype  = 
"kDoubleScaleBoth";
 
  167            stype += 
" | kDoubleScaleBoth";
 
  180   Int_t hw = 0, wh = 0, 
xy = 0, yx = 0;
 
  185   if (leftCur == 
kNone)
 
  189   if (rightCur == 
kNone)
 
  212   if (
xy > hw/2-7 && 
xy < hw/2+7 && 
fMove != 3) {
 
  216      if ((yx <= (relMax - relMin) / 4 + relMin) &&
 
  217          (yx >= relMin) && (
fMove != 2))
 
  222      else if ((yx >= (relMax - relMin) / 4 * 3 + relMin) &&
 
  223               (yx <= relMax) && (
fMove != 1))
 
  248      Error(
"TGDoubleVSlider", 
"sliderv.xpm not found");
 
  292   if (relMax+1 < (
int)
fHeight-8) {
 
  304      if (lines < 1) lines = 1;
 
  305      for (
int i = 0; i <= lines; i++) {
 
  306         int y = i * 
fScale + (i * remain) / lines;
 
  322      int y1 = (relMax - relMin) / 4 + relMin;
 
  323      int y2 = (relMax - relMin) / 4 * 3 + relMin;
 
  348      else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
 
  387   if ((now-was) < 50) 
return kTRUE;
 
  402   } 
else if (
fMove == 2) {
 
  407   } 
else if (
fMove == 3) {
 
  442      Error(
"TGDoubleHSlider", 
"sliderh.xpm not found");
 
  484   if (relMax+1 < (
int)
fWidth-8) {
 
  495      if (lines < 1) lines = 1;
 
  496      for (
int i = 0; i <= lines; i++) {
 
  497         int x = i * 
fScale + (i * remain) / lines;
 
  513      int x1 = (relMax - relMin) / 4 + relMin;
 
  514      int x2 = (relMax - relMin) / 4 * 3 + relMin;
 
  539      else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
 
  578   if ((now-was) < 50) 
return kTRUE;
 
  593   } 
else if (
fMove == 2) {
 
  598   } 
else if (
fMove == 3) {
 
  627   out <<
"   TGDoubleHSlider *";
 
  634         out << 
",kTRUE,kTRUE);" << std::endl;
 
  636         out << 
",kFALSE,kTRUE);" << std::endl;
 
  638      out << 
",kTRUE);" << std::endl;
 
  640      out << 
");" << std::endl;
 
  643      out << 
"   " << 
GetName() << 
"->SetName(\"" << 
GetName() << 
"\");" << std::endl;
 
  647          << 
");" << std::endl;
 
  654      out << 
"   " << 
GetName() << 
"->SetScale(" << 
fScale << 
");" << std::endl;
 
  665   out<<
"   TGDoubleVSlider *";
 
  672         out << 
",kTRUE,kTRUE);" << std::endl;
 
  674         out << 
",kFALSE,kTRUE);" << std::endl;
 
  676      out << 
",kTRUE);" << std::endl;
 
  678      out << 
");" << std::endl;
 
  681      out << 
"   " << 
GetName() << 
"->SetName(\"" << 
GetName() << 
"\");" << std::endl;
 
  685          << 
");" << std::endl;
 
  694      out << 
"   " << 
GetName() << 
"->SetScale(" << 
fScale << 
");" << std::endl;
 
const Mask_t kButtonPressMask
 
const Mask_t kAnyModifier
 
const Mask_t kPointerMotionMask
 
Handle_t Cursor_t
Cursor handle.
 
const Mask_t kButtonReleaseMask
 
ULong_t Pixel_t
Pixel value.
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
 
Option_t Option_t TPoint TPoint const char x2
 
Option_t Option_t TPoint TPoint const char x1
 
Option_t Option_t TPoint xy
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
 
Option_t Option_t TPoint TPoint const char y2
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
Option_t Option_t TPoint TPoint const char y1
 
R__EXTERN TSystem * gSystem
 
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
 
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
 
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
 
void FreePicture(const TGPicture *pic)
Free picture resource.
 
Dragging the slider will generate the event:
 
void DoRedraw() override
Redraw horizontal slider widget.
 
TGDoubleHSlider(const TGWindow *p=nullptr, UInt_t w=1, UInt_t type=1, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetDefaultFrameBackground(), Bool_t reversed=kFALSE, Bool_t mark_ends=kFALSE)
Create horizontal slider widget.
 
Int_t fXp
horizontal slider x position in pixel coordinates
 
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in horizontal slide widget.
 
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save an horizontal slider as a C++ statement(s) on output stream out.
 
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in horizontal slider widget.
 
virtual ~TGDoubleHSlider()
Delete a horizontal slider widget.
 
DoubleSlider widgets allow easy selection of a min and a max value out of a range.
 
void ChangeCursor(Event_t *event)
Change the cursor shape depending on the slider area.
 
virtual Float_t GetMaxPosition() const
 
Double_t fSmin
logical position of min value of Slider
 
Int_t fScaleType
tick mark scale type (no, downright, both)
 
Double_t fPressSmax
logical max position at button press event
 
virtual void PositionChanged()
 
TGDoubleSlider(const TGDoubleSlider &)=delete
 
Double_t fSmax
logical position of max value of Slider
 
static void FixBounds(Double_t &min, Double_t &max)
Avoid boundaries to be equal.
 
Double_t fVmax
logical upper limit of slider
 
Int_t fScale
tick mark scale
 
Double_t fVmin
logical lower limit of slider
 
Int_t fMove
1: move min value 2: move max value 3: move min and max value 0: don't move any value
 
Int_t fRelPos
slider position in pixel coordinates
 
Double_t fPos
logical position between fVmin and fVmax
 
virtual Float_t GetMinPosition() const
 
Bool_t fReversedScale
reverse which end is min and max
 
Double_t fPressSmin
logical min position at button press event
 
Bool_t fMarkEnds
lines marking where stretch zones begin
 
Int_t fPressPoint
mouse position at button press event
 
const TGPicture * fSliderPic
picture to draw slider ends
 
TString GetSString() const
returns scaling type as string
 
Dragging the slider will generate the event:
 
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in vertical slider.
 
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save an horizontal slider as a C++ statement(s) on output stream out.
 
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion event in vertical slider.
 
TGDoubleVSlider(const TGWindow *p=nullptr, UInt_t h=1, UInt_t type=1, Int_t id=-1, UInt_t options=kVerticalFrame, Pixel_t back=GetDefaultFrameBackground(), Bool_t reversed=kFALSE, Bool_t mark_ends=kFALSE)
Create a vertical slider widget.
 
Int_t fYp
vertical slider y position in pixel coordinates
 
virtual ~TGDoubleVSlider()
Delete vertical slider widget.
 
void DoRedraw() override
Redraw vertical slider widget.
 
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
 
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
 
static const TGGC & GetBlackGC()
Get black graphics context.
 
UInt_t fHeight
frame height
 
static const TGGC & GetHilightGC()
Get highlight color graphics context.
 
virtual UInt_t GetOptions() const
 
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
 
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
 
static const TGGC & GetShadowGC()
Get shadow color graphics context.
 
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
 
static const TGGC & GetBckgndGC()
Get background color graphics context.
 
TGClient * fClient
Connection to display server.
 
Handle_t fId
X11/Win32 Window identifier.
 
void Draw(Option_t *="") override
Default Draw method for all objects.
 
ROOT GUI Window base class.
 
const TGWindow * fParent
Parent window.
 
virtual void SetWindowName(const char *name=nullptr)
Set window name.
 
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
 
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.