#include <FWStringParameterSetter.h>
Public Member Functions | |
virtual void | attach (FWParameterBase *) |
virtual TGFrame * | build (TGFrame *iParent, bool labelBack=true) |
void | doUpdate () |
FWStringParameterSetter () | |
virtual | ~FWStringParameterSetter () |
Private Member Functions | |
FWStringParameterSetter (const FWStringParameterSetter &) | |
const FWStringParameterSetter & | operator= (const FWStringParameterSetter &) |
Private Attributes | |
FWStringParameter * | m_param |
TGTextEntry * | m_widget |
Definition at line 20 of file FWStringParameterSetter.h.
FWStringParameterSetter::FWStringParameterSetter | ( | ) |
Definition at line 35 of file FWStringParameterSetter.cc.
FWStringParameterSetter::~FWStringParameterSetter | ( | ) | [virtual] |
Definition at line 46 of file FWStringParameterSetter.cc.
{ }
FWStringParameterSetter::FWStringParameterSetter | ( | const FWStringParameterSetter & | ) | [private] |
void FWStringParameterSetter::attach | ( | FWParameterBase * | iParam | ) | [virtual] |
Implements FWParameterSetterBase.
Definition at line 67 of file FWStringParameterSetter.cc.
References m_param.
{ m_param = dynamic_cast<FWStringParameter*>(iParam); assert(0!=m_param); }
TGFrame * FWStringParameterSetter::build | ( | TGFrame * | iParent, |
bool | labelBack = true |
||
) | [virtual] |
Implements FWParameterSetterBase.
Definition at line 74 of file FWStringParameterSetter.cc.
References FWParameterSetterBase::frame(), diffTwoXMLs::label, m_param, m_widget, FWParameterBase::name(), and FWGenericParameter< T >::value().
{ TGCompositeFrame* frame = new TGHorizontalFrame(iParent,180,20,kFixedWidth); m_widget = new TGTextEntry(frame, m_param->name().c_str(), 0); m_widget->SetText( m_param->value().c_str() ); m_widget->Connect("ReturnPressed()", "FWStringParameterSetter", this, "doUpdate()"); // label TGLabel* label = new TGLabel(frame,m_param->name().c_str()); if (labelBack) { frame->AddFrame(m_widget, new TGLayoutHints(kLHintsExpandX|kLHintsCenterY,2,2,1,1)); frame->AddFrame(label, new TGLayoutHints(kLHintsLeft|kLHintsCenterY,4,2,1,1) ); } else { frame->AddFrame(label, new TGLayoutHints(kLHintsLeft|kLHintsCenterY) ); frame->AddFrame(m_widget, new TGLayoutHints(kLHintsLeft|kLHintsCenterY, 2,8,2,2)); } return frame; }
void FWStringParameterSetter::doUpdate | ( | ) |
Definition at line 97 of file FWStringParameterSetter.cc.
References m_param, m_widget, FWGenericParameter< T >::set(), and FWParameterSetterBase::update().
const FWStringParameterSetter& FWStringParameterSetter::operator= | ( | const FWStringParameterSetter & | ) | [private] |
Definition at line 42 of file FWStringParameterSetter.h.
Referenced by attach(), build(), and doUpdate().
TGTextEntry* FWStringParameterSetter::m_widget [private] |
Definition at line 43 of file FWStringParameterSetter.h.
Referenced by build(), and doUpdate().