Public Member Functions | Protected Attributes

BoolInpSpec Class Reference

Specifications for boolean inputs. More...

Inheritance diagram for BoolInpSpec:
DataInpSpec

List of all members.

Public Member Functions

 BoolInpSpec (bool yesno, const char *truetxt=sKey::Yes, const char *falsetxt=sKey::No, bool isset=true)
 BoolInpSpec (const BoolInpSpec &)
virtual bool isUndef (int idx=0) const
virtual DataInpSpecclone () const
const char * trueFalseTxt (bool tf=true) const
void setTrueFalseTxt (bool, const char *)
bool checked () const
void setChecked (bool yesno)
virtual const char * text (int idx=0) const
virtual bool setText (const char *s, int idx=0)
virtual bool getBoolValue (int idx=0) const
virtual void setValue (bool, int idx=0)
virtual bool getDefaultBoolValue (int idx=0) const
virtual void setDefaultValue (bool, int idx=0)
bool isSet () const
void setSet (bool yesno=true)

Protected Attributes

BufferString truetext
BufferString falsetext
bool yn
bool defaultyn
bool isset

Detailed Description

Specifications for boolean inputs.

This specifies a boolean input field. If the second char string is "" or NULL, then a checkbox will be created. Otherwise two connected radio buttons will do the job. Default will create two radio buttons "Yes" and "No". When calling setText("xx") on the resulting uiGenInput, it will try to set the boolean value according to the given true/false text's or "Yes"/"No". It does not change the underlying true/false texts.


Constructor & Destructor Documentation

BoolInpSpec::BoolInpSpec ( bool  yesno,
const char *  truetxt = sKey::Yes,
const char *  falsetxt = sKey::No,
bool  isset = true 
)
BoolInpSpec::BoolInpSpec ( const BoolInpSpec  ) 

Member Function Documentation

bool BoolInpSpec::checked (  )  const
virtual DataInpSpec* BoolInpSpec::clone (  )  const [virtual]

Implements DataInpSpec.

virtual bool BoolInpSpec::getBoolValue ( int  idx = 0  )  const [virtual]

Reimplemented from DataInpSpec.

virtual bool BoolInpSpec::getDefaultBoolValue ( int  idx = 0  )  const [virtual]

Reimplemented from DataInpSpec.

bool BoolInpSpec::isSet (  )  const [inline]
virtual bool BoolInpSpec::isUndef ( int  idx = 0  )  const [virtual]

Implements DataInpSpec.

void BoolInpSpec::setChecked ( bool  yesno  ) 
virtual void BoolInpSpec::setDefaultValue ( bool  ,
int  idx = 0 
) [virtual]

Reimplemented from DataInpSpec.

void BoolInpSpec::setSet ( bool  yesno = true  )  [inline]
virtual bool BoolInpSpec::setText ( const char *  s,
int  idx = 0 
) [virtual]

Implements DataInpSpec.

void BoolInpSpec::setTrueFalseTxt ( bool  ,
const char *   
)
virtual void BoolInpSpec::setValue ( bool  ,
int  idx = 0 
) [virtual]

Reimplemented from DataInpSpec.

virtual const char* BoolInpSpec::text ( int  idx = 0  )  const [virtual]

Implements DataInpSpec.

const char* BoolInpSpec::trueFalseTxt ( bool  tf = true  )  const

Member Data Documentation

bool BoolInpSpec::defaultyn [protected]
bool BoolInpSpec::isset [protected]
bool BoolInpSpec::yn [protected]