Logo ROOT  
Reference Guide
TGNumberEntry.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Daniel Sigg 03/09/2001
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TGNumberEntry
14 #define ROOT_TGNumberEntry
15 
16 
17 #include "TGFrame.h"
18 #include "TGTextEntry.h"
19 #include "TGButton.h"
20 
21 
23 public:
24  enum EStyle { ///< Style of number entry field
25  kNESInteger = 0, ///< Integer
26  kNESRealOne = 1, ///< Fixed fraction real, one digit
27  kNESRealTwo = 2, ///< Fixed fraction real, two digit
28  kNESRealThree = 3, ///< Fixed fraction real, three digit
29  kNESRealFour = 4, ///< Fixed fraction real, four digit
30  kNESReal = 5, ///< Real number
31  kNESDegree = 6, ///< Degree
32  kNESMinSec = 7, ///< Minute:seconds
33  kNESHourMin = 8, ///< Hour:minutes
34  kNESHourMinSec = 9, ///< Hour:minute:seconds
35  kNESDayMYear = 10, ///< Day/month/year
36  kNESMDayYear = 11, ///< Month/day/year
37  kNESHex = 12 ///< Hex
38  };
39 
40  enum EAttribute { ///< Attributes of number entry field
41  kNEAAnyNumber = 0, ///< Any number
42  kNEANonNegative = 1, ///< Non-negative number
43  kNEAPositive = 2 ///< Positive number
44  };
45 
46  enum ELimit { ///< Limit selection of number entry field
47  kNELNoLimits = 0, ///< No limits
48  kNELLimitMin = 1, ///< Lower limit only
49  kNELLimitMax = 2, ///< Upper limit only
50  kNELLimitMinMax = 3 ///< Both lower and upper limits
51  };
52 
53  enum EStepSize { ///< Step for number entry field increase
54  kNSSSmall = 0, ///< Small step
55  kNSSMedium = 1, ///< Medium step
56  kNSSLarge = 2, ///< Large step
57  kNSSHuge = 3 ///< Huge step
58  };
59 
60  virtual ~TGNumberFormat() { }
61  ClassDef(TGNumberFormat,0) // Class defining namespace for several enums used by TGNumberEntry
62 };
63 
64 
66 
67 protected:
68  Bool_t fNeedsVerification; ///< Needs verification of input
69  EStyle fNumStyle; ///< Number style
70  EAttribute fNumAttr; ///< Number attribute
71  ELimit fNumLimits; ///< Limit attributes
72  Double_t fNumMin; ///< Lower limit
73  Double_t fNumMax; ///< Upper limit
74  Bool_t fStepLog; ///< Logarithmic steps for increase?
75 
76 public:
77  TGNumberEntryField(const TGWindow *p, Int_t id,
78  Double_t val, GContext_t norm,
81  Pixel_t back = GetWhitePixel());
82  TGNumberEntryField(const TGWindow *parent = 0,
83  Int_t id = -1, Double_t val = 0,
86  ELimit limits = kNELNoLimits,
87  Double_t min = 0, Double_t max = 1);
88 
89  virtual void SetNumber(Double_t val);
90  virtual void SetIntNumber(Long_t val);
91  virtual void SetTime(Int_t hour, Int_t min, Int_t sec);
92  virtual void SetDate(Int_t year, Int_t month, Int_t day);
93  virtual void SetHexNumber(ULong_t val);
94  virtual void SetText(const char* text, Bool_t emit = kTRUE);
95 
96  virtual Double_t GetNumber() const;
97  virtual Long_t GetIntNumber() const;
98  virtual void GetTime(Int_t& hour, Int_t& min, Int_t& sec) const;
99  virtual void GetDate(Int_t& year, Int_t& month, Int_t& day) const;
100  virtual ULong_t GetHexNumber() const;
101 
102  virtual Int_t GetCharWidth(const char* text = "0") const;
103  virtual void IncreaseNumber(EStepSize step = kNSSSmall,
104  Int_t sign = 1, Bool_t logstep = kFALSE);
105  virtual void SetFormat(EStyle style,
106  EAttribute attr = kNEAAnyNumber);
107  virtual void SetLimits(ELimit limits = kNELNoLimits,
108  Double_t min = 0, Double_t max = 1);
109  virtual void SetState(Bool_t state);
110  virtual void SetLogStep(Bool_t on = kTRUE) {
111  // Set logarithmic steps
112  fStepLog = on; }
113 
114  virtual EStyle GetNumStyle() const {
115  // Get the numerical style
116  return fNumStyle; }
117  virtual EAttribute GetNumAttr() const {
118  // Get the numerical attribute
119  return fNumAttr; }
120  virtual ELimit GetNumLimits() const {
121  // Get the numerical limit attribute
122  return fNumLimits; }
123  virtual Double_t GetNumMin() const {
124  // Get the lower limit
125  return fNumMin; }
126  virtual Double_t GetNumMax() const {
127  // Get the upper limit
128  return fNumMax; }
129  virtual Bool_t IsLogStep() const {
130  // Is log step enabled?
131  return fStepLog; }
132 
133  virtual Bool_t HandleKey(Event_t* event);
135  virtual void TextChanged(const char *text = 0);
136  virtual void ReturnPressed();
137  virtual void Layout();
138  virtual Bool_t IsEditable() const { return kFALSE; }
139  virtual void InvalidInput(const char *instr) { Emit("InvalidInput(char*)", instr); } //*SIGNAL*
140  virtual void SavePrimitive(std::ostream &out, Option_t * = "");
141 
142  ClassDef(TGNumberEntryField,0) // A text entry field used by a TGNumberEntry
143 };
144 
145 
146 
147 class TGNumberEntry : public TGCompositeFrame, public TGWidget,
148  public TGNumberFormat {
149 
150  // dummy data members - just to say about options for context menu
151  EStyle fNumStyle;//*OPTION={GetMethod="GetNumStyle";SetMethod="SetNumStyle";Items=(0="Int",5="Real",6="Degree",9="Hour:Min:Sec",10="Day/Month/Year",12="Hex")}*
152  EAttribute fNumAttr; // *OPTION={GetMethod="GetNumAttr";SetMethod="SetNumAttr";Items=(0="&AnyNumber",1="&Non negative",2="&Positive")}*
153  ELimit fNumLimits; // *OPTION={GetMethod="GetNumLimits";SetMethod="SetNumLimits";Items=(0="&No Limits",1="Limit M&in",2="Limit M&ax",2="Min &and Max")}*
154 
155 private:
156  const TGPicture *fPicUp; ///< Up arrow
157  const TGPicture *fPicDown; ///< Down arrow
158 
159  TGNumberEntry(const TGNumberEntry&) = delete;
161 
162 protected:
163  TGNumberEntryField *fNumericEntry; ///< Number text entry field
164  TGButton *fButtonUp; ///< Button for increasing value
165  TGButton *fButtonDown; ///< Button for decreasing value
166  Bool_t fButtonToNum; ///< Send button messages to parent rather than number entry field
167 
168 public:
169  TGNumberEntry(const TGWindow *parent = nullptr, Double_t val = 0,
170  Int_t digitwidth = 5, Int_t id = -1,
172  EAttribute attr = kNEAAnyNumber,
173  ELimit limits = kNELNoLimits,
174  Double_t min = 0, Double_t max = 1);
175  virtual ~TGNumberEntry();
176 
177  virtual void SetNumber(Double_t val) {
178  // Set the numeric value (floating point representation)
179  fNumericEntry->SetNumber(val); }
180  virtual void SetIntNumber(Long_t val) {
181  // Set the numeric value (integer representation)
182  fNumericEntry->SetIntNumber(val); }
183  virtual void SetTime(Int_t hour, Int_t min, Int_t sec) {
184  // Set the numeric value (time format)
185  fNumericEntry->SetTime(hour, min, sec); }
186  virtual void SetDate(Int_t year, Int_t month, Int_t day) {
187  // Set the numeric value (date format)
188  fNumericEntry->SetDate(year, month, day); }
189  virtual void SetHexNumber(ULong_t val) {
190  // Set the numeric value (hex format)
191  fNumericEntry->SetHexNumber(val); }
192  virtual void SetText(const char* text) {
193  // Set the value (text format)
195  virtual void SetState(Bool_t enable = kTRUE);
196 
197  virtual Double_t GetNumber() const {
198  // Get the numeric value (floating point representation)
199  return fNumericEntry->GetNumber(); }
200  virtual Long_t GetIntNumber() const {
201  // Get the numeric value (integer representation)
202  return fNumericEntry->GetIntNumber (); }
203  virtual void GetTime(Int_t& hour, Int_t& min, Int_t& sec) const {
204  // Get the numeric value (time format)
205  fNumericEntry->GetTime(hour, min, sec); }
206  virtual void GetDate(Int_t& year, Int_t& month, Int_t& day) const {
207  // Get the numeric value (date format)
208  fNumericEntry->GetDate(year, month, day); }
209  virtual ULong_t GetHexNumber() const {
210  // Get the numeric value (hex format)
211  return fNumericEntry->GetHexNumber(); }
212  virtual void IncreaseNumber(EStepSize step = kNSSSmall,
213  Int_t sign = 1, Bool_t logstep = kFALSE) {
214  // Increase the number value
215  fNumericEntry->IncreaseNumber(step, sign, logstep); }
217  // Set the numerical format
218  fNumericEntry->SetFormat(style, attr); }
220  Double_t min = 0, Double_t max = 1) {
221  // Set the numerical limits.
222  fNumericEntry->SetLimits(limits, min, max); }
223 
224  virtual EStyle GetNumStyle() const {
225  // Get the numerical style
226  return fNumericEntry->GetNumStyle(); }
227  virtual EAttribute GetNumAttr() const {
228  // Get the numerical attribute
229  return fNumericEntry->GetNumAttr(); }
230  virtual ELimit GetNumLimits() const {
231  // Get the numerical limit attribute
232  return fNumericEntry->GetNumLimits(); }
233  virtual Double_t GetNumMin() const {
234  // Get the lower limit
235  return fNumericEntry->GetNumMin(); }
236  virtual Double_t GetNumMax() const {
237  // Get the upper limit
238  return fNumericEntry->GetNumMax(); }
239  virtual Bool_t IsLogStep() const {
240  // Is log step enabled?
241  return fNumericEntry->IsLogStep(); }
242  virtual void SetButtonToNum(Bool_t state);
243 
245  SetFormat(style, GetNumAttr()); } //*SUBMENU*
247  SetFormat(GetNumStyle(), attr); } //*SUBMENU*
249  SetLimits(limits, GetNumMin(), GetNumMax()); } //*SUBMENU*
250  void SetLimitValues(Double_t min = 0, Double_t max = 1) {
251  SetLimits(GetNumLimits(), min, max); } //*MENU*
252  virtual void SetLogStep(Bool_t on = kTRUE); //*TOGGLE* *GETTER=IsLogStep
253 
254  virtual void Associate(const TGWindow *w);
255  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
256  virtual void ValueChanged(Long_t val); //*SIGNAL*
257  virtual void ValueSet(Long_t val); //*SIGNAL*
258  virtual void Modified(); //*SIGNAL*
259 
261  // Get the number entry field
262  return fNumericEntry; }
264  // Get the up button
265  return fButtonUp; }
267  // Get the down button
268  return fButtonDown; }
269 
270  virtual Bool_t IsEditable() const { return kFALSE; }
271 
273  virtual void SavePrimitive(std::ostream &out, Option_t * = "");
274  virtual TGLayoutManager *GetLayoutManager() const;
275 
276  ClassDef(TGNumberEntry,0) // Entry field widget for several numeric formats
277 };
278 
279 
281 protected:
282  TGNumberEntry *fBox; // pointer to numeric control box
283 
284 private:
287 
288 public:
290  virtual void Layout();
291  virtual TGDimension GetDefaultSize() const;
292 
293  ClassDef(TGNumberEntryLayout,0) // Layout manager for number entry widget
294 };
295 
296 
297 #endif
TGNumberFormat::ELimit
ELimit
Definition: TGNumberEntry.h:46
TGNumberEntryLayout::TGNumberEntryLayout
TGNumberEntryLayout(TGNumberEntry *box)
Definition: TGNumberEntry.h:289
TGNumberFormat::kNELLimitMax
@ kNELLimitMax
Upper limit only.
Definition: TGNumberEntry.h:49
TGNumberFormat::kNESMinSec
@ kNESMinSec
Minute:seconds.
Definition: TGNumberEntry.h:32
TGNumberEntryField::SetHexNumber
virtual void SetHexNumber(ULong_t val)
Set the numeric value (hex format).
Definition: TGNumberEntry.cxx:1225
TGNumberEntryLayout::operator=
TGNumberEntryLayout & operator=(const TGNumberEntryLayout &)=delete
TGNumberEntry::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process the up/down button messages.
Definition: TGNumberEntry.cxx:2058
TGNumberEntry::GetLayoutManager
virtual TGLayoutManager * GetLayoutManager() const
Return layout manager.
Definition: TGNumberEntry.cxx:2089
TGNumberEntryLayout
Definition: TGNumberEntry.h:280
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TGNumberEntryField::GetDate
virtual void GetDate(Int_t &year, Int_t &month, Int_t &day) const
Get the numeric value (date format).
Definition: TGNumberEntry.cxx:1339
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGNumberEntry::fPicUp
const TGPicture * fPicUp
Up arrow.
Definition: TGNumberEntry.h:156
TGNumberFormat::kNELLimitMinMax
@ kNELLimitMinMax
Both lower and upper limits.
Definition: TGNumberEntry.h:50
TGNumberEntry::IncreaseNumber
virtual void IncreaseNumber(EStepSize step=kNSSSmall, Int_t sign=1, Bool_t logstep=kFALSE)
Definition: TGNumberEntry.h:212
TGNumberFormat::kNESDegree
@ kNESDegree
Degree.
Definition: TGNumberEntry.h:31
TGNumberEntry::~TGNumberEntry
virtual ~TGNumberEntry()
Destructs a numeric entry widget.
Definition: TGNumberEntry.cxx:1996
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
TGNumberEntry::ValueChanged
virtual void ValueChanged(Long_t val)
Emit ValueChanged(Long_t) signal.
Definition: TGNumberEntry.cxx:2107
TGDimension
Definition: TGDimension.h:18
TGNumberEntryLayout::Layout
virtual void Layout()
Layout the internal GUI elements in use.
Definition: TGNumberEntry.cxx:1761
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGNumberFormat::kNSSMedium
@ kNSSMedium
Medium step.
Definition: TGNumberEntry.h:55
TGNumberEntry::fNumStyle
EStyle fNumStyle
Definition: TGNumberEntry.h:151
TGNumberEntryLayout::GetDefaultSize
virtual TGDimension GetDefaultSize() const
Return the default size of the numeric control box.
Definition: TGNumberEntry.cxx:1789
TGNumberEntry::GetDefaultHeight
UInt_t GetDefaultHeight() const
Definition: TGNumberEntry.h:272
TGNumberFormat::kNSSHuge
@ kNSSHuge
Huge step.
Definition: TGNumberEntry.h:57
TGNumberFormat::kNSSSmall
@ kNSSSmall
Step for number entry field increase.
Definition: TGNumberEntry.h:54
TGNumberEntryField::IncreaseNumber
virtual void IncreaseNumber(EStepSize step=kNSSSmall, Int_t sign=1, Bool_t logstep=kFALSE)
Increase the number value.
Definition: TGNumberEntry.cxx:1380
TGNumberEntry::SetIntNumber
virtual void SetIntNumber(Long_t val)
Definition: TGNumberEntry.h:180
Pixel_t
ULong_t Pixel_t
Pixel value.
Definition: GuiTypes.h:40
TGNumberEntry::fButtonToNum
Bool_t fButtonToNum
Send button messages to parent rather than number entry field.
Definition: TGNumberEntry.h:166
TGNumberEntry::fNumAttr
EAttribute fNumAttr
Definition: TGNumberEntry.h:152
TGNumberEntry::Modified
virtual void Modified()
Emit Modified() signal.
Definition: TGNumberEntry.cxx:2128
TGNumberFormat::kNESHourMin
@ kNESHourMin
Hour:minutes.
Definition: TGNumberEntry.h:33
FontStruct_t
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
TGNumberFormat::kNESRealThree
@ kNESRealThree
Fixed fraction real, three digit.
Definition: TGNumberEntry.h:28
TGNumberFormat::kNEAAnyNumber
@ kNEAAnyNumber
Attributes of number entry field.
Definition: TGNumberEntry.h:41
TGNumberEntryField::fNumStyle
EStyle fNumStyle
Number style.
Definition: TGNumberEntry.h:69
TGNumberEntryField::Layout
virtual void Layout()
Layout.
Definition: TGNumberEntry.cxx:1740
TGNumberEntry::SetHexNumber
virtual void SetHexNumber(ULong_t val)
Definition: TGNumberEntry.h:189
TGFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:191
TGNumberFormat::kNEAPositive
@ kNEAPositive
Positive number.
Definition: TGNumberEntry.h:43
TGNumberFormat::kNEANonNegative
@ kNEANonNegative
Non-negative number.
Definition: TGNumberEntry.h:42
TGNumberEntryField::TGNumberEntryField
TGNumberEntryField(const TGWindow *p, Int_t id, Double_t val, GContext_t norm, FontStruct_t font=GetDefaultFontStruct(), UInt_t option=kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel())
Constructs a number entry field.
Definition: TGNumberEntry.cxx:1081
TGWidget
The widget base class.
Definition: TGWidget.h:43
box
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
TGNumberEntryField::InvalidInput
virtual void InvalidInput(const char *instr)
Definition: TGNumberEntry.h:139
TGNumberEntryField::GetCharWidth
virtual Int_t GetCharWidth(const char *text="0") const
Get the text width in pixels.
Definition: TGNumberEntry.cxx:1372
TGNumberEntryField::fNumAttr
EAttribute fNumAttr
Number attribute.
Definition: TGNumberEntry.h:70
TGNumberEntry::operator=
TGNumberEntry & operator=(const TGNumberEntry &)=delete
TGNumberFormat::kNESReal
@ kNESReal
Real number.
Definition: TGNumberEntry.h:30
TGNumberEntryField::SetDate
virtual void SetDate(Int_t year, Int_t month, Int_t day)
Set the numeric value (date format).
Definition: TGNumberEntry.cxx:1206
event
Definition: triangle.c:552
TGNumberFormat::kNESRealTwo
@ kNESRealTwo
Fixed fraction real, two digit.
Definition: TGNumberEntry.h:27
TGNumberEntry::TGNumberEntry
TGNumberEntry(const TGNumberEntry &)=delete
TGNumberEntryField::SetNumber
virtual void SetNumber(Double_t val)
Set the numeric value (floating point representation).
Definition: TGNumberEntry.cxx:1115
TGNumberEntryField::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a number entry widget as a C++ statement(s) on output stream out.
Definition: TGNumberEntry.cxx:2256
TGNumberEntry::GetNumberEntry
TGNumberEntryField * GetNumberEntry() const
Definition: TGNumberEntry.h:260
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGNumberEntryField::fNumMax
Double_t fNumMax
Upper limit.
Definition: TGNumberEntry.h:73
TGNumberFormat::kNESRealFour
@ kNESRealFour
Fixed fraction real, four digit.
Definition: TGNumberEntry.h:29
kDoubleBorder
@ kDoubleBorder
Definition: GuiTypes.h:385
TGNumberEntryLayout::fBox
TGNumberEntry * fBox
Definition: TGNumberEntry.h:282
text
TText * text
Definition: entrylist_figure1.C:10
bool
TGNumberEntryField::HandleFocusChange
virtual Bool_t HandleFocusChange(Event_t *event)
Handle focus change.
Definition: TGNumberEntry.cxx:1696
TGLayoutManager
Frame layout manager.
Definition: TGLayout.h:135
TGNumberFormat::EStepSize
EStepSize
Definition: TGNumberEntry.h:53
GContext_t
Handle_t GContext_t
Graphics context handle.
Definition: GuiTypes.h:38
TGNumberEntry::SetLimitValues
void SetLimitValues(Double_t min=0, Double_t max=1)
Definition: TGNumberEntry.h:250
TGNumberEntryField::IsLogStep
virtual Bool_t IsLogStep() const
Definition: TGNumberEntry.h:129
style
TCanvas * style()
Definition: style.C:1
TGNumberFormat::kNESRealOne
@ kNESRealOne
Fixed fraction real, one digit.
Definition: TGNumberEntry.h:26
TGNumberEntryField::SetText
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Set the value (text format).
Definition: TGNumberEntry.cxx:1233
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGNumberEntry::fButtonUp
TGButton * fButtonUp
Button for increasing value.
Definition: TGNumberEntry.h:164
TGNumberEntry::fNumericEntry
TGNumberEntryField * fNumericEntry
Number text entry field.
Definition: TGNumberEntry.h:163
TGNumberEntryField::SetLogStep
virtual void SetLogStep(Bool_t on=kTRUE)
Definition: TGNumberEntry.h:110
TGNumberFormat::kNESMDayYear
@ kNESMDayYear
Month/day/year.
Definition: TGNumberEntry.h:36
TGNumberFormat::kNESDayMYear
@ kNESDayMYear
Day/month/year.
Definition: TGNumberEntry.h:35
TGNumberEntry::GetHexNumber
virtual ULong_t GetHexNumber() const
Definition: TGNumberEntry.h:209
TGNumberEntry::SetNumber
virtual void SetNumber(Double_t val)
Definition: TGNumberEntry.h:177
TGNumberFormat
Definition: TGNumberEntry.h:22
TGNumberEntry::SetTime
virtual void SetTime(Int_t hour, Int_t min, Int_t sec)
Definition: TGNumberEntry.h:183
TGNumberEntryField::SetTime
virtual void SetTime(Int_t hour, Int_t min, Int_t sec)
Set the numeric value (time format).
Definition: TGNumberEntry.cxx:1183
TGNumberEntry::fPicDown
const TGPicture * fPicDown
Down arrow.
Definition: TGNumberEntry.h:157
TGTextEntry
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TGNumberEntry::SetNumLimits
void SetNumLimits(ELimit limits=kNELNoLimits)
Definition: TGNumberEntry.h:248
TGNumberFormat::kNESHex
@ kNESHex
Hex.
Definition: TGNumberEntry.h:37
TGNumberEntry::SetFormat
virtual void SetFormat(EStyle style, EAttribute attr=TGNumberFormat::kNEAAnyNumber)
Definition: TGNumberEntry.h:216
TGNumberEntry::SetDate
virtual void SetDate(Int_t year, Int_t month, Int_t day)
Definition: TGNumberEntry.h:186
TGFrame.h
TGNumberEntryField::GetNumber
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
Definition: TGNumberEntry.cxx:1245
Long_t
long Long_t
Definition: RtypesCore.h:54
TGNumberEntryField::HandleKey
virtual Bool_t HandleKey(Event_t *event)
Handle keys.
Definition: TGNumberEntry.cxx:1612
TGNumberEntry::GetNumLimits
virtual ELimit GetNumLimits() const
Definition: TGNumberEntry.h:230
TGNumberEntry::SetText
virtual void SetText(const char *text)
Definition: TGNumberEntry.h:192
TGNumberEntry::fButtonDown
TGButton * fButtonDown
Button for decreasing value.
Definition: TGNumberEntry.h:165
TGNumberEntryField::SetState
virtual void SetState(Bool_t state)
Set the active state.
Definition: TGNumberEntry.cxx:1600
TGNumberEntry::GetNumAttr
virtual EAttribute GetNumAttr() const
Definition: TGNumberEntry.h:227
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TGNumberEntryField::TextChanged
virtual void TextChanged(const char *text=0)
Text has changed message.
Definition: TGNumberEntry.cxx:1711
TGNumberEntryField
Definition: TGNumberEntry.h:65
TGTextEntry::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Definition: TGTextEntry.cxx:1789
TGNumberEntry::GetTime
virtual void GetTime(Int_t &hour, Int_t &min, Int_t &sec) const
Definition: TGNumberEntry.h:203
unsigned int
TGNumberEntry::SetLogStep
virtual void SetLogStep(Bool_t on=kTRUE)
Set log steps.
Definition: TGNumberEntry.cxx:2016
TGNumberFormat::~TGNumberFormat
virtual ~TGNumberFormat()
Definition: TGNumberEntry.h:60
TGNumberEntry::GetButtonUp
TGButton * GetButtonUp() const
Definition: TGNumberEntry.h:263
TGNumberEntry::SetLimits
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
Definition: TGNumberEntry.h:219
TGNumberEntry::GetDate
virtual void GetDate(Int_t &year, Int_t &month, Int_t &day) const
Definition: TGNumberEntry.h:206
Double_t
double Double_t
Definition: RtypesCore.h:59
TGNumberEntryField::GetNumStyle
virtual EStyle GetNumStyle() const
Definition: TGNumberEntry.h:114
TGNumberEntry::fNumLimits
ELimit fNumLimits
Definition: TGNumberEntry.h:153
TGNumberEntry::SetNumAttr
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
Definition: TGNumberEntry.h:246
TGNumberEntryField::GetHexNumber
virtual ULong_t GetHexNumber() const
Get the numeric value (hex format).
Definition: TGNumberEntry.cxx:1364
TGNumberEntryField::GetIntNumber
virtual Long_t GetIntNumber() const
Get the numeric value (integer representation).
Definition: TGNumberEntry.cxx:1286
TGNumberEntryField::GetNumAttr
virtual EAttribute GetNumAttr() const
Definition: TGNumberEntry.h:117
TGTextEntry.h
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGButton.h
TGNumberEntry::GetNumStyle
virtual EStyle GetNumStyle() const
Definition: TGNumberEntry.h:224
TGNumberEntryField::GetNumMax
virtual Double_t GetNumMax() const
Definition: TGNumberEntry.h:126
TGNumberEntryField::SetFormat
virtual void SetFormat(EStyle style, EAttribute attr=kNEAAnyNumber)
Set the numerical format.
Definition: TGNumberEntry.cxx:1570
TGNumberEntryLayout::TGNumberEntryLayout
TGNumberEntryLayout(const TGNumberEntryLayout &)=delete
Event_t
Event structure.
Definition: GuiTypes.h:174
TGNumberEntry::Associate
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
Definition: TGNumberEntry.cxx:2007
TGNumberEntry::IsLogStep
virtual Bool_t IsLogStep() const
Definition: TGNumberEntry.h:239
TGNumberFormat::kNELNoLimits
@ kNELNoLimits
Limit selection of number entry field.
Definition: TGNumberEntry.h:47
TGNumberEntryField::GetNumMin
virtual Double_t GetNumMin() const
Definition: TGNumberEntry.h:123
TGFrame::GetWhitePixel
static Pixel_t GetWhitePixel()
Get white pixel value.
Definition: TGFrame.cxx:709
TGNumberEntry::SetButtonToNum
virtual void SetButtonToNum(Bool_t state)
Send button messages to the number field (true) or parent widget (false).
Definition: TGNumberEntry.cxx:2046
TGNumberFormat::kNELLimitMin
@ kNELLimitMin
Lower limit only.
Definition: TGNumberEntry.h:48
TGNumberEntry::GetIntNumber
virtual Long_t GetIntNumber() const
Definition: TGNumberEntry.h:200
TGNumberEntryField::GetNumLimits
virtual ELimit GetNumLimits() const
Definition: TGNumberEntry.h:120
TGNumberEntry::GetNumber
virtual Double_t GetNumber() const
Definition: TGNumberEntry.h:197
TGNumberEntryField::GetTime
virtual void GetTime(Int_t &hour, Int_t &min, Int_t &sec) const
Get the numeric value (time format).
Definition: TGNumberEntry.cxx:1295
TGNumberEntry::IsEditable
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
Definition: TGNumberEntry.h:270
TGNumberEntryField::fNumLimits
ELimit fNumLimits
Limit attributes.
Definition: TGNumberEntry.h:71
TGNumberEntry
TGNumberEntry is a number entry input widget with up/down buttons.
Definition: TGNumberEntry.h:148
TGNumberEntryField::ReturnPressed
virtual void ReturnPressed()
Return was pressed.
Definition: TGNumberEntry.cxx:1720
TGNumberEntry::SetNumStyle
void SetNumStyle(EStyle style)
Definition: TGNumberEntry.h:244
TGButton
A button abstract base class.
Definition: TGButton.h:68
TGNumberEntryField::fStepLog
Bool_t fStepLog
Logarithmic steps for increase?
Definition: TGNumberEntry.h:74
TGNumberFormat::kNESHourMinSec
@ kNESHourMinSec
Hour:minute:seconds.
Definition: TGNumberEntry.h:34
TGNumberFormat::EAttribute
EAttribute
Definition: TGNumberEntry.h:40
TGNumberEntryField::SetLimits
virtual void SetLimits(ELimit limits=kNELNoLimits, Double_t min=0, Double_t max=1)
Set the numerical limits.
Definition: TGNumberEntry.cxx:1585
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGNumberFormat::kNSSLarge
@ kNSSLarge
Large step.
Definition: TGNumberEntry.h:56
TGNumberEntry::SetState
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
Definition: TGNumberEntry.cxx:2026
TGNumberEntry::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a number entry widget as a C++ statement(s) on output stream out.
Definition: TGNumberEntry.cxx:2136
TGNumberFormat::EStyle
EStyle
Definition: TGNumberEntry.h:24
TGNumberEntry::GetNumMax
virtual Double_t GetNumMax() const
Definition: TGNumberEntry.h:236
TGNumberEntry::ValueSet
virtual void ValueSet(Long_t val)
Emit ValueSet(Long_t) signal.
Definition: TGNumberEntry.cxx:2119
TGNumberEntryField::SetIntNumber
virtual void SetIntNumber(Long_t val)
Set the numeric value (integer representation).
Definition: TGNumberEntry.cxx:1168
TGNumberEntryField::fNumMin
Double_t fNumMin
Lower limit.
Definition: TGNumberEntry.h:72
TGNumberEntry::GetButtonDown
TGButton * GetButtonDown() const
Definition: TGNumberEntry.h:266
TGNumberFormat::kNESInteger
@ kNESInteger
Style of number entry field.
Definition: TGNumberEntry.h:25
TGNumberEntry::GetNumMin
virtual Double_t GetNumMin() const
Definition: TGNumberEntry.h:233
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
int
TGNumberEntryField::fNeedsVerification
Bool_t fNeedsVerification
Needs verification of input.
Definition: TGNumberEntry.h:68
TGNumberEntryField::IsEditable
virtual Bool_t IsEditable() const
Definition: TGNumberEntry.h:138