#include <construct_dialog.hpp>
Public Member Functions | |
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) | |
int | get_index (int selection) const |
void | delete_item (int selection) |
Public Member Functions inherited from gui::dialog_textbox | |
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) | |
virtual | ~dialog_textbox () |
label * | get_label () const |
sdl_handler_vector | handler_members () |
Public Member Functions inherited from gui::textbox | |
textbox (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, const bool auto_join=true) | |
virtual | ~textbox () |
const std::string | text () const |
void | set_text (const std::string &text, const SDL_Color &color=font::NORMAL_COLOR) |
void | append_text (const std::string &text, bool auto_scroll=false, const SDL_Color &color=font::NORMAL_COLOR) |
void | clear () |
void | set_selection (const int selstart, const int selend) |
void | set_cursor_pos (const int cursor_pos) |
void | set_editable (bool value) |
bool | editable () const |
int | font_size () const |
void | set_font_size (int fs) |
void | scroll_to_bottom () |
void | set_wrap (bool val) |
void | set_edit_target (textbox *target) |
Public Member Functions inherited from gui::scrollarea | |
scrollarea (CVideo &video, bool auto_join=true) | |
Create a zone with automatic handling of scrollbar. More... | |
virtual void | hide (bool value=true) |
Public Member Functions inherited from gui::widget | |
SDL_Rect const & | location () const |
virtual void | set_location (SDL_Rect const &rect) |
void | set_location (int x, int y) |
void | set_width (int w) |
void | set_height (int h) |
void | set_measurements (int w, int h) |
int | width () const |
int | height () const |
bool | focus (const SDL_Event *event) |
void | set_focus (bool focus) |
bool | hidden () const |
virtual void | enable (bool new_val=true) |
bool | enabled () const |
void | set_clip_rect (const SDL_Rect &rect) |
void | set_volatile (bool val=true) |
void | set_dirty (bool dirty=true) |
bool | dirty () const |
const std::string & | id () const |
void | set_id (const std::string &id) |
void | set_help_string (const std::string &str) |
void | set_tooltip_string (const std::string &str) |
virtual void | process_help_string (int mousex, int mousey) |
virtual void | process_tooltip_string (int mousex, int mousey) |
Public Member Functions inherited from events::sdl_handler | |
virtual void | join () |
virtual void | join (context &c) |
virtual void | join_same (sdl_handler *parent) |
virtual void | leave () |
virtual void | join_global () |
virtual void | leave_global () |
Private Member Functions | |
virtual void | handle_text_changed (const ucs4::string &text) |
Private Attributes | |
std::vector< std::string > | items_ |
std::vector< std::string > | items_to_filter_ |
std::vector< std::string > | filtered_items_ |
std::vector< int > | index_map_ |
std::vector< std::string > | last_words |
size_t | header_row_ |
gui::dialog & | dialog_ |
Additional Inherited Members | |
Protected Member Functions inherited from gui::textbox | |
virtual void | draw_contents () |
virtual void | update_location (SDL_Rect const &rect) |
virtual void | set_inner_location (SDL_Rect const &) |
virtual void | scroll (unsigned int pos) |
Protected Member Functions inherited from gui::scrollarea | |
virtual void | process_event () |
SDL_Rect | inner_location () const |
unsigned | scrollbar_width () const |
unsigned | get_position () const |
unsigned | get_max_position () const |
void | set_position (unsigned pos) |
void | adjust_position (unsigned pos) |
void | move_position (int dep) |
void | set_shown_size (unsigned h) |
void | set_full_size (unsigned h) |
void | set_scroll_rate (unsigned r) |
bool | has_scrollbar () const |
Protected Member Functions inherited from gui::widget | |
widget (widget const &o) | |
widget (CVideo &video, const bool auto_join=true) | |
virtual | ~widget () |
void | bg_register (SDL_Rect const &rect) |
void | bg_restore () const |
void | bg_restore (SDL_Rect const &rect) const |
void | bg_update () |
void | bg_cancel () |
CVideo & | video () const |
virtual void | draw () |
const SDL_Rect * | clip_rect () const |
virtual sdl_handler_vector | member_handlers () |
virtual void | handle_window_event (SDL_Event const &event) |
bool | mouse_locked () const |
void | aquire_mouse_lock () |
void | free_mouse_lock () |
Protected Member Functions inherited from events::sdl_handler | |
sdl_handler (const bool auto_join=true) | |
virtual | ~sdl_handler () |
Protected Attributes inherited from gui::widget | |
bool | focus_ |
Definition at line 119 of file construct_dialog.hpp.
|
inline |
Definition at line 121 of file construct_dialog.hpp.
References gui::textbox::set_text().
Definition at line 934 of file construct_dialog.cpp.
References filtered_items_, header_row_, i, index_map_, items_, and items_to_filter_.
Definition at line 918 of file construct_dialog.cpp.
References header_row_, and index_map_.
Referenced by dialogs::recall_dialog(), and dialogs::unit_preview_pane::set_selection().
|
privatevirtual |
Reimplemented from gui::textbox.
Definition at line 956 of file construct_dialog.cpp.
References chars_equal_insensitive(), dialog_, filtered_items_, header_row_, index_map_, items_, items_to_filter_, last_words, gui::dialog::set_menu_items(), and utils::split().
|
private |
Definition at line 147 of file construct_dialog.hpp.
Referenced by handle_text_changed().
|
private |
Definition at line 143 of file construct_dialog.hpp.
Referenced by delete_item(), and handle_text_changed().
|
private |
Definition at line 146 of file construct_dialog.hpp.
Referenced by delete_item(), get_index(), and handle_text_changed().
|
private |
Definition at line 144 of file construct_dialog.hpp.
Referenced by delete_item(), get_index(), and handle_text_changed().
|
private |
Definition at line 143 of file construct_dialog.hpp.
Referenced by delete_item(), and handle_text_changed().
|
private |
Definition at line 143 of file construct_dialog.hpp.
Referenced by delete_item(), and handle_text_changed().
|
private |
Definition at line 145 of file construct_dialog.hpp.
Referenced by handle_text_changed().