2014-06-06 21:34:36 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
ErrorDialog.h
|
|
|
|
|
|
|
|
Jimmy Johnson
|
|
|
|
James Crook
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_HELPSYSTEM__
|
|
|
|
#define __AUDACITY_HELPSYSTEM__
|
|
|
|
|
|
|
|
#include "../Audacity.h"
|
|
|
|
#include <wx/defs.h>
|
|
|
|
#include <wx/window.h>
|
|
|
|
|
|
|
|
class AudacityProject;
|
|
|
|
|
2014-06-09 18:42:19 +00:00
|
|
|
/** @brief Class which contains static methods and data needed for implementing
|
|
|
|
* help buttons
|
|
|
|
*
|
|
|
|
* This class should be the only place in the codebase where the location of
|
|
|
|
* the online copy of the Audacity manual is stored, so that it can be
|
|
|
|
* changed if required
|
|
|
|
*/
|
|
|
|
class HelpSystem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// Displays cutable information in a text ctrl, with an OK button.
|
|
|
|
static void ShowInfoDialog( wxWindow *parent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &dlogTitle,
|
|
|
|
const wxString &shortMsg,
|
|
|
|
const wxString &message,
|
|
|
|
const int xSize, const int ySize);
|
|
|
|
|
2016-02-13 15:43:16 +00:00
|
|
|
/// Displays a NEW window with wxHTML help.
|
2014-08-26 22:53:11 +00:00
|
|
|
/// @param HtmlText Either the literal HTML code to go into the window,
|
|
|
|
/// or the name of the file to read said HTML code from (see below).
|
|
|
|
/// @param bIsFile If true, treat HtmlText argument as a file name, if false
|
|
|
|
/// (default), then it is the HTML code to display.
|
|
|
|
/// @param bModal Whether the resulting window should be modal or not.
|
|
|
|
/// Default is modeless dialogue
|
2014-06-09 18:42:19 +00:00
|
|
|
static void ShowHtmlText( wxWindow * pParent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &Title,
|
|
|
|
const wxString &HtmlText,
|
2014-08-26 22:53:11 +00:00
|
|
|
bool bIsFile = false,
|
|
|
|
bool bModal = false);
|
2014-06-06 21:34:36 +00:00
|
|
|
|
2014-06-09 18:42:19 +00:00
|
|
|
/// Displays a file in your browser, if it's available locally,
|
2014-08-25 23:46:50 +00:00
|
|
|
/// OR else links to the internet. Generally using this outside this class
|
|
|
|
/// is depreciated in favour of the "smarter" overload below, unless there
|
|
|
|
/// is a good reason for using this form.
|
|
|
|
/// @param localFileName Name and path of the file on the local machine
|
|
|
|
/// file system to be opened. file.name#anchor syntax is allowed, and therefore
|
|
|
|
/// file names containing a '#' are not (on any platform).
|
2014-08-26 22:53:11 +00:00
|
|
|
/// @param bModal Whether the resulting dialogue should be modal or not.
|
|
|
|
/// Default is modeless dialogue
|
2017-05-19 17:20:05 +00:00
|
|
|
/// @param alwaysDefaultBrowser Force use of default web browser.
|
|
|
|
/// Default allows built in browser for local files.
|
2014-06-09 18:42:19 +00:00
|
|
|
static void ShowHelpDialog(wxWindow *parent,
|
2014-06-06 21:34:36 +00:00
|
|
|
const wxString &localFileName,
|
2014-08-26 22:53:11 +00:00
|
|
|
const wxString &remoteURL,
|
2017-05-19 17:20:05 +00:00
|
|
|
bool bModal = false,
|
|
|
|
bool alwaysDefaultBrowser = false);
|
2014-06-09 19:55:14 +00:00
|
|
|
|
|
|
|
/// Displays a page from the Audacity manual in your browser, if
|
|
|
|
/// it's available locally, OR else links to the internet.
|
|
|
|
/// @param PageName The name of the manual page to display as it is in
|
|
|
|
/// _development version_ of the manual (i.e. in MediaWiki), _not_ the
|
2014-08-26 22:53:11 +00:00
|
|
|
/// converted file name used for offline and released manuals.
|
|
|
|
/// @param bModal Whether the resulting dialogue should be modal or not.
|
|
|
|
/// Default is modeless dialogue
|
2014-06-09 19:55:14 +00:00
|
|
|
static void ShowHelpDialog(wxWindow *parent,
|
2014-08-26 22:53:11 +00:00
|
|
|
const wxString &PageName,
|
|
|
|
bool bModal = false);
|
2014-06-09 19:55:14 +00:00
|
|
|
|
|
|
|
/// Hostname (domain name including subdomain) of the server on which the
|
|
|
|
/// online help is available
|
|
|
|
static const wxString HelpHostname;
|
2014-08-28 00:24:31 +00:00
|
|
|
|
|
|
|
/// URL path on the help server to the root directory of the manual.
|
|
|
|
/// index and quick_help are here in the on-line release manual.
|
|
|
|
/// Must both start and end with '/' characters.
|
|
|
|
static const wxString HelpServerHomeDir;
|
|
|
|
|
|
|
|
/// Path to sub-directory where the manual pages are located.
|
|
|
|
/// index and quick_help are here only in the alpha manual.
|
|
|
|
/// Must both start and end with '/' characters.
|
|
|
|
static const wxString HelpServerManDir;
|
|
|
|
|
|
|
|
/// Sub-directory for local help pages (but not index.html
|
|
|
|
/// or quick_help.html)
|
|
|
|
/// Must both start and end with '/' characters.
|
|
|
|
static const wxString LocalHelpManDir;
|
|
|
|
|
2014-06-09 19:55:14 +00:00
|
|
|
/// The string which is appended to the development manual page name in order
|
|
|
|
/// obtain the file name in the local and release web copies of the manual
|
|
|
|
static const wxString ReleaseSuffix;
|
|
|
|
|
2014-06-09 18:42:19 +00:00
|
|
|
};
|
2014-06-06 21:34:36 +00:00
|
|
|
|
|
|
|
#endif // __AUDACITY_HELPSYSTEM__
|