Audacity  3.0.3
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 
30 class AudacityProject;
31 
39 class AUDACITY_DLL_API HelpSystem
40 {
41 public:
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 
115 class ShuttleGui;
116 
117 #include "HtmlWindow.h" // to inherit
118 
119 AUDACITY_DLL_API void OpenInDefaultBrowser(const URLString& link);
120 
121 
125 class AUDACITY_DLL_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 
139 class BrowserDialog /* not final */ : public wxDialogWrapper
140 {
141 public:
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 
155  bool mDismissed{};
156  DECLARE_EVENT_TABLE()
157 };
158 
159 #endif // __AUDACITY_HELPSYSTEM__
size
size_t size
Definition: ffmpeg-2.3.6-single-header.h:412
BrowserDialog::OnKeyDown
void OnKeyDown(wxKeyEvent &event)
Definition: HelpSystem.cpp:497
BrowserDialog::mpHtml
HtmlWindow * mpHtml
Definition: HelpSystem.h:154
HelpSystem::LocalHelpManDir
static const wxString LocalHelpManDir
Definition: HelpSystem.h:111
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
HelpSystem::HelpHostname
static const wxString HelpHostname
Definition: HelpSystem.h:96
BrowserDialog::OnForward
void OnForward(wxCommandEvent &event)
Definition: HelpSystem.cpp:459
BrowserDialog::mDismissed
bool mDismissed
Definition: HelpSystem.h:155
OpenInDefaultBrowser
AUDACITY_DLL_API void OpenInDefaultBrowser(const URLString &link)
Definition: HelpSystem.cpp:522
BrowserDialog::UpdateButtons
void UpdateButtons()
Definition: HelpSystem.cpp:509
BrowserDialog::OnClose
void OnClose(wxCommandEvent &event)
Definition: HelpSystem.cpp:471
wxPanelWrapper.h
BrowserDialog::ID
@ ID
Definition: HelpSystem.h:142
HelpSystem
Class which contains static methods and data needed for implementing help buttons.
Definition: HelpSystem.h:40
HelpSystem::HelpServerHomeDir
static const wxString HelpServerHomeDir
Definition: HelpSystem.h:101
FilePath
wxString FilePath
Definition: Project.h:20
LinkingHtmlWindow
An HtmlWindow that handles linked clicked - usually the link will go to our own local copy of the man...
Definition: HelpSystem.h:126
HelpSystem::HelpServerManDir
static const wxString HelpServerManDir
Definition: HelpSystem.h:106
HtmlWindow
HtmlWindow Class.
Definition: HtmlWindow.h:37
BrowserDialog::OnBackward
void OnBackward(wxCommandEvent &event)
Definition: HelpSystem.cpp:465
HtmlWindow.h
BrowserDialog::BrowserDialog
BrowserDialog(wxWindow *pParent, const TranslatableString &title)
Definition: HelpSystem.cpp:440
wxDialogWrapper
Definition: wxPanelWrapper.h:81
title
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22
TaggedIdentifier
Template generates different TaggedIdentifier classes that don't interconvert implicitly.
Definition: Identifier.h:113
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
BrowserDialog
Adds some event handling to an HtmlWindow.
Definition: HelpSystem.h:140
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631