From bd6336c629841c6db3a6ca53a936d629d34db53b Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:15:16 +0200 Subject: 4.1 --- lib/help_provider.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lib/help_provider.h (limited to 'lib/help_provider.h') diff --git a/lib/help_provider.h b/lib/help_provider.h new file mode 100644 index 00000000..9baf9303 --- /dev/null +++ b/lib/help_provider.h @@ -0,0 +1,59 @@ +// ************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * +// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * +// ************************************************************************** + +#ifndef HELPPROVIDER_H_INCLUDED +#define HELPPROVIDER_H_INCLUDED + +#include +#include "ffs_paths.h" + +namespace zen +{ +void displayHelpEntry(const wxString& section = wxEmptyString); + + + + + + + + + + + + + +//######################## implementation ######################## +inline +wxHelpController& getHelpCtrl() +{ + static wxHelpController controller; //external linkage, despite inline definition! + static bool initialized = false; + if (!initialized) + { + initialized = true; + controller.Initialize(zen::getResourceDir() + +#ifdef FFS_WIN + L"FreeFileSync.chm"); +#elif defined FFS_LINUX + L"Help/FreeFileSync.hhp"); +#endif + } + return controller; +} + + +inline +void displayHelpEntry(const wxString& section) +{ + if (section.empty()) + getHelpCtrl().DisplayContents(); + else + getHelpCtrl().DisplaySection(section); +} +} + +#endif // HELPPROVIDER_H_INCLUDED -- cgit