65 :
TGFrame(p, w, h, options, back)
99 img2->
Merge(img,
"overlay");
135 Error(
"TGVSlider",
"slider?h.xpm not found");
182 int lines = ((int)fHeight-16) /
fScale;
183 int remain = ((int)fHeight-16) %
fScale;
184 if (lines < 1) lines = 1;
185 for (
int i = 0; i <= lines; i++) {
186 int y = i *
fScale + (i * remain) / lines;
215 fPos -= ((
m) ? m : 1);
217 fPos += ((
m) ? m : 1);
224 if (
fPos != oldPos) {
252 fPos -= ((
m) ? m : 1);
255 fPos += ((
m) ? m : 1);
330 Error(
"TGHSlider",
"slider?v.xpm not found");
376 int lines = ((int)fWidth-16) /
fScale;
377 int remain = ((int)fWidth-16) %
fScale;
378 if (lines < 1) lines = 1;
379 for (
int i = 0; i <= lines; i++) {
380 int x = i *
fScale + (i * remain) / lines;
409 fPos += ((
m) ? m : 1);
411 fPos -= ((
m) ? m : 1);
418 if (
fPos != oldPos) {
440 fPos -= ((
m) ? m : 1);
443 fPos += ((
m) ? m : 1);
516 if (stype.
Length() == 0) stype =
"kSlider1";
517 else stype +=
" | kSlider1";
520 if (stype.
Length() == 0) stype =
"kSlider2";
521 else stype +=
" | kSlider2";
524 if (stype.
Length() == 0) stype =
"kScaleNo";
525 else stype +=
" | kScaleNo";
528 if (stype.
Length() == 0) stype =
"kScaleDownRight";
529 else stype +=
" | kScaleDownRight";
532 if (stype.
Length() == 0) stype =
"kScaleBoth";
533 else stype +=
" | kScaleBoth";
546 out <<
" TGHSlider *";
553 out <<
");" << std::endl;
560 if (option && strstr(option,
"keep_names"))
561 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
564 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
570 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
573 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
591 out <<
");" << std::endl;
598 if (option && strstr(option,
"keep_names"))
599 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
602 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
608 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
611 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
TGPicturePool * GetPicturePool() const
TGHSlider(const TGWindow *p=0, UInt_t w=40, UInt_t type=kSlider1|kScaleBoth, Int_t id=-1, UInt_t options=kHorizontalFrame, Pixel_t back=GetDefaultFrameBackground())
Create horizontal slider widget.
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.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SetState(Bool_t state)
Set state of widget. If kTRUE=enabled, kFALSE=disabled.
An abstract interface to image processing library.
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=0)
virtual Pixmap_t GetPixmap()
void Draw(Option_t *="")
Default Draw method for all objects.
Bool_t IsEditable() const
const Mask_t kPointerMotionMask
const char * Data() const
virtual void FillRectangle(const char *=0, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
const TGPicture * fDisabledPic
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
void FreePicture(const TGPicture *pic)
Free picture resource.
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
const char * GetName() const
Returns name of object.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual UInt_t GetDefaultWidth() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in horizontal slider widget.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
virtual ~TGHSlider()
Delete a horizontal slider widget.
const Mask_t kButtonPressMask
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical slider.
virtual Int_t GetPosition() const
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
TGVSlider(const TGWindow *p=0, UInt_t h=40, UInt_t type=kSlider1|kScaleBoth, Int_t id=-1, UInt_t options=kVerticalFrame, Pixel_t back=GetDefaultFrameBackground())
Create a vertical slider widget.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
static const TGGC & GetBlackGC()
Get black graphics context.
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
virtual void Resize(UInt_t w, UInt_t h)
Resize the frame.
Pixmap_t GetPicture() const
virtual void PositionChanged(Int_t pos)
const Mask_t kStructureNotifyMask
virtual Pixmap_t GetMask()
const Mask_t kButtonReleaseMask
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual void Resize(UInt_t w, UInt_t h)
Resize the frame.
virtual UInt_t GetDefaultHeight() const
virtual void CreateDisabledPicture()
Creates disabled picture.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in horizontal slide widget.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
static TImage * Create()
Create an image.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical slider.
virtual void DoRedraw()
Redraw vertical slider widget.
const Mask_t kAnyModifier
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
const TGPicture * fSliderPic
TString GetTypeString() const
Returns the slider type as a string - used in SavePrimitive().
virtual ~TGVSlider()
Delete vertical slider widget.