16 #ifndef CONSTRUCT_DIALOG_H_INCLUDED
17 #define CONSTRUCT_DIALOG_H_INCLUDED
21 #include "widgets/label.hpp"
122 const std::vector<std::string>&
items,
123 const std::vector<std::string>& items_to_filter,
size_t header_row,
192 std::map<preview_pane *, SDL_Rect >
panes;
196 std::map<dialog_button *, std::pair<int,int> >
buttons;
231 const style& dialog_style=default_style);
242 void set_menu_items(
const std::vector<std::string> &menu_items,
bool keep_selection=
false);
254 const int text_widget_max_chars = 256,
262 virtual dimension_measurements
layout(
int xloc=-1,
int yloc=-1);
263 void set_layout(dimension_measurements &new_dim);
270 int show(
int xloc,
int yloc);
dialog_textbox & get_textbox() const
std::vector< std::string > last_words
static thandler * handler
sdl_handler_vector handler_members()
void set_result(const int result)
std::vector< char_t > string
void update_widget_positions()
void add_option(const std::string &label, bool checked=false, BUTTON_LOCATION loc=BUTTON_CHECKBOX, const std::string &help_string="")
int get_index(int selection) const
std::vector< events::sdl_handler * > sdl_handler_vector
static const int message_font_size
void set_textbox(dialog_textbox *const box)
dimension_measurements dim_
dialog_image(label *const caption, CVideo &video, surface img)
std::vector< dialog_button * > standard_buttons_
std::vector< dialog_button * > extra_buttons_
virtual void action(dialog_process_info &dp_info)
GLuint GLuint GLsizei GLenum type
int relative_size(int size)
static const style & default_style
static const size_t image_h_pad
void add_button(dialog_button *const btn, BUTTON_LOCATION loc)
sdl_handler_vector handler_members()
void set_text(const std::string &text, const SDL_Color &color=font::NORMAL_COLOR)
dialog(CVideo &video, const std::string &title="", const std::string &message="", const DIALOG_TYPE type=MESSAGE, const style &dialog_style=default_style)
std::vector< button * > frame_buttons_
dialog_textbox * text_widget_
static const size_t bottom_padding
const std::vector< std::string > items
const std::string text() const
std::string textbox_text() const
std::vector< std::string > filtered_items_
static menu * get_empty_menu(CVideo &video)
Provides create-on-use semantics for empty_menu.
filter_textbox(CVideo &video, const std::string &header, const std::vector< std::string > &items, const std::vector< std::string > &items_to_filter, size_t header_row, dialog &dialog, int width=250)
static const size_t right_padding
std::vector< std::pair< dialog_button *, BUTTON_LOCATION > > button_pool_
std::vector< dialog_button * > top_buttons_
std::vector< std::string > items_to_filter_
void add_pane(preview_pane *const pp)
static const style & message_style
std::vector< preview_pane * >::iterator pp_iterator
void set_menu(menu *const m)
dialog_button * help_button_
virtual dimension_measurements layout(int xloc=-1, int yloc=-1)
GLclampf GLclampf GLclampf alpha
static const size_t top_padding
std::vector< dialog_button * >::iterator button_iterator
void set_menu_items(const std::vector< std::string > &menu_items, bool keep_selection=false)
Changes (or sets, if not previously set) the dialog's menu items to the provided list.
dimension_measurements get_layout() const
static const style hotkeys_style
virtual ~dialog_textbox()
void set_image(dialog_image *const img)
dialog_frame & get_frame()
void set_basic_behavior(DIALOG_TYPE type)
std::vector< std::pair< dialog_button *, BUTTON_LOCATION > >::const_iterator button_pool_const_iterator
std::vector< preview_pane * >::const_iterator pp_const_iterator
void operator=(const dialog_textbox &)
static const size_t left_padding
std::map< dialog_button *, std::pair< int, int > > buttons
virtual void handle_text_changed(const ucs4::string &text)
GLfloat GLfloat GLfloat GLfloat h
static menu * empty_menu
A pointer to this empty menu is used instead of nullptr (for menu_).
label * get_label() const
std::map< preview_pane *, SDL_Rect > panes
std::vector< preview_pane * > preview_panes_
std::vector< std::string > items_
std::vector< int > index_map_
bool option_checked(unsigned int option_index=0)
static const int caption_font_size
std::vector< dialog_button * >::const_iterator button_const_iterator
static const int max_menu_width
int process(dialog_process_info &info)
GLsizei GLenum GLuint GLuint GLsizei char * message
std::vector< std::pair< dialog_button *, BUTTON_LOCATION > >::iterator button_pool_iterator
GLint GLint GLint GLint GLint GLint GLsizei width
dialog_textbox(label *const label_widget, CVideo &video, int width, const std::string &text="", bool editable=true, size_t max_size=256, int font_size=font::SIZE_PLUS, double alpha=0.4, double alpha_focus=0.2)
dialog_frame::style style
void delete_item(int selection)
Class that keeps track of all the keys on the keyboard.
GLsizei const GLcharARB ** string
void set_panes(std::vector< preview_pane * > panes)
void set_layout(dimension_measurements &new_dim)
label & get_message() const
static void delete_empty_menu()
Explicit freeing of class static resources.