Audacity  3.0.3
Screenshot.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Screenshot.cpp
6 
7  Dominic Mazzoni
8 
9 *******************************************************************/
19 #include "Screenshot.h"
23 #include <wx/defs.h>
24 #include <wx/event.h>
25 #include <wx/frame.h>
26 
27 #include "ShuttleGui.h"
28 #include <wx/button.h>
29 #include <wx/checkbox.h>
30 #include <wx/dirdlg.h>
31 #include <wx/image.h>
32 #include <wx/intl.h>
33 #include <wx/panel.h>
34 #include <wx/sizer.h>
35 #include <wx/statusbr.h>
36 #include <wx/textctrl.h>
37 #include <wx/timer.h>
38 #include <wx/tglbtn.h>
39 #include <wx/window.h>
40 
41 #include "prefs/GUISettings.h" // for RTL_WORKAROUND
42 #include "Project.h"
43 #include "ProjectStatus.h"
44 #include "ProjectWindow.h"
45 #include "Prefs.h"
46 #include "tracks/ui/TrackView.h"
47 #include "widgets/HelpSystem.h"
48 
49 #include "ViewInfo.h"
50 #include "WaveTrack.h"
51 
53 class ScreenFrameTimer;
54 
56 #define ScreenCaptureFrameTitle XO("Screen Capture Frame")
57 
58 // ANSWER-ME: Should this derive from wxDialogWrapper instead?
59 class ScreenshotBigDialog final : public wxFrame,
60  public PrefsListener
61 {
62  public:
63 
64  // constructors and destructors
66  wxWindow *parent, wxWindowID id, AudacityProject &project);
67  virtual ~ScreenshotBigDialog();
68 
69  bool ProcessEvent(wxEvent & event) override;
70 
71  private:
72  void Populate();
74 
75  void OnCloseWindow(wxCloseEvent & event);
76  void OnUIUpdate(wxUpdateUIEvent & event);
77  void OnDirChoose(wxCommandEvent & event);
78  void OnGetURL(wxCommandEvent & event);
79  void OnClose(wxCommandEvent & event );
80 
81 
82  void SizeMainWindow(int w, int h);
83  void OnMainWindowSmall(wxCommandEvent & event);
84  void OnMainWindowLarge(wxCommandEvent & event);
85  void OnToggleBackgroundBlue(wxCommandEvent & event);
86  void OnToggleBackgroundWhite(wxCommandEvent & event);
87 
88  void DoCapture(int captureMode);
89  void OnCaptureSomething(wxCommandEvent & event);
90 
91  void TimeZoom(double seconds);
92  void OnOneSec(wxCommandEvent & event);
93  void OnTenSec(wxCommandEvent & event);
94  void OnOneMin(wxCommandEvent & event);
95  void OnFiveMin(wxCommandEvent & event);
96  void OnOneHour(wxCommandEvent & event);
97 
98  void SizeTracks(int h);
99  void OnShortTracks(wxCommandEvent & event);
100  void OnMedTracks(wxCommandEvent & event);
101  void OnTallTracks(wxCommandEvent & event);
102 
103  // PrefsListener implementation
104  void UpdatePrefs() override;
105 
107 
108  std::unique_ptr<ScreenshotCommand> CreateCommand();
109 
110  wxCheckBox *mDelayCheckBox;
111  wxTextCtrl *mDirectoryTextBox;
112  wxToggleButton *mBlue;
113  wxToggleButton *mWhite;
114  wxStatusBar *mStatus;
115 
116  std::unique_ptr<ScreenFrameTimer> mTimer;
117 
118  std::unique_ptr<ScreenshotCommand> mCommand;
120 
121  DECLARE_EVENT_TABLE()
122 };
123 
124 // Static pointer to the unique ScreenshotBigDialog window.
125 // Formerly it was parentless, therefore this was a Destroy_ptr<ScreenshotBigDialog>
126 // But now the window is owned, so just use a bare pointer, and null it when
127 // the unique window is destroyed.
130 
132 
134 {
135  if (!mFrame) {
136  auto parent = wxTheApp->GetTopWindow();
137  if (!parent) {
138  wxASSERT(false);
139  return;
140  }
142  safenew ScreenshotBigDialog(parent, -1, project) };
143  }
144  mFrame->Show();
145  mFrame->Raise();
146 }
147 
149 {
150  mFrame = nullptr;
151 }
152 
154 
155 class ScreenFrameTimer final : public wxTimer
156 {
157  public:
159  wxEvent & event)
160  {
161  screenFrame = frame;
162  evt.reset(event.Clone());
163  }
164 
166  {
167  if (IsRunning())
168  {
169  Stop();
170  }
171  }
172 
173  void Notify() override
174  {
175  // Process timer notification just once, then destroy self
176  evt->SetEventObject(NULL);
178  }
179 
180  private:
182  std::unique_ptr<wxEvent> evt;
183 };
184 
186 
187 enum
188 {
191 
194 
200 
204 
206 
208  // No point delaying the capture of sets of things.
213 
214  // Put all events that need delay between AllDelayed and LastDelayed.
220 
234 
241 
243 
246 
247 };
248 
249 BEGIN_EVENT_TABLE(ScreenshotBigDialog, wxFrame)
253 
255 
261 
267 
271 
274 
275 // Must not be called before CreateStatusBar!
276 std::unique_ptr<ScreenshotCommand> ScreenshotBigDialog::CreateCommand()
277 {
278  wxASSERT(mStatus != NULL);
279  auto output =
280  std::make_unique<CommandOutputTargets>(std::make_unique<NullProgressTarget>(),
281  std::make_shared<StatusBarTarget>(*mStatus),
282  std::make_shared<MessageBoxTarget>());
283  return std::make_unique<ScreenshotCommand>();//*type, std::move(output), this);
284 }
285 
287  wxWindow * parent, wxWindowID id, AudacityProject &project)
288 : wxFrame(parent, id, ScreenCaptureFrameTitle.Translation(),
289  wxDefaultPosition, wxDefaultSize,
290 
291 #if !defined(__WXMSW__)
292 
293  #if !defined(__WXMAC__) // bug1358
294  wxFRAME_TOOL_WINDOW |
295  #endif
296 
297 #else
298 
299  wxSTAY_ON_TOP|
300 
301 #endif
302 
303  wxSYSTEM_MENU|wxCAPTION|wxCLOSE_BOX)
304  , mProject{ project }
305  , mContext( project )
306 {
307  mDelayCheckBox = NULL;
308  mDirectoryTextBox = NULL;
309 
310  mStatus = CreateStatusBar(3);
311  mCommand = CreateCommand();
312 
313  Populate();
314 
315  // Reset the toolbars to a known state.
316  // Note that the audio could be playing.
317  // The monitoring will switch off temporarily
318  // because we've switched monitor mid play.
319  // Bug 383 - Resetting the toolbars is not wanted.
320  // Any that are invisible will be amde visible as/when needed.
321  //ToolManager::Get( mContext.project ).Reset();
322  Center();
323 }
324 
326 {
327  if (this == mFrame)
328  mFrame = nullptr;
329  else
330  // There should only be one!
331  wxASSERT(false);
332 }
333 
335 {
336  ShuttleGui S(this, eIsCreating);
338 }
339 
341 {
342  wxPanel *p = S.StartPanel();
343  RTL_WORKAROUND(p);
344  {
345  S.SetBorder(3);
346 
347  S.StartStatic(XO("Choose location to save files"));
348  {
349  S.StartMultiColumn(3, wxEXPAND);
350  {
351  S.SetStretchyCol(1);
352 
355  XXO("Save images to:"),
356  gPrefs->Read(wxT("/ScreenshotPath"), wxFileName::GetHomeDir()),
357  30
358  );
359  S.Id(IdDirChoose).AddButton(XXO("Choose..."));
360  }
361  S.EndMultiColumn();
362  }
363  S.EndStatic();
364 
365  S.StartStatic(XO("Capture entire window or screen"));
366  {
367  S.StartHorizontalLay();
368  {
369  S.Id(IdMainWindowSmall).AddButton(XXO("Resize Small"));
370  S.Id(IdMainWindowLarge).AddButton(XXO("Resize Large"));
371  mBlue = safenew wxToggleButton(S.GetParent(),
373  /* i18n-hint: Bkgnd is short for background and appears on a small button
374  * It is OK to just translate this item as if it said 'Blue' */
375  _("Blue Bkgnd"));
376  S.AddWindow(mBlue);
377  mWhite = safenew wxToggleButton(S.GetParent(),
379  /* i18n-hint: Bkgnd is short for background and appears on a small button
380  * It is OK to just translate this item as if it said 'White' */
381  _("White Bkgnd"));
382  S.AddWindow(mWhite);
383  }
384  S.EndHorizontalLay();
385 
386  S.StartHorizontalLay();
387  {
388  S.Id(IdCaptureWindowContents).AddButton(XXO("Capture Window Only"));
389  S.Id(IdCaptureFullWindow).AddButton(XXO("Capture Full Window"));
390  S.Id(IdCaptureWindowPlus).AddButton(XXO("Capture Window Plus"));
391  }
392  S.EndHorizontalLay();
393 
394  S.StartHorizontalLay();
395  {
396  S.Id(IdCaptureFullScreen).AddButton(XXO("Capture Full Screen"));
397  }
398  S.EndHorizontalLay();
399 
400  S.StartHorizontalLay();
401  {
403  XXO("Wait 5 seconds and capture frontmost window/dialog"),
404  false);
405  }
406  S.EndHorizontalLay();
407  }
408  S.EndStatic();
409 
410  S.StartStatic(XO("Capture part of a project window"));
411  {
412  S.StartHorizontalLay();
413  {
414  S.Id(IdCaptureToolbars).AddButton(XXO("All Toolbars"));
415  S.Id(IdCaptureEffects).AddButton(XXO("All Effects"));
416  S.Id(IdCaptureScriptables).AddButton(XXO("All Scriptables"));
417  S.Id(IdCapturePreferences).AddButton(XXO("All Preferences"));
418  }
419  S.EndHorizontalLay();
420 
421  S.StartHorizontalLay();
422  {
423  S.Id(IdCaptureSelectionBar).AddButton(XXO("SelectionBar"));
424  S.Id(IdCaptureSpectralSelection).AddButton(XXO("Spectral Selection"));
425  S.Id(IdCaptureTimer).AddButton(XXO("Timer"));
426  S.Id(IdCaptureTools).AddButton(XXO("Tools"));
427  S.Id(IdCaptureTransport).AddButton(XXO("Transport"));
428  }
429  S.EndHorizontalLay();
430 
431  S.StartHorizontalLay();
432  {
433  S.Id(IdCaptureMixer).AddButton(XXO("Mixer"));
434  S.Id(IdCaptureMeter).AddButton(XXO("Meter"));
435  S.Id(IdCapturePlayMeter).AddButton(XXO("Play Meter"));
436  S.Id(IdCaptureRecordMeter).AddButton(XXO("Record Meter"));
437  }
438  S.EndHorizontalLay();
439 
440  S.StartHorizontalLay();
441  {
442  S.Id(IdCaptureEdit).AddButton(XXO("Edit"));
443  S.Id(IdCaptureDevice).AddButton(XXO("Device"));
444  S.Id(IdCaptureTranscription).AddButton(XXO("Play-at-Speed"));
445  S.Id(IdCaptureScrub).AddButton(XXO("Scrub"));
446  }
447  S.EndHorizontalLay();
448 
449  S.StartHorizontalLay();
450  {
451  S.Id(IdCaptureTrackPanel).AddButton(XXO("Track Panel"));
452  S.Id(IdCaptureRuler).AddButton(XXO("Ruler"));
453  S.Id(IdCaptureTracks).AddButton(XXO("Tracks"));
454  S.Id(IdCaptureFirstTrack).AddButton(XXO("First Track"));
455  S.Id(IdCaptureSecondTrack).AddButton(XXO("Second Track"));
456  }
457  S.EndHorizontalLay();
458  }
459  S.EndStatic();
460 
461  S.StartStatic(XO("Scale"));
462  {
463  S.StartHorizontalLay();
464  {
465  S.Id(IdOneSec).AddButton(XXO("One Sec"));
466  S.Id(IdTenSec).AddButton(XXO("Ten Sec"));
467  S.Id(IdOneMin).AddButton(XXO("One Min"));
468  S.Id(IdFiveMin).AddButton(XXO("Five Min"));
469  S.Id(IdOneHour).AddButton(XXO("One Hour"));
470  }
471  S.EndHorizontalLay();
472 
473  S.StartHorizontalLay();
474  {
475  S.Id(IdShortTracks).AddButton(XXO("Short Tracks"));
476  S.Id(IdMedTracks).AddButton(XXO("Medium Tracks"));
477  S.Id(IdTallTracks).AddButton(XXO("Tall Tracks"));
478  }
479  S.EndHorizontalLay();
480  }
481  S.EndStatic();
483  }
484  S.EndPanel();
485 
486  Layout();
487  GetSizer()->Fit(this);
488  SetMinSize(GetSize());
489 
490  int top = 0;
491 #ifdef __WXMAC__
492  // Allow for Mac menu bar
493  top += 20;
494 #endif
495 
496  int width, height;
497  GetSize(&width, &height);
498  int displayWidth, displayHeight;
499  wxDisplaySize(&displayWidth, &displayHeight);
500 
501  if (width > 100) {
502  Move(displayWidth - width - 16, top + 16);
503  }
504  else {
505  CentreOnParent();
506  }
507 
508  SetIcon( GetProjectFrame( mContext.project ).GetIcon() );
509 }
510 
512 {
513  if (!IsFrozen())
514  {
515  int id = e.GetId();
516 
517  // If split into two parts to make for easier breakpoint
518  // when testing timer.
519  if (mDelayCheckBox &&
520  mDelayCheckBox->GetValue() &&
521  e.IsCommandEvent() &&
522  e.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED)
523  {
524  if( id >= IdAllDelayedEvents && id <= IdLastDelayedEvent &&
525  e.GetEventObject() != NULL) {
526  mTimer = std::make_unique<ScreenFrameTimer>(this, e);
527  mTimer->Start(5000, true);
528  return true;
529  }
530  }
531 
532  if (e.IsCommandEvent() && e.GetEventObject() == NULL) {
533  e.SetEventObject(this);
534  }
535  }
536 
537  return wxFrame::ProcessEvent(e);
538 }
539 
540 void ScreenshotBigDialog::OnCloseWindow(wxCloseEvent & WXUNUSED(event))
541 {
542  if (mDirectoryTextBox->IsModified()) {
543  gPrefs->Write(wxT("/ScreenshotPath"), mDirectoryTextBox->GetValue());
544  gPrefs->Flush();
545  }
546 
547  Destroy();
548 }
549 
550 void ScreenshotBigDialog::OnClose(wxCommandEvent & WXUNUSED(event))
551 {
552  if (mDirectoryTextBox->IsModified()) {
553  gPrefs->Write(wxT("/ScreenshotPath"), mDirectoryTextBox->GetValue());
554  gPrefs->Flush();
555  }
556 
557  Destroy();
558 }
559 
560 void ScreenshotBigDialog::OnGetURL(wxCommandEvent & WXUNUSED(event))
561 {
562  HelpSystem::ShowHelp(this, wxT("Screenshot"));
563 }
564 
565 void ScreenshotBigDialog::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event))
566 {
567 #ifdef __WXMAC__
568  wxTopLevelWindow *top = mCommand->GetFrontWindow(&mProject);
569  bool needupdate = false;
570  bool enable = false;
571 
572  if ((!top || top->IsIconized()) && mDirectoryTextBox->IsEnabled()) {
573  needupdate = true;
574  enable = false;
575  }
576  else if ((top && !top->IsIconized()) && !mDirectoryTextBox->IsEnabled()) {
577  needupdate = true;
578  enable = true;
579  }
580 
581  if (needupdate) {
582  for (int i = IdMainWindowSmall; i < IdLastDelayedEvent; i++) {
583  wxWindow *w = wxWindow::FindWindowById(i, this);
584  if (w) {
585  w->Enable(enable);
586  }
587  }
588  }
589 #endif
590 }
591 
592 void ScreenshotBigDialog::OnDirChoose(wxCommandEvent & WXUNUSED(event))
593 {
594  wxString current = mDirectoryTextBox->GetValue();
595 
596  wxDirDialogWrapper dlog(this,
597  XO("Choose a location to save screenshot images"),
598  current);
599 
600  dlog.ShowModal();
601  if (!dlog.GetPath().empty()) {
602  wxFileName tmpDirPath;
603  tmpDirPath.AssignDir(dlog.GetPath());
604  wxString path = tmpDirPath.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR);
605  mDirectoryTextBox->SetValue(path);
606  gPrefs->Write(wxT("/ScreenshotPath"), path);
607  gPrefs->Flush();
608  mCommand->mPath = path;
609  }
610 }
611 
612 void ScreenshotBigDialog::OnToggleBackgroundBlue(wxCommandEvent & WXUNUSED(event))
613 {
614  mWhite->SetValue(false);
615 }
616 
617 void ScreenshotBigDialog::OnToggleBackgroundWhite(wxCommandEvent & WXUNUSED(event))
618 {
619  mBlue->SetValue(false);
620 }
621 
623 {
624  int top = 20;
625 
626  auto &window = GetProjectFrame( mContext.project );
627  window.Maximize(false);
628  window.SetSize(16, 16 + top, w, h);
629  //Bug383 - Toolbar Resets not wanted.
630  //ToolManager::Get( mContext.project ).Reset();
631 }
632 
633 void ScreenshotBigDialog::OnMainWindowSmall(wxCommandEvent & WXUNUSED(event))
634 {
635  SizeMainWindow(680, 450);
636 }
637 
638 void ScreenshotBigDialog::OnMainWindowLarge(wxCommandEvent & WXUNUSED(event))
639 {
640  SizeMainWindow(900, 600);
641 }
642 
643 void ScreenshotBigDialog::DoCapture(int captureMode)
644 {
645  Hide();
646  wxYieldIfNeeded();
647  //mCommand->SetParameter(wxT("FilePath"), mDirectoryTextBox->GetValue());
648  //mCommand->SetParameter(wxT("CaptureMode"), captureMode);
649  mCommand->mBack = mWhite->GetValue()
651  : mBlue->GetValue()
653  mCommand->mPath = mDirectoryTextBox->GetValue();
654  mCommand->mWhat = captureMode;
655  if (!mCommand->Apply(mContext))
656  mStatus->SetStatusText(_("Capture failed!"), mainStatusBarField);
657 
658  // Bug 2323: (100% hackage alert) Since the command target dialog is not
659  // accessible from outside the command, this seems to be the only way we
660  // can get the window on top of this dialog.
661  auto w = static_cast<wxDialogWrapper *>(wxFindWindowByLabel(XO("Long Message").Translation()));
662  if (w) {
663  auto endmodal = [w](wxCommandEvent &evt)
664  {
665  w->EndModal(0);
666  };
667  w->Bind(wxEVT_BUTTON, endmodal);
668  w->ShowModal();
669  }
670 
671  Show();
672 }
673 
674 void ScreenshotBigDialog::OnCaptureSomething(wxCommandEvent & event)
675 {
676  int i = event.GetId() - IdCaptureFirst;
677 
678  /*
679  IdCaptureEffects= IdCaptureFirst,
680  IdCaptureScriptables,
681  IdCapturePreferences,
682  IdCaptureToolbars,
683 
684  // Put all events that need delay between AllDelayed and LastDelayed.
685  IdAllDelayedEvents,
686  IdCaptureWindowContents=IdAllDelayedEvents,
687  IdCaptureFullWindow,
688  IdCaptureWindowPlus,
689  IdCaptureFullScreen,
690 
691  IdCaptureSelectionBar,
692  IdCaptureSpectralSelection,
693  IdCaptureTools,
694  IdCaptureTransport,
695  IdCaptureMixer,
696  IdCaptureMeter,
697  IdCapturePlayMeter,
698  IdCaptureRecordMeter,
699  IdCaptureEdit,
700  IdCaptureDevice,
701  IdCaptureTranscription,
702  IdCaptureScrub,
703 
704  IdCaptureTrackPanel,
705  IdCaptureRuler,
706  IdCaptureTracks,
707  IdCaptureFirstTrack,
708  IdCaptureSecondTrack,
709  IdCaptureLast = IdCaptureSecondTrack,
710  */
711 
712  static const int codes[] = {
717 
740  };
741 
742  DoCapture(codes[i]);
743 }
744 
745 void ScreenshotBigDialog::TimeZoom(double seconds)
746 {
747  auto &viewInfo = ViewInfo::Get( mContext.project );
748  auto &window = ProjectWindow::Get( mContext.project );
749  int width, height;
750  window.GetClientSize(&width, &height);
751  viewInfo.SetZoom((0.75 * width) / seconds);
752  window.RedrawProject();
753 }
754 
755 void ScreenshotBigDialog::OnOneSec(wxCommandEvent & WXUNUSED(event))
756 {
757  TimeZoom(1.0);
758 }
759 
760 void ScreenshotBigDialog::OnTenSec(wxCommandEvent & WXUNUSED(event))
761 {
762  TimeZoom(10.0);
763 }
764 
765 void ScreenshotBigDialog::OnOneMin(wxCommandEvent & WXUNUSED(event))
766 {
767  TimeZoom(60.0);
768 }
769 
770 void ScreenshotBigDialog::OnFiveMin(wxCommandEvent & WXUNUSED(event))
771 {
772  TimeZoom(300.0);
773 }
774 
775 void ScreenshotBigDialog::OnOneHour(wxCommandEvent & WXUNUSED(event))
776 {
777  TimeZoom(3600.0);
778 }
779 
781 {
782  // h is the height for a channel
783  // Set the height of a mono track twice as high
784 
785  // TODO: more-than-two-channels
786  // If there should be more-than-stereo tracks, this makes
787  // each channel as high as for a stereo channel
788 
789  auto &tracks = TrackList::Get( mContext.project );
790  for (auto t : tracks.Leaders<WaveTrack>()) {
791  auto channels = TrackList::Channels(t);
792  auto nChannels = channels.size();
793  auto height = nChannels == 1 ? 2 * h : h;
794  for (auto channel : channels)
795  TrackView::Get( *channel ).SetHeight(height);
796  }
798 }
799 
800 void ScreenshotBigDialog::OnShortTracks(wxCommandEvent & WXUNUSED(event))
801 {
802  for (auto t : TrackList::Get( mContext.project ).Any<WaveTrack>()) {
803  auto &view = TrackView::Get( *t );
804  view.SetHeight( view.GetMinimizedHeight() );
805  }
806 
808 }
809 
810 void ScreenshotBigDialog::OnMedTracks(wxCommandEvent & WXUNUSED(event))
811 {
812  SizeTracks(60);
813 }
814 
815 void ScreenshotBigDialog::OnTallTracks(wxCommandEvent & WXUNUSED(event))
816 {
817  SizeTracks(85);
818 }
819 
821 {
822  Freeze();
823 
824  SetSizer(nullptr);
825  DestroyChildren();
826 
827  SetTitle(ScreenCaptureFrameTitle.Translation());
828  Populate();
829 
830  Thaw();
831 }
WaveTrack.h
EVT_BUTTON
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:162
ScreenFrameTimer::evt
std::unique_ptr< wxEvent > evt
Definition: Screenshot.cpp:182
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:36
IdDirectory
@ IdDirectory
Definition: Screenshot.cpp:192
ScreenshotBigDialog::OnCaptureSomething
void OnCaptureSomething(wxCommandEvent &event)
Definition: Screenshot.cpp:674
ScreenFrameTimer::ScreenFrameTimer
ScreenFrameTimer(ScreenshotBigDialog *frame, wxEvent &event)
Definition: Screenshot.cpp:158
ScreenshotCommand::ktranscription
@ ktranscription
Definition: ScreenshotCommand.h:64
IdCaptureTimer
@ IdCaptureTimer
Definition: Screenshot.cpp:223
ProjectStatus.h
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:68
ScreenCaptureFrameTitle
#define ScreenCaptureFrameTitle
Definition: Screenshot.cpp:56
ScreenshotBigDialog::DoCapture
void DoCapture(int captureMode)
Definition: Screenshot.cpp:643
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:302
ScreenshotBigDialog::CreateCommand
std::unique_ptr< ScreenshotCommand > CreateCommand()
Definition: Screenshot.cpp:276
ScreenshotBigDialog::UpdatePrefs
void UpdatePrefs() override
Definition: Screenshot.cpp:820
IdCaptureScrub
@ IdCaptureScrub
Definition: Screenshot.cpp:233
ScreenshotCommand::kpreferences
@ kpreferences
Definition: ScreenshotCommand.h:51
ScreenshotBigDialog::OnGetURL
void OnGetURL(wxCommandEvent &event)
Definition: Screenshot.cpp:560
IdAllDelayedEvents
@ IdAllDelayedEvents
Definition: Screenshot.cpp:215
ScreenshotBigDialog::TimeZoom
void TimeZoom(double seconds)
Definition: Screenshot.cpp:745
OpenScreenshotTools
void OpenScreenshotTools(AudacityProject &project)
Definition: Screenshot.cpp:133
ScreenshotBigDialog::Populate
void Populate()
Definition: Screenshot.cpp:334
HelpSystem.h
ScreenshotBigDialog::OnDirChoose
void OnDirChoose(wxCommandEvent &event)
Definition: Screenshot.cpp:592
IdCaptureMixer
@ IdCaptureMixer
Definition: Screenshot.cpp:226
TrackView::Get
static TrackView & Get(Track &)
Definition: TrackView.cpp:63
OldStyleCommandType
Base class for containing data common to all commands of a given type. Also acts as a factory.
Definition: CommandType.h:43
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:67
IdMedTracks
@ IdMedTracks
Definition: Screenshot.cpp:202
ScreenshotBigDialog::OnToggleBackgroundBlue
void OnToggleBackgroundBlue(wxCommandEvent &event)
Definition: Screenshot.cpp:612
mFrame
ScreenshotBigDialogPtr mFrame
Definition: Screenshot.cpp:129
IdToggleBackgroundWhite
@ IdToggleBackgroundWhite
Definition: Screenshot.cpp:245
TrackView.h
IdCaptureWindowContents
@ IdCaptureWindowContents
Definition: Screenshot.cpp:216
ScreenshotBigDialog::OnShortTracks
void OnShortTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:800
Project.h
ScreenshotCommand::kfullwindow
@ kfullwindow
Definition: ScreenshotCommand.h:45
IdCaptureScriptables
@ IdCaptureScriptables
Definition: Screenshot.cpp:210
ScreenshotBigDialog::mCommand
std::unique_ptr< ScreenshotCommand > mCommand
Definition: Screenshot.cpp:118
IdDelayCheckBox
@ IdDelayCheckBox
Definition: Screenshot.cpp:205
ScreenshotCommand::kfirsttrack
@ kfirsttrack
Definition: ScreenshotCommand.h:68
ScreenshotCommand::kselectionbar
@ kselectionbar
Definition: ScreenshotCommand.h:52
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1467
ScreenshotCommand::ktimer
@ ktimer
Definition: ScreenshotCommand.h:54
ScreenshotCommand::kedit
@ kedit
Definition: ScreenshotCommand.h:61
ScreenshotBigDialog::OnMainWindowLarge
void OnMainWindowLarge(wxCommandEvent &event)
Definition: Screenshot.cpp:638
ScreenshotCommand::ktracks
@ ktracks
Definition: ScreenshotCommand.h:67
wxDirDialogWrapper
Definition: wxPanelWrapper.h:126
TrackView::SetHeight
void SetHeight(int height)
Definition: TrackView.cpp:153
ScreenshotBigDialog::mContext
const CommandContext mContext
Definition: Screenshot.cpp:119
XO
#define XO(s)
Definition: Internat.h:32
END_EVENT_TABLE
END_EVENT_TABLE()
IdFiveMin
@ IdFiveMin
Definition: Screenshot.cpp:198
IdLastDelayedEvent
@ IdLastDelayedEvent
Definition: Screenshot.cpp:242
IdCapturePreferences
@ IdCapturePreferences
Definition: Screenshot.cpp:211
ScreenshotBigDialog::OnTenSec
void OnTenSec(wxCommandEvent &event)
Definition: Screenshot.cpp:760
ScreenshotCommand::kscriptables
@ kscriptables
Definition: ScreenshotCommand.h:50
ScreenshotCommand::kmeter
@ kmeter
Definition: ScreenshotCommand.h:58
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
ScreenshotCommand::ktoolbars
@ ktoolbars
Definition: ScreenshotCommand.h:48
ProjectWindow::Get
static ProjectWindow & Get(AudacityProject &project)
Definition: ProjectWindow.cpp:531
eCloseButton
@ eCloseButton
Definition: ShuttleGui.h:617
ScreenFrameTimer
Definition: Screenshot.cpp:156
ScreenshotCommand::ksecondtrack
@ ksecondtrack
Definition: ScreenshotCommand.h:72
ScreenshotBigDialog::mProject
AudacityProject & mProject
Definition: Screenshot.cpp:106
ShuttleGuiBase::StartPanel
wxPanel * StartPanel(int iStyle=0)
Definition: ShuttleGui.cpp:983
IdTenSec
@ IdTenSec
Definition: Screenshot.cpp:196
ShuttleGuiBase::EndPanel
void EndPanel()
Definition: ShuttleGui.cpp:1011
IdCaptureMeter
@ IdCaptureMeter
Definition: Screenshot.cpp:227
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2248
IdCaptureWindowPlus
@ IdCaptureWindowPlus
Definition: Screenshot.cpp:218
PrefsListener
Definition: Prefs.h:216
IdCaptureFirst
@ IdCaptureFirst
Definition: Screenshot.cpp:207
IdTallTracks
@ IdTallTracks
Definition: Screenshot.cpp:203
IdCaptureTranscription
@ IdCaptureTranscription
Definition: Screenshot.cpp:232
CommandContext.h
IdShortTracks
@ IdShortTracks
Definition: Screenshot.cpp:201
IdToggleBackgroundBlue
@ IdToggleBackgroundBlue
Definition: Screenshot.cpp:244
ScreenshotBigDialog::mDelayCheckBox
wxCheckBox * mDelayCheckBox
Definition: Screenshot.cpp:110
IdCapturePlayMeter
@ IdCapturePlayMeter
Definition: Screenshot.cpp:228
XXO
#define XXO(s)
Definition: Internat.h:45
mainStatusBarField
@ mainStatusBarField
Definition: ProjectStatus.h:26
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1170
ScreenshotCommand::kBlue
@ kBlue
Definition: ScreenshotCommand.h:36
ScreenshotBigDialog::OnFiveMin
void OnFiveMin(wxCommandEvent &event)
Definition: Screenshot.cpp:770
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:22
IdCaptureDevice
@ IdCaptureDevice
Definition: Screenshot.cpp:231
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1160
ScreenshotBigDialog::SizeMainWindow
void SizeMainWindow(int w, int h)
Definition: Screenshot.cpp:622
ScreenshotCommand::kplaymeter
@ kplaymeter
Definition: ScreenshotCommand.h:59
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:631
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
IdCaptureSpectralSelection
@ IdCaptureSpectralSelection
Definition: Screenshot.cpp:222
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
ScreenshotCommand::kruler
@ kruler
Definition: ScreenshotCommand.h:66
ScreenshotBigDialog::OnClose
void OnClose(wxCommandEvent &event)
Definition: Screenshot.cpp:550
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:611
ScreenshotCommand.h
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:503
ScreenshotBigDialog::OnUIUpdate
void OnUIUpdate(wxUpdateUIEvent &event)
Definition: Screenshot.cpp:565
IdCaptureFullScreen
@ IdCaptureFullScreen
Definition: Screenshot.cpp:219
IdMainWindowLarge
@ IdMainWindowLarge
Definition: Screenshot.cpp:190
CommandTargets.h
IdCaptureTracks
@ IdCaptureTracks
Definition: Screenshot.cpp:237
ScreenshotBigDialog::OnTallTracks
void OnTallTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:815
ScreenFrameTimer::Notify
void Notify() override
Definition: Screenshot.cpp:173
ScreenshotBigDialog::mTimer
std::unique_ptr< ScreenFrameTimer > mTimer
Definition: Screenshot.cpp:116
ShuttleGui.h
IdDirChoose
@ IdDirChoose
Definition: Screenshot.cpp:193
ViewInfo.h
IdCaptureRecordMeter
@ IdCaptureRecordMeter
Definition: Screenshot.cpp:229
IdCaptureRuler
@ IdCaptureRuler
Definition: Screenshot.cpp:236
ScreenshotBigDialog::mStatus
wxStatusBar * mStatus
Definition: Screenshot.cpp:114
ScreenFrameTimer::screenFrame
ScreenshotBigDialog * screenFrame
Definition: Screenshot.cpp:181
ScreenshotBigDialog::SizeTracks
void SizeTracks(int h)
Definition: Screenshot.cpp:780
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:353
IdCaptureLast
@ IdCaptureLast
Definition: Screenshot.cpp:240
ScreenshotCommand::ktrackpanel
@ ktrackpanel
Definition: ScreenshotCommand.h:65
GUISettings.h
ScreenshotCommand::ktransport
@ ktransport
Definition: ScreenshotCommand.h:56
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:886
id
int id
Definition: WaveTrackControls.cpp:589
ScreenshotBigDialog::mBlue
wxToggleButton * mBlue
Definition: Screenshot.cpp:112
IdCaptureTrackPanel
@ IdCaptureTrackPanel
Definition: Screenshot.cpp:235
wxDialogWrapper
Definition: wxPanelWrapper.h:81
IdCaptureTools
@ IdCaptureTools
Definition: Screenshot.cpp:224
ScreenshotBigDialog::ProcessEvent
bool ProcessEvent(wxEvent &event) override
Definition: Screenshot.cpp:511
IdCaptureFullWindow
@ IdCaptureFullWindow
Definition: Screenshot.cpp:217
ScreenFrameTimer::~ScreenFrameTimer
virtual ~ScreenFrameTimer()
Definition: Screenshot.cpp:165
ScreenshotBigDialog::OnOneHour
void OnOneHour(wxCommandEvent &event)
Definition: Screenshot.cpp:775
ShuttleGuiBase::AddWindow
wxWindow * AddWindow(wxWindow *pWindow)
Definition: ShuttleGui.cpp:292
IdCaptureSelectionBar
@ IdCaptureSelectionBar
Definition: Screenshot.cpp:221
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:151
ScreenshotBigDialog::mDirectoryTextBox
wxTextCtrl * mDirectoryTextBox
Definition: Screenshot.cpp:111
HelpSystem::ShowHelp
static void ShowHelp(wxWindow *parent, const wxString &localFileName, const wxString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:238
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:495
ScreenshotCommand::kwindowplus
@ kwindowplus
Definition: ScreenshotCommand.h:46
IdCaptureFirstTrack
@ IdCaptureFirstTrack
Definition: Screenshot.cpp:238
ScreenshotBigDialog::OnMedTracks
void OnMedTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:810
IdCaptureToolbars
@ IdCaptureToolbars
Definition: Screenshot.cpp:212
_
#define _(s)
Definition: Internat.h:76
IdOneSec
@ IdOneSec
Definition: Screenshot.cpp:195
ScreenshotCommand::kfullscreen
@ kfullscreen
Definition: ScreenshotCommand.h:47
ScreenshotCommand::krecordmeter
@ krecordmeter
Definition: ScreenshotCommand.h:60
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
ScreenshotBigDialog::ScreenshotBigDialog
ScreenshotBigDialog(wxWindow *parent, wxWindowID id, AudacityProject &project)
Definition: Screenshot.cpp:286
ScreenshotCommand::ktools
@ ktools
Definition: ScreenshotCommand.h:55
ScreenshotCommand::kmixer
@ kmixer
Definition: ScreenshotCommand.h:57
ScreenshotBigDialog::OnOneSec
void OnOneSec(wxCommandEvent &event)
Definition: Screenshot.cpp:755
IdCaptureTransport
@ IdCaptureTransport
Definition: Screenshot.cpp:225
ScreenshotCommand::kdevice
@ kdevice
Definition: ScreenshotCommand.h:62
ScreenshotCommand::kwindow
@ kwindow
Definition: ScreenshotCommand.h:44
CloseScreenshotTools
void CloseScreenshotTools()
Definition: Screenshot.cpp:148
ScreenshotBigDialog::OnToggleBackgroundWhite
void OnToggleBackgroundWhite(wxCommandEvent &event)
Definition: Screenshot.cpp:617
RTL_WORKAROUND
#define RTL_WORKAROUND(pWnd)
Definition: GUISettings.h:21
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2406
IdCaptureSecondTrack
@ IdCaptureSecondTrack
Definition: Screenshot.cpp:239
ScreenshotBigDialog::~ScreenshotBigDialog
virtual ~ScreenshotBigDialog()
Definition: Screenshot.cpp:325
ScreenshotBigDialog::OnOneMin
void OnOneMin(wxCommandEvent &event)
Definition: Screenshot.cpp:765
Prefs.h
ProjectWindow.h
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:497
ScreenshotBigDialog::OnCloseWindow
void OnCloseWindow(wxCloseEvent &event)
Definition: Screenshot.cpp:540
ProjectWindow::RedrawProject
void RedrawProject(const bool bForceWaveTracks=false)
Definition: ProjectWindow.cpp:706
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1354
ScreenshotBigDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: Screenshot.cpp:340
IdCaptureEdit
@ IdCaptureEdit
Definition: Screenshot.cpp:230
IdCaptureEffects
@ IdCaptureEffects
Definition: Screenshot.cpp:209
ScreenshotCommand::keffects
@ keffects
Definition: ScreenshotCommand.h:49
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:915
ScreenshotBigDialog::OnMainWindowSmall
void OnMainWindowSmall(wxCommandEvent &event)
Definition: Screenshot.cpp:633
safenew
#define safenew
Definition: MemoryX.h:8
ScreenshotBigDialog::mWhite
wxToggleButton * mWhite
Definition: Screenshot.cpp:113
ShuttleGuiBase::SetStretchyCol
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:195
CommandContext::project
AudacityProject & project
Definition: CommandContext.h:52
IdOneHour
@ IdOneHour
Definition: Screenshot.cpp:199
IdMainWindowSmall
@ IdMainWindowSmall
Definition: Screenshot.cpp:189
ScreenshotCommand::kWhite
@ kWhite
Definition: ScreenshotCommand.h:37
Screenshot.h
ScreenshotCommand::kscrub
@ kscrub
Definition: ScreenshotCommand.h:63
ScreenshotCommand
Implements a command for capturing various areas of the screen or project window. It's one big if-els...
Definition: ScreenshotCommand.h:32
EVT_COMMAND_RANGE
EVT_COMMAND_RANGE(ID_Slider, ID_Slider+NUMBER_OF_BANDS - 1, wxEVT_COMMAND_SLIDER_UPDATED, EffectEqualization::OnSlider) EffectEqualization
Definition: Equalization.cpp:217
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638
ScreenshotBigDialog
ScreenshotBigDialog provides an alternative Gui for ScreenshotCommand. It adds a timer that allows a ...
Definition: Screenshot.cpp:61
IdOneMin
@ IdOneMin
Definition: Screenshot.cpp:197
ScreenshotCommand::kNone
@ kNone
Definition: ScreenshotCommand.h:38
ScreenshotCommand::kspectralselection
@ kspectralselection
Definition: ScreenshotCommand.h:53