62 return static_cast<standard_button>(
static_cast<uint32_t
>(aLhs) |
static_cast<uint32_t
>(aRhs));
67 return static_cast<standard_button>(
static_cast<uint32_t
>(aLhs) &
static_cast<uint32_t
>(aRhs));
129 class dialog_button_box :
public widget<>
138 typedef std::pair<button_role, std::string> button_details;
140 typedef std::pair<standard_button, button_role> button_key;
143 bool operator()(
const button_key& aLhs,
const button_key& aRhs)
const;
145 typedef std::multimap<button_key, std::unique_ptr<push_button>, button_sorter> button_list;
147 struct button_not_found : std::logic_error { button_not_found() :
std::logic_error(
"neogfx::dialog_button_box::button_not_found") {} };
149 dialog_button_box(i_widget& aParent);
150 dialog_button_box(i_layout& aLayout);
151 ~dialog_button_box();
154 button_role role_of_button(standard_button aStandardButton);
155 void enable_role(button_role aButtonRole);
156 void disable_role(button_role aButtonRole);
157 push_button& button(standard_button aStandardButton)
const;
158 void add_button(standard_button aStandardButton);
159 void add_button(standard_button aStandardButton, button_role aButtonRole, std::string
const& aButtonText);
160 void add_buttons(standard_button aStandardButtons);
161 void set_default_button(standard_button aButton);
163 i_layout& option_layout();
165 static bool has_reject_role(standard_button aStandardButtons);
166 static button_details standard_button_details(standard_button aStandardButton);
169 bool can_reject()
const;
171 static bool similar_role(button_role aButtonRole1, button_role aButtonRole2);
174 horizontal_layout iLayout;
175 horizontal_layout iOptionLayout;
176 horizontal_spacer iSpacer;
177 horizontal_layout iStandardButtonLayout;
178 button_list iButtons;
179 std::optional<standard_button> iDefaultButton;
#define end_declare_enum(enumName)
#define declare_enum_string(enumName, enumEnumerator)
#define begin_declare_enum(enumName)
constexpr style_aspect operator&(style_aspect aLhs, style_aspect aRhs)
constexpr style_aspect operator|(style_aspect aLhs, style_aspect aRhs)
#define define_event(name, declName,...)