82 const char *lbl1,
const char *lbl2,
const char *dsp1,
83 const char *dsp2,
int id)
123 Int_t i, nexe, offset;
126 if (!counterFont)
return;
130 if (!textFont)
return;
134 if (!labelFont)
return;
148 for (i=1; i<4; i++) {
156 for (i=0; i<5; i++) {
160 if (
mark[4] < 1000.0)
break;
171 for (i=0; i<5; i++) {
175 if (
mark[4] > 99.9 )
break;
246 if (!glowImage || !glowImage->
IsValid()) {
247 Error(
"TGSpeedo::Glow",
"glow_green.png not found");
253 if (!glowImage || !glowImage->
IsValid()) {
254 Error(
"TGSpeedo::Glow",
"glow_orange.png not found");
260 if (!glowImage || !glowImage->
IsValid()) {
261 Error(
"TGSpeedo::Glow",
"glow_red.png not found");
286 if ((event->
fX > (xc - 26)) && (event->
fX < (xc + 26)) &&
287 (event->
fY < (yc + 50)) && (event->
fY > (yc + 28))) {
291 else if ((event->
fX > (xc + 30)) && (event->
fX < (xc + 40)) &&
292 (event->
fY > (yc + 57)) && (event->
fY < (yc + 67))) {
412 if ((damping > 0) || (
gVirtualX->InheritsFrom(
"TGX11")))
419 Float_t diff_ratio = diff_scale / diff_angle;
423 if (new_angle > old_angle) {
424 for (i=old_angle; i<new_angle; i+=step) {
431 if (new_angle < old_angle) {
432 for (i=old_angle; i>new_angle; i-=step) {
467 Int_t xch0, xch1, ych0, ych1;
468 Int_t xpk0, ypk0, xpk1, ypk1;
469 Int_t xmn0, ymn0, xmn1, ymn1;
492 if (!img || !img->
IsValid())
return;
494 img->
DrawLine(xpk0, ypk0, xpk1, ypk1,
"#00ff00", 3);
495 img->
DrawLine(xpk0, ypk0, xpk1, ypk1,
"#ffffff", 1);
498 img->
DrawLine(xmn0, ymn0, xmn1, ymn1,
"#ffff00", 3);
499 img->
DrawLine(xmn0, ymn0, xmn1, ymn1,
"#ff0000", 1);
502 img->
DrawLine(xch0, ych0, xch1, ych1,
"#ff0000", 2);
538 if (nexe%3 == 0 && ww < 10000)
break;
544 snprintf(sval, 80,
"%04d", (
int)ww);
545 snprintf(dsval, 80,
"%c %c %c %c", sval[0], sval[1], sval[2], sval[3]);
573 Int_t xch0, xch1, ych0, ych1;
574 Int_t xpk0, ypk0, xpk1, ypk1;
575 Int_t xmn0, ymn0, xmn1, ymn1;
618 if (nexe%3 == 0 && ww < 10000)
break;
624 snprintf(sval, 80,
"%04d", (
int)ww);
625 snprintf(dsval, 80,
"%c %c %c %c", sval[0], sval[1], sval[2], sval[3]);
643 if (!img || !img->
IsValid())
return;
645 img->
DrawLine(xpk0, ypk0, xpk1, ypk1,
"#00ff00", 3);
646 img->
DrawLine(xpk0, ypk0, xpk1, ypk1,
"#ffffff", 1);
649 img->
DrawLine(xmn0, ymn0, xmn1, ymn1,
"#ffff00", 3);
650 img->
DrawLine(xmn0, ymn0, xmn1, ymn1,
"#ff0000", 1);
653 img->
DrawLine(xch0, ych0, xch1, ych1,
"#ff0000", 2);
const Mask_t kButtonPressMask
const Mask_t kButtonReleaseMask
R__EXTERN TSystem * gSystem
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
TGPicturePool * GetPicturePool() const
void FreePicture(const TGPicture *pic)
Free picture resource.
FontStruct_t GetFontStruct() const
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual void DoRedraw()
Redraw the frame.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
void SetOdoValue(Int_t val)
Set actual value of odo meter.
virtual ~TGSpeedo()
TGSpeedo widget Destructor.
void StepScale(Float_t step)
Increment/decrement scale (needle position) of "step" value.
EGlowColor fThresholdColor[3]
void SetDisplayText(const char *text1, const char *text2="")
Set small display text (two lines).
virtual void DoRedraw()
Redraw speedo widget.
void Glow(EGlowColor col=kGreen)
Make speedo glowing.
void SetMinMaxScale(Float_t min, Float_t max)
Set min and max scale values.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
void DrawText()
Draw text in speedo widget.
virtual TGDimension GetDefaultSize() const
Return default dimension of the widget.
void Translate(Float_t val, Float_t angle, Int_t *x, Int_t *y)
Translate distance from center and angle to xy coordinates.
void SetLabelText(const char *text1, const char *text2="")
Set main label text (two lines).
void SetScaleValue(Float_t val)
Set actual scale (needle position) value.
void Build()
Build TGSpeedo widget.
void DrawNeedle()
Draw needle in speedo widget.
TGSpeedo(const TGWindow *p=0, int id=-1)
TGSpeedo widget constructor.
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual void DrawText(Int_t=0, Int_t=0, const char *="", Int_t=12, const char *=0, const char *="fixed", EText3DType=TImage::kPlain, const char *=0, Float_t=0)
virtual void DrawLine(UInt_t, UInt_t, UInt_t, UInt_t, const char *="#000000", UInt_t=1)
virtual Bool_t IsValid() const
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual Pixmap_t GetPixmap()
virtual void PaintImage(Drawable_t, Int_t, Int_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0, Option_t *="")
virtual TObject * Clone(const char *) const
Make a clone of an object using the Streamer facility.
virtual Pixmap_t GetMask()
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.