Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef HELP_HPP_INCLUDED
00016 #define HELP_HPP_INCLUDED
00017
00018 class config;
00019 class display;
00020 class gamemap;
00021
00022 #include "hotkeys.hpp"
00023 #include "construct_dialog.hpp"
00024
00025 namespace help {
00026
00027 struct help_manager {
00028 help_manager(const config *game_config, gamemap *map);
00029 ~help_manager();
00030 };
00031
00032 struct section;
00033
00034
00035
00036 void show_help(display &disp, const section &toplevel, const std::string& show_topic="",
00037 int xloc=-1, int yloc=-1);
00038
00039
00040
00041
00042 void show_help(display &disp, const std::string& show_topic="", int xloc=-1, int yloc=-1);
00043
00044
00045 void show_unit_help(display &disp, const std::string& unit_id, bool hidden = false,
00046 int xloc=-1, int yloc=-1);
00047
00048 class help_button : public gui::dialog_button, public hotkey::command_executor {
00049 public:
00050 help_button(display& disp, const std::string &help_topic);
00051 ~help_button();
00052 int action(gui::dialog_process_info &info);
00053 std::string topic() const { return topic_; }
00054 void join();
00055 void leave();
00056 private:
00057 void show_help();
00058 bool can_execute_command(hotkey::HOTKEY_COMMAND cmd, int =-1) const;
00059
00060 display &disp_;
00061 const std::string topic_;
00062 hotkey::basic_handler *help_hand_;
00063 };
00064
00065
00066 }
00067
00068 #endif