CMS 3D CMS Logo

List of all members | Public Member Functions
FWNumberEntryField Class Reference

#include <FWNumberEntry.h>

Inheritance diagram for FWNumberEntryField:

Public Member Functions

 ClassDef (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=0, 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 ()
 
virtual Bool_t HandleFocusChange (Event_t *event)
 
virtual void ReturnPressed ()
 
virtual void SetUIntNumber (UInt_t n)
 
virtual void SetULong64Number (ULong64_t n)
 
virtual ~FWNumberEntryField ()
 

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 = 0,
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 17 of file FWNumberEntry.cc.

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

Member Function Documentation

FWNumberEntryField::ClassDef ( FWNumberEntryField  ,
 
)

Referenced by ~FWNumberEntryField().

UInt_t FWNumberEntryField::GetUIntNumber ( )
virtual

Definition at line 49 of file FWNumberEntry.cc.

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

50 {
51  return static_cast<UInt_t>(strtoul(GetText(), 0, 10));
52 }
ULong64_t FWNumberEntryField::GetULong64Number ( )
virtual

Definition at line 61 of file FWNumberEntry.cc.

Referenced by FWGUIManager::eventIdChanged(), and ~FWNumberEntryField().

62 {
63  return static_cast<ULong64_t>(strtoull(GetText(), 0, 10));
64 }
Bool_t FWNumberEntryField::HandleFocusChange ( Event_t *  event)
virtual

Definition at line 29 of file FWNumberEntry.cc.

Referenced by ~FWNumberEntryField().

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
void FWNumberEntryField::ReturnPressed ( )
virtual

Definition at line 38 of file FWNumberEntry.cc.

Referenced by ~FWNumberEntryField().

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

Definition at line 55 of file FWNumberEntry.cc.

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

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

Definition at line 67 of file FWNumberEntry.cc.

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

68 {
69  SetText(Form("%llu", n), kFALSE);
70 }