Audacity  3.0.3
HelpMenus.cpp
Go to the documentation of this file.
1 
2 
3 #include <wx/bmpbuttn.h>
4 #include <wx/textctrl.h>
5 #include <wx/frame.h>
6 
7 #include "../AboutDialog.h"
8 #include "../AllThemeResources.h"
9 #include "../AudacityLogger.h"
10 #include "../AudioIOBase.h"
11 #include "../CommonCommandFlags.h"
12 #include "../CrashReport.h" // for HAS_CRASH_REPORT
13 #include "../FileNames.h"
14 #include "../HelpText.h"
15 #include "../Menus.h"
16 #include "../Prefs.h"
17 #include "../Project.h"
18 #include "../ProjectSelectionManager.h"
19 #include "../ShuttleGui.h"
20 #include "../SplashDialog.h"
21 #include "../Theme.h"
22 #include "../commands/CommandContext.h"
23 #include "../commands/CommandManager.h"
24 #include "../prefs/PrefsDialog.h"
25 #include "../widgets/AudacityMessageBox.h"
26 #include "../widgets/HelpSystem.h"
27 
28 // private helper classes and functions
29 namespace {
30 
32  AudacityProject &project, const wxString &info,
33  const TranslatableString &description, const wxString &defaultPath,
34  bool fixedWidth = false)
35 {
36  auto &window = GetProjectFrame( project );
37  wxDialogWrapper dlg( &window, wxID_ANY, description);
38  dlg.SetName();
39  ShuttleGui S(&dlg, eIsCreating);
40 
41  wxTextCtrl *text;
42  S.StartVerticalLay();
43  {
44  text = S.Id(wxID_STATIC)
45  .Style(wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH)
46  .AddTextWindow("");
47 
48  wxButton *save = safenew wxButton(S.GetParent(), wxID_OK, _("&Save"));
50  }
51  S.EndVerticalLay();
52 
53  if (fixedWidth) {
54  auto style = text->GetDefaultStyle();
55  style.SetFontFamily( wxFONTFAMILY_TELETYPE );
56  text->SetDefaultStyle(style);
57  }
58 
59  *text << info;
60 
61  dlg.SetSize(350, 450);
62 
63  if (dlg.ShowModal() == wxID_OK)
64  {
65  const auto fileDialogTitle = XO("Save %s").Format( description );
66  wxString fName = FileNames::SelectFile(FileNames::Operation::Export,
67  fileDialogTitle,
68  wxEmptyString,
69  defaultPath,
70  wxT("txt"),
72  wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
73  &window);
74  if (!fName.empty())
75  {
76  if (!text->SaveFile(fName))
77  {
79  XO("Unable to save %s").Format( description ),
80  fileDialogTitle);
81  }
82  }
83  }
84 }
85 
94 {
95 public:
96  using PrefSetter = std::function< void() > ;
97 
98  QuickFixDialog(wxWindow * pParent, AudacityProject &project);
99  void Populate();
100  void PopulateOrExchange(ShuttleGui & S);
101  void AddStuck( ShuttleGui & S, bool & bBool,
102  const PrefSetter &prefSetter,
103  const TranslatableString &Prompt, wxString Help );
104 
105  void OnOk(wxCommandEvent &event);
106  void OnCancel(wxCommandEvent &event);
107  void OnHelp(const wxString &Str);
108  void OnFix(const PrefSetter &setter, wxWindowID id);
109 
111 
112  int mItem;
116  DECLARE_EVENT_TABLE()
117 };
118 
119 
120 #define FixButtonID 7001
121 #define HelpButtonID 7011
122 
123 BEGIN_EVENT_TABLE(QuickFixDialog, wxDialogWrapper)
124  EVT_BUTTON(wxID_OK, QuickFixDialog::OnOk)
125  EVT_BUTTON(wxID_CANCEL, QuickFixDialog::OnCancel)
127 
128 QuickFixDialog::QuickFixDialog(wxWindow * pParent, AudacityProject &project) :
129  wxDialogWrapper(pParent, wxID_ANY, XO("Do you have these problems?"),
130  wxDefaultPosition, wxDefaultSize,
131  wxDEFAULT_DIALOG_STYLE )
132  , mProject{ project }
133 {
134  const long SNAP_OFF = 0;
135 
136  gPrefs->Read(wxT("/GUI/SyncLockTracks"), &mbSyncLocked, false);
137  mbInSnapTo = gPrefs->Read(wxT("/SnapTo"), SNAP_OFF) !=0;
138  gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"), &mbSoundActivated, false);
139 
140  ShuttleGui S(this, eIsCreating);
141  PopulateOrExchange(S);
142 
143  Fit();
144  auto sz = GetSize();
145  SetMinSize( sz );
146  SetMaxSize( sz );
147 
148  // The close button has the cancel id and acts exactly the same as cancel.
149  wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
150  if( pWin )
151  pWin->SetFocus( );
152  Center();
153 }
154 
155 void QuickFixDialog::AddStuck( ShuttleGui & S, bool & bBool,
156  const PrefSetter &prefSetter,
157  const TranslatableString &Prompt, wxString Help )
158 {
159  mItem++;
160  wxWindowID id = FixButtonID + mItem;
161  if( !bBool)
162  return;
163 
164  S
165  .AddFixedText( Prompt );
166 
167  S
168  .Id( id )
169  .AddButton( XXO("Fix") )
170  ->Bind( wxEVT_BUTTON, [this, prefSetter, id](wxCommandEvent&){
171  OnFix( prefSetter, id );
172  } );
173 
174  {
175  // Replace standard Help button with smaller icon button.
176  // bs->AddButton(safenew wxButton(parent, wxID_HELP));
177  auto b = safenew wxBitmapButton(S.GetParent(), HelpButtonID+mItem, theTheme.Bitmap( bmpHelpIcon ));
178  b->SetToolTip( _("Help") );
179  b->SetLabel(_("Help")); // for screen readers
180  b->Bind( wxEVT_BUTTON, [this, Help](const wxCommandEvent&){
181  OnHelp( Help );
182  } );
183  S.AddWindow( b );
184  }
185 }
186 
187 void QuickFixDialog::PopulateOrExchange(ShuttleGui & S)
188 {
189 
190  S.StartVerticalLay(1);
191  S.StartStatic( XO("Quick Fixes"));
192 
193  // These aren't all possible modes one can be stuck in, but they are some of them.
194  bool bStuckInMode = mbSyncLocked || mbInSnapTo || mbSoundActivated;
195 
196  if( !bStuckInMode ){
197  SetLabel(XO("Nothing to do"));
198  S.AddFixedText(XO("No quick, easily fixed problems were found"));
199  }
200  else {
201  S.StartMultiColumn(3, wxALIGN_CENTER);
202  {
203  mItem = -1;
204 
205  auto defaultAction =
206  [](AudacityProject *pProject, const wxString &path){ return
207  [pProject, path]{
208  gPrefs->Write(path, 0);
209  gPrefs->Flush();
210  // This is overkill (aka slow), as all preferences are
211  // reloaded and all
212  // toolbars recreated.
213  // Overkill probably doesn't matter, as this command is
214  // infrequently used.
215  DoReloadPreferences( *pProject );
216  };
217  };
218 
219  // Use # in the URLs to ensure we go to the online version of help.
220  // Local help may well not be installed.
221  auto pProject = &mProject;
222  AddStuck( S, mbSyncLocked,
223  defaultAction( pProject, "/GUI/SyncLockTracks" ),
224  XO("Clocks on the Tracks"), "Quick_Fix#sync_lock" );
225  AddStuck( S, mbInSnapTo,
226  [pProject] {
227  gPrefs->Write( "/SnapTo", 0 );
228  gPrefs->Flush();
229  // Sadly SnapTo has to be handled specially,
230  // as it is not part of the standard
231  // preference dialogs.
232  ProjectSelectionManager::Get( *pProject ).AS_SetSnapTo( 0 );
233  },
234  XO("Can't select precisely"), "Quick_Fix#snap_to" );
235  AddStuck( S, mbSoundActivated,
236  defaultAction( pProject, "/AudioIO/SoundActivatedRecord" ),
237  XO("Recording stops and starts"),
238  "Quick_Fix#sound_activated_recording" );
239  }
240  S.EndMultiColumn();
241  }
242  S.EndStatic();
243 
244  S.StartHorizontalLay(wxALIGN_CENTER_HORIZONTAL, 0);
245  S.AddStandardButtons(eCloseButton + (bStuckInMode ? 0 : eHelpButton));
246  S.EndHorizontalLay();
247 
248  S.EndVerticalLay();
249 
250  wxButton * pBtn = (wxButton*)FindWindowById( wxID_HELP );
251  if( pBtn )
252  pBtn->Bind( wxEVT_BUTTON, [this]( const wxCommandEvent & ){
253  OnHelp( "Quick_Fix#" );
254  } );
255 }
256 
257 void QuickFixDialog::OnOk(wxCommandEvent &event)
258 {
259  (void)event;// Compiler food
260  EndModal(wxID_OK);
261 }
262 
263 void QuickFixDialog::OnCancel(wxCommandEvent &event)
264 {
265  (void)event;// Compiler food
266  EndModal(wxID_CANCEL);
267 }
268 
269 void QuickFixDialog::OnHelp(const wxString &Str)
270 {
271  HelpSystem::ShowHelp(this, Str, true);
272 }
273 
274 void QuickFixDialog::OnFix(const PrefSetter &setter, wxWindowID id)
275 {
276  if ( setter )
277  setter();
278 
279  // Change the label after doing the fix, as the fix may take a second or two.
280  auto pBtn = FindWindow(id);
281  if( pBtn )
282  pBtn->SetLabel( _("Fixed") );
283 
284  // The close button has the cancel id and acts exactly the same as cancel.
285  wxButton * pWin = (wxButton*)FindWindowById( wxID_CANCEL );
286  if( pWin )
287  pWin->SetFocus( );
288 }
289 
290 }
291 
292 namespace HelpActions {
293 
294 // exported helper functions
295 
296 // Menu handler functions
297 
299 
300 void OnQuickFix(const CommandContext &context)
301 {
302  auto &project = context.project;
303  QuickFixDialog dlg( &GetProjectFrame( project ), project );
304  dlg.ShowModal();
305 }
306 
307 void OnQuickHelp(const CommandContext &context)
308 {
309  auto &project = context.project;
311  &GetProjectFrame( project ),
312  wxT("Quick_Help"));
313 }
314 
315 void OnManual(const CommandContext &context)
316 {
317  auto &project = context.project;
319  &GetProjectFrame( project ),
320  wxT("Main_Page"));
321 }
322 
323 void OnAudioDeviceInfo(const CommandContext &context)
324 {
325  auto &project = context.project;
326  auto gAudioIO = AudioIOBase::Get();
327  wxString info = gAudioIO->GetDeviceInfo();
328  ShowDiagnostics( project, info,
329  XO("Audio Device Info"), wxT("deviceinfo.txt") );
330 }
331 
332 #ifdef EXPERIMENTAL_MIDI_OUT
333 void OnMidiDeviceInfo(const CommandContext &context)
334 {
335  auto &project = context.project;
336  auto gAudioIO = AudioIOBase::Get();
337  wxString info = gAudioIO->GetMidiDeviceInfo();
338  ShowDiagnostics( project, info,
339  XO("MIDI Device Info"), wxT("midideviceinfo.txt") );
340 }
341 #endif
342 
343 void OnShowLog( const CommandContext &context )
344 {
345  auto logger = AudacityLogger::Get();
346  if (logger) {
347  logger->Show();
348  }
349 }
350 
351 #if defined(HAS_CRASH_REPORT)
352 void OnCrashReport(const CommandContext &WXUNUSED(context) )
353 {
354 // Change to "1" to test a real crash
355 #if 0
356  char *p = 0;
357  *p = 1234;
358 #endif
359  CrashReport::Generate(wxDebugReport::Context_Current);
360 }
361 #endif
362 
363 void OnMenuTree(const CommandContext &context)
364 {
365  auto &project = context.project;
366 
367  using namespace MenuTable;
368  struct MyVisitor : ToolbarMenuVisitor
369  {
371 
372  enum : unsigned { TAB = 3 };
373  void DoBeginGroup( GroupItem &item, const Path& ) override
374  {
375  if ( dynamic_cast<MenuItem*>( &item ) ) {
376  Indent();
377  // using GET for alpha only diagnostic tool
378  info += item.name.GET();
379  Return();
380  indentation = wxString{ ' ', TAB * ++level };
381  }
382  }
383 
384  void DoEndGroup( GroupItem &item, const Path& ) override
385  {
386  if ( dynamic_cast<MenuItem*>( &item ) )
387  indentation = wxString{ ' ', TAB * --level };
388  }
389 
390  void DoVisit( SingleItem &item, const Path& ) override
391  {
392  // using GET for alpha only diagnostic tool
393  Indent();
394  info += item.name.GET();
395  Return();
396  }
397 
398  void DoSeparator() override
399  {
400  static const wxString separatorName{ '=', 20 };
401  Indent();
402  info += separatorName;
403  Return();
404  }
405 
406  void Indent() { info += indentation; }
407  void Return() { info += '\n'; }
408 
409  unsigned level{};
410  wxString indentation;
411  wxString info;
412  } visitor{ project };
413 
414  MenuManager::Visit( visitor );
415 
416  ShowDiagnostics( project, visitor.info,
417  XO("Menu Tree"), wxT("menutree.txt"), true );
418 }
419 
420 void OnCheckForUpdates(const CommandContext &WXUNUSED(context))
421 {
423 }
424 
425 void OnAbout(const CommandContext &context)
426 {
427 #ifdef __WXMAC__
428  // Modeless dialog, consistent with other Mac applications
429  // Simulate the application Exit menu item
430  wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
431  wxTheApp->AddPendingEvent( evt );
432 #else
433  auto &project = context.project;
434  auto &window = GetProjectFrame( project );
435 
436  // Windows and Linux still modal.
437  AboutDialog dlog( &window );
438  dlog.ShowModal();
439 #endif
440 }
441 
442 #if 0
443 // Legacy handlers, not used as of version 2.3.0
444 
445 // Only does the update checks if it's an ALPHA build and not disabled by
446 // preferences.
447 void MayCheckForUpdates(AudacityProject &project)
448 {
449 #ifdef IS_ALPHA
450  OnCheckForUpdates(project);
451 #endif
452 }
453 
454 void OnHelpWelcome(const CommandContext &context)
455 {
457 }
458 
459 #endif
460 
461 }; // struct Handler
462 
463 } // namespace
464 
466  // Handler is not stateful. Doesn't need a factory registered with
467  // AudacityProject.
468  static HelpActions::Handler instance;
469  return instance;
470 };
471 
472 // Menu definitions
473 
474 #define FN(X) (& HelpActions::Handler :: X)
475 
476 namespace {
477 using namespace MenuTable;
479 {
480  static BaseItemSharedPtr menu{
482  Menu( wxT("Help"), XXO("&Help"),
483  Section( "Basic",
484  // QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
485  #ifdef EXPERIMENTAL_DA
486  // DA: Has QuickFix menu item.
487  Command( wxT("QuickFix"), XXO("&Quick Fix..."), FN(OnQuickFix),
489  // DA: 'Getting Started' rather than 'Quick Help'.
490  Command( wxT("QuickHelp"), XXO("&Getting Started"), FN(OnQuickHelp),
492  // DA: Emphasise it is the Audacity Manual (No separate DA manual).
493  Command( wxT("Manual"), XXO("Audacity &Manual"), FN(OnManual),
495 
496  #else
497  Command( wxT("QuickHelp"), XXO("&Quick Help..."), FN(OnQuickHelp),
499  Command( wxT("Manual"), XXO("&Manual..."), FN(OnManual),
501  #endif
502  ),
503 
504  #ifdef __WXMAC__
505  Items
506  #else
507  Section
508  #endif
509  ( "Other",
510  Menu( wxT("Diagnostics"), XXO("&Diagnostics"),
511  Command( wxT("DeviceInfo"), XXO("Au&dio Device Info..."),
512  FN(OnAudioDeviceInfo),
513  AudioIONotBusyFlag() ),
514  #ifdef EXPERIMENTAL_MIDI_OUT
515  Command( wxT("MidiDeviceInfo"), XXO("&MIDI Device Info..."),
516  FN(OnMidiDeviceInfo),
517  AudioIONotBusyFlag() ),
518  #endif
519  Command( wxT("Log"), XXO("Show &Log..."), FN(OnShowLog),
521  #if defined(HAS_CRASH_REPORT)
522  Command( wxT("CrashReport"), XXO("&Generate Support Data..."),
523  FN(OnCrashReport), AlwaysEnabledFlag )
524  #endif
525 
526  #ifdef IS_ALPHA
527  ,
528  // Menu explorer. Perhaps this should become a macro command
529  Command( wxT("MenuTree"), XXO("Menu Tree..."),
530  FN(OnMenuTree),
532  #endif
533  )
534  #ifndef __WXMAC__
535  ),
536 
537  Section( "",
538 #else
539  ,
540 #endif
541 
542  // DA: Does not fully support update checking.
543  #ifndef EXPERIMENTAL_DA
544  Command( wxT("Updates"), XXO("&Check for Updates..."),
545  FN(OnCheckForUpdates),
547  #endif
548  Command( wxT("About"), XXO("&About Audacity..."), FN(OnAbout),
550  )
551  ) ) };
552  return menu;
553 }
554 
556  wxT(""),
557  Shared( HelpMenu() )
558 };
559 
560 }
561 
562 #undef FN
EVT_BUTTON
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
TranslatableString
Definition: Types.h:290
DoReloadPreferences
void DoReloadPreferences(AudacityProject &project)
Definition: PrefsDialog.cpp:840
HelpActions::Handler::OnCheckForUpdates
void OnCheckForUpdates(const CommandContext &WXUNUSED(context))
Definition: HelpMenus.cpp:420
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:36
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1177
HelpActions::Handler
Definition: HelpMenus.cpp:298
MenuTable::FinderScope
Definition: CommandManager.h:465
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog
Class which makes a dialog for displaying quick fixes to common issues.
Definition: HelpMenus.cpp:94
FN
#define FN(X)
Definition: HelpMenus.cpp:474
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:67
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: AudacityMessageBox.h:20
HelpActions::Handler::OnManual
void OnManual(const CommandContext &context)
Definition: HelpMenus.cpp:315
AboutDialog
The AboutDialog shows the program version and developer credits.
Definition: AboutDialog.h:32
HelpButtonID
#define HelpButtonID
Definition: HelpMenus.cpp:121
AudioIONotBusyFlag
const ReservedCommandFlag & AudioIONotBusyFlag()
Definition: CommonCommandFlags.cpp:127
Format
Abstract base class used in importing a file.
ToolbarMenuVisitor::ToolbarMenuVisitor
ToolbarMenuVisitor(AudacityProject &p)
Definition: CommandManager.h:390
HelpActions::Handler::OnQuickHelp
void OnQuickHelp(const CommandContext &context)
Definition: HelpMenus.cpp:307
Registry::Shared
std::unique_ptr< SharedItem > Shared(const BaseItemSharedPtr &ptr)
Definition: Registry.h:93
HelpActions
Definition: HelpMenus.cpp:292
XO
#define XO(s)
Definition: Internat.h:32
anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics
void ShowDiagnostics(AudacityProject &project, const wxString &info, const TranslatableString &description, const wxString &defaultPath, bool fixedWidth=false)
Definition: HelpMenus.cpp:31
SNAP_OFF
@ SNAP_OFF
Definition: ProjectSettings.h:28
eCancelButton
@ eCancelButton
Definition: ShuttleGui.h:608
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
eCloseButton
@ eCloseButton
Definition: ShuttleGui.h:617
AlwaysEnabledFlag
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:35
MenuTable::AttachedItem
Definition: CommandManager.h:688
HelpActions::Handler::OnAudioDeviceInfo
void OnAudioDeviceInfo(const CommandContext &context)
Definition: HelpMenus.cpp:323
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::Populate
void Populate()
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mProject
AudacityProject & mProject
Definition: HelpMenus.cpp:110
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mbInSnapTo
bool mbInSnapTo
Definition: HelpMenus.cpp:114
HelpActions::Handler::OnShowLog
void OnShowLog(const CommandContext &context)
Definition: HelpMenus.cpp:343
anonymous_namespace{HelpMenus.cpp}::HelpMenu
BaseItemSharedPtr HelpMenu()
Definition: HelpMenus.cpp:478
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2248
ThemeBase::Bitmap
wxBitmap & Bitmap(int iIndex)
Definition: Theme.cpp:1211
SplashDialog::DoHelpWelcome
static void DoHelpWelcome(AudacityProject &project)
Definition: SplashDialog.cpp:68
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mItem
int mItem
Definition: HelpMenus.cpp:112
ShuttleGui::Style
ShuttleGui & Style(long iStyle)
Definition: ShuttleGui.h:734
XXO
#define XXO(s)
Definition: Internat.h:45
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1170
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:22
ProjectSelectionManager::AS_SetSnapTo
void AS_SetSnapTo(int snap) override
Definition: ProjectSelectionManager.cpp:110
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1160
ProjectSelectionManager::Get
static ProjectSelectionManager & Get(AudacityProject &project)
Definition: ProjectSelectionManager.cpp:34
FileNames::TextFiles
AUDACITY_DLL_API const FileType TextFiles
Definition: FileNames.h:77
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1196
Registry::BaseItemSharedPtr
std::shared_ptr< BaseItem > BaseItemSharedPtr
Definition: Registry.h:72
GetProjectFrame
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
Definition: Project.cpp:186
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:611
ShuttleGuiBase::AddFixedText
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:433
AudacityLogger::Get
static AudacityLogger * Get()
Definition: AudacityLogger.cpp:58
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:503
AudioIOBase::Get
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:94
ToolbarMenuVisitor
Definition: CommandManager.h:389
MenuTable::Items
std::unique_ptr< MenuItems > Items(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:580
findCommandHandler
static CommandHandlerObject & findCommandHandler(AudacityProject &)
Definition: HelpMenus.cpp:465
wxDialogWrapper::SetName
void SetName(const TranslatableString &title)
Definition: wxPanelWrapper.cpp:76
FixButtonID
#define FixButtonID
Definition: HelpMenus.cpp:120
OpenInDefaultBrowser
void OpenInDefaultBrowser(const wxHtmlLinkInfo &link)
Definition: HelpSystem.cpp:517
anonymous_namespace{HelpMenus.cpp}::sAttachment1
AttachedItem sAttachment1
Definition: HelpMenus.cpp:555
MenuTable::MenuItem
Definition: CommandManager.h:412
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:353
anonymous_namespace{Registry.cpp}::Path
std::vector< Identifier > Path
Definition: Registry.cpp:163
HelpActions::Handler::OnQuickFix
void OnQuickFix(const CommandContext &context)
Definition: HelpMenus.cpp:300
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:886
wxDialogWrapper
Definition: wxPanelWrapper.h:81
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
FileNames::SelectFile
AUDACITY_DLL_API FilePath SelectFile(Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
VerCheckUrl
AUDACITY_DLL_API const wxString VerCheckUrl()
_
#define _(s)
Definition: Internat.h:76
MenuTable::Command
std::unique_ptr< CommandItem > Command(const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())
Definition: CommandManager.h:655
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
HelpActions::Handler::OnAbout
void OnAbout(const CommandContext &context)
Definition: HelpMenus.cpp:425
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mbSoundActivated
bool mbSoundActivated
Definition: HelpMenus.cpp:115
CommandHandlerObject
wxEvtHandler CommandHandlerObject
Definition: CommandFunctors.h:28
MenuTable::Menu
std::unique_ptr< MenuItem > Menu(const Identifier &internalName, const TranslatableString &title, Args &&... args)
Definition: CommandManager.h:603
ShuttleGuiBase::AddTextWindow
wxTextCtrl * AddTextWindow(const wxString &Value)
Multiline text box that grows.
Definition: ShuttleGui.cpp:705
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PrefSetter
std::function< void() > PrefSetter
Definition: HelpMenus.cpp:96
anonymous_namespace{HelpMenus.cpp}::END_EVENT_TABLE
END_EVENT_TABLE()
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2406
MenuTable::Section
std::unique_ptr< MenuPart > Section(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:591
theTheme
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:201
HelpActions::Handler::OnMenuTree
void OnMenuTree(const CommandContext &context)
Definition: HelpMenus.cpp:363
MenuTable
Definition: CommandManager.h:396
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:915
safenew
#define safenew
Definition: MemoryX.h:8
CommandContext::project
AudacityProject & project
Definition: CommandContext.h:52
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mbSyncLocked
bool mbSyncLocked
Definition: HelpMenus.cpp:113
MenuManager::Visit
static void Visit(ToolbarMenuVisitor &visitor)
Definition: Menus.cpp:436