116 img2->
Merge(img,
"overlay");
152 Error(
"TGVSlider",
"slider?h.xpm not found");
201 if (lines < 1) lines = 1;
202 for (
int i = 0; i <= lines; i++) {
203 int y = i *
fScale + (i * remain) / lines;
241 if (
fPos != oldPos) {
347 Error(
"TGHSlider",
"slider?v.xpm not found");
395 if (lines < 1) lines = 1;
396 for (
int i = 0; i <= lines; i++) {
397 int x = i *
fScale + (i * remain) / lines;
435 if (
fPos != oldPos) {
533 if (stype.
Length() == 0) stype =
"kSlider1";
534 else stype +=
" | kSlider1";
537 if (stype.
Length() == 0) stype =
"kSlider2";
538 else stype +=
" | kSlider2";
541 if (stype.
Length() == 0) stype =
"kScaleNo";
542 else stype +=
" | kScaleNo";
545 if (stype.
Length() == 0) stype =
"kScaleDownRight";
546 else stype +=
" | kScaleDownRight";
549 if (stype.
Length() == 0) stype =
"kScaleBoth";
550 else stype +=
" | kScaleBoth";
563 out <<
" TGHSlider *";
570 out <<
");" << std::endl;
577 if (option && strstr(option,
"keep_names"))
578 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
581 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
587 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
590 out <<
" " <<
GetName() <<
"->SetState(kFALSE);" << std::endl;
608 out <<
");" << std::endl;
615 if (option && strstr(option,
"keep_names"))
616 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
619 out <<
" " <<
GetName() <<
"->SetRange(" <<
fVmin <<
"," <<
fVmax <<
");" << std::endl;
625 out <<
" " <<
GetName() <<
"->SetScale(" <<
fScale <<
");" << std::endl;
628 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.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
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.
UInt_t fHeight
frame height
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
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().
Pixel_t fBackground
frame background color
static const TGGC & GetBckgndGC()
Get background color graphics context.
Concrete class for horizontal slider.
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.
Int_t fXp
horizontal slider x position in pixel coordinates
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.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const char * GetName() const
Returns name of object.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixmap_t GetPicture() const
Slider widgets allow easy selection of a range.
Int_t fPos
logical position between fVmin and fVmax
Int_t fRelPos
slider position in pixel coordinates
virtual void CreateDisabledPicture()
Creates disabled picture.
virtual Int_t GetPosition() const
const TGPicture * fSliderPic
picture to draw slider
Int_t fVmin
logical lower limit of slider
Int_t fType
slider type bits
TString GetTypeString() const
used in SavePrimitive
TGSlider(const TGSlider &)=delete
Bool_t fDragging
true if in dragging mode
Int_t fScale
tick mark scale
const TGPicture * fDisabledPic
picture to draw disabled slider
virtual void PositionChanged(Int_t pos)
Int_t fVmax
logical upper limit of slider
virtual void SetState(Bool_t state)
Set state of widget. If kTRUE=enabled, kFALSE=disabled.
Concrete class for vertical slider.
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.
Int_t fYp
vertical slider y position in pixel coordinates
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.
ROOT GUI Window base class.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const TGWindow * fParent
Parent window.
@ kEditDisableHeight
window height cannot be edited
@ kEditDisableWidth
window width cannot be edited
UInt_t fEditDisabled
flags used for "guibuilding"
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