Audacity 3.2.0
HelpSystem.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 HelpSystem.cpp
6
7 Jimmy Johnson
8 Leland Lucius
9 Richard Ash
10
11 was merged with LinkingHtmlWindow.h
12
13 Vaughan Johnson
14 Dominic Mazzoni
15
16 utility fn and
17 descendant of HtmlWindow that opens links in the user's
18 default browser
19
20*//********************************************************************/
21
22
23#include "HelpSystem.h"
24
25#include <wx/setup.h> // for wxUSE_* macros
26#include <wx/button.h>
27#include <wx/frame.h>
28#include <wx/icon.h>
29#include <wx/dialog.h>
30#include <wx/intl.h>
31#include <wx/log.h>
32#include <wx/sizer.h>
33#include <wx/stattext.h>
34#include <wx/textctrl.h>
35#include <wx/utils.h>
36#include <wx/html/htmlwin.h>
37#include <wx/settings.h>
38#include <wx/statusbr.h>
39#include <wx/regex.h>
40
41#include "FileNames.h"
42#include "AllThemeResources.h"
43#include "../ShuttleGui.h"
44#include "Theme.h"
45#include "../HelpText.h"
46#include "Prefs.h"
47#include "wxFileNameWrapper.h"
48#include "../prefs/GUIPrefs.h"
49
50#include "BasicUI.h"
51
52#ifdef USE_ALPHA_MANUAL
53const wxString HelpSystem::HelpHostname = wxT("alphamanual.audacityteam.org");
54const wxString HelpSystem::HelpServerHomeDir = wxT("/man/");
55const wxString HelpSystem::HelpServerManDir = wxT("/man/");
56#else
57const wxString HelpSystem::HelpHostname = wxT("manual.audacityteam.org");
58const wxString HelpSystem::HelpServerHomeDir = wxT("/");
59const wxString HelpSystem::HelpServerManDir = wxT("/man/");
60#endif
61const wxString HelpSystem::LocalHelpManDir = wxT("/man/");
62
63namespace {
64
65// Helper class to make browser "simulate" a modal dialog
67{
68public:
69 HtmlTextHelpDialog(wxWindow *pParent, const TranslatableString &title)
70 : BrowserDialog{ pParent, title }
71 {
72#if !wxCHECK_VERSION(3, 0, 0)
73 MakeModal( true );
74#endif
75 }
77 {
78#if !wxCHECK_VERSION(3, 0, 0)
79 MakeModal( false );
80#endif
81 // On Windows, for some odd reason, the Audacity window will be sent to
82 // the back. So, make sure that doesn't happen.
83 GetParent()->Raise();
84 }
85};
86
87}
88
92void HelpSystem::ShowInfoDialog( wxWindow *parent,
93 const TranslatableString &dlogTitle,
94 const TranslatableString &shortMsg,
95 const wxString &message,
96 const int xSize, const int ySize)
97{
98 wxDialogWrapper dlog(parent, wxID_ANY,
99 dlogTitle,
100 wxDefaultPosition, wxDefaultSize,
101 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX /*| wxDEFAULT_FRAME_STYLE */);
102
103 dlog.SetName();
104 ShuttleGui S(&dlog, eIsCreating);
105
106 S.StartVerticalLay(1);
107 {
108 S.AddTitle( shortMsg );
109 S.Style( wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_RICH2 |
110 wxTE_AUTO_URL | wxTE_NOHIDESEL | wxHSCROLL )
111 .AddTextWindow(message);
112
113 S.SetBorder( 0 );
114 S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
115 S.AddStandardButtons(eOkButton);
116 S.EndHorizontalLay();
117 }
118 S.EndVerticalLay();
119
120 // Smallest size is half default size. Seems reasonable.
121 dlog.SetMinSize( wxSize(xSize/2, ySize/2) );
122 dlog.SetSize( wxSize(xSize, ySize) );
123 dlog.Center();
124 dlog.ShowModal();
125}
126
127void HelpSystem::ShowHtmlText(wxWindow *pParent,
128 const TranslatableString &Title,
129 const wxString &HtmlText,
130 bool bIsFile,
131 bool bModal)
132{
133 LinkingHtmlWindow *html;
134
135 wxASSERT(pParent); // to justify safenew
136 // JKC: ANSWER-ME: Why do we create a fake 'frame' and then put a BrowserDialog
137 // inside it, rather than have a variant of the BrowserDialog that is a
138 // frame??
139 // Bug 1412 seems to be related to the extra frame.
140 auto pFrame = safenew wxFrame {
141 pParent, wxID_ANY, Title.Translation(), wxDefaultPosition, wxDefaultSize,
142#if defined(__WXMAC__)
143 // On OSX, the html frame can go behind the help dialog and if the help
144 // html frame is modal, you can't get back to it. Pressing escape gets
145 // you out of this, but it's just easier to add the wxSTAY_ON_TOP flag
146 // to prevent it from falling behind the dialog. Not the perfect solution
147 // but acceptable in this case.
148 wxSTAY_ON_TOP |
149#endif
150 wxDEFAULT_FRAME_STYLE
151 };
152
153 BrowserDialog * pWnd;
154 if( bModal )
155 pWnd = safenew HtmlTextHelpDialog{ pFrame, Title };
156 else
157 pWnd = safenew BrowserDialog{ pFrame, Title };
158
159 // Bug 1412 workaround for 'extra window'. Hide the 'fake' window.
160 pFrame->SetTransparent(0);
161 ShuttleGui S( pWnd, eIsCreating );
162
163 S.Style( wxNO_BORDER | wxTAB_TRAVERSAL )
164 .Prop(true)
165 .StartPanel();
166 {
167 S.StartHorizontalLay( wxEXPAND, false );
168 {
169 S.Id( wxID_BACKWARD )
170 .Disable()
171#if wxUSE_TOOLTIPS
172 .ToolTip( XO("Backwards" ) )
173#endif
174 /* i18n-hint arrowhead meaning backward movement */
175 .AddButton( XXO("<") );
176 S.Id( wxID_FORWARD )
177 .Disable()
178#if wxUSE_TOOLTIPS
179 .ToolTip( XO("Forwards" ) )
180#endif
181 /* i18n-hint arrowhead meaning forward movement */
182 .AddButton( XXO(">") );
183 }
184 S.EndHorizontalLay();
185
186 html = safenew LinkingHtmlWindow(S.GetParent(), wxID_ANY,
187 wxDefaultPosition,
188 bIsFile ? wxSize(500, 400) : wxSize(480, 240),
189 wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
190
191 html->SetRelatedFrame( pFrame, wxT("Help: %s") );
192 if( bIsFile )
193 html->LoadFile( HtmlText );
194 else
195 html->SetPage( HtmlText);
196
197 S.Prop(1).Focus().Position( wxEXPAND )
198 .AddWindow( html );
199
200 S.Id( wxID_CANCEL ).AddButton( XXO("Close"), wxALIGN_CENTER, true );
201 }
202 S.EndPanel();
203
204 // -- START of ICON stuff -----
205 // If this section (providing an icon) causes compilation errors on linux, comment it out for now.
206 // it will just mean that the icon is missing. Works OK on Windows.
207 #ifdef __WXMSW__
208 wxIcon ic{ wxICON(AudacityLogo) };
209 #else
210 wxIcon ic{};
211 ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48));
212 #endif
213 pFrame->SetIcon( ic );
214 // -- END of ICON stuff -----
215
216
217 pWnd->mpHtml = html;
218 pWnd->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
219
220 pFrame->CreateStatusBar();
221 pFrame->Centre();
222 pFrame->Layout();
223 pFrame->SetSizeHints(pWnd->GetSize());
224
225 pFrame->SetName(Title.Translation());
226 if (bModal)
227 pWnd->ShowModal();
228 else {
229 pWnd->Show(true);
230 pFrame->Show(true);
231 }
232
233 html->SetRelatedStatusBar( 0 );
234
235 return;
236}
237
238// Shows help in browser, or possibly in own dialog.
239void HelpSystem::ShowHelp(wxWindow *parent,
240 const FilePath &localFileName,
241 const URLString &remoteURL,
242 bool bModal,
243 bool alwaysDefaultBrowser)
244{
245 wxASSERT(parent); // to justify safenew
246 wxString HelpMode = wxT("Local");
247
248// DA: Default for DA is manual from internet.
249#ifdef EXPERIMENTAL_DA
250 gPrefs->Read(wxT("/GUI/Help"), &HelpMode, wxT("FromInternet") );
251#else
252 gPrefs->Read(wxT("/GUI/Help"), &HelpMode, wxT("Local") );
253#endif
254
255 {
256 // these next lines are for legacy cfg files (pre 2.0) where we had different modes
257 if( (HelpMode == wxT("Standard")) || (HelpMode == wxT("InBrowser")) )
258 {
259 HelpMode = GUIManualLocation.Default().Internal();
260 GUIManualLocation.Write(HelpMode);
261 gPrefs->Flush();
262 }
263 }
264
265 // Anchors (URLs with a '#' in them) are not supported by many OSs for local file names
266 // See, for example, https://groups.google.com/forum/#!topic/wx-users/pC0uOZJalRQ
267 // Problems have been reported on Win, Mac and some versions of Linux.
268 // So we set HelpMode to use the internet if an anchor is found.
269 if (localFileName.Find('#', true) != wxNOT_FOUND)
270 HelpMode = wxT("FromInternet");
271 // Until a solution is found for this, the next few lines are irrelevant.
272
273 // Obtain the local file system file name, without the anchor if present.
274 wxString localfile;
275 if (localFileName.Find('#', true) != wxNOT_FOUND)
276 localfile = localFileName.BeforeLast('#');
277 else
278 localfile = localFileName;
279
280 if( (HelpMode == wxT("FromInternet")) && !remoteURL.empty() )
281 {
282 // Always go to remote URL. Use External browser.
283 OpenInDefaultBrowser( remoteURL );
284 }
285 else if( localfile.empty() || !wxFileExists( localfile ))
286 {
287 if (remoteURL.empty())
288 {
289 // If you give an empty remote URL, you should have already ensured
290 // that the file exists!
291 wxASSERT(!remoteURL.empty());
292 // I can't find it'.
293 // Use Built-in browser to suggest you use the remote url.
294 wxString Text = HelpText(wxT("remotehelp"));
295 Text.Replace(wxT("*URL*"), remoteURL.GET());
296 // Always make the 'help on the internet' dialog modal.
297 // Fixes Bug 1411.
298 ShowHtmlText(parent, XO("Help on the Internet"), Text, false, true);
299 }
300 else
301 {
302 // Use External browser to go to remote URL.
303 OpenInDefaultBrowser(remoteURL);
304 }
305 }
306 else if( HelpMode == wxT("Local") || alwaysDefaultBrowser)
307 {
308 // Local file, External browser
309 OpenInDefaultBrowser( L"file:" + localFileName );
310 }
311 else
312 {
313 // Local file, Built-in browser
314 ShowHtmlText( parent, {}, localFileName, true, bModal );
315 }
316}
317
318void HelpSystem::ShowHelp(wxWindow *parent,
319 const ManualPageID &PageName,
320 bool bModal)
321{
324 const wxString ReleaseSuffix = L".html";
325
326 FilePath localHelpPage;
327 wxString webHelpPath;
328 wxString webHelpPage;
329 wxString releasePageName;
330 wxString anchor; // optional part of URL after (and including) the '#'
331 const auto &PageNameStr = PageName.GET();
332 if (PageNameStr.Find('#', true) != wxNOT_FOUND)
333 { // need to split anchor off into separate variable
334 releasePageName = PageNameStr.BeforeLast('#');
335 anchor = wxT("#") + PageNameStr.AfterLast('#');
336 }
337 else
338 {
339 releasePageName = PageName.GET();
340 anchor = wxT("");
341 }
342 // The wiki pages are transformed to static HTML by
343 // scripts/mw2html_audacity/mw2html.py
344 // The name is first transformed to lower case, then all
345 // 'special characters' are replaced by underscores. Spaces are
346 // transformed to "+".
347 //
348 // The transformations are handled in mw2html by first applying
349 // 'urllib.parse.quote_plus' (escape chars that are not in "always safe" list)
350 // then replacing escape characters (%xx) with underscores,
351 // and finally removing duplicate / redundant underscores.
352 //
353 // The front page and 'quick_help' are treated as special cases and placed in
354 // the root of the help directory rather than the "/man/" sub-directory.
355 if (releasePageName == L"Main_Page")
356 {
357 releasePageName = L"index" + ReleaseSuffix + anchor;
358 localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
359 webHelpPath = L"https://" + HelpSystem::HelpHostname + HelpSystem::HelpServerHomeDir;
360 }
361 else if (releasePageName == L"Quick_Help")
362 {
363// DA: No bundled help, by default, and different quick-help URL.
364#ifdef EXPERIMENTAL_DA
365 releasePageName = L"video" + ReleaseSuffix + anchor;
366 localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
367 webHelpPath = L"http://www.darkaudacity.com/";
368#else
369 releasePageName = L"quick_help" + ReleaseSuffix + anchor;
370 localHelpPage = wxFileName(FileNames::HtmlHelpDir(), releasePageName).GetFullPath();
371 webHelpPath = L"https://" + HelpSystem::HelpHostname + HelpSystem::HelpServerHomeDir;
372#endif
373 }
374 // not a page name, but rather a full path (e.g. to wiki)
375 // in which case do not do any substitutions.
376 else if (releasePageName.StartsWith( "http" ) )
377 {
378 localHelpPage = "";
379 releasePageName += anchor;
380 // webHelpPath remains empty
381 }
382 else
383 {
384 // Handle all other pages.
385 // Change to lower case.
386 releasePageName = releasePageName.Lower();
387 wxRegEx re;
388 // replace 'special characters' with underscores.
389 // RFC 2396 defines the characters a-z, A-Z, 0-9 and ".-_" as "always safe"
390 // mw2html also replaces "-" with "_" so replace that too.
391
392 // If PageName contains a %xx code, mw2html will transform it:
393 // '%xx' => '%25xx' => '_'
394 re.Compile(wxT("%.."));
395 re.ReplaceAll(&releasePageName, (wxT("_")));
396 // Now replace all other 'not-safe' characters.
397 re.Compile(wxT("[^[:alnum:] . [:space:]]"));
398 re.ReplaceAll(&releasePageName, (wxT("_")));
399 // Replace spaces with "+"
400 releasePageName.Replace(wxT(" "), wxT("+"), true);
401 // Reduce multiple underscores to single underscores
402 re.Compile(wxT("__+"));
403 re.ReplaceAll(&releasePageName, (wxT("_")));
404 // Replace "_." with "."
405 releasePageName.Replace(wxT("_."), wxT("."), true);
406 // Concatenate file name with file extension and anchor.
407 releasePageName = releasePageName + ReleaseSuffix + anchor;
408 // Other than index and quick_help, all local pages are in subdirectory 'LocalHelpManDir'.
409 localHelpPage = wxFileName(FileNames::HtmlHelpDir() + LocalHelpManDir, releasePageName).GetFullPath();
410 // Other than index and quick_help, all on-line pages are in subdirectory 'HelpServerManDir'.
411 webHelpPath = L"https://" + HelpSystem::HelpHostname + HelpSystem::HelpServerManDir;
412 }
413
414#ifdef USE_ALPHA_MANUAL
415 webHelpPage = webHelpPath + PageName.GET();
416#else
417 webHelpPage = webHelpPath + releasePageName;
418#endif
419
420 wxLogMessage(wxT("Help button pressed: PageName %s, releasePageName %s"),
421 PageName.GET(), releasePageName);
422 wxLogMessage(wxT("webHelpPage %s, localHelpPage %s"),
423 webHelpPage, localHelpPage);
424
425 wxASSERT(parent); // to justify safenew
426
428 parent,
429 localHelpPage,
430 webHelpPage,
431 bModal
432 );
433}
434
435// For compilers that support precompilation, includes "wx/wx.h".
436#include <wx/wxprec.h>
437
438#include <wx/mimetype.h>
439#include <wx/filename.h>
440#include <wx/uri.h>
441
442BEGIN_EVENT_TABLE(BrowserDialog, wxDialogWrapper)
446 EVT_KEY_DOWN(BrowserDialog::OnKeyDown)
448
449
451 : wxDialogWrapper{ pParent, ID, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER /*| wxMAXIMIZE_BOX */ }
452{
453 int width, height;
454 const int minWidth = 400;
455 const int minHeight = 250;
456
457 gPrefs->Read(wxT("/GUI/BrowserWidth"), &width, minWidth);
458 gPrefs->Read(wxT("/GUI/BrowserHeight"), &height, minHeight);
459
460 if (width < minWidth || width > wxSystemSettings::GetMetric(wxSYS_SCREEN_X))
461 width = minWidth;
462 if (height < minHeight || height > wxSystemSettings::GetMetric(wxSYS_SCREEN_Y))
463 height = minHeight;
464
465 SetMinSize(wxSize(minWidth, minHeight));
466 SetSize(wxDefaultPosition.x, wxDefaultPosition.y, width, height, wxSIZE_AUTO);
467}
468
469void BrowserDialog::OnForward(wxCommandEvent & WXUNUSED(event))
470{
471 mpHtml->HistoryForward();
473}
474
475void BrowserDialog::OnBackward(wxCommandEvent & WXUNUSED(event))
476{
477 mpHtml->HistoryBack();
479}
480
481void BrowserDialog::OnClose(wxCommandEvent & WXUNUSED(event))
482{
483 if (IsModal() && !mDismissed)
484 {
485 mDismissed = true;
486 EndModal(wxID_CANCEL);
487 }
488 auto parent = GetParent();
489
490 gPrefs->Write(wxT("/GUI/BrowserWidth"), GetSize().GetX());
491 gPrefs->Write(wxT("/GUI/BrowserHeight"), GetSize().GetY());
492 gPrefs->Flush();
493
494#ifdef __WXMAC__
495 auto grandparent = GetParent()->GetParent();
496#endif
497
498 parent->Destroy();
499
500#ifdef __WXMAC__
501 if(grandparent && grandparent->IsShown()) {
502 grandparent->Raise();
503 }
504#endif
505}
506
507void BrowserDialog::OnKeyDown(wxKeyEvent & event)
508{
509 bool bSkip = true;
510 if (event.GetKeyCode() == WXK_ESCAPE)
511 {
512 bSkip = false;
513 Close(false);
514 }
515 event.Skip(bSkip);
516}
517
518
520{
521 wxWindow * pWnd;
522 if( (pWnd = FindWindowById( wxID_BACKWARD, this )) != NULL )
523 {
524 pWnd->Enable(mpHtml->HistoryCanBack());
525 }
526 if( (pWnd = FindWindowById( wxID_FORWARD, this )) != NULL )
527 {
528 pWnd->Enable(mpHtml->HistoryCanForward());
529 }
530}
531
533{
534 wxURI uri(link.GET());
535 BasicUI::OpenInDefaultBrowser(uri.BuildURI());
536}
537
538LinkingHtmlWindow::LinkingHtmlWindow(wxWindow *parent, wxWindowID id /*= -1*/,
539 const wxPoint& pos /*= wxDefaultPosition*/,
540 const wxSize& size /*= wxDefaultSize*/,
541 long style /*= wxHW_SCROLLBAR_AUTO*/) :
542 HtmlWindow(parent, id, pos, size, style)
543{
544}
545
546void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
547{
548 wxString href = link.GetHref();
549
550 if( href.StartsWith( wxT("innerlink:help:")))
551 {
552 HelpSystem::ShowHelp(this, ManualPageID{ href.Mid( 15 ) }, true );
553 return;
554 }
555 else if( href.StartsWith(wxT("innerlink:")) )
556 {
557 wxString FileName =
558 wxFileName( FileNames::HtmlHelpDir(), href.Mid( 10 ) + wxT(".htm") ).GetFullPath();
559 if( wxFileExists( FileName ) )
560 {
561 HelpSystem::ShowHelp(this, FileName, wxEmptyString, false);
562 return;
563 }
564 else
565 {
566 SetPage( HelpText( href.Mid( 10 )));
567 wxGetTopLevelParent(this)->SetLabel( TitleText( href.Mid( 10 )).Translation() );
568 }
569 }
570 else if( href.StartsWith(wxT("mailto:")) || href.StartsWith(wxT("file:")) )
571 {
572 OpenInDefaultBrowser( link.GetHref() );
573 return;
574 }
575 else if( !href.StartsWith( wxT("http:")) && !href.StartsWith( wxT("https:")) )
576 {
577 HtmlWindow::OnLinkClicked( link );
578 }
579 else
580 {
581 OpenInDefaultBrowser(link.GetHref());
582 return;
583 }
584 wxFrame * pFrame = GetRelatedFrame();
585 if( !pFrame )
586 return;
587 wxWindow * pWnd = pFrame->FindWindow(BrowserDialog::ID);
588 if( !pWnd )
589 return;
590 BrowserDialog * pDlg = wxDynamicCast( pWnd , BrowserDialog );
591 if( !pDlg )
592 return;
593 pDlg->UpdateButtons();
594}
wxT("CloseDown"))
Toolkit-neutral facade for basic user interface services.
END_EVENT_TABLE()
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
ChoiceSetting GUIManualLocation
Definition: GUIPrefs.cpp:130
void OpenInDefaultBrowser(const URLString &link)
Definition: HelpSystem.cpp:532
TranslatableString TitleText(const wxString &Key)
Definition: HelpText.cpp:151
wxString HelpText(const wxString &Key)
Definition: HelpText.cpp:360
#define XXO(s)
Definition: Internat.h:44
#define XO(s)
Definition: Internat.h:31
#define safenew
Definition: MemoryX.h:10
static const auto title
FileConfig * gPrefs
Definition: Prefs.cpp:71
wxString FilePath
Definition: Project.h:20
@ eIsCreating
Definition: ShuttleGui.h:39
@ eOkButton
Definition: ShuttleGui.h:597
THEME_API Theme theTheme
Definition: Theme.cpp:82
#define S(N)
Definition: ToChars.cpp:64
int id
Adds some event handling to an HtmlWindow.
Definition: HelpSystem.h:140
void UpdateButtons()
Definition: HelpSystem.cpp:519
void OnClose(wxCommandEvent &event)
Definition: HelpSystem.cpp:481
void OnKeyDown(wxKeyEvent &event)
Definition: HelpSystem.cpp:507
void OnBackward(wxCommandEvent &event)
Definition: HelpSystem.cpp:475
HtmlWindow * mpHtml
Definition: HelpSystem.h:154
void OnForward(wxCommandEvent &event)
Definition: HelpSystem.cpp:469
bool Write(const wxString &value)
Definition: Prefs.cpp:390
const EnumValueSymbol & Default() const
Definition: Prefs.cpp:346
const wxString & Internal() const
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:239
static const wxString LocalHelpManDir
Definition: HelpSystem.h:111
static void ShowInfoDialog(wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &shortMsg, const wxString &message, const int xSize, const int ySize)
Displays cuttable information in a text ctrl, with an OK button.
Definition: HelpSystem.cpp:92
static const wxString HelpHostname
Definition: HelpSystem.h:96
static const wxString HelpServerHomeDir
Definition: HelpSystem.h:101
static const wxString HelpServerManDir
Definition: HelpSystem.h:106
static void ShowHtmlText(wxWindow *pParent, const TranslatableString &Title, const wxString &HtmlText, bool bIsFile=false, bool bModal=false)
Definition: HelpSystem.cpp:127
HtmlWindow Class.
Definition: HtmlWindow.h:37
bool empty() const
Definition: Identifier.h:61
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
Definition: Identifier.h:66
An HtmlWindow that handles linked clicked - usually the link will go to our own local copy of the man...
Definition: HelpSystem.h:126
LinkingHtmlWindow(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxHW_SCROLLBAR_AUTO)
Definition: HelpSystem.cpp:538
void OnLinkClicked(const wxHtmlLinkInfo &link) override
Definition: HelpSystem.cpp:546
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
Template generates different TaggedIdentifier classes that don't interconvert implicitly.
Definition: Identifier.h:113
wxBitmap & Bitmap(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const
HtmlTextHelpDialog(wxWindow *pParent, const TranslatableString &title)
Definition: HelpSystem.cpp:69
void SetName(const TranslatableString &title)
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.
Definition: BasicUI.cpp:238
FILES_API FilePath HtmlHelpDir()