15 #define GETTEXT_DOMAIN "wesnoth-lib"
33 void click_callback(twindow& window,
bool& handled,
bool& halt, tpoint coordinate)
35 SDL_Rect rect = window.get_rectangle();
36 if(coordinate.x < rect.x || coordinate.x > rect.x + rect.w || coordinate.y < rect.y || coordinate.y > rect.y + rect.h ) {
37 halt = handled =
true;
42 void resize_callback(twindow& window)
55 tlistbox& list = find_widget<tlistbox>(&window,
"list",
true);
56 std::map<std::string, string_map>
data;
57 t_string& label = data[
"label"][
"label"];
58 t_string& use_markup = data[
"label"][
"use_markup"];
59 for(
const auto& str :
items_) {
std::vector< std::string > items_
void item_change_callback(twindow &window, size_t item)
bool select_row(const unsigned row, const bool select=true)
Selectes a row.
REGISTER_DIALOG(label_settings)
SDL_Rect button_pos_
The screen location of the combobox button that triggred this droplist.
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
Dialog is closed with ok button.
A SDL resize request, coordinate is the new window size.
void add_row(const string_map &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
Dialog is closed with the cancel button.
void set_variable(const std::string &key, const variant &value)
void pre_show(twindow &window)
Inherited from tdialog.
void set_retval(const int retval, const bool close_window=true)
Sets there return value of the window.
A SDL left mouse button up event.
void post_show(twindow &window)
Inherited from tdialog.
void close()
Requests to close the window.
void set_callback_item_change(const std::function< void(size_t)> &callback)