library: libGui
#include "TGNumberEntry.h"

TGNumberEntry


class description - header file - source file - inheritance tree (.pdf)

class TGNumberEntry : public TGCompositeFrame, public TGWidget, public TGNumberFormat

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
<-
TGCompositeFrame
TGWidget
TGNumberFormat
<-
TGNumberEntry

    protected:
TGNumberEntry(const TGNumberEntry&) TGNumberEntry& operator=(const TGNumberEntry&) public:
TGNumberEntry(const TGWindow* parent = 0, Double_t val = 0, Int_t digitwidth = 5, Int_t id = -1, TGNumberFormat::EStyle style = kNESReal, TGNumberFormat::EAttribute attr = kNEAAnyNumber, TGNumberFormat::ELimit limits = kNELNoLimits, Double_t min = 0, Double_t max = 1) virtual ~TGNumberEntry() virtual void Associate(const TGWindow* w) static TClass* Class() TGButton* GetButtonDown() const TGButton* GetButtonUp() const virtual void GetDate(Int_t& year, Int_t& month, Int_t& day) const virtual UInt_t GetDefaultHeight() const virtual ULong_t GetHexNumber() const virtual Long_t GetIntNumber() const virtual TGLayoutManager* GetLayoutManager() const virtual TGNumberFormat::EAttribute GetNumAttr() const virtual Double_t GetNumber() const TGNumberEntryField* GetNumberEntry() const virtual TGNumberFormat::ELimit GetNumLimits() const virtual Double_t GetNumMax() const virtual Double_t GetNumMin() const virtual TGNumberFormat::EStyle GetNumStyle() const virtual void GetTime(Int_t& hour, Int_t& min, Int_t& sec) const virtual void IncreaseNumber(TGNumberFormat::EStepSize step = kNSSSmall, Int_t sign = 1, Bool_t logstep = kFALSE) virtual TClass* IsA() const virtual Bool_t IsEditable() const virtual Bool_t IsLogStep() const virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) virtual void SavePrimitive(ostream& out, Option_t* = "") virtual void SetButtonToNum(Bool_t state) virtual void SetDate(Int_t year, Int_t month, Int_t day) virtual void SetFormat(TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr = TGNumberFormat::kNEAAnyNumber) virtual void SetHexNumber(ULong_t val) virtual void SetIntNumber(Long_t val) virtual void SetLimits(TGNumberFormat::ELimit limits = TGNumberFormat::kNELNoLimits, Double_t min = 0, Double_t max = 1) void SetLimitValues(Double_t min = 0, Double_t max = 1) virtual void SetLogStep(Bool_t on = kTRUE) void SetNumAttr(TGNumberFormat::EAttribute attr = kNEAAnyNumber) virtual void SetNumber(Double_t val) void SetNumLimits(TGNumberFormat::ELimit limits = kNELNoLimits) void SetNumStyle(TGNumberFormat::EStyle style) virtual void SetState(Bool_t enable = kTRUE) virtual void SetText(const char* text) virtual void SetTime(Int_t hour, Int_t min, Int_t sec) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void ValueChanged(Long_t val) virtual void ValueSet(Long_t val)

Data Members

    private:
TGNumberFormat::EStyle fNumStyle *OPTION={GetMethod="GetNumStyle";SetMethod="SetNumStyle";Items=(0="Int",5="Real",6="Degree",9="Hour:Min:Sec",10="Day/Month/Year",12="Hex")}* TGNumberFormat::EAttribute fNumAttr *OPTION={GetMethod="GetNumAttr";SetMethod="SetNumAttr";Items=(0="&AnyNumber",1="&Non negative",2="&Positive")}* TGNumberFormat::ELimit fNumLimits *OPTION={GetMethod="GetNumLimits";SetMethod="SetNumLimits";Items=(0="&No Limits",1="Limit M&in",2="Limit M&ax",2="Min &and Max")}* const TGPicture* fPicUp Up arrow const TGPicture* fPicDown Down arrow protected:
TGNumberEntryField* fNumericEntry Number text entry field TGButton* fButtonUp Button for increasing value TGButton* fButtonDown Button for decreasing value Bool_t fButtonToNum Send button messages to parent rather than number entry field

Class Description

                                                                      
 TGNumberEntry, TGNumberEntryField and TGNumberFormat                 
                                                                      
 TGNumberEntry is a number entry input widget with up/down buttons.   
 TGNumberEntryField is a number entry input widget.                   
 TGNumberFormat contains enum types to specify the numeric format.    
                                                                      
 The number entry widget is based on TGTextEntry but allows only      
 numerical input. The widget support numerous formats including       
 integers, hex numbers, real numbers, fixed fraction reals and        
 time/date formats. The widget also allows to restrict input values   
 to non-negative or positive numbers and to specify explicit limits.  
                                                                      
 The following styles are supported:                                  
 kNESInteger:        integer number                                   
 kNESRealOne:        real number with one digit (no exponent)         
 kNESRealTwo:        real number with two digits (no exponent)        
 kNESRealThree:      real number with three digits (no exponent)      
 kNESRealFour:       real number with four digits (no exponent)       
 kNESReal:           arbitrary real number                            
 kNESDegree:         angle in degree:minutes:seconds format           
 kNESMinSec:         time in minutes:seconds format                   
 kNESHourMin:        time in hour:minutes format                      
 kNESHourMinSec:     time in hour:minutes:seconds format              
 kNESDayMYear:       date in day/month/year format                    
 kNESMDayYear:       date in month/day/year format                    
 kNESHex:            hex number                                       
                                                                      
 The following attributes can be specified:                           
 kNEAAnyNumber:      any number is allowed                            
 kNEANonNegative:    only non-negative numbers are allowed            
 kNEAPositive:       only positive numbers are allowed                
                                                                      
 Explicit limits can be specified individually:                       
 kNELNoLimits:       no limits                                        
 kNELLimitMin:       lower limit only                                 
 kNELLimitMax        upper limit only                                 
 kNELLimitMinMax     both lower and upper limits                      
                                                                      
 TGNumberEntryField is a plain vanilla entry field, whereas           
 TGNumberEntry adds two small buttons to increase and decrease the    
 numerical value in the field. The number entry widgets also support  
 using the up and down cursor keys to change the numerical values.    
 The step size can be selected with control and shift keys:           
 --                  small step (1 unit/factor of 3)                  
 shift               medium step (10 units/factor of 10)              
 control             large step (100 units/factor of 30)              
 shift-control       huge step (1000 units/factor of 100)             
                                                                      
 The steps are either linear or logarithmic. The default behaviour    
 is set when the entry field is created, but it can be changed by     
 pressing the alt key at the same time.                               
                                                                      
 Changing the number in the widget will generate the event:           
 kC_TEXTENTRY, kTE_TEXTCHANGED, widget id, 0.                         
 Hitting the enter key will generate:                                 
 kC_TEXTENTRY, kTE_ENTER, widget id, 0.                               
 Hitting the tab key will generate:                                   
 kC_TEXTENTRY, kTE_TAB, widget id, 0.                                 
                                                                      

TGNumberEntry(const TGWindow *parent, Double_t val, Int_t wdigits, Int_t id, EStyle style, EAttribute attr, ELimit limits, Double_t min, Double_t max)
 Constructs a numeric entry widget.
TGNumberEntry(const TGNumberEntry& ne)
copy constructor
TGNumberEntry& operator=(const TGNumberEntry& ne)
assignment operator
~TGNumberEntry()
 Destructs a numeric entry widget.
void Associate(const TGWindow *w)
 Make w the window that will receive the generated messages.
void SetLogStep(Bool_t on)
 Set log steps.
void SetState(Bool_t enable)
 Set the active state.
void SetButtonToNum(Bool_t state)
 Send button messages to the number field (true) or parent widget (false).
 When the message is sent to the parent widget, it is responsible to change
 the numerical value accordingly. This can be useful to implement cursors
 which move from data point to data point. For the message being sent
 see ProcessMessage().
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
 Process the up/down button messages. If fButtonToNum is false the
 following message is sent: kC_COMMAND, kCM_BUTTON, widget id, param
 param % 100 is the step size
 param % 10000 / 100 != 0 indicates log step
 param / 10000 != 0 indicates button down
TGLayoutManager * GetLayoutManager()
 Return layout manager.
void ValueChanged(Long_t val)
 Emit ValueChanged(Long_t) signal. This signal is emitted when
 fButtonToNum is false. The val has the following meaning:
 val % 100 is the step size
 val % 10000 / 100 != 0 indicates log step
 val / 10000 != 0 indicates button down
void ValueSet(Long_t val)
 Emit ValueSet(Long_t) signal. This signal is emitted when the
 number entry value is changed. The val has the following meaning:
 val % 100 is the step size
 val % 10000 / 100 != 0 indicates log step
 val / 10000 != 0 indicates button down
void SavePrimitive(ostream &out, Option_t * /*= ""*/)
 Save a number entry widget as a C++ statement(s) on output stream out.
void SetNumber(Double_t val)
void SetIntNumber(Long_t val)
void SetTime(Int_t hour, Int_t min, Int_t sec)
void SetDate(Int_t year, Int_t month, Int_t day)
void SetHexNumber(ULong_t val)
void SetText(const char* text)
Double_t GetNumber()
Long_t GetIntNumber()
void GetTime(Int_t& hour, Int_t& min, Int_t& sec)
void GetDate(Int_t& year, Int_t& month, Int_t& day)
ULong_t GetHexNumber()
void IncreaseNumber(EStepSize step = kNSSSmall, Int_t sign = 1, Bool_t logstep = kFALSE)
void SetFormat(EStyle style, EAttribute attr = kNEAAnyNumber)
void SetLimits(ELimit limits = kNELNoLimits, Double_t min = 0, Double_t max = 1)
EStyle GetNumStyle()
EAttribute GetNumAttr()
ELimit GetNumLimits()
Double_t GetNumMin()
Double_t GetNumMax()
Bool_t IsLogStep()
Bool_t IsEditable()
void SetNumStyle(EStyle style)
void SetNumAttr(EAttribute attr = kNEAAnyNumber)
void SetNumLimits(ELimit limits = kNELNoLimits)
void SetLimitValues(Double_t min = 0, Double_t max = 1)
UInt_t GetDefaultHeight()

Author: Daniel Sigg 03/09/2001
Last update: root/gui:$Name: $:$Id: TGNumberEntry.cxx,v 1.28 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.