99 img2->
Merge(img,
"overlay");
135 Error(
"TGVSlider",
"slider?h.xpm not found");
184 if (lines < 1) lines = 1;
185 for (
int i = 0; i <= lines; i++) {
186 int y = i *
fScale + (i * remain) / lines;
224 if (
fPos != oldPos) {
330 Error(
"TGHSlider",
"slider?v.xpm not found");
378 if (lines < 1) lines = 1;
379 for (
int i = 0; i <= lines; i++) {
380 int x = i *
fScale + (i * remain) / lines;
418 if (
fPos != oldPos) {
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;
const Mask_t kButtonPressMask
const Mask_t kAnyModifier
const Mask_t kPointerMotionMask
const Mask_t kStructureNotifyMask
const Mask_t kButtonReleaseMask
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Bool_t IsEditable() const
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.
TGPicturePool * GetPicturePool() const
void FreePicture(const TGPicture *pic)
Free picture resource.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
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 UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
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.
virtual void Resize(UInt_t w, UInt_t h)
Resize the frame.
virtual void DoRedraw()
Redraw horizontal slider widget.
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.
virtual ~TGHSlider()
Delete a horizontal slider widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in horizontal slide widget.
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.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
const char * GetName() const
Returns name of object.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixmap_t GetPicture() const
virtual void CreateDisabledPicture()
Creates disabled picture.
virtual Int_t GetPosition() const
const TGPicture * fSliderPic
TGSlider(const TGSlider &)
TString GetTypeString() const
Returns the slider type as a string - used in SavePrimitive().
const TGPicture * fDisabledPic
virtual void PositionChanged(Int_t pos)
virtual void SetState(Bool_t state)
Set state of widget. If kTRUE=enabled, kFALSE=disabled.
virtual void Resize(UInt_t w, UInt_t h)
Resize the frame.
virtual Bool_t HandleConfigureNotify(Event_t *event)
Handles resize events for this widget.
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.
virtual ~TGVSlider()
Delete vertical slider widget.
virtual void DoRedraw()
Redraw vertical slider widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an horizontal slider as a C++ statement(s) on output stream out.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion event in vertical slider.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical slider.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
An abstract interface to image processing library.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=0)
static TImage * Create()
Create an image.
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual Pixmap_t GetPixmap()
virtual void FillRectangle(const char *=0, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
virtual Pixmap_t GetMask()
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const