Public Member Functions | |
help_browser (display &disp, const section &toplevel) | |
void | adjust_layout () |
void | show_topic (const std::string &topic_id) |
Display the topic with the specified identifier. | |
Protected Member Functions | |
virtual void | update_location (SDL_Rect const &rect) |
virtual void | process_event () |
virtual void | handle_event (const SDL_Event &event) |
Private Member Functions | |
void | update_cursor () |
Update the current cursor, set it to the reference cursor if mousex, mousey is over a cross-reference, otherwise, set it to the normal cursor. | |
void | show_topic (const topic &t, bool save_in_history=true) |
void | move_in_history (std::deque< const topic * > &from, std::deque< const topic * > &to) |
Move in the topic history. | |
Private Attributes | |
display & | disp_ |
help_menu | menu_ |
help_text_area | text_area_ |
const section & | toplevel_ |
bool | ref_cursor_ |
std::deque< const topic * > | back_topics_ |
std::deque< const topic * > | forward_topics_ |
gui::button | back_button_ |
gui::button | forward_button_ |
topic const * | shown_topic_ |
Definition at line 441 of file help.cpp.
Definition at line 2499 of file help.cpp.
References back_button_, forward_button_, gui::widget::hide(), font::relative_size(), and gui::widget::set_measurements().
void help::help_browser::adjust_layout | ( | ) |
Definition at line 2515 of file help.cpp.
References back_button_, forward_button_, gui::widget::height(), gui::widget::location(), menu_, font::relative_size(), gui::widget::set_dirty(), gui::widget::set_height(), gui::widget::set_location(), gui::menu::set_max_height(), gui::menu::set_max_width(), gui::widget::set_width(), text_area_, and gui::widget::width().
Referenced by update_location().
void help::help_browser::show_topic | ( | const std::string & | topic_id | ) |
Display the topic with the specified identifier.
Open the menu on the right location and display the topic in the text area.
Definition at line 2680 of file help.cpp.
References help::find_topic(), hidden_symbol(), and toplevel_.
Referenced by handle_event(), move_in_history(), process_event(), and help::show_help().
void help::help_browser::update_location | ( | SDL_Rect const & | rect | ) | [protected, virtual] |
Reimplemented from gui::widget.
Definition at line 2555 of file help.cpp.
References adjust_layout().
void help::help_browser::process_event | ( | ) | [protected, virtual] |
Fake focus functionality for the menu, only process it if it has focus.
A new topic has been chosen in the menu, display it.
Reimplemented from events::handler.
Definition at line 2560 of file help.cpp.
References back_button_, back_topics_, help::help_menu::chosen_topic(), forward_button_, forward_topics_, gui::widget::hide(), gui::widget::location(), menu_, move_in_history(), point_in_rect(), gui::button::pressed(), help::help_menu::process(), show_topic(), and shown_topic_.
void help::help_browser::handle_event | ( | const SDL_Event & | event | ) | [protected, virtual] |
Reimplemented from gui::widget.
Definition at line 2602 of file help.cpp.
References _, disp_, help::find_topic(), help::help_text_area::ref_at(), show_topic(), text_area_, toplevel_, and update_cursor().
void help::help_browser::update_cursor | ( | ) | [private] |
Update the current cursor, set it to the reference cursor if mousex, mousey is over a cross-reference, otherwise, set it to the normal cursor.
Definition at line 2631 of file help.cpp.
References cursor::HYPERLINK, cursor::NORMAL, help::help_text_area::ref_at(), ref_cursor_, cursor::set(), and text_area_.
Referenced by handle_event(), and show_topic().
void help::help_browser::show_topic | ( | const topic & | t, | |
bool | save_in_history = true | |||
) | [private] |
Definition at line 2694 of file help.cpp.
References back_topics_, forward_topics_, help::topic::id, log_scope, menu_, help::topic_text::parsed_text(), help::help_menu::select_topic(), help::help_text_area::show_topic(), shown_topic_, help::topic::text, text_area_, type, unit_type_data::types(), update_cursor(), and unit_type::WITHOUT_ANIMATIONS.
void help::help_browser::move_in_history | ( | std::deque< const topic * > & | from, | |
std::deque< const topic * > & | to | |||
) | [private] |
Move in the topic history.
Pop an element from from and insert it in to. Pop at the fronts if the maximum number of elements is exceeded.
Definition at line 2585 of file help.cpp.
References show_topic(), and shown_topic_.
Referenced by process_event().
display& help::help_browser::disp_ [private] |
help_menu help::help_browser::menu_ [private] |
Definition at line 468 of file help.cpp.
Referenced by adjust_layout(), process_event(), and show_topic().
help_text_area help::help_browser::text_area_ [private] |
Definition at line 469 of file help.cpp.
Referenced by adjust_layout(), handle_event(), show_topic(), and update_cursor().
const section& help::help_browser::toplevel_ [private] |
bool help::help_browser::ref_cursor_ [private] |
std::deque<const topic *> help::help_browser::back_topics_ [private] |
std::deque<const topic *> help::help_browser::forward_topics_ [private] |
gui::button help::help_browser::back_button_ [private] |
Definition at line 473 of file help.cpp.
Referenced by adjust_layout(), help_browser(), and process_event().
Definition at line 473 of file help.cpp.
Referenced by adjust_layout(), help_browser(), and process_event().
topic const* help::help_browser::shown_topic_ [private] |
Definition at line 474 of file help.cpp.
Referenced by move_in_history(), process_event(), and show_topic().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |