Audacity  2.3.1
LinkingHtmlWindow.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  LinkingHtmlWindow.h
6 
7  Vaughan Johnson
8  Dominic Mazzoni
9 
10  utility fn and
11  descendant of HtmlWindow that opens links in the user's
12  default browser
13 
14 **********************************************************************/
15 
16 #ifndef __AUDACITY_LINKINGHTMLWINDOW__
17 #define __AUDACITY_LINKINGHTMLWINDOW__
18 
19 #include <wx/html/htmlwin.h>
20 #include <wx/frame.h>
21 
22 #include "HtmlWindow.h"
23 #include "wxPanelWrapper.h"
24 
25 void OpenInDefaultBrowser(const wxHtmlLinkInfo& link);
26 
27 
31 class AUDACITY_DLL_API LinkingHtmlWindow final : public HtmlWindow
32 {
33  public:
34  LinkingHtmlWindow(wxWindow *parent, wxWindowID id = -1,
35  const wxPoint& pos = wxDefaultPosition,
36  const wxSize& size = wxDefaultSize,
37  long style = wxHW_SCROLLBAR_AUTO);
38  void OnLinkClicked(const wxHtmlLinkInfo& link) override;
39  //void OnSetTitle(const wxString& title) override;
40 
41 };
42 
43 
45 class BrowserDialog /* not final */ : public wxDialogWrapper
46 {
47 public:
48  enum { ID = 0 };
49  BrowserDialog(wxWindow *pParent, const wxString &title);
50 
51  void OnForward(wxCommandEvent & event);
52  void OnBackward(wxCommandEvent & event);
53  void OnClose(wxCommandEvent & event);
54  void OnKeyDown(wxKeyEvent & event);
55 
56  void UpdateButtons();
57  //void SetLabel(const wxString& label) override;
58 
59 
61  bool mDismissed{};
62  DECLARE_EVENT_TABLE()
63 };
64 
65 #endif // __AUDACITY_LINKINGHTMLWINDOW__
void OnBackward(wxCommandEvent &event)
An HtmlWindow that handles linked clicked - usually the link will go to our own local copy of the man...
void OnForward(wxCommandEvent &event)
void OpenInDefaultBrowser(const wxHtmlLinkInfo &link)
BrowserDialog(wxWindow *pParent, const wxString &title)
HtmlWindow Class.
Definition: HtmlWindow.h:39
Adds some event handling to an HtmlWindow.
void OnKeyDown(wxKeyEvent &event)
HtmlWindow * mpHtml
void OnClose(wxCommandEvent &event)