46 bool title_uses_markup =
false,
47 bool message_uses_markup =
false);
Main class to show messages to the user.
Abstract base class for all modal dialogs.
A simple one-column listbox with OK and Cancel buttons.
void set_single_button(bool value)
Sets whether the Cancel button should be hidden or not.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
const std::string & ok_label() const
void set_cancel_label(const std::string &s)
Sets the caption for the Cancel button.
void set_ok_label(const std::string &s)
Sets the caption for the OK button.
virtual const std::string & window_id() const override
The ID of the window to build.
bool single_button() const
std::vector< std::string > list_type
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
int selected_index() const
Returns the selected item index after displaying.
std::string cancel_label_
void set_selected_index(int index)
Sets the initially selected item index (-1 by default).
const std::string & cancel_label() const
simple_item_selector(const std::string &title, const std::string &message, const list_type &items, bool title_uses_markup=false, bool message_uses_markup=false)
base class of top level items, the only item which needs to store the final canvases to draw on.
const std::vector< std::string > items
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
static map_location::DIRECTION s