class RGValuatorBase: public TGCompositeFrame
{
+ RGValuatorBase(const RGValuatorBase&); // Not implemented
+ RGValuatorBase& operator=(const RGValuatorBase&); // Not implemented
+
protected:
UInt_t fLabelWidth;
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
class RGValuator: public RGValuatorBase
{
+ RGValuator(const RGValuator&); // Not implemented
+ RGValuator& operator=(const RGValuator&); // Not implemented
+
protected:
Float_t fValue;
Float_t fMin;
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);
class RGDoubleValuator: public RGValuatorBase
{
+ RGDoubleValuator(const RGDoubleValuator&); // Not implemented
+ RGDoubleValuator& operator=(const RGDoubleValuator&); // Not implemented
+
protected:
TGNumberEntry* fMinEntry;
TGNumberEntry* fMaxEntry;
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();
ClassDef(RGDoubleValuator, 0);
}; // endclass RGDoubleValuator
+/**************************************************************************/
+
+class RGTriVecValuator : public TGCompositeFrame
+{
+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