PageRenderTime 292ms CodeModel.GetById 100ms app.highlight 3ms RepoModel.GetById 125ms app.codeStats 1ms

/indra/newview/llviewerhelp.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 63 lines | 17 code | 12 blank | 34 comment | 0 complexity | 303dfe0b04d181663520cdf2d55a1ad9 MD5 | raw file
 1/** 
 2 * @file llviewerhelp.h
 3 * @brief Utility functions for the Help system
 4 * @author Tofu Linden
 5 *
 6 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28#ifndef LL_LLVIEWERHELP_H
29#define LL_LLVIEWERHELP_H
30
31// The Help UI lives in llfloaterhelpbrowser, llviewerhelp provides a
32// layer of abstraction that protects help-system-using code from the details of
33// the Help UI floater and how help topics are converted into URLs.
34
35#include "llhelp.h" // our abstract base
36#include "llsingleton.h"
37
38class LLUICtrl;
39
40class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
41{
42	friend class LLSingleton<LLViewerHelp>;
43
44 public:
45	/// display the specified help topic in the help viewer
46	/*virtual*/ void showTopic(const std::string &topic);
47
48	std::string getURL(const std::string& topic);
49
50	// return topic derived from viewer UI focus, else default topic
51	std::string getTopicFromFocus();
52
53	/// return default (fallback) topic name suitable for showTopic()
54	/*virtual*/ std::string defaultTopic();
55
56	// return topic to use before the user logs in
57	/*virtual*/ std::string preLoginTopic();
58
59	// return topic to use for the top-level help, invoked by F1
60	/*virtual*/ std::string f1HelpTopic();
61};
62
63#endif // header guard