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