1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-10 16:35:32 +01:00

Merge LinkingHtmlWindow into HelpSystem...

... they cooperated closely in a cycle of two not worth breaking
This commit is contained in:
Paul Licameli
2019-07-10 10:29:01 -04:00
parent f4b370d1e2
commit d6317ae6af
13 changed files with 215 additions and 282 deletions

View File

@@ -7,6 +7,15 @@
Jimmy Johnson
James Crook
was merged with LinkingHtmlWindow.h
Vaughan Johnson
Dominic Mazzoni
utility fn and
descendant of HtmlWindow that opens links in the user's
default browser
**********************************************************************/
#ifndef __AUDACITY_HELPSYSTEM__
@@ -104,4 +113,46 @@ public:
class ShuttleGui;
#include "HtmlWindow.h" // to inherit
void OpenInDefaultBrowser(const wxHtmlLinkInfo& link);
/// \brief An HtmlWindow that handles linked clicked - usually the
/// link will go to our own local copy of the manual, but it could
/// launch a new browser window.
class AUDACITY_DLL_API LinkingHtmlWindow final : public HtmlWindow
{
public:
LinkingHtmlWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHW_SCROLLBAR_AUTO);
void OnLinkClicked(const wxHtmlLinkInfo& link) override;
//void OnSetTitle(const wxString& title) override;
};
/// Adds some event handling to an HtmlWindow
class BrowserDialog /* not final */ : public wxDialogWrapper
{
public:
enum { ID = 0 };
BrowserDialog(wxWindow *pParent, const wxString &title);
void OnForward(wxCommandEvent & event);
void OnBackward(wxCommandEvent & event);
void OnClose(wxCommandEvent & event);
void OnKeyDown(wxKeyEvent & event);
void UpdateButtons();
//void SetLabel(const wxString& label) override;
HtmlWindow * mpHtml;
bool mDismissed{};
DECLARE_EVENT_TABLE()
};
#endif // __AUDACITY_HELPSYSTEM__