37 YCheckBox_dont_care = -1,
64 virtual const char *
widgetClass()
const {
return "YCheckBox"; }
89 virtual YCheckBoxState
value() = 0;
96 virtual void setValue( YCheckBoxState state ) = 0;
107 {
setValue( checked ? YCheckBox_on : YCheckBox_off ); }
122 std::string
label()
const;
130 virtual void setLabel(
const std::string & label );
158 virtual bool setProperty(
const std::string & propertyName,
206 #endif // YCheckBox_h const char * userInputProperty()
The name of the widget property that will return user input.
virtual const YPropertySet & propertySet()
Return this class's property set.
Transport class for the value of simple properties.
A set of properties to check names and types against.
bool isChecked()
Simplified access to value(): Return 'true' if the CheckBox is checked.
YCheckBox(YWidget *parent, const std::string &label)
Constructor.
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
std::string label() const
Get the label (the text on the CheckBox).
virtual void setLabel(const std::string &label)
Set the label (the text on the CheckBox).
bool dontCare()
Simplified access to tri-state ("don't care").
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
virtual std::string shortcutString() const
Get the string of this widget that holds the keyboard shortcut.
virtual void setValue(YCheckBoxState state)=0
Set the CheckBox value (on/off/don't care).
void setDontCare()
Simplified access to setting tri-state ("don't care").
virtual void setUseBoldFont(bool bold=true)
Indicate whether or not a bold font should be used.
void setChecked(bool checked=true)
Simplified access to setValue(): Check of uncheck the CheckBox.
virtual void setShortcutString(const std::string &str)
Set the string of this widget that holds the keyboard shortcut.
bool useBoldFont() const
Returns 'true' if a bold font should be used.
virtual ~YCheckBox()
Destructor.
virtual YCheckBoxState value()=0
Get the current value:
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.