CMS 3D CMS Logo

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() [1/2]

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() [2/2]

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 }
Definition: style.py:1

◆ ~FWNumberEntryField()

FWNumberEntryField::~FWNumberEntryField ( )
inlineoverride

Definition at line 27 of file FWNumberEntry.h.

27 {}

Member Function Documentation

◆ ClassDefOverride()

FWNumberEntryField::ClassDefOverride ( FWNumberEntryField  ,
 
)

◆ GetUIntNumber()

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)); }

◆ GetULong64Number()

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)); }

◆ HandleFocusChange()

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 }
Definition: event.py:1

◆ ReturnPressed()

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 }

◆ SetUIntNumber()

void FWNumberEntryField::SetUIntNumber ( UInt_t  n)
virtual

Definition at line 51 of file FWNumberEntry.cc.

References dqmiodumpmetadata::n.

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

51 { SetText(Form("%u", n), kFALSE); }

◆ SetULong64Number()

void FWNumberEntryField::SetULong64Number ( ULong64_t  n)
virtual

Definition at line 57 of file FWNumberEntry.cc.

References dqmiodumpmetadata::n.

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

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