Audacity  2.2.0
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 class AUDACITY_DLL_API LinkingHtmlWindow final : public HtmlWindow
28 {
29  public:
30  LinkingHtmlWindow(wxWindow *parent, wxWindowID id = -1,
31  const wxPoint& pos = wxDefaultPosition,
32  const wxSize& size = wxDefaultSize,
33  long style = wxHW_SCROLLBAR_AUTO);
34  void OnLinkClicked(const wxHtmlLinkInfo& link) override;
35  //void OnSetTitle(const wxString& title) override;
36 
37 };
38 
39 class BrowserDialog /* not final */ : public wxDialogWrapper
40 {
41 public:
42  enum { ID = 0 };
43  BrowserDialog(wxWindow *pParent, const wxString &title);
44 
45  void OnForward(wxCommandEvent & event);
46  void OnBackward(wxCommandEvent & event);
47  void OnClose(wxCommandEvent & event);
48  void OnKeyDown(wxKeyEvent & event);
49 
50  void UpdateButtons();
51  //void SetLabel(const wxString& label) override;
52 
53 
55  bool mDismissed{};
56  DECLARE_EVENT_TABLE()
57 };
58 
59 #endif // __AUDACITY_LINKINGHTMLWINDOW__
void OnBackward(wxCommandEvent &event)
Definition: LinkingHtmlWindow.cpp:67
Definition: LinkingHtmlWindow.h:27
void OnForward(wxCommandEvent &event)
Definition: LinkingHtmlWindow.cpp:61
Definition: LinkingHtmlWindow.h:42
Definition: wxPanelWrapper.h:19
void OpenInDefaultBrowser(const wxHtmlLinkInfo &link)
Definition: LinkingHtmlWindow.cpp:124
BrowserDialog(wxWindow *pParent, const wxString &title)
Definition: LinkingHtmlWindow.cpp:42
HtmlWindow Class.
Definition: HtmlWindow.h:35
Definition: LinkingHtmlWindow.h:39
bool mDismissed
Definition: LinkingHtmlWindow.h:55
void OnKeyDown(wxKeyEvent &event)
Definition: LinkingHtmlWindow.cpp:99
HtmlWindow * mpHtml
Definition: LinkingHtmlWindow.h:54
void UpdateButtons()
Definition: LinkingHtmlWindow.cpp:111
void OnClose(wxCommandEvent &event)
Definition: LinkingHtmlWindow.cpp:73