120 Error(
"TGTripleVSlider",
"slider1h.xpm not found");
175 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
178 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
232 static int oldDiff = 0;
237 if ((now-was) < 50)
return kTRUE;
253 }
else if (
fMove == 2) {
259 }
else if (
fMove == 3) {
270 if (abs(diff) < 3) oldDiff = diff;
275 else if (
fMove == 4) {
314 Bool_t lcheck = (opt == 1);
358 if ((
fMove != 4) && ((now-was) < 150))
return;
393 Error(
"TGTripleVSlider",
"slider1v.xpm not found");
448 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
451 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
505 static int oldDiff = 0;
510 if ((now-was) < 50)
return kTRUE;
526 }
else if (
fMove == 2) {
532 }
else if (
fMove == 3) {
543 if (abs(diff) < 3) oldDiff = diff;
548 else if (
fMove == 4) {
587 Bool_t lcheck = (opt == 1);
631 if ((
fMove != 4) && ((now-was) < 150))
return;
662 out <<
" TGTripleHSlider *";
669 out <<
",kTRUE,kTRUE";
671 out <<
",kFALSE,kTRUE";
673 out <<
",kTRUE,kFALSE";
675 out <<
",kFALSE,kFALSE";
679 out <<
",kFALSE,kTRUE);" << std::endl;
681 out <<
",kFALSE,kFALSE);" << std::endl;
684 out <<
",kTRUE);" << std::endl;
687 out <<
");" << std::endl;
689 if (option && strstr(option,
"keep_names"))
690 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
694 <<
");" << std::endl;
701 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
703 out <<
" " <<
GetName() <<
"->SetPointerPosition(" <<
fSCz <<
");" << std::endl;
713 out<<
" TGTripleVSlider *";
720 out <<
",kTRUE,kTRUE";
722 out <<
",kFALSE,kTRUE";
724 out <<
",kTRUE,kFALSE";
726 out <<
",kFALSE,kFALSE";
730 out <<
",kFALSE,kTRUE);" << std::endl;
732 out <<
",kFALSE,kFALSE);" << std::endl;
735 out <<
",kTRUE);" << std::endl;
738 out <<
");" << std::endl;
740 if (option && strstr(option,
"keep_names"))
741 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
745 <<
");" << std::endl;
752 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
754 out <<
" " <<
GetName() <<
"->SetPointerPosition(" <<
fSCz <<
");" << std::endl;
const Mask_t kButtonPressMask
const Mask_t kPointerMotionMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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:
virtual void DoRedraw()
Redraw horizontal slider widget.
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
Double_t fPressSmax
logical max position at button press event
virtual void PositionChanged()
Double_t fSmax
logical position of max value of Slider
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
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
TString GetSString() const
returns scaling type as string
Dragging the slider will generate the event:
virtual void DoRedraw()
Redraw vertical slider widget.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
UInt_t fHeight
frame height
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.
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 *="")
Default Draw method for all objects.
TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer val...
Bool_t fConstrained
kTRUE if pointer is constrained to slider edges
Int_t fCz
horizontal pointer position in pixel coordinates
virtual void DoRedraw()
Redraw horizontal slider widget.
TGTripleHSlider(const TGWindow *p=0, 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, Bool_t constrained=kTRUE, Bool_t relative=kFALSE)
Create horizontal slider widget.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in horizontal slider widget.
const TGPicture * fPointerPic
picture to draw pointer
Double_t fSCz
vertical pointer position
virtual void PointerPositionChanged()
virtual ~TGTripleHSlider()
Delete a horizontal slider widget.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
Bool_t fRelative
kTRUE if pointer position is relative to slider
virtual Float_t GetPointerPosition() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
virtual void DrawPointer()
Draw slider pointer.
virtual void SetPointerPos(Int_t z, Int_t opt=0)
Set slider pointer position in pixel value.
virtual void SetPointerPosition(Double_t pos)
Set pointer position in scaled (real) value.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in horizontal slide widget.
virtual void SetConstrained(Bool_t on=kTRUE)
Set pointer position constrained in the slider range.
TripleSlider inherit from DoubleSlider widgets and allow easy selection of a min, max and pointer val...
virtual void SetPointerPos(Int_t z, Int_t opt=0)
Set slider pointer position in pixel value.
virtual void SetPointerPosition(Double_t pos)
Set pointer position in scaled (real) value.
Double_t fSCz
vertical pointer position
virtual void DoRedraw()
Redraw vertical slider widget.
Int_t fCz
vertical pointer position in pixel coordinates
virtual void DrawPointer()
Draw slider pointer.
virtual void PointerPositionChanged()
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical slider.
virtual void SetConstrained(Bool_t on=kTRUE)
Set pointer position constrained in the slider range.
virtual ~TGTripleVSlider()
Delete vertical slider widget.
Bool_t fRelative
kTRUE if pointer position is relative to slider
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
const TGPicture * fPointerPic
picture to draw pointer
virtual Float_t GetPointerPosition() const
TGTripleVSlider(const TGWindow *p=0, 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, Bool_t constrained=kTRUE, Bool_t relative=kFALSE)
Create a vertical slider widget.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical slider.
Bool_t fConstrained
kTRUE if pointer is constrained to slider edges
ROOT GUI Window base class.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const TGWindow * fParent
Parent window.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.