PageRenderTime 32ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLVIEWERHELP_H
  28. #define LL_LLVIEWERHELP_H
  29. // The Help UI lives in llfloaterhelpbrowser, llviewerhelp provides a
  30. // layer of abstraction that protects help-system-using code from the details of
  31. // the Help UI floater and how help topics are converted into URLs.
  32. #include "llhelp.h" // our abstract base
  33. #include "llsingleton.h"
  34. class LLUICtrl;
  35. class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
  36. {
  37. friend class LLSingleton<LLViewerHelp>;
  38. public:
  39. /// display the specified help topic in the help viewer
  40. /*virtual*/ void showTopic(const std::string &topic);
  41. std::string getURL(const std::string& topic);
  42. // return topic derived from viewer UI focus, else default topic
  43. std::string getTopicFromFocus();
  44. /// return default (fallback) topic name suitable for showTopic()
  45. /*virtual*/ std::string defaultTopic();
  46. // return topic to use before the user logs in
  47. /*virtual*/ std::string preLoginTopic();
  48. // return topic to use for the top-level help, invoked by F1
  49. /*virtual*/ std::string f1HelpTopic();
  50. };
  51. #endif // header guard