Audacity  2.2.0
HelpSystem Class Reference

Class which contains static methods and data needed for implementing help buttons. More...

#include <HelpSystem.h>

Static Public Member Functions

static void ShowInfoDialog (wxWindow *parent, const wxString &dlogTitle, const wxString &shortMsg, const wxString &message, const int xSize, const int ySize)
 Displays cutable information in a text ctrl, with an OK button. More...
 
static void ShowHtmlText (wxWindow *pParent, const wxString &Title, const wxString &HtmlText, bool bIsFile=false, bool bModal=false)
 
static void ShowHelp (wxWindow *parent, const wxString &localFileName, const wxString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
 
static void ShowHelp (wxWindow *parent, const wxString &PageName, bool bModal=false)
 

Static Public Attributes

static const wxString HelpHostname = wxT("manual.audacityteam.org")
 
static const wxString HelpServerHomeDir = wxT("/")
 
static const wxString HelpServerManDir = wxT("/man/")
 
static const wxString LocalHelpManDir = wxT("/man/")
 
static const wxString ReleaseSuffix = wxT(".html")
 

Detailed Description

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

Member Function Documentation

void HelpSystem::ShowHelp ( wxWindow *  parent,
const wxString &  localFileName,
const wxString &  remoteURL,
bool  bModal = false,
bool  alwaysDefaultBrowser = false 
)
static

Displays a file in your browser, if it's available locally, 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.

Parameters
localFileNameName 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).
bModalWhether the resulting dialogue should be modal or not. Default is modeless dialogue
alwaysDefaultBrowserForce use of default web browser. Default allows built in browser for local files.

References _(), GetActiveProject(), gPrefs, HelpText(), AudacityProject::mHelpPref, OpenInDefaultBrowser(), and ShowHtmlText().

Referenced by FindDialog::OnDownload(), LibraryPrefs::OnFFmpegDownButton(), ContrastDialog::OnGetURL(), FreqWindow::OnGetURL(), ErrorDialog::OnHelp(), PrefsDialog::OnHelp(), EffectUIHost::OnHelp(), TimerRecordDialog::OnHelpButtonClick(), LinkingHtmlWindow::OnLinkClicked(), AudacityProject::OnManual(), LibraryPrefs::OnMP3DownButton(), AudacityProject::OnQuickHelp(), and ShowHelp().

void HelpSystem::ShowHelp ( wxWindow *  parent,
const wxString &  PageName,
bool  bModal = false 
)
static

Displays a page from the Audacity manual in your browser, if it's available locally, OR else links to the internet.

Parameters
PageNameThe name of the manual page to display as it is in development version of the manual (i.e. in MediaWiki), not the converted file name used for offline and released manuals.
bModalWhether the resulting dialogue should be modal or not. Default is modeless dialogue

References HelpHostname, HelpServerHomeDir, HelpServerManDir, FileNames::HtmlHelpDir(), LocalHelpManDir, ReleaseSuffix, and ShowHelp().

void HelpSystem::ShowHtmlText ( wxWindow *  pParent,
const wxString &  Title,
const wxString &  HtmlText,
bool  bIsFile = false,
bool  bModal = false 
)
static

Displays a NEW window with wxHTML help.

Parameters
HtmlTextEither the literal HTML code to go into the window, or the name of the file to read said HTML code from (see below).
bIsFileIf true, treat HtmlText argument as a file name, if false (default), then it is the HTML code to display.
bModalWhether the resulting window should be modal or not. Default is modeless dialogue

References _(), ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddWindow(), ThemeBase::Bitmap(), eIsCreating, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndPanel(), ShuttleGui::Id(), BrowserDialog::mpHtml, ShuttleGui::Prop(), safenew, ShuttleGuiBase::SetStyle(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartPanel(), and theTheme.

Referenced by ErrorDialog::OnHelp(), and ShowHelp().

void HelpSystem::ShowInfoDialog ( wxWindow *  parent,
const wxString &  dlogTitle,
const wxString &  shortMsg,
const wxString &  message,
const int  xSize,
const int  ySize 
)
static

Displays cutable information in a text ctrl, with an OK button.

Mostly we use this so that we have the code for resizability in one place. Other considerations like screen readers are also handled by having the code in one place.

References ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddTextWindow(), ShuttleGuiBase::AddTitle(), ShuttleGuiBase::AddWindow(), eIsCreating, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndVerticalLay(), eOkButton, safenew, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::SetStyle(), ShuttleGuiBase::StartHorizontalLay(), and ShuttleGuiBase::StartVerticalLay().

Referenced by ExportMultiple::OnExport().

Member Data Documentation

const wxString HelpSystem::HelpHostname = wxT("manual.audacityteam.org")
static

Hostname (domain name including subdomain) of the server on which the online help is available

Referenced by ShowHelp().

const wxString HelpSystem::HelpServerHomeDir = wxT("/")
static

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.

Referenced by ShowHelp().

const wxString HelpSystem::HelpServerManDir = wxT("/man/")
static

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.

Referenced by ShowHelp().

const wxString HelpSystem::LocalHelpManDir = wxT("/man/")
static

Sub-directory for local help pages (but not index.html or quick_help.html) Must both start and end with '/' characters.

Referenced by ShowHelp().

const wxString HelpSystem::ReleaseSuffix = wxT(".html")
static

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

Referenced by ShowHelp().


The documentation for this class was generated from the following files: