summaryrefslogtreecommitdiff
path: root/src/gui/helpwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-19 01:31:14 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-19 01:33:40 +0300
commite9c84384d8d0e5b91678eb4722ae30bd3693703f (patch)
tree6f30e3d8500f9b0c4620a6c5393df498a04c0a0c /src/gui/helpwindow.h
parent0a068a5f08b1805d5b385b8f81aaf3c7199bff06 (diff)
downloadmanaverse-e9c84384d8d0e5b91678eb4722ae30bd3693703f.tar.gz
manaverse-e9c84384d8d0e5b91678eb4722ae30bd3693703f.tar.bz2
manaverse-e9c84384d8d0e5b91678eb4722ae30bd3693703f.tar.xz
manaverse-e9c84384d8d0e5b91678eb4722ae30bd3693703f.zip
Add help search commands (?text).
Example: ?warps It will open help page about warps.
Diffstat (limited to 'src/gui/helpwindow.h')
-rw-r--r--src/gui/helpwindow.h15
1 files changed, 15 insertions, 0 deletions
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 <map>
+#include <set>
+
class BrowserBox;
class LinkHandler;
@@ -38,6 +41,10 @@ namespace gcn
class ScrollArea;
}
+typedef std::set<std::string> HelpNames;
+typedef HelpNames::const_iterator HelpNamesCIter;
+typedef std::map<std::string, HelpNames> 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;