#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>Classes | |
| struct | RealInfo_t |
| class | TGRepeatFireButton |
| class | TRepeatTimer |
Enumerations | |
| enum | ERealStyle { kRSInt = 0 , kRSFrac = 1 , kRSExpo = 2 , kRSFracExpo = 3 } |
Functions | |
| static void | AppendFracZero (char *text, std::size_t textCap, Int_t digits) |
| Given a numeric string "xxx.yyy" or "xxx,yyy", makes sure that the fractional part (if present) always has at least digits digits, appending zeroes if needed. | |
| 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 void | CopyAndSkipGarbage (char *dst, std::size_t dstCap, const char *src, TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr) |
| Copy the string stored in src into dst, skipping some chars depending on the format and style. | |
| static char * | DIntToStr (char *text, std::size_t textCap, Long_t l, Bool_t Sec, char Del) |
| static char * | DIntToStr (char *text, std::size_t textCap, Long_t l, char Del, char Del2) |
| For kNESMinSecCent. | |
| 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, std::size_t textCap, 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, std::size_t textCap, Long_t l, Int_t digits) |
| static Double_t | RealToDouble (const RealInfo_t ri) |
| Convert to double format. | |
| static char * | RealToStr (char *text, std::size_t textCap, 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, std::size_t textCap, 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, std::size_t textCap, 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 |
| enum ERealStyle |
| Enumerator | |
|---|---|
| kRSInt | |
| kRSFrac | |
| kRSExpo | |
| kRSFracExpo | |
Definition at line 103 of file TGNumberEntry.cxx.
|
static |
Given a numeric string "xxx.yyy" or "xxx,yyy", makes sure that the fractional part (if present) always has at least digits digits, appending zeroes if needed.
Definition at line 574 of file TGNumberEntry.cxx.
|
static |
Check min/max limits for the set value.
Definition at line 786 of file TGNumberEntry.cxx.
|
static |
Copy the string stored in src into dst, skipping some chars depending on the format and style.
The copy is stopped when reaching dstCap-1 copied chars or when finding a null terminator char in src, whatever happens first.
| src | (owned by caller) is the preallocated char buffer to be copied |
| dst | (owned by caller) is a preallocated char buffer where result is stored |
| dstCap | must match the length of dst buffer and be bigger than 0 |
| style | see TGNumberFormat::EStyle |
| attr | see TGNumberFormat::EAttribute |
Definition at line 242 of file TGNumberEntry.cxx.
Definition at line 490 of file TGNumberEntry.cxx.
|
static |
For kNESMinSecCent.
Definition at line 511 of file TGNumberEntry.cxx.
|
static |
Definition at line 526 of file TGNumberEntry.cxx.
Definition at line 562 of file TGNumberEntry.cxx.
|
static |
Definition at line 434 of file TGNumberEntry.cxx.
|
static |
Change year/month/day format.
Definition at line 1036 of file TGNumberEntry.cxx.
|
static |
Convert to double format.
Definition at line 867 of file TGNumberEntry.cxx.
|
static |
Definition at line 261 of file TGNumberEntry.cxx.
|
static |
Definition at line 449 of file TGNumberEntry.cxx.
|
static |
Definition at line 166 of file TGNumberEntry.cxx.
Definition at line 159 of file TGNumberEntry.cxx.
Create a number entry with year/month/day information.
Definition at line 605 of file TGNumberEntry.cxx.
Definition at line 457 of file TGNumberEntry.cxx.
|
static |
Convert to double format.
Definition at line 759 of file TGNumberEntry.cxx.
|
static |
Definition at line 294 of file TGNumberEntry.cxx.
Definition at line 133 of file TGNumberEntry.cxx.
Definition at line 285 of file TGNumberEntry.cxx.
Definition at line 277 of file TGNumberEntry.cxx.
|
static |
Definition at line 334 of file TGNumberEntry.cxx.
|
static |
Translate a string to a number value.
Definition at line 632 of file TGNumberEntry.cxx.
|
static |
Translate a number value to a string.
textCap indicates the capacity of text.
Definition at line 706 of file TGNumberEntry.cxx.
Definition at line 146 of file TGNumberEntry.cxx.
| const Int_t kDays[13] |
Definition at line 128 of file TGNumberEntry.cxx.
| const Double_t kEpsilon = 1E-12 |
Definition at line 124 of file TGNumberEntry.cxx.