45 typedef std::optional<bool> button_checked_state;
47 struct not_tri_state_checkable :
public std::logic_error { not_tri_state_checkable() :
std::logic_error(
"neogfx::not_tri_state_checkable") {} };
49 class i_button :
public i_widget,
public virtual i_skinnable_item
63 virtual bool is_pressed()
const = 0;
65 virtual void set_checkable(button_checkable aCheckable = button_checkable::BiState) = 0;
66 virtual bool is_checked()
const = 0;
67 virtual bool is_unchecked()
const = 0;
68 virtual bool is_indeterminate()
const = 0;
69 virtual void check() = 0;
70 virtual void uncheck() = 0;
71 virtual void set_indeterminate() = 0;
72 virtual void set_checked(
bool aChecked) = 0;
73 virtual void toggle() = 0;
76 class i_radio_button :
public i_button
79 virtual bool is_on()
const = 0;
80 virtual bool is_off()
const = 0;
81 virtual void set_on() = 0;
83 virtual const i_radio_button* next_button()
const = 0;
84 virtual i_radio_button* next_button() = 0;
85 virtual bool any_siblings_on()
const = 0;
#define end_declare_enum(enumName)
#define declare_enum_string(enumName, enumEnumerator)
#define begin_declare_enum(enumName)
#define declare_event(declName,...)