library: libGui #include "TGDoubleSlider.h"

# TGDoubleSlider

class description - source file - inheritance tree (.pdf)

## class TGDoubleSlider : public TGFrame, public TGWidget

| Inheritance Chart:
`TObject`
| <- | `TGObject`
| <- | `TGWindow`
`TQObject`
| <- | `TGFrame`
`TGWidget`
| <- | `TGDoubleSlider` |
<- |
`TGDoubleHSlider` |
`TGDoubleVSlider` |

This is an abstract class, constructors will not be documented.
Look at the header to check for available constructors.

        protected:

          static void FixBounds(Float_t& min, Float_t& max)
              TString GetSString() const

        public:

                  virtual ~TGDoubleSlider()
           static TClass* Class()
          virtual Float_t GetMaxPosition() const
          virtual Float_t GetMinPosition() const
             virtual void GetPosition(Float_t& min, Float_t& max) const
             virtual void GetPosition(Float_t* min, Float_t* max) const
           virtual Bool_t HandleButton(Event_t* event)
           virtual Bool_t HandleMotion(Event_t* event)
          virtual TClass* IsA() const
             virtual void MapSubwindows()
             virtual void PositionChanged()
             virtual void Pressed()
             virtual void Released()
             virtual void SetPosition(Float_t min, Float_t max)
             virtual void SetRange(Float_t min, Float_t max)
             virtual void SetScale(Int_t scale)
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

          Float_t fPos            logical position between fVmin and fVmax
          Float_t fSmin           logical position of min value of Slider
          Float_t fSmax           logical position of max value of Slider
            Int_t fRelPos         slider position in pixel coordinates
          Float_t fVmin           logical lower limit of slider
          Float_t fVmax           logical upper limit of slider
            Int_t fScale          tick mark scale
            Int_t fScaleType      tick mark scale type (no, downright, both)
            Int_t fPressPoint     mouse position at button press event
          Float_t fPressSmin      logical min position at button press event
          Float_t fPressSmax      logical max position at button press event
            Int_t fMove           1: move min value
           Bool_t fReversedScale  reverse which end is min and max
           Bool_t fMarkEnds       lines marking where stretch zones begin

## Class Description

     TGDoubleSlider, TGDoubleVSlider and TGDoubleHSlider

     DoubleSlider widgets allow easy selection of a min and a max value
     out of a range.
     DoubleSliders can be either horizontal or vertical oriented and
     there is a choice of three different types of tick marks.

     To change the min value press the mouse near to the left / bottom
     edge of the slider.
     To change the max value press the mouse near to the right / top
     edge of the slider.
     To change both values simultaneously press the mouse near to the
     center of the slider.

     TGDoubleSlider is an abstract base class. Use the concrete
     TGDoubleVSlider and TGDoubleHSlider.

     Dragging the slider will generate the event:
     kC_VSLIDER, kSL_POS, slider id, 0  (for vertical slider)
     kC_HSLIDER, kSL_POS, slider id, 0  (for horizontal slider)

     Pressing the mouse will generate the event:
     kC_VSLIDER, kSL_PRESS, slider id, 0  (for vertical slider)
     kC_HSLIDER, kSL_PRESS, slider id, 0  (for horizontal slider)

     Releasing the mouse will generate the event:
     kC_VSLIDER, kSL_RELEASE, slider id, 0  (for vertical slider)
     kC_HSLIDER, kSL_RELEASE, slider id, 0  (for horizontal slider)

     Use the functions GetMinPosition(), GetMaxPosition() and
     GetPosition() to retrieve the position of the slider.

void FixBounds(Float_t &min, Float_t &max)

     Avoid boundaries to be equal.

TString GetSString() const

     Returns the slider type as a string - used in SavePrimitive()

### Inline Functions

                   void ~TGDoubleSlider()
                 Bool_t HandleButton(Event_t* event)
                 Bool_t HandleMotion(Event_t* event)
                   void SetScale(Int_t scale)
                   void SetRange(Float_t min, Float_t max)
                   void SetPosition(Float_t min, Float_t max)
                Float_t GetMinPosition() const
                Float_t GetMaxPosition() const
                   void GetPosition(Float_t& min, Float_t& max) const
                   void GetPosition(Float_t* min, Float_t* max) const
                   void MapSubwindows()
                   void PositionChanged()
                   void Pressed()
                   void Released()
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)

Author: Reiner Rohlfs 30/09/98
Last update: root/gui:$Name: $:$Id: TGDoubleSlider.cxx,v 1.12 2005/01/12 18:39:29 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *