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