86 Error(
"TGTripleVSlider",
"slider1h.xpm not found");
141 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
144 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
190 if (event->
fY > (
fCz - 5) && event->
fY < (
fCz + 5) &&
198 static int oldDiff = 0;
203 if ((now-was) < 50)
return kTRUE;
219 }
else if (
fMove == 2) {
225 }
else if (
fMove == 3) {
236 if (abs(diff) < 3) oldDiff = diff;
241 else if (
fMove == 4) {
280 Bool_t lcheck = (opt == 1);
324 if ((
fMove != 4) && ((now-was) < 150))
return;
359 Error(
"TGTripleVSlider",
"slider1v.xpm not found");
414 else if (
fPressPoint < (relMax - relMin) / 4 + relMin)
417 else if (
fPressPoint > (relMax - relMin) / 4 * 3 + relMin)
463 if (event->
fX > (
fCz - 5) && event->
fX < (
fCz + 5) &&
471 static int oldDiff = 0;
476 if ((now-was) < 50)
return kTRUE;
492 }
else if (
fMove == 2) {
498 }
else if (
fMove == 3) {
509 if (abs(diff) < 3) oldDiff = diff;
514 else if (
fMove == 4) {
553 Bool_t lcheck = (opt == 1);
597 if ((
fMove != 4) && ((now-was) < 150))
return;
628 out <<
" TGTripleHSlider *";
635 out <<
",kTRUE,kTRUE";
637 out <<
",kFALSE,kTRUE";
639 out <<
",kTRUE,kFALSE";
641 out <<
",kFALSE,kFALSE";
645 out <<
",kFALSE,kTRUE);" << std::endl;
647 out <<
",kFALSE,kFALSE);" << std::endl;
650 out <<
",kTRUE);" << std::endl;
653 out <<
");" << std::endl;
655 if (option && strstr(option,
"keep_names"))
656 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
660 <<
");" << std::endl;
667 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
669 out <<
" " <<
GetName() <<
"->SetPointerPosition(" <<
fSCz <<
");" << std::endl;
679 out<<
" TGTripleVSlider *";
686 out <<
",kTRUE,kTRUE";
688 out <<
",kFALSE,kTRUE";
690 out <<
",kTRUE,kFALSE";
692 out <<
",kFALSE,kFALSE";
696 out <<
",kFALSE,kTRUE);" << std::endl;
698 out <<
",kFALSE,kFALSE);" << std::endl;
701 out <<
",kTRUE);" << std::endl;
704 out <<
");" << std::endl;
706 if (option && strstr(option,
"keep_names"))
707 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
711 <<
");" << std::endl;
718 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
720 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.
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
virtual void PositionChanged()
virtual Float_t GetMinPosition() const
TString GetSString() const
Returns the slider type as a string - used in SavePrimitive()
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.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
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.
void Draw(Option_t *="")
Default Draw method for all objects.
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
virtual void PointerPositionChanged()
virtual ~TGTripleHSlider()
Delete a horizontal slider widget.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
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.
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 void DoRedraw()
Redraw vertical slider widget.
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.
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
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.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
UInt_t fCode
key or button code