101 img2->
Merge(img,
"overlay");
137 Error(
"TGVSlider",
"slider?h.xpm not found");
186 if (lines < 1) lines = 1;
187 for (
int i = 0; i <= lines; i++) {
188 int y = i *
fScale + (i * remain) / lines;
226 if (
fPos != oldPos) {
332 Error(
"TGHSlider",
"slider?v.xpm not found");
380 if (lines < 1) lines = 1;
381 for (
int i = 0; i <= lines; i++) {
382 int x = i *
fScale + (i * remain) / lines;
420 if (
fPos != oldPos) {
518 if (stype.
Length() == 0) stype =
"kSlider1";
519 else stype +=
" | kSlider1";
522 if (stype.
Length() == 0) stype =
"kSlider2";
523 else stype +=
" | kSlider2";
526 if (stype.
Length() == 0) stype =
"kScaleNo";
527 else stype +=
" | kScaleNo";
530 if (stype.
Length() == 0) stype =
"kScaleDownRight";
531 else stype +=
" | kScaleDownRight";
534 if (stype.
Length() == 0) stype =
"kScaleBoth";
535 else stype +=
" | kScaleBoth";
548 out <<
" TGHSlider *";
555 out <<
");" << std::endl;
562 if (option && strstr(option,
"keep_names"))
563 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
566 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
572 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
575 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
593 out <<
");" << std::endl;
600 if (option && strstr(option,
"keep_names"))
601 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
604 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
610 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
613 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
const Mask_t kButtonPressMask
const Mask_t kAnyModifier
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kPointerMotionMask
const Mask_t kStructureNotifyMask
Handle_t GContext_t
Graphics context handle.
const Mask_t kButtonReleaseMask
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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
TString GetTypeString() const
Returns the slider type as a string - used in SavePrimitive().
TGSlider(const TGSlider &)=delete
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.
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.
TGVSlider(const TGWindow *p=nullptr, 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 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()
const char * Data() const
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
UInt_t fCode
key or button code