#include <menu.hpp>


Classes | |
| class | basic_sorter |
| class | imgsel_style |
| struct | item |
| class | sorter |
| class | style |
Public Types | |
| enum | ROW_TYPE { NORMAL_ROW, SELECTED_ROW, HEADING_ROW } |
Public Member Functions | |
| menu (CVideo &video, const std::vector< std::string > &items, bool click_selects=false, int max_height=-1, int max_width=-1, const sorter *sorter_obj=NULL, style *menu_style=NULL, const bool auto_join=true) | |
| ~menu () | |
| Default implementation, but defined out-of-line for efficiency reasons. | |
| int | selection () const |
| void | move_selection (size_t id) |
| void | move_selection_keeping_viewport (size_t id) |
| void | reset_selection () |
| void | change_item (int pos1, int pos2, const std::string &str) |
| void | erase_item (size_t index) |
| void | set_heading (const std::vector< std::string > &heading) |
| void | set_items (const std::vector< std::string > &items, bool strip_spaces=true, bool keep_viewport=false) |
| Set new items to show and redraw/recalculate everything. | |
| void | set_max_height (const int new_max_height) |
| Set a new max height for this menu. | |
| void | set_max_width (const int new_max_width) |
| size_t | number_of_items () const |
| int | process () |
| bool | double_clicked () |
| void | set_click_selects (bool value) |
| void | set_numeric_keypress_selection (bool value) |
| void | scroll (unsigned int pos) |
| void | set_sorter (sorter *s) |
| void | sort_by (int column) |
| int | get_sort_by () |
| bool | get_sort_reversed () |
Static Public Attributes | |
| static style & | default_style = menu::bluebg_style |
| static style | simple_style |
| static imgsel_style | bluebg_style |
Protected Member Functions | |
| bool | item_ends_with_image (const std::string &item) const |
| virtual void | handle_event (const SDL_Event &event) |
| void | set_inner_location (const SDL_Rect &rect) |
| bool | requires_event_focus (const SDL_Event *event=NULL) const |
| const std::vector< int > & | column_widths () const |
| virtual void | draw_row (const size_t row_index, const SDL_Rect &rect, ROW_TYPE type) |
Protected Attributes | |
| style * | style_ |
| bool | silent_ |
Private Types | |
| enum | SELECTION_MOVE_VIEWPORT { MOVE_VIEWPORT, NO_MOVE_VIEWPORT } |
Private Member Functions | |
| size_t | max_items_onscreen () const |
| size_t | heading_height () const |
| void | adjust_viewport_to_selection () |
| void | key_press (SDLKey key) |
| void | create_help_strings () |
| void | process_help_string (int mousex, int mousey) |
| void | column_widths_item (const std::vector< std::string > &row, std::vector< int > &widths) const |
| void | clear_item (int item) |
| void | draw_contents () |
| void | draw () |
| int | hit (int x, int y) const |
| std::pair< int, int > | hit_cell (int x, int y) const |
| int | hit_column (int x) const |
| int | hit_heading (int x, int y) const |
| SDL_Rect | get_item_rect (int item) const |
| SDL_Rect | get_item_rect_internal (size_t pos) const |
| size_t | get_item_height_internal (const std::vector< std::string > &item) const |
| size_t | get_item_height (int item) const |
| int | items_start () const |
| int | items_end () const |
| int | items_height () const |
| void | update_scrollbar_grip_height () |
| void | fill_items (const std::vector< std::string > &items, bool strip_spaces) |
| Set new items to show. | |
| void | do_sort () |
| void | recalculate_pos () |
| void | assert_pos () |
| void | update_size () |
| void | set_selection_pos (size_t pos, bool silent=false, SELECTION_MOVE_VIEWPORT move_viewport=MOVE_VIEWPORT) |
| void | move_selection_to (size_t id, bool silent=false, SELECTION_MOVE_VIEWPORT move_viewport=MOVE_VIEWPORT) |
| void | move_selection_up (size_t dep) |
| void | move_selection_down (size_t dep) |
| void | invalidate_row (size_t id) |
| void | invalidate_row_pos (size_t pos) |
| void | invalidate_heading () |
Private Attributes | |
| int | max_height_ |
| int | max_width_ |
| int | max_items_ |
| int | item_height_ |
| std::vector< item > | items_ |
| std::vector< size_t > | item_pos_ |
| std::vector< std::string > | heading_ |
| int | heading_height_ |
| std::pair< int, int > | cur_help_ |
| int | help_string_ |
| std::vector< int > | column_widths_ |
| size_t | selected_ |
| bool | click_selects_ |
| bool | out_ |
| bool | previous_button_ |
| bool | show_result_ |
| bool | double_clicked_ |
| std::map< int, SDL_Rect > | itemRects_ |
| bool | num_selects_ |
| variable which determines whether a numeric keypress should select an item on the dialog | |
| bool | ignore_next_doubleclick_ |
| bool | last_was_doubleclick_ |
| bool | use_ellipsis_ |
| const sorter * | sorter_ |
| int | sortby_ |
| bool | sortreversed_ |
| int | highlight_heading_ |
| std::set< int > | invalid_ |
Friends | |
| class | style |
| class | imgsel_style |
Definition at line 32 of file menu.hpp.
| enum gui::menu::ROW_TYPE |
enum gui::menu::SELECTION_MOVE_VIEWPORT [private] |
| gui::menu::menu | ( | CVideo & | video, | |
| const std::vector< std::string > & | items, | |||
| bool | click_selects = false, |
|||
| int | max_height = -1, |
|||
| int | max_width = -1, |
|||
| const sorter * | sorter_obj = NULL, |
|||
| style * | menu_style = NULL, |
|||
| const bool | auto_join = true | |||
| ) |
Definition at line 195 of file menu.cpp.
References default_style, fill_items(), gui::menu::style::init(), and style_.

| gui::menu::~menu | ( | ) |
| void gui::menu::adjust_viewport_to_selection | ( | ) | [private] |
Definition at line 508 of file menu.cpp.
References gui::scrollarea::adjust_position(), click_selects_, and selected_.
Referenced by erase_item(), set_items(), and set_selection_pos().


| void gui::menu::assert_pos | ( | ) | [private] |
Definition at line 306 of file menu.cpp.
References item_pos_, and items_.
Referenced by erase_item(), and recalculate_pos().

| void gui::menu::change_item | ( | int | pos1, | |
| int | pos2, | |||
| const std::string & | str | |||
| ) |
Definition at line 384 of file menu.cpp.
References item_pos_, items_, and gui::widget::set_dirty().

| void gui::menu::clear_item | ( | int | item | ) | [private] |
Definition at line 900 of file menu.cpp.
References gui::widget::bg_restore(), and get_item_rect().
Referenced by erase_item().


| const std::vector< int > & gui::menu::column_widths | ( | ) | const [protected] |
Definition at line 888 of file menu.cpp.
References column_widths_, column_widths_item(), heading_, and items_.
Referenced by draw_row(), hit_column(), and update_size().


| void gui::menu::column_widths_item | ( | const std::vector< std::string > & | row, | |
| std::vector< int > & | widths | |||
| ) | const [private] |
Definition at line 867 of file menu.cpp.
References gui::menu::style::get_cell_padding(), item_ends_with_image(), gui::menu::style::item_size(), and style_.
Referenced by column_widths().


| void gui::menu::create_help_strings | ( | ) | [private] |
Definition at line 315 of file menu.cpp.
References gui2::event::find(), HELP_STRING_SEPARATOR, items_, and utils::split().
Referenced by fill_items().


| void gui::menu::do_sort | ( | ) | [private] |
Definition at line 276 of file menu.cpp.
References gui::menu::sorter::column_sortable(), item_pos_, items_, move_selection_to(), NO_MOVE_VIEWPORT, recalculate_pos(), selection(), gui::widget::set_dirty(), sortby_, sorter_, and sortreversed_.
Referenced by fill_items(), and sort_by().


| bool gui::menu::double_clicked | ( | ) |
Definition at line 738 of file menu.cpp.
References double_clicked_.
Referenced by mp::ui::handle_event(), gui::dialog::process(), and mp::create::process_event().

| void gui::menu::draw | ( | ) | [private, virtual] |
Reimplemented from gui::widget.
Reimplemented in mp::gamebrowser.
Definition at line 1006 of file menu.cpp.
References gui::widget::bg_restore(), gui::widget::clip_rect(), gui::widget::dirty(), draw_contents(), gui::menu::style::draw_row(), get_item_rect(), heading_height(), HEADING_ROW, gui::widget::hidden(), gui::scrollarea::inner_location(), invalid_, item_pos_, gui::widget::location(), NORMAL_ROW, out_, pos, selected_, SELECTED_ROW, gui::widget::set_dirty(), style_, update_rect(), and gui::widget::video().

| void gui::menu::draw_contents | ( | ) | [private, virtual] |
Reimplemented from gui::widget.
Reimplemented in mp::gamebrowser.
Definition at line 994 of file menu.cpp.
References gui::menu::style::draw_row(), get_item_rect(), heading_height(), HEADING_ROW, gui::scrollarea::inner_location(), item_pos_, NORMAL_ROW, out_, selected_, SELECTED_ROW, and style_.
Referenced by draw().


| void gui::menu::draw_row | ( | const size_t | row_index, | |
| const SDL_Rect & | rect, | |||
| ROW_TYPE | type | |||
| ) | [protected, virtual] |
Reimplemented in mp::gamebrowser.
Definition at line 908 of file menu.cpp.
References CVideo::blit_surface(), column_widths(), current_language_rtl(), draw_solid_tinted_rectangle(), font::draw_text(), gui::menu::style::get_font_size(), image::get_image(), gui::menu::style::get_item_image(), gui::menu::style::get_thickness(), heading_, HEADING_ROW, highlight_heading_, IMAGE_PREFIX, IMG_TEXT_SEPARATOR, gui::scrollarea::inner_location(), items_, font::make_text_ellipsis(), max_width_, font::NORMAL_COLOR, font::parse_markup(), utils::REMOVE_EMPTY, screen_area(), sortby_, sortreversed_, utils::split(), style_, font::text_area(), use_ellipsis_, gui::widget::video(), and w.
Referenced by gui::menu::style::draw_row().


| void gui::menu::erase_item | ( | size_t | index | ) |
Definition at line 395 of file menu.cpp.
References adjust_viewport_to_selection(), assert_pos(), clear_item(), item_pos_, itemRects_, items_, pos, selected_, gui::widget::set_dirty(), and update_scrollbar_grip_height().
Referenced by gui::dialog::action().


| void gui::menu::fill_items | ( | const std::vector< std::string > & | items, | |
| bool | strip_spaces | |||
| ) | [private] |
Set new items to show.
If strip_spaces is false, spaces will remain at the item edges.
Definition at line 219 of file menu.cpp.
References COLUMN_SEPARATOR, create_help_strings(), DEFAULT_ITEM, do_sort(), heading_, HEADING_PREFIX, item_pos_, items_, utils::quoted_split(), selected_, sortby_, and update_size().
Referenced by menu(), and set_items().


| size_t gui::menu::get_item_height | ( | int | item | ) | const [private] |
Definition at line 1169 of file menu.cpp.
References get_item_height_internal(), item_height_, and items_.
Referenced by get_item_rect_internal(), and max_items_onscreen().


| size_t gui::menu::get_item_height_internal | ( | const std::vector< std::string > & | item | ) | const [private] |
Definition at line 1149 of file menu.cpp.
References gui::menu::style::item_size(), and style_.
Referenced by get_item_height(), and heading_height().


| SDL_Rect gui::menu::get_item_rect | ( | int | item | ) | const [private] |
Definition at line 1100 of file menu.cpp.
References get_item_rect_internal(), and item_pos_.
Referenced by clear_item(), draw(), draw_contents(), hit(), and update_size().


| SDL_Rect gui::menu::get_item_rect_internal | ( | size_t | pos | ) | const [private] |
Definition at line 1105 of file menu.cpp.
References gui2::create_rect(), get_item_height(), gui::scrollarea::get_position(), heading_height(), gui::scrollarea::inner_location(), itemRects_, max_items_onscreen(), and screen_area().
Referenced by get_item_rect().


| int gui::menu::get_sort_by | ( | ) | [inline] |
| bool gui::menu::get_sort_reversed | ( | ) | [inline] |
Definition at line 203 of file menu.hpp.
References sortreversed_.
| void gui::menu::handle_event | ( | const SDL_Event & | event | ) | [protected, virtual] |
Reimplemented from gui::scrollarea.
Reimplemented in mp::gamebrowser, and gui::file_menu.
Definition at line 643 of file menu.cpp.
References game_config::sounds::button_press, click_selects_, gui::menu::sorter::column_sortable(), DOUBLE_CLICK_EVENT, double_clicked_, gui::widget::focus(), gui::widget::height(), gui::widget::hidden(), highlight_heading_, hit(), hit_heading(), ignore_next_doubleclick_, invalidate_heading(), invalidate_row_pos(), key_press(), last_was_doubleclick_, gui::widget::mouse_locked(), move_selection_to(), out_, sound::play_UI_sound(), selected_, gui::widget::set_focus(), show_result_, silent_, sort_by(), and sorter_.

| size_t gui::menu::heading_height | ( | ) | const [private] |
Definition at line 1160 of file menu.cpp.
References get_item_height_internal(), heading_, heading_height_, and max_height_.
Referenced by draw(), draw_contents(), get_item_rect_internal(), hit_heading(), max_items_onscreen(), and update_size().


| int gui::menu::hit | ( | int | x, | |
| int | y | |||
| ) | const [private] |
Definition at line 1048 of file menu.cpp.
References get_item_rect(), gui::scrollarea::inner_location(), and items_.
Referenced by handle_event(), hit_cell(), and process_help_string().


| std::pair< int, int > gui::menu::hit_cell | ( | int | x, | |
| int | y | |||
| ) | const [private] |
Definition at line 1074 of file menu.cpp.
References hit(), and hit_column().

| int gui::menu::hit_column | ( | int | x | ) | const [private] |
Definition at line 1062 of file menu.cpp.
References column_widths(), and gui::widget::location().
Referenced by hit_cell(), hit_heading(), and process_help_string().


| int gui::menu::hit_heading | ( | int | x, | |
| int | y | |||
| ) | const [private] |
Definition at line 1089 of file menu.cpp.
References heading_height(), gui::widget::height(), hit_column(), and gui::scrollarea::inner_location().
Referenced by handle_event().


| void gui::menu::invalidate_heading | ( | ) | [private] |
Definition at line 1228 of file menu.cpp.
References invalid_.
Referenced by handle_event().

| void gui::menu::invalidate_row | ( | size_t | id | ) | [private] |
Definition at line 1210 of file menu.cpp.
References invalid_, and items_.
Referenced by invalidate_row_pos().

| void gui::menu::invalidate_row_pos | ( | size_t | pos | ) | [private] |
Definition at line 1219 of file menu.cpp.
References invalidate_row(), and items_.
Referenced by handle_event(), and set_selection_pos().


| bool gui::menu::item_ends_with_image | ( | const std::string & | item | ) | const [protected] |
Definition at line 881 of file menu.cpp.
References IMAGE_PREFIX, IMG_TEXT_SEPARATOR, and pos.
Referenced by column_widths_item().

| int gui::menu::items_end | ( | ) | const [private] |
| int gui::menu::items_height | ( | ) | const [private] |
| int gui::menu::items_start | ( | ) | const [private] |
| void gui::menu::key_press | ( | SDLKey | key | ) | [private] |
Definition at line 576 of file menu.cpp.
References click_selects_, items_, max_items_onscreen(), move_selection_down(), move_selection_up(), num_selects_, and set_selection_pos().
Referenced by handle_event().


| size_t gui::menu::max_items_onscreen | ( | ) | const [private] |
Definition at line 482 of file menu.cpp.
References get_item_height(), CVideo::gety(), heading_height(), items_, max_height_, max_items_, sort(), and gui::widget::video().
Referenced by get_item_rect_internal(), key_press(), update_scrollbar_grip_height(), and update_size().


| void gui::menu::move_selection | ( | size_t | id | ) |
Definition at line 556 of file menu.cpp.
References item_pos_, MOVE_VIEWPORT, and set_selection_pos().
Referenced by mp::create::create(), mp::create::layout_children(), gui::file_menu::select_file(), and mp::ui::set_selected_game().


| void gui::menu::move_selection_down | ( | size_t | dep | ) | [private] |
Definition at line 541 of file menu.cpp.
References items_, selected_, and set_selection_pos().
Referenced by key_press().


| void gui::menu::move_selection_keeping_viewport | ( | size_t | id | ) |
Definition at line 564 of file menu.cpp.
References item_pos_, NO_MOVE_VIEWPORT, and set_selection_pos().
Referenced by mp::ui::set_user_menu_items().


| void gui::menu::move_selection_to | ( | size_t | id, | |
| bool | silent = false, |
|||
| SELECTION_MOVE_VIEWPORT | move_viewport = MOVE_VIEWPORT | |||
| ) | [private] |
Definition at line 548 of file menu.cpp.
References item_pos_, and set_selection_pos().
Referenced by do_sort(), and handle_event().


| void gui::menu::move_selection_up | ( | size_t | dep | ) | [private] |
Definition at line 536 of file menu.cpp.
References selected_, and set_selection_pos().
Referenced by key_press().


| size_t gui::menu::number_of_items | ( | ) | const [inline] |
Definition at line 187 of file menu.hpp.
References items_.
Referenced by mp::create::process_event().

| int gui::menu::process | ( | ) |
Reimplemented in help::help_menu.
Definition at line 728 of file menu.cpp.
References selected_, and show_result_.
Referenced by gui::dialog::process().

| void gui::menu::process_help_string | ( | int | mousex, | |
| int | mousey | |||
| ) | [private, virtual] |
Reimplemented from gui::widget.
Definition at line 1182 of file menu.cpp.
References CVideo::clear_help_string(), cur_help_, help_string_, hit(), hit_column(), items_, CVideo::set_help_string(), and gui::widget::video().

| void gui::menu::recalculate_pos | ( | ) | [private] |
| bool gui::menu::requires_event_focus | ( | const SDL_Event * | event = NULL |
) | const [protected, virtual] |
Reimplemented from events::handler.
Definition at line 610 of file menu.cpp.
References click_selects_, gui::widget::focus_, gui::widget::height(), gui::widget::hidden(), and num_selects_.

| void gui::menu::reset_selection | ( | ) |
Reimplemented in mp::gamebrowser.
Definition at line 571 of file menu.cpp.
References set_selection_pos().
Referenced by gui::dialog::set_menu_items().


| void gui::menu::scroll | ( | unsigned int | pos | ) | [virtual] |
Implements gui::scrollarea.
Reimplemented in mp::gamebrowser.
Definition at line 755 of file menu.cpp.
References itemRects_, and gui::widget::set_dirty().

| int gui::menu::selection | ( | ) | const |
Reimplemented in mp::gamebrowser.
Definition at line 368 of file menu.cpp.
References items_, and selected_.
Referenced by gui::dialog::action(), gui::dialog_button::action(), do_sort(), gui::file_menu::handle_event(), mp::ui::handle_event(), mp::create::layout_children(), gui::dialog::process(), mp::create::process_event(), gui::dialog::set_menu_items(), and gui::file_menu::type_a_head().

| void gui::menu::set_click_selects | ( | bool | value | ) |
Definition at line 745 of file menu.cpp.
References click_selects_.
| void gui::menu::set_heading | ( | const std::vector< std::string > & | heading | ) |
Definition at line 424 of file menu.cpp.
References column_widths_, heading_, itemRects_, max_items_, and gui::widget::set_dirty().

| void gui::menu::set_inner_location | ( | const SDL_Rect & | rect | ) | [protected, virtual] |
Implements gui::scrollarea.
Reimplemented in mp::gamebrowser.
Definition at line 377 of file menu.cpp.
References gui::widget::bg_register(), itemRects_, and update_scrollbar_grip_height().

| void gui::menu::set_items | ( | const std::vector< std::string > & | items, | |
| bool | strip_spaces = true, |
|||
| bool | keep_viewport = false | |||
| ) |
Set new items to show and redraw/recalculate everything.
If strip_spaces is false, spaces will remain at the item edges. If keep_viewport is true, the menu tries to keep the selection at the same position as it were before the items were set.
Definition at line 435 of file menu.cpp.
References adjust_viewport_to_selection(), column_widths_, fill_items(), gui::scrollarea::get_max_position(), gui::scrollarea::get_position(), gui::scrollarea::has_scrollbar(), item_height_, item_pos_, itemRects_, items_, max_items_, selected_, gui::widget::set_dirty(), gui::scrollarea::set_position(), and update_scrollbar_grip_height().
Referenced by mp::create::create(), gui::file_menu::display_current_files(), help::help_menu::display_visible_items(), mp::wait::generate_menu(), mp::create::layout_children(), gui::dialog::set_menu_items(), and mp::ui::set_user_menu_items().


| void gui::menu::set_max_height | ( | const int | new_max_height | ) |
Set a new max height for this menu.
Note that this does not take effect immediately, only after certain operations that clear everything, such as set_items().
Definition at line 466 of file menu.cpp.
References itemRects_, max_height_, max_items_, and update_size().
Referenced by help::help_browser::adjust_layout(), mp::wait::layout_children(), mp::ui::layout_children(), mp::create::layout_children(), and gui::dialog::update_widget_positions().


| void gui::menu::set_max_width | ( | const int | new_max_width | ) |
Definition at line 474 of file menu.cpp.
References column_widths_, itemRects_, max_width_, and update_size().
Referenced by help::help_browser::adjust_layout(), mp::wait::layout_children(), mp::ui::layout_children(), mp::create::layout_children(), and gui::dialog::update_widget_positions().


| void gui::menu::set_numeric_keypress_selection | ( | bool | value | ) |
Definition at line 750 of file menu.cpp.
References num_selects_.
Referenced by mp::create::create(), mp::gamebrowser::gamebrowser(), mp::ui::ui(), gui::dialog::update_widget_positions(), and mp::wait::wait().

| void gui::menu::set_selection_pos | ( | size_t | pos, | |
| bool | silent = false, |
|||
| SELECTION_MOVE_VIEWPORT | move_viewport = MOVE_VIEWPORT | |||
| ) | [private] |
Definition at line 515 of file menu.cpp.
References adjust_viewport_to_selection(), invalidate_row_pos(), items_, game_config::sounds::menu_select, MOVE_VIEWPORT, sound::play_UI_sound(), selected_, and silent_.
Referenced by key_press(), move_selection(), move_selection_down(), move_selection_keeping_viewport(), move_selection_to(), move_selection_up(), and reset_selection().


| void gui::menu::set_sorter | ( | sorter * | s | ) |
| void gui::menu::sort_by | ( | int | column | ) |
Definition at line 772 of file menu.cpp.
References do_sort(), itemRects_, gui::widget::set_dirty(), sortby_, and sortreversed_.
Referenced by handle_event(), and set_sorter().


| void gui::menu::update_scrollbar_grip_height | ( | ) | [private] |
Definition at line 335 of file menu.cpp.
References items_, max_items_onscreen(), gui::scrollarea::set_full_size(), and gui::scrollarea::set_shown_size().
Referenced by erase_item(), set_inner_location(), set_items(), and update_size().


| void gui::menu::update_size | ( | ) | [private] |
Definition at line 341 of file menu.cpp.
References column_widths(), get_item_rect(), gui::scrollarea::get_position(), h, heading_height(), gui::widget::height(), items_, max_height_, max_items_onscreen(), max_width_, gui::scrollarea::scrollbar_width(), gui::widget::set_measurements(), update_scrollbar_grip_height(), use_ellipsis_, w, and gui::widget::width().
Referenced by fill_items(), set_max_height(), and set_max_width().


friend class imgsel_style [friend] |
bool gui::menu::click_selects_ [private] |
Definition at line 242 of file menu.hpp.
Referenced by adjust_viewport_to_selection(), handle_event(), key_press(), requires_event_focus(), and set_click_selects().
std::vector<int> gui::menu::column_widths_ [mutable, private] |
Definition at line 239 of file menu.hpp.
Referenced by column_widths(), set_heading(), set_items(), and set_max_width().
std::pair<int,int> gui::menu::cur_help_ [private] |
Definition at line 236 of file menu.hpp.
Referenced by process_help_string().
menu::style & gui::menu::default_style = menu::bluebg_style [static] |
Definition at line 104 of file menu.hpp.
Referenced by menu(), and gui::dialog::set_menu().
bool gui::menu::double_clicked_ [private] |
Reimplemented in mp::gamebrowser.
Definition at line 249 of file menu.hpp.
Referenced by double_clicked(), and handle_event().
std::vector<std::string> gui::menu::heading_ [private] |
Definition at line 230 of file menu.hpp.
Referenced by column_widths(), draw_row(), fill_items(), heading_height(), and set_heading().
int gui::menu::heading_height_ [mutable, private] |
Definition at line 231 of file menu.hpp.
Referenced by heading_height().
int gui::menu::help_string_ [private] |
Reimplemented from gui::widget.
Definition at line 237 of file menu.hpp.
Referenced by process_help_string().
int gui::menu::highlight_heading_ [private] |
Definition at line 291 of file menu.hpp.
Referenced by draw_row(), and handle_event().
bool gui::menu::ignore_next_doubleclick_ [private] |
Reimplemented in mp::gamebrowser.
Definition at line 282 of file menu.hpp.
Referenced by handle_event().
std::set<int> gui::menu::invalid_ [private] |
Definition at line 312 of file menu.hpp.
Referenced by draw(), invalidate_heading(), and invalidate_row().
int gui::menu::item_height_ [mutable, private] |
Reimplemented in mp::gamebrowser.
Definition at line 222 of file menu.hpp.
Referenced by get_item_height(), and set_items().
std::vector<size_t> gui::menu::item_pos_ [private] |
Definition at line 228 of file menu.hpp.
Referenced by assert_pos(), change_item(), do_sort(), draw(), draw_contents(), erase_item(), fill_items(), get_item_rect(), move_selection(), move_selection_keeping_viewport(), move_selection_to(), recalculate_pos(), and set_items().
std::map<int,SDL_Rect> gui::menu::itemRects_ [mutable, private] |
Definition at line 263 of file menu.hpp.
Referenced by erase_item(), get_item_rect_internal(), scroll(), set_heading(), set_inner_location(), set_items(), set_max_height(), set_max_width(), and sort_by().
std::vector<item> gui::menu::items_ [private] |
Definition at line 227 of file menu.hpp.
Referenced by assert_pos(), change_item(), column_widths(), create_help_strings(), do_sort(), draw_row(), erase_item(), fill_items(), get_item_height(), hit(), invalidate_row(), invalidate_row_pos(), key_press(), max_items_onscreen(), move_selection_down(), number_of_items(), process_help_string(), recalculate_pos(), selection(), set_items(), set_selection_pos(), update_scrollbar_grip_height(), and update_size().
bool gui::menu::last_was_doubleclick_ [private] |
Reimplemented in mp::gamebrowser.
Definition at line 283 of file menu.hpp.
Referenced by handle_event().
int gui::menu::max_height_ [private] |
Definition at line 221 of file menu.hpp.
Referenced by heading_height(), max_items_onscreen(), set_max_height(), and update_size().
int gui::menu::max_items_ [mutable, private] |
Definition at line 222 of file menu.hpp.
Referenced by max_items_onscreen(), set_heading(), set_items(), and set_max_height().
int gui::menu::max_width_ [private] |
Definition at line 221 of file menu.hpp.
Referenced by draw_row(), set_max_width(), and update_size().
bool gui::menu::num_selects_ [private] |
variable which determines whether a numeric keypress should select an item on the dialog
Definition at line 278 of file menu.hpp.
Referenced by key_press(), requires_event_focus(), and set_numeric_keypress_selection().
bool gui::menu::out_ [private] |
Definition at line 243 of file menu.hpp.
Referenced by draw(), draw_contents(), and handle_event().
bool gui::menu::previous_button_ [private] |
size_t gui::menu::selected_ [private] |
Reimplemented in mp::gamebrowser.
Definition at line 241 of file menu.hpp.
Referenced by adjust_viewport_to_selection(), draw(), draw_contents(), erase_item(), fill_items(), handle_event(), move_selection_down(), move_selection_up(), process(), selection(), set_items(), and set_selection_pos().
bool gui::menu::show_result_ [private] |
Definition at line 247 of file menu.hpp.
Referenced by handle_event(), and process().
bool gui::menu::silent_ [protected] |
Definition at line 215 of file menu.hpp.
Referenced by handle_event(), help::help_menu::help_menu(), and set_selection_pos().
menu::style gui::menu::simple_style [static] |
Definition at line 105 of file menu.hpp.
Referenced by gui::dialog::get_menu().
int gui::menu::sortby_ [private] |
Definition at line 289 of file menu.hpp.
Referenced by do_sort(), draw_row(), fill_items(), get_sort_by(), set_sorter(), and sort_by().
const sorter* gui::menu::sorter_ [private] |
Definition at line 288 of file menu.hpp.
Referenced by do_sort(), handle_event(), and set_sorter().
bool gui::menu::sortreversed_ [private] |
Definition at line 290 of file menu.hpp.
Referenced by do_sort(), draw_row(), get_sort_reversed(), set_sorter(), and sort_by().
style* gui::menu::style_ [protected] |
Definition at line 214 of file menu.hpp.
Referenced by column_widths_item(), draw(), draw_contents(), mp::gamebrowser::draw_contents(), draw_row(), get_item_height_internal(), menu(), help::help_menu::process(), and mp::gamebrowser::row_height().
bool gui::menu::use_ellipsis_ [private] |
Definition at line 286 of file menu.hpp.
Referenced by draw_row(), and update_size().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:23 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |