General purpose widgets. More...
Classes | |
class | button |
struct | check_item |
class | combo |
class | combo_drag |
class | dialog |
class | dialog_button |
class | dialog_button_action |
struct | dialog_button_info |
class | dialog_frame |
class | dialog_image |
struct | dialog_manager |
struct | dialog_process_info |
class | dialog_textbox |
class | drop_group_manager |
Used to create and destroy drop groups. More... | |
class | drop_target |
Handles droping for drag able ui items. More... | |
class | file_menu |
A widget where the user may navigate through directories and choose a file. More... | |
class | filter_textbox |
class | floating_textbox |
class | label |
class | list_slider |
struct | match_begin |
class | menu |
class | multimenu |
A widget that additionally to the normal menu contents also displays a checkbox in each row. More... | |
class | preview_pane |
class | progress_bar |
class | scrollarea |
class | scrollbar |
Scrollbar. More... | |
class | scrollpane |
Scrollpane. More... | |
class | slider |
class | standard_dialog_button |
class | textbox |
class | tristate_button |
class | widget |
class | zoom_slider |
Typedefs | |
typedef Uint32 | msecs |
typedef boost::shared_ptr < combo_drag > | combo_drag_ptr |
typedef boost::shared_ptr < drop_target > | drop_target_ptr |
typedef int | drop_target_group |
typedef boost::shared_ptr < drop_group_manager > | drop_group_manager_ptr |
Enumerations | |
enum | TEXTBOX_MODE { TEXTBOX_NONE, TEXTBOX_SEARCH, TEXTBOX_MESSAGE, TEXTBOX_COMMAND, TEXTBOX_AI } |
enum | DIALOG_RESULT { DIALOG_BACK =-7, DIALOG_FORWARD =-6, CREATE_ITEM =-5, DELETE_ITEM =-4, ESCAPE_DIALOG =-3, CONTINUE_DIALOG =-2, CLOSE_DIALOG =-1 } |
enum | DIALOG_TYPE { MESSAGE, OK_ONLY, YES_NO, OK_CANCEL, CANCEL_ONLY, CLOSE_ONLY, NULL_DIALOG } |
Functions | |
bool | in_dialog () |
int | show_dialog (CVideo &video, surface image, const std::string &caption, const std::string &message, DIALOG_TYPE type, const std::vector< std::string > *menu_items, const std::vector< preview_pane * > *preview_panes, const std::string &text_widget_label, std::string *text_widget_text, const int text_widget_max_chars, std::vector< check_item > *options, int xloc, int yloc, const dialog_frame::style *dialog_style, std::vector< dialog_button_info > *action_buttons, const menu::sorter *sorter, menu::style *menu_style) |
void | check_quit (CVideo &video) |
static bool | is_valid_image (const std::string &str) |
static const std::string | dir_picture ("misc/folder-icon.png") |
static const std::string | path_up ("..") |
static std::pair< int, int > | parse_fraction (const std::string &s) |
static int | xp_to_advance (const std::string &s) |
Variables | |
const int | font_size = font::SIZE_SMALL |
const int | checkbox_horizontal_padding = font::SIZE_SMALL / 2 |
const int | ButtonHPadding = 10 |
const int | ButtonVPadding = 10 |
const int | horizontal_padding = font::SIZE_SMALL |
const int | vertical_padding = font::SIZE_SMALL / 2 |
General purpose widgets.
This module primarily contains a number of common, general purpose widgets for the construction of composite user interfaces.
Definition at line 24 of file combo_drag.hpp.
Definition at line 30 of file drop_target.hpp.
typedef int gui::drop_target_group |
Definition at line 29 of file drop_target.hpp.
Definition at line 26 of file drop_target.hpp.
typedef Uint32 gui::msecs |
Definition at line 334 of file construct_dialog.hpp.
enum gui::DIALOG_RESULT |
Enumerator | |
---|---|
DIALOG_BACK | |
DIALOG_FORWARD | |
CREATE_ITEM | |
DELETE_ITEM | |
ESCAPE_DIALOG | |
CONTINUE_DIALOG | |
CLOSE_DIALOG |
Definition at line 33 of file show_dialog.hpp.
enum gui::DIALOG_TYPE |
Enumerator | |
---|---|
MESSAGE | |
OK_ONLY | |
YES_NO | |
OK_CANCEL | |
CANCEL_ONLY | |
CLOSE_ONLY | |
NULL_DIALOG |
Definition at line 165 of file show_dialog.hpp.
enum gui::TEXTBOX_MODE |
Enumerator | |
---|---|
TEXTBOX_NONE | |
TEXTBOX_SEARCH | |
TEXTBOX_MESSAGE | |
TEXTBOX_COMMAND | |
TEXTBOX_AI |
Definition at line 33 of file floating_textbox.hpp.
|
static |
Referenced by gui::file_menu::display_current_files().
bool gui::in_dialog | ( | ) |
Definition at line 57 of file show_dialog.cpp.
References gui2::is_in_dialog().
Referenced by controller_base::handle_event(), hotkey::basic_handler::handle_event(), and display::redraw_everything().
|
static |
Definition at line 580 of file button.cpp.
References IMAGE_PREFIX.
Referenced by gui::button::set_image(), gui::button::set_label(), and gui::button::set_overlay().
|
static |
|
static |
int gui::show_dialog | ( | CVideo & | video, |
surface | image, | ||
const std::string & | caption, | ||
const std::string & | message, | ||
DIALOG_TYPE | type, | ||
const std::vector< std::string > * | menu_items, | ||
const std::vector< preview_pane * > * | preview_panes, | ||
const std::string & | text_widget_label, | ||
std::string * | text_widget_text, | ||
const int | text_widget_max_chars, | ||
std::vector< check_item > * | options, | ||
int | xloc, | ||
int | yloc, | ||
const dialog_frame::style * | dialog_style, | ||
std::vector< dialog_button_info > * | action_buttons, | ||
const menu::sorter * | sorter, | ||
menu::style * | menu_style | ||
) |
Definition at line 447 of file show_dialog.cpp.
References gui::dialog::add_button(), gui::dialog::add_option(), gui::dialog::add_pane(), gui::check_item::checked, d, gui::dialog::default_style, i, gui::check_item::label, gui::dialog::max_menu_width, MESSAGE, surface::null(), gui::dialog::option_checked(), gui::dialog::result(), gui::dialog::set_image(), gui::dialog::set_menu(), gui::dialog::set_textbox(), gui::dialog::show(), and gui::dialog::textbox_text().
Referenced by attack_prediction_displayer::button_pressed(), statistics_dialog::do_scene_selection(), mp::wait::join_game(), and gui::combo::make_drop_down_menu().
|
static |
Definition at line 115 of file menu.cpp.
References parse_fraction().
Referenced by gui::menu::basic_sorter::less().
const int gui::ButtonHPadding = 10 |
Definition at line 43 of file show_dialog.cpp.
Referenced by gui::dialog_frame::draw(), gui::dialog_frame::layout(), gui::dialog::layout(), mp::create::layout_children(), mp::configure::layout_children(), and mp::connect::layout_children().
const int gui::ButtonVPadding = 10 |
Definition at line 44 of file show_dialog.cpp.
Referenced by gui::dialog_frame::bottom_padding(), gui::dialog_frame::layout(), mp::wait::layout_children(), mp::connect::layout_children(), and mp::lobby::layout_children().
const int gui::checkbox_horizontal_padding = font::SIZE_SMALL / 2 |
Definition at line 38 of file tristate_button.cpp.
Referenced by gui::button::draw_contents(), and gui::tristate_button::draw_contents().
const int gui::font_size = font::SIZE_SMALL |
Definition at line 37 of file tristate_button.cpp.
Referenced by help::help_text_area::add_text_item(), gui::button::calculate_size(), wb::recall::draw_hex(), wb::recruit::draw_hex(), wb::draw_numbers(), help::help_text_area::handle_format_cfg(), gui::menu::style::item_size(), font::line_size(), font::floating_label::set_font_size(), the_end(), and font::word_wrap_text().
const int gui::horizontal_padding = font::SIZE_SMALL |
Definition at line 43 of file button.cpp.
const int gui::vertical_padding = font::SIZE_SMALL / 2 |
Definition at line 45 of file button.cpp.