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