85 Error(
"TGTripleVSlider",
"slider1h.xpm not found");
140 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
143 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
189 if (event->
fY > (
fCz - 5) && event->
fY < (
fCz + 5) &&
197 static int oldDiff = 0;
202 if ((now-was) < 50)
return kTRUE;
218 }
else if (
fMove == 2) {
224 }
else if (
fMove == 3) {
232 fSmax = fPressSmax + logicalDiff;
233 fSmin = fPressSmin + logicalDiff;
235 if (abs(diff) < 3) oldDiff = diff;
240 else if (
fMove == 4) {
279 Bool_t lcheck = (opt == 1);
323 if ((
fMove != 4) && ((now-was) < 150))
return;
358 Error(
"TGTripleVSlider",
"slider1v.xpm not found");
413 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
416 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
462 if (event->
fX > (
fCz - 5) && event->
fX < (
fCz + 5) &&
470 static int oldDiff = 0;
475 if ((now-was) < 50)
return kTRUE;
491 }
else if (
fMove == 2) {
497 }
else if (
fMove == 3) {
505 fSmax = fPressSmax + logicalDiff;
506 fSmin = fPressSmin + logicalDiff;
508 if (abs(diff) < 3) oldDiff = diff;
513 else if (
fMove == 4) {
552 Bool_t lcheck = (opt == 1);
596 if ((
fMove != 4) && ((now-was) < 150))
return;
627 out <<
" TGTripleHSlider *";
634 out <<
",kTRUE,kTRUE";
636 out <<
",kFALSE,kTRUE";
638 out <<
",kTRUE,kFALSE";
640 out <<
",kFALSE,kFALSE";
644 out <<
",kFALSE,kTRUE);" << std::endl;
646 out <<
",kFALSE,kFALSE);" << std::endl;
649 out <<
",kTRUE);" << std::endl;
652 out <<
");" << std::endl;
654 if (option && strstr(option,
"keep_names"))
655 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
659 <<
");" << std::endl;
661 if (
fSmin != fWidth/8*3 ||
fSmax != fWidth/8*5)
666 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
668 out <<
" " <<
GetName() <<
"->SetPointerPosition(" <<
fSCz <<
");" << std::endl;
678 out<<
" TGTripleVSlider *";
685 out <<
",kTRUE,kTRUE";
687 out <<
",kFALSE,kTRUE";
689 out <<
",kTRUE,kFALSE";
691 out <<
",kFALSE,kFALSE";
695 out <<
",kFALSE,kTRUE);" << std::endl;
697 out <<
",kFALSE,kFALSE);" << std::endl;
700 out <<
",kTRUE);" << std::endl;
703 out <<
");" << std::endl;
705 if (option && strstr(option,
"keep_names"))
706 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
710 <<
");" << std::endl;
712 if (
fSmin != fHeight/8*3 ||
fSmax != fHeight/8*5)
717 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
719 out <<
" " <<
GetName() <<
"->SetPointerPosition(" <<
fSCz <<
");" << std::endl;
TString GetSString() const
Returns the slider type as a string - used in SavePrimitive()
virtual Float_t GetMinPosition() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in horizontal slider widget.
virtual void SetPointerPos(Int_t z, Int_t opt=0)
Set slider pointer position in pixel value.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in horizontal slide widget.
virtual Float_t GetMaxPosition() const
virtual void PointerPositionChanged()
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual void DoRedraw()
Redraw horizontal slider widget.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical slider.
virtual ~TGTripleVSlider()
Delete vertical slider widget.
virtual void DoRedraw()
Redraw vertical slider widget.
const TGPicture * fPointerPic
void Draw(Option_t *="")
Default Draw method for all objects.
const Mask_t kPointerMotionMask
virtual Float_t GetPointerPosition() const
void FreePicture(const TGPicture *pic)
Free picture resource.
virtual void SetPointerPosition(Float_t pos)
Set pointer position in scaled (real) value.
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
virtual Float_t GetPointerPosition() const
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
const Mask_t kButtonPressMask
virtual void DrawPointer()
Draw slider pointer.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
virtual ~TGTripleHSlider()
Delete a horizontal slider widget.
virtual void SetPointerPos(Int_t z, Int_t opt=0)
Set slider pointer position in pixel value.
R__EXTERN TSystem * gSystem
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void SetPointerPosition(Float_t pos)
Set pointer position in scaled (real) value.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void ChangeCursor(Event_t *event)
Change the cursor shape depending on the slider area.
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
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.
const TGPicture * fPointerPic
const Mask_t kStructureNotifyMask
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical slider.
const Mask_t kButtonReleaseMask
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
virtual void SetConstrained(Bool_t on=kTRUE)
Set pointer position constrained in the slider range.
you should not use this method at all Int_t Int_t z
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
virtual void DrawPointer()
Draw slider pointer.
virtual void DoRedraw()
Redraw vertical slider widget.
virtual void PointerPositionChanged()
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void DoRedraw()
Redraw horizontal slider widget.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
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 HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
virtual void PositionChanged()
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual void SetConstrained(Bool_t on=kTRUE)
Set pointer position constrained in the slider range.