Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGNumberEntry.cxx File Reference
#include "TGNumberEntry.h"
#include "KeySymbols.h"
#include "TTimer.h"
#include "TSystem.h"
#include "TGToolTip.h"
#include "TMath.h"
#include "TVirtualX.h"
#include "strlcpy.h"
#include "snprintf.h"
#include <cctype>
#include <iostream>
Include dependency graph for TGNumberEntry.cxx:

Classes

struct  RealInfo_t
 
class  TGRepeatFireButton
 
class  TRepeatTimer
 

Namespaces

namespace  ROOT
 tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tbb::task_arena without forward declaring tbb::interface7
 

Enumerations

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

Functions

static void AppendFracZero (char *text, Int_t digits)
 
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.
 
static char * DIntToStr (char *text, Long_t l, Bool_t Sec, char Del)
 
static char * DIntToStr (char *text, Long_t l, char Del, char Del2)
 For kNESMinSecCent.
 
static char * EliminateGarbage (char *text, TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr)
 
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 ULong_t HexStrToInt (const char *s)
 
static void IncreaseDate (Long_t &l, TGNumberFormat::EStepSize step, Int_t sign)
 Change year/month/day format.
 
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.
 
static Long_t IntStr (const char *text)
 
static char * IntToHexStr (char *text, ULong_t l)
 
static Bool_t IsGoodChar (char c, TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr)
 
static Bool_t IsLeapYear (Int_t year)
 
static Long_t MakeDateNumber (const char *, Long_t Day, Long_t Month, Long_t Year)
 Create a number entry with year/month/day information.
 
static char * MIntToStr (char *text, Long_t l, Int_t digits)
 
static Double_t RealToDouble (const RealInfo_t ri)
 Convert to double format.
 
static char * RealToStr (char *text, const RealInfo_t &ri)
 
static Long_t Round (Double_t x)
 
static TString StringInt (Long_t i, Int_t digits)
 
static char * StrInt (char *text, Long_t i, Int_t digits)
 
static Double_t StrToReal (const char *text, RealInfo_t &ri)
 
static Long_t TranslateToNum (const char *text, TGNumberFormat::EStyle style, RealInfo_t &ri)
 Translate a string to a number value.
 
static char * TranslateToStr (char *text, Long_t l, TGNumberFormat::EStyle style, const RealInfo_t &ri)
 Translate a number value to a string.
 
static Long_t Truncate (Double_t x)
 

Variables

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

Enumeration Type Documentation

◆ ERealStyle

enum ERealStyle
Enumerator
kRSInt 
kRSFrac 
kRSExpo 
kRSFracExpo 

Definition at line 107 of file TGNumberEntry.cxx.

Function Documentation

◆ AppendFracZero()

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

Definition at line 577 of file TGNumberEntry.cxx.

◆ CheckMinMax()

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 784 of file TGNumberEntry.cxx.

◆ DIntToStr() [1/2]

static char * DIntToStr ( char *  text,
Long_t  l,
Bool_t  Sec,
char  Del 
)
static

Definition at line 495 of file TGNumberEntry.cxx.

◆ DIntToStr() [2/2]

static char * DIntToStr ( char *  text,
Long_t  l,
char  Del,
char  Del2 
)
static

For kNESMinSecCent.

Definition at line 516 of file TGNumberEntry.cxx.

◆ EliminateGarbage()

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

Definition at line 236 of file TGNumberEntry.cxx.

◆ GetNumbers()

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 531 of file TGNumberEntry.cxx.

◆ GetSignificant()

static Long_t GetSignificant ( Long_t  l,
Int_t  Max 
)
static

Definition at line 567 of file TGNumberEntry.cxx.

◆ HexStrToInt()

static ULong_t HexStrToInt ( const char *  s)
static

Definition at line 424 of file TGNumberEntry.cxx.

◆ IncreaseDate()

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

Change year/month/day format.

Definition at line 1034 of file TGNumberEntry.cxx.

◆ IncreaseReal()

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 865 of file TGNumberEntry.cxx.

◆ IntStr()

static Long_t IntStr ( const char *  text)
static

Definition at line 253 of file TGNumberEntry.cxx.

◆ IntToHexStr()

static char * IntToHexStr ( char *  text,
ULong_t  l 
)
static

Definition at line 439 of file TGNumberEntry.cxx.

◆ IsGoodChar()

static Bool_t IsGoodChar ( char  c,
TGNumberFormat::EStyle  style,
TGNumberFormat::EAttribute  attr 
)
static

Definition at line 170 of file TGNumberEntry.cxx.

◆ IsLeapYear()

static Bool_t IsLeapYear ( Int_t  year)
static

Definition at line 163 of file TGNumberEntry.cxx.

◆ 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 604 of file TGNumberEntry.cxx.

◆ MIntToStr()

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

Definition at line 462 of file TGNumberEntry.cxx.

◆ RealToDouble()

static Double_t RealToDouble ( const RealInfo_t  ri)
static

Convert to double format.

Definition at line 757 of file TGNumberEntry.cxx.

◆ RealToStr()

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

Definition at line 294 of file TGNumberEntry.cxx.

◆ Round()

static Long_t Round ( Double_t  x)
static

Definition at line 137 of file TGNumberEntry.cxx.

◆ StringInt()

static TString StringInt ( Long_t  i,
Int_t  digits 
)
static

Definition at line 285 of file TGNumberEntry.cxx.

◆ StrInt()

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

Definition at line 269 of file TGNumberEntry.cxx.

◆ StrToReal()

static Double_t StrToReal ( const char *  text,
RealInfo_t ri 
)
static

Definition at line 324 of file TGNumberEntry.cxx.

◆ TranslateToNum()

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

Translate a string to a number value.

Definition at line 631 of file TGNumberEntry.cxx.

◆ TranslateToStr()

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 704 of file TGNumberEntry.cxx.

◆ Truncate()

static Long_t Truncate ( Double_t  x)
static

Definition at line 150 of file TGNumberEntry.cxx.

Variable Documentation

◆ kDays

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

Definition at line 132 of file TGNumberEntry.cxx.

◆ kEpsilon

const Double_t kEpsilon = 1E-12

Definition at line 128 of file TGNumberEntry.cxx.