Bool_t fAlignRight;
Bool_t fShowSlider;
- Int_t fNELength;
- Int_t fNEHeight;
+ Int_t fNELength; // Number-entry length (in characters)
+ Int_t fNEHeight; // Number-entry height (in pixels)
TGLabel* fLabel;
RGValuatorBase(const TGWindow *p, const char* title, UInt_t w, UInt_t h);
virtual ~RGValuatorBase() {}
- virtual void Build() = 0;
+ virtual void Build(Bool_t connect=kTRUE) = 0;
void SetLabelWidth(Int_t w) { fLabelWidth = w; }
void SetAlignRight(Bool_t a) { fAlignRight = a; }
void SetShowSlider(Bool_t s=kTRUE) { fShowSlider = s; }
void SetNELength(Int_t l) { fNELength = l; }
- void SetNEGeight(Int_t h) { fNEHeight = h; }
+ void SetNEHeight(Int_t h) { fNEHeight = h; }
ClassDef(RGValuatorBase, 0);
}; // endclass RGValuatorBase
RGValuator(const TGWindow *p, const char* title, UInt_t w, UInt_t h);
virtual ~RGValuator() {}
- virtual void Build();
+ virtual void Build(Bool_t connect=kTRUE);
Float_t GetValue() const { return fValue; }
virtual void SetValue(Float_t v, Bool_t emit=kFALSE);
void SetSliderNewLine(Bool_t nl) { fSliderNewLine = nl; }
+ void GetLimits(Float_t& min, Float_t& max) const { min = fMin; max = fMax; }
+ Float_t GetLimitMin() const { return fMin; }
+ Float_t GetLimitMax() const { return fMax; }
void SetLimits(Int_t min, Int_t max);
void SetLimits(Float_t min, Float_t max, Int_t npos,
TGNumberFormat::EStyle nef=TGNumberFormat::kNESRealTwo);
RGDoubleValuator(const TGWindow *p, const char* title, UInt_t w, UInt_t h);
virtual ~RGDoubleValuator() {}
- virtual void Build();
+ virtual void Build(Bool_t connect=kTRUE);
void MinEntryCallback();
void MaxEntryCallback();
TGNumberEntry* GetMinEntry() { return fMinEntry; }
TGNumberEntry* GetMaxEntry() { return fMaxEntry; }
+ void SetLimits(Int_t min, Int_t max);
void SetLimits(Float_t min, Float_t max, TGNumberFormat::EStyle nef=TGNumberFormat::kNESRealTwo);
void SetValues(Float_t min, Float_t max, Bool_t emit=kFALSE);
{ min = fMinEntry->GetNumber(); max = fMaxEntry->GetNumber(); }
Float_t GetMin() const { return fMinEntry->GetNumber(); }
Float_t GetMax() const { return fMaxEntry->GetNumber(); }
+ Float_t GetLimitMin() const { return fMinEntry->GetNumMin(); }
+ Float_t GetLimitMax() const { return fMaxEntry->GetNumMax(); }
ClassDef(RGDoubleValuator, 0);
}; // endclass RGDoubleValuator
+/**************************************************************************/
+
+class RGTriVecValuator : public TGCompositeFrame
+{
+ RGTriVecValuator(const RGTriVecValuator&); // Not implemented
+ RGTriVecValuator& operator=(const RGTriVecValuator&); // Not implemented
+
+protected:
+ RGValuator* fVal[3];
+
+ // Weed-size vars from RGValuator; copied.
+ UInt_t fLabelWidth;
+ Int_t fNELength; // Number-entry length (in characters)
+ Int_t fNEHeight; // Number-entry height (in pixels)
+
+public:
+ RGTriVecValuator(const TGWindow *p, const char* name, UInt_t w, UInt_t h);
+ virtual ~RGTriVecValuator();
+
+ void Build(Bool_t vertical, const char* lab0, const char* lab1, const char* lab2);
+
+ RGValuator* GetValuator(Int_t i) const { return fVal[i]; }
+
+ Float_t GetValue(Int_t i) const { return fVal[i]->GetValue(); }
+ void SetValue(Int_t i, Float_t v) { fVal[i]->SetValue(v); }
+
+ void GetValues(Float_t& v0, Float_t& v1, Float_t& v2) const
+ { v0 = GetValue(0); v1 = GetValue(1); v2 = GetValue(2); }
+ void GetValues(Float_t v[3]) const
+ { v[0] = GetValue(0); v[1] = GetValue(1); v[2] = GetValue(2); }
+ void GetValues(Double_t v[3]) const
+ { v[0] = GetValue(0); v[1] = GetValue(1); v[2] = GetValue(2); }
+
+ void SetValues(Float_t v0, Float_t v1, Float_t v2)
+ { SetValue(0, v0); SetValue(1, v1); SetValue(2, v2); }
+ void SetValues(Float_t v[3])
+ { SetValue(0, v[0]); SetValue(1, v[1]); SetValue(2, v[2]); }
+ void SetValues(Double_t v[3])
+ { SetValue(0, v[0]); SetValue(1, v[1]); SetValue(2, v[2]); }
+
+ void ValueSet(); //*SIGNAL*
+
+ // Weed-size vars from RGValuator; copied.
+ void SetLabelWidth(Int_t w) { fLabelWidth = w; }
+ void SetNELength(Int_t l) { fNELength = l; }
+ void SetNEHeight(Int_t h) { fNEHeight = h; }
+
+ void SetLimits(Int_t min, Int_t max);
+ void SetLimits(Float_t min, Float_t max,
+ TGNumberFormat::EStyle nef=TGNumberFormat::kNESRealTwo);
+
+ ClassDef(RGTriVecValuator, 0)
+};
+
}
#endif