Audacity  3.0.3
HelpMenus.cpp
Go to the documentation of this file.
1 
2 #include <wx/app.h>
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, const ManualPageID &Help );
104 
105  void OnOk(wxCommandEvent &event);
106  void OnCancel(wxCommandEvent &event);
107  void OnHelp(const ManualPageID &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, const ManualPageID &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 ManualPageID &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  L"Quick_Help");
313 }
314 
315 void OnManual(const CommandContext &context)
316 {
317  auto &project = context.project;
319  &GetProjectFrame( project ),
320  L"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 #ifdef IS_ALPHA
364 void OnSegfault(const CommandContext &)
365 {
366  unsigned *p = nullptr;
367  *p = 0xDEADBEEF;
368 }
369 
370 void OnException(const CommandContext &)
371 {
372  // Throw an exception that can be caught only as (...)
373  // The intent is to exercise detection of unhandled exceptions by the
374  // crash reporter
375  struct Unique{};
376  throw Unique{};
377 }
378 
379 void OnAssertion(const CommandContext &)
380 {
381  // We don't use assert() much directly, but Breakpad does detect it
382  // This may crash the program only in debug builds
383  // See also wxSetAssertHandler, and wxApp::OnAssertFailure()
384  assert(false);
385 }
386 #endif
387 
388 void OnMenuTree(const CommandContext &context)
389 {
390  auto &project = context.project;
391 
392  using namespace MenuTable;
393  struct MyVisitor : ToolbarMenuVisitor
394  {
396 
397  enum : unsigned { TAB = 3 };
398  void DoBeginGroup( GroupItem &item, const Path& ) override
399  {
400  if ( dynamic_cast<MenuItem*>( &item ) ) {
401  Indent();
402  // using GET for alpha only diagnostic tool
403  info += item.name.GET();
404  Return();
405  indentation = wxString{ ' ', TAB * ++level };
406  }
407  }
408 
409  void DoEndGroup( GroupItem &item, const Path& ) override
410  {
411  if ( dynamic_cast<MenuItem*>( &item ) )
412  indentation = wxString{ ' ', TAB * --level };
413  }
414 
415  void DoVisit( SingleItem &item, const Path& ) override
416  {
417  // using GET for alpha only diagnostic tool
418  Indent();
419  info += item.name.GET();
420  Return();
421  }
422 
423  void DoSeparator() override
424  {
425  static const wxString separatorName{ '=', 20 };
426  Indent();
427  info += separatorName;
428  Return();
429  }
430 
431  void Indent() { info += indentation; }
432  void Return() { info += '\n'; }
433 
434  unsigned level{};
435  wxString indentation;
436  wxString info;
437  } visitor{ project };
438 
439  MenuManager::Visit( visitor );
440 
441  ShowDiagnostics( project, visitor.info,
442  Verbatim("Menu Tree"), wxT("menutree.txt"), true );
443 }
444 
445 void OnCheckForUpdates(const CommandContext &WXUNUSED(context))
446 {
448 }
449 
450 void OnAbout(const CommandContext &context)
451 {
452 #ifdef __WXMAC__
453  // Modeless dialog, consistent with other Mac applications
454  // Simulate the application Exit menu item
455  wxCommandEvent evt{ wxEVT_MENU, wxID_ABOUT };
456  wxTheApp->AddPendingEvent( evt );
457 #else
458  auto &project = context.project;
459  auto &window = GetProjectFrame( project );
460 
461  // Windows and Linux still modal.
462  AboutDialog dlog( &window );
463  dlog.ShowModal();
464 #endif
465 }
466 
467 #if 0
468 // Legacy handlers, not used as of version 2.3.0
469 
470 // Only does the update checks if it's an ALPHA build and not disabled by
471 // preferences.
472 void MayCheckForUpdates(AudacityProject &project)
473 {
474 #ifdef IS_ALPHA
475  OnCheckForUpdates(project);
476 #endif
477 }
478 
479 void OnHelpWelcome(const CommandContext &context)
480 {
482 }
483 
484 #endif
485 
486 }; // struct Handler
487 
488 } // namespace
489 
491  // Handler is not stateful. Doesn't need a factory registered with
492  // AudacityProject.
493  static HelpActions::Handler instance;
494  return instance;
495 };
496 
497 // Menu definitions
498 
499 #define FN(X) (& HelpActions::Handler :: X)
500 
501 namespace {
502 using namespace MenuTable;
504 {
505  static BaseItemSharedPtr menu{
507  Menu( wxT("Help"), XXO("&Help"),
508  Section( "Basic",
509  // QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
510  #ifdef EXPERIMENTAL_DA
511  // DA: Has QuickFix menu item.
512  Command( wxT("QuickFix"), XXO("&Quick Fix..."), FN(OnQuickFix),
514  // DA: 'Getting Started' rather than 'Quick Help'.
515  Command( wxT("QuickHelp"), XXO("&Getting Started"), FN(OnQuickHelp),
517  // DA: Emphasise it is the Audacity Manual (No separate DA manual).
518  Command( wxT("Manual"), XXO("Audacity &Manual"), FN(OnManual),
520 
521  #else
522  Command( wxT("QuickHelp"), XXO("&Quick Help..."), FN(OnQuickHelp),
524  Command( wxT("Manual"), XXO("&Manual..."), FN(OnManual),
526  #endif
527  ),
528 
529  #ifdef __WXMAC__
530  Items
531  #else
532  Section
533  #endif
534  ( "Other",
535  Menu( wxT("Diagnostics"), XXO("&Diagnostics"),
536  Command( wxT("DeviceInfo"), XXO("Au&dio Device Info..."),
537  FN(OnAudioDeviceInfo),
538  AudioIONotBusyFlag() ),
539  #ifdef EXPERIMENTAL_MIDI_OUT
540  Command( wxT("MidiDeviceInfo"), XXO("&MIDI Device Info..."),
541  FN(OnMidiDeviceInfo),
542  AudioIONotBusyFlag() ),
543  #endif
544  Command( wxT("Log"), XXO("Show &Log..."), FN(OnShowLog),
546  #if defined(HAS_CRASH_REPORT)
547  Command( wxT("CrashReport"), XXO("&Generate Support Data..."),
548  FN(OnCrashReport), AlwaysEnabledFlag )
549  #endif
550 
551  #ifdef IS_ALPHA
552  ,
553  // alpha-only items don't need to internationalize, so use
554  // Verbatim for labels
555 
556  Command( wxT("RaiseSegfault"), Verbatim("Test segfault report"),
557  FN(OnSegfault), AlwaysEnabledFlag ),
558 
559  Command( wxT("ThrowException"), Verbatim("Test exception report"),
560  FN(OnException), AlwaysEnabledFlag ),
561 
562  Command( wxT("ViolateAssertion"), Verbatim("Test assertion report"),
563  FN(OnAssertion), AlwaysEnabledFlag ),
564 
565  // Menu explorer. Perhaps this should become a macro command
566  Command( wxT("MenuTree"), Verbatim("Menu Tree..."),
567  FN(OnMenuTree),
569  #endif
570  )
571  #ifndef __WXMAC__
572  ),
573 
574  Section( "",
575 #else
576  ,
577 #endif
578 
579  // DA: Does not fully support update checking.
580  #ifndef EXPERIMENTAL_DA
581  Command( wxT("Updates"), XXO("&Check for Updates..."),
582  FN(OnCheckForUpdates),
584  #endif
585  Command( wxT("About"), XXO("&About Audacity..."), FN(OnAbout),
587  )
588  ) ) };
589  return menu;
590 }
591 
593  wxT(""),
594  Shared( HelpMenu() )
595 };
596 
597 }
598 
599 #undef FN
EVT_BUTTON
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
DoReloadPreferences
void DoReloadPreferences(AudacityProject &project)
Definition: PrefsDialog.cpp:845
HelpActions::Handler::OnCheckForUpdates
void OnCheckForUpdates(const CommandContext &WXUNUSED(context))
Definition: HelpMenus.cpp:445
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
SNAP_OFF
@ SNAP_OFF
Definition: ProjectSettings.h:29
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
HelpActions::Handler
Definition: HelpMenus.cpp:298
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption=XO("Message"), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: AudacityMessageBox.h:20
MenuTable::FinderScope
Definition: CommandManager.h:472
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:499
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:604
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:397
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:31
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
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
AlwaysEnabledFlag
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:35
MenuTable::AttachedItem
Definition: CommandManager.h:695
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
HelpSystem::ShowHelp
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:237
HelpActions::Handler::OnShowLog
void OnShowLog(const CommandContext &context)
Definition: HelpMenus.cpp:343
anonymous_namespace{HelpMenus.cpp}::HelpMenu
BaseItemSharedPtr HelpMenu()
Definition: HelpMenus.cpp:503
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2274
ThemeBase::Bitmap
wxBitmap & Bitmap(int iIndex)
Definition: Theme.cpp:1216
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:727
XXO
#define XXO(s)
Definition: Internat.h:44
eCancelButton
@ eCancelButton
Definition: ShuttleGui.h:601
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
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:1167
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:1229
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
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:188
ShuttleGuiBase::AddFixedText
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:440
AudacityLogger::Get
static AudacityLogger * Get()
Definition: AudacityLogger.cpp:58
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:496
AudioIOBase::Get
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:94
ToolbarMenuVisitor
Definition: CommandManager.h:396
VerCheckUrl
AUDACITY_DLL_API const URLString VerCheckUrl()
MenuTable::Items
std::unique_ptr< MenuItems > Items(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:587
ShuttleGuiBase::AddWindow
wxWindow * AddWindow(wxWindow *pWindow, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:299
findCommandHandler
static CommandHandlerObject & findCommandHandler(AudacityProject &)
Definition: HelpMenus.cpp:490
wxDialogWrapper::SetName
void SetName(const TranslatableString &title)
Definition: wxPanelWrapper.cpp:76
FixButtonID
#define FixButtonID
Definition: HelpMenus.cpp:120
anonymous_namespace{HelpMenus.cpp}::sAttachment1
AttachedItem sAttachment1
Definition: HelpMenus.cpp:592
MenuTable::MenuItem
Definition: CommandManager.h:419
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:360
OpenInDefaultBrowser
void OpenInDefaultBrowser(const URLString &link)
Definition: HelpSystem.cpp:522
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:893
wxDialogWrapper
Definition: wxPanelWrapper.h:81
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
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)
TaggedIdentifier< ManualPageIDTag >
_
#define _(s)
Definition: Internat.h:75
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:662
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:113
eCloseButton
@ eCloseButton
Definition: ShuttleGui.h:610
HelpActions::Handler::OnAbout
void OnAbout(const CommandContext &context)
Definition: HelpMenus.cpp:450
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:610
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
ShuttleGuiBase::AddTextWindow
wxTextCtrl * AddTextWindow(const wxString &Value)
Multiline text box that grows.
Definition: ShuttleGui.cpp:712
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:2432
MenuTable::Section
std::unique_ptr< MenuPart > Section(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:598
theTheme
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:203
Prefs.h
HelpActions::Handler::OnMenuTree
void OnMenuTree(const CommandContext &context)
Definition: HelpMenus.cpp:388
MenuTable
Definition: CommandManager.h:403
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
safenew
#define safenew
Definition: MemoryX.h:10
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:631
anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::mbSyncLocked
bool mbSyncLocked
Definition: HelpMenus.cpp:113
MenuManager::Visit
static void Visit(ToolbarMenuVisitor &visitor)
Definition: Menus.cpp:436