CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
FWNumberEntryField Class Reference

#include <FWNumberEntry.h>

Inheritance diagram for FWNumberEntryField:

Public Member Functions

 ClassDefOverride (FWNumberEntryField, 0)
 
 FWNumberEntryField (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())
 
 FWNumberEntryField (const TGWindow *parent=nullptr, Int_t id=-1, Double_t val=0, EStyle style=kNESReal, EAttribute attr=kNEAAnyNumber, ELimit limits=kNELNoLimits, Double_t min=0, Double_t max=1)
 
virtual UInt_t GetUIntNumber ()
 
virtual ULong64_t GetULong64Number ()
 
Bool_t HandleFocusChange (Event_t *event) override
 
void ReturnPressed () override
 
virtual void SetUIntNumber (UInt_t n)
 
virtual void SetULong64Number (ULong64_t n)
 
 ~FWNumberEntryField () override
 

Detailed Description

Definition at line 8 of file FWNumberEntry.h.

Constructor & Destructor Documentation

FWNumberEntryField::FWNumberEntryField ( 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() 
)
FWNumberEntryField::FWNumberEntryField ( const TGWindow *  parent = nullptr,
Int_t  id = -1,
Double_t  val = 0,
EStyle  style = kNESReal,
EAttribute  attr = kNEAAnyNumber,
ELimit  limits = kNELNoLimits,
Double_t  min = 0,
Double_t  max = 1 
)

Definition at line 15 of file FWNumberEntry.cc.

23  : TGNumberEntryField(parent, id, val, style, attr, limits, min, max) {
24  // Constructs a number entry field.
25 }
T min(T a, T b)
Definition: MathUtil.h:58
FWNumberEntryField::~FWNumberEntryField ( )
inlineoverride

Definition at line 27 of file FWNumberEntry.h.

27 {}

Member Function Documentation

FWNumberEntryField::ClassDefOverride ( FWNumberEntryField  ,
 
)
UInt_t FWNumberEntryField::GetUIntNumber ( )
virtual

Definition at line 48 of file FWNumberEntry.cc.

Referenced by FWGUIManager::eventIdChanged(), FWGUIManager::lumiIdChanged(), and FWGUIManager::runIdChanged().

48 { return static_cast<UInt_t>(strtoul(GetText(), nullptr, 10)); }
ULong64_t FWNumberEntryField::GetULong64Number ( )
virtual

Definition at line 54 of file FWNumberEntry.cc.

Referenced by FWGUIManager::eventIdChanged().

54 { return static_cast<ULong64_t>(strtoull(GetText(), nullptr, 10)); }
Bool_t FWNumberEntryField::HandleFocusChange ( Event_t *  event)
override

Definition at line 30 of file FWNumberEntry.cc.

30  {
31  // Handle focus change.
32  // Avoid verification by TGNumberEntryField (which is f***ed).
33 
34  return TGTextEntry::HandleFocusChange(event);
35 }
void FWNumberEntryField::ReturnPressed ( )
override

Definition at line 38 of file FWNumberEntry.cc.

38  {
39  // Return was pressed.
40  // Avoid verification by TGNumberEntryField (which is f***ed).
41 
42  TGTextEntry::ReturnPressed();
43 }
void FWNumberEntryField::SetUIntNumber ( UInt_t  n)
virtual

Definition at line 51 of file FWNumberEntry.cc.

Referenced by CmsShowMainFrame::loadEvent(), FWGUIManager::lumiIdChanged(), and FWGUIManager::runIdChanged().

51 { SetText(Form("%u", n), kFALSE); }
void FWNumberEntryField::SetULong64Number ( ULong64_t  n)
virtual

Definition at line 57 of file FWNumberEntry.cc.

Referenced by FWGUIManager::eventIdChanged(), and CmsShowMainFrame::loadEvent().

57 { SetText(Form("%llu", n), kFALSE); }