Audacity 3.2.0
HelpSystem.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 HelpSystem.h
6
7 Jimmy Johnson
8 James Crook
9
10 was merged with LinkingHtmlWindow.h
11
12 Vaughan Johnson
13 Dominic Mazzoni
14
15 utility fn and
16 descendant of HtmlWindow that opens links in the user's
17 default browser
18
19**********************************************************************/
20
21#ifndef __AUDACITY_HELPSYSTEM__
22#define __AUDACITY_HELPSYSTEM__
23
24
25
26#include <wx/defs.h>
27#include "wxPanelWrapper.h" // to inherit
28#include "HelpText.h"
29
30class AudacityProject;
31
39class WX_INIT_API HelpSystem
40{
41public:
43 static void ShowInfoDialog( wxWindow *parent,
44 const TranslatableString &dlogTitle,
45 const TranslatableString &shortMsg,
46 const wxString &message,
47 const int xSize, const int ySize);
48
56 static void ShowHtmlText( wxWindow * pParent,
57 const TranslatableString &Title,
58 const wxString &HtmlText,
59 bool bIsFile = false,
60 bool bModal = false);
61
76 static void ShowHelp(wxWindow *parent,
77 const FilePath &localFileName,
78 const URLString &remoteURL,
79 bool bModal = false,
80 bool alwaysDefaultBrowser = false);
81
90 static void ShowHelp(wxWindow *parent,
91 const ManualPageID &PageName,
92 bool bModal = false);
93
96 static const wxString HelpHostname;
97
101 static const wxString HelpServerHomeDir;
102
106 static const wxString HelpServerManDir;
107
111 static const wxString LocalHelpManDir;
112
113};
114
115class ShuttleGui;
116
117#include "HtmlWindow.h" // to inherit
118
119WX_INIT_API void OpenInDefaultBrowser(const URLString& link);
120
121
125class WX_INIT_API LinkingHtmlWindow final : public HtmlWindow
126{
127 public:
128 LinkingHtmlWindow(wxWindow *parent, wxWindowID id = -1,
129 const wxPoint& pos = wxDefaultPosition,
130 const wxSize& size = wxDefaultSize,
131 long style = wxHW_SCROLLBAR_AUTO);
132 void OnLinkClicked(const wxHtmlLinkInfo& link) override;
133 //void OnSetTitle(const wxString& title) override;
134
135};
136
137
139class BrowserDialog /* not final */ : public wxDialogWrapper
140{
141public:
142 enum { ID = 0 };
143 BrowserDialog(wxWindow *pParent, const TranslatableString &title);
144
145 void OnForward(wxCommandEvent & event);
146 void OnBackward(wxCommandEvent & event);
147 void OnClose(wxCommandEvent & event);
148 void OnKeyDown(wxKeyEvent & event);
149
150 void UpdateButtons();
151 //void SetLabel(const wxString& label) override;
152
153
156 DECLARE_EVENT_TABLE()
157};
158
159extern WX_INIT_API ChoiceSetting
161;
162
163#endif // __AUDACITY_HELPSYSTEM__
WX_INIT_API void OpenInDefaultBrowser(const URLString &link)
Definition: HelpSystem.cpp:510
WX_INIT_API ChoiceSetting GUIManualLocation
Definition: HelpSystem.cpp:574
static const auto title
wxString FilePath
Definition: Project.h:21
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Adds some event handling to an HtmlWindow.
Definition: HelpSystem.h:140
void UpdateButtons()
Definition: HelpSystem.cpp:497
void OnClose(wxCommandEvent &event)
Definition: HelpSystem.cpp:459
void OnKeyDown(wxKeyEvent &event)
Definition: HelpSystem.cpp:485
BrowserDialog(wxWindow *pParent, const TranslatableString &title)
Definition: HelpSystem.cpp:428
void OnBackward(wxCommandEvent &event)
Definition: HelpSystem.cpp:453
HtmlWindow * mpHtml
Definition: HelpSystem.h:154
void OnForward(wxCommandEvent &event)
Definition: HelpSystem.cpp:447
Class which contains static methods and data needed for implementing help buttons.
Definition: HelpSystem.h:40
static const wxString LocalHelpManDir
Definition: HelpSystem.h:111
static const wxString HelpHostname
Definition: HelpSystem.h:96
static const wxString HelpServerHomeDir
Definition: HelpSystem.h:101
static const wxString HelpServerManDir
Definition: HelpSystem.h:106
HtmlWindow Class.
Definition: HtmlWindow.h:37
An HtmlWindow that handles linked clicked - usually the link will go to our own local copy of the man...
Definition: HelpSystem.h:126
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Template generates different TaggedIdentifier classes that don't interconvert implicitly.
Definition: Identifier.h:113
Holds a msgid for the translation catalog; may also bind format arguments.