ROOT  6.06/09
Reference Guide
Enumerations | Functions | Variables
TGNumberEntry.cxx File Reference
#include "TGNumberEntry.h"
#include "KeySymbols.h"
#include "TTimer.h"
#include "TSystem.h"
#include "TGToolTip.h"
#include "TMath.h"
#include "Riostream.h"
#include <ctype.h>
+ Include dependency graph for TGNumberEntry.cxx:

Go to the source code of this file.

Enumerations

enum  ERealStyle { kRSInt = 0, kRSFrac = 1, kRSExpo = 2, kRSFracExpo = 3 }
 

Functions

 ClassImp (TGNumberFormat)
 
 ClassImp (TGNumberEntryField)
 
 ClassImp (TGNumberEntryLayout)
 
 ClassImp (TGNumberEntry)
 
static Long_t Round (Double_t x)
 
static Long_t Truncate (Double_t x)
 
static Bool_t IsLeapYear (Int_t year)
 
static Bool_t IsGoodChar (char c, TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr)
 
static char * EliminateGarbage (char *text, TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr)
 
static Long_t IntStr (const char *text)
 
static char * StrInt (char *text, Long_t i, Int_t digits)
 
static TString StringInt (Long_t i, Int_t digits)
 
static char * RealToStr (char *text, const RealInfo_t &ri)
 
static Double_t StrToReal (const char *text, RealInfo_t &ri)
 
static ULong_t HexStrToInt (const char *s)
 
static char * IntToHexStr (char *text, ULong_t l)
 
static char * MIntToStr (char *text, Long_t l, Int_t digits)
 
static char * DIntToStr (char *text, Long_t l, Bool_t Sec, char Del)
 
static void GetNumbers (const char *s, Int_t &Sign, Long_t &n1, Int_t maxd1, Long_t &n2, Int_t maxd2, Long_t &n3, Int_t maxd3, const char *Delimiters)
 
static Long_t GetSignificant (Long_t l, Int_t Max)
 
static void AppendFracZero (char *text, Int_t digits)
 
static Long_t MakeDateNumber (const char *, Long_t Day, Long_t Month, Long_t Year)
 Create a number entry with year/month/day information. More...
 
static Long_t TranslateToNum (const char *text, TGNumberFormat::EStyle style, RealInfo_t &ri)
 Translate a string to a number value. More...
 
static char * TranslateToStr (char *text, Long_t l, TGNumberFormat::EStyle style, const RealInfo_t &ri)
 Translate a number value to a string. More...
 
static Double_t RealToDouble (const RealInfo_t ri)
 Convert to double format. More...
 
static void CheckMinMax (Long_t &l, TGNumberFormat::EStyle style, TGNumberFormat::ELimit limits, Double_t min, Double_t max)
 Check min/max limits for the set value. More...
 
static void IncreaseReal (RealInfo_t &ri, Double_t mag, Bool_t logstep, TGNumberFormat::ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
 Convert to double format. More...
 
static void IncreaseDate (Long_t &l, TGNumberFormat::EStepSize step, Int_t sign)
 Change year/month/day format. More...
 

Variables

const Double_t kEpsilon = 1E-12
 
const Int_t kDays [13]
 

Enumeration Type Documentation

enum ERealStyle
Enumerator
kRSInt 
kRSFrac 
kRSExpo 
kRSFracExpo 

Definition at line 104 of file TGNumberEntry.cxx.

Function Documentation

static void AppendFracZero ( char *  text,
Int_t  digits 
)
static

Definition at line 555 of file TGNumberEntry.cxx.

Referenced by TranslateToNum().

static void CheckMinMax ( Long_t l,
TGNumberFormat::EStyle  style,
TGNumberFormat::ELimit  limits,
Double_t  min,
Double_t  max 
)
static

Check min/max limits for the set value.

Definition at line 756 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::IncreaseNumber().

ClassImp ( TGNumberFormat  )
ClassImp ( TGNumberEntryField  )
ClassImp ( TGNumberEntryLayout  )
ClassImp ( TGNumberEntry  )
static char* DIntToStr ( char *  text,
Long_t  l,
Bool_t  Sec,
char  Del 
)
static

Definition at line 489 of file TGNumberEntry.cxx.

Referenced by TranslateToStr().

static char* EliminateGarbage ( char *  text,
TGNumberFormat::EStyle  style,
TGNumberFormat::EAttribute  attr 
)
static

Definition at line 230 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::SetText().

static void GetNumbers ( const char *  s,
Int_t Sign,
Long_t n1,
Int_t  maxd1,
Long_t n2,
Int_t  maxd2,
Long_t n3,
Int_t  maxd3,
const char *  Delimiters 
)
static

Definition at line 509 of file TGNumberEntry.cxx.

Referenced by TranslateToNum().

static Long_t GetSignificant ( Long_t  l,
Int_t  Max 
)
static

Definition at line 545 of file TGNumberEntry.cxx.

Referenced by MakeDateNumber(), and TranslateToNum().

static ULong_t HexStrToInt ( const char *  s)
static

Definition at line 418 of file TGNumberEntry.cxx.

Referenced by TranslateToNum().

static void IncreaseDate ( Long_t l,
TGNumberFormat::EStepSize  step,
Int_t  sign 
)
static

Change year/month/day format.

Definition at line 1006 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::IncreaseNumber().

static void IncreaseReal ( RealInfo_t &  ri,
Double_t  mag,
Bool_t  logstep,
TGNumberFormat::ELimit  limits = TGNumberFormat::kNELNoLimits,
Double_t  min = 0,
Double_t  max = 1 
)
static

Convert to double format.

Definition at line 837 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::IncreaseNumber().

static Long_t IntStr ( const char *  text)
static

Definition at line 247 of file TGNumberEntry.cxx.

Referenced by StrToReal().

static char* IntToHexStr ( char *  text,
ULong_t  l 
)
static
static Bool_t IsGoodChar ( char  c,
TGNumberFormat::EStyle  style,
TGNumberFormat::EAttribute  attr 
)
static

Definition at line 167 of file TGNumberEntry.cxx.

Referenced by EliminateGarbage(), and TGNumberEntryField::HandleKey().

static Bool_t IsLeapYear ( Int_t  year)
static

Definition at line 160 of file TGNumberEntry.cxx.

Referenced by IncreaseDate(), and MakeDateNumber().

static Long_t MakeDateNumber ( const char *  ,
Long_t  Day,
Long_t  Month,
Long_t  Year 
)
static

Create a number entry with year/month/day information.

Definition at line 582 of file TGNumberEntry.cxx.

Referenced by TranslateToNum().

static char* MIntToStr ( char *  text,
Long_t  l,
Int_t  digits 
)
static

Definition at line 456 of file TGNumberEntry.cxx.

Referenced by TranslateToStr().

static Double_t RealToDouble ( const RealInfo_t  ri)
static

Convert to double format.

Definition at line 729 of file TGNumberEntry.cxx.

Referenced by IncreaseReal().

static char* RealToStr ( char *  text,
const RealInfo_t &  ri 
)
static

Definition at line 288 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::IncreaseNumber(), and TranslateToStr().

static Long_t Round ( Double_t  x)
static
static TString StringInt ( Long_t  i,
Int_t  digits 
)
static

Definition at line 279 of file TGNumberEntry.cxx.

Referenced by DIntToStr(), MIntToStr(), and TranslateToStr().

static char* StrInt ( char *  text,
Long_t  i,
Int_t  digits 
)
static

Definition at line 263 of file TGNumberEntry.cxx.

Referenced by RealToStr(), StringInt(), and TranslateToStr().

static Double_t StrToReal ( const char *  text,
RealInfo_t &  ri 
)
static
static Long_t TranslateToNum ( const char *  text,
TGNumberFormat::EStyle  style,
RealInfo_t &  ri 
)
static

Translate a string to a number value.

Definition at line 609 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::GetIntNumber().

static char* TranslateToStr ( char *  text,
Long_t  l,
TGNumberFormat::EStyle  style,
const RealInfo_t &  ri 
)
static

Translate a number value to a string.

Definition at line 678 of file TGNumberEntry.cxx.

Referenced by TGNumberEntryField::SetIntNumber().

static Long_t Truncate ( Double_t  x)
static

Definition at line 147 of file TGNumberEntry.cxx.

Referenced by IncreaseReal().

Variable Documentation

const Int_t kDays[13]
Initial value:
=
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }

Definition at line 129 of file TGNumberEntry.cxx.

Referenced by IncreaseDate(), and MakeDateNumber().

const Double_t kEpsilon = 1E-12

Definition at line 125 of file TGNumberEntry.cxx.

Referenced by IncreaseReal(), and Truncate().