From e9c84384d8d0e5b91678eb4722ae30bd3693703f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 19 Jun 2012 01:31:14 +0300 Subject: Add help search commands (?text). Example: ?warps It will open help page about warps. --- src/gui/helpwindow.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/gui/helpwindow.h') diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h index 675b5c35a..9d89c03c4 100644 --- a/src/gui/helpwindow.h +++ b/src/gui/helpwindow.h @@ -30,6 +30,9 @@ #include "localconsts.h" +#include +#include + class BrowserBox; class LinkHandler; @@ -38,6 +41,10 @@ namespace gcn class ScrollArea; } +typedef std::set HelpNames; +typedef HelpNames::const_iterator HelpNamesCIter; +typedef std::map HelpTagsMap; + /** * The help dialog. */ @@ -66,11 +73,19 @@ class HelpWindow : public Window, public LinkHandler, */ void loadHelp(const std::string &helpFile); + /** + * Seach for given text in tags. + */ + void search(const std::string &text); + private: + void loadTags(); + void loadFile(const std::string &file); BrowserBox *mBrowserBox; gcn::ScrollArea *mScrollArea; + HelpTagsMap mTagFileMap; }; extern HelpWindow *helpWindow; -- cgit v1.2.3-70-g09d2