Audacity  2.2.2
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 *******************************************************************/
10 
11 #include "Screenshot.h"
12 #include "MemoryX.h"
16 #include <wx/defs.h>
17 #include <wx/event.h>
18 #include <wx/frame.h>
19 
20 #include "ShuttleGui.h"
21 #include <wx/button.h>
22 #include <wx/checkbox.h>
23 #include <wx/dirdlg.h>
24 #include <wx/image.h>
25 #include <wx/intl.h>
26 #include <wx/panel.h>
27 #include <wx/statusbr.h>
28 #include <wx/textctrl.h>
29 #include <wx/timer.h>
30 #include <wx/tglbtn.h>
31 #include <wx/window.h>
32 
33 #include "AudacityApp.h"
34 #include "Project.h"
35 #include "Prefs.h"
36 #include "toolbars/ToolManager.h"
37 
38 #include "Track.h"
39 
40 class CommandType;
41 
43 
44 class ScreenFrame final : public wxFrame
45 {
46  public:
47  // constructors and destructors
48  ScreenFrame(wxWindow *parent, wxWindowID id);
49  virtual ~ScreenFrame();
50 
51  bool ProcessEvent(wxEvent & event) override;
52 
53  private:
54  void Populate();
56 
57  void OnCloseWindow(wxCloseEvent & event);
58  void OnUIUpdate(wxUpdateUIEvent & event);
59  void OnDirChoose(wxCommandEvent & event);
60 
61  void SizeMainWindow(int w, int h);
62  void OnMainWindowSmall(wxCommandEvent & event);
63  void OnMainWindowLarge(wxCommandEvent & event);
64  void OnToggleBackgroundBlue(wxCommandEvent & event);
65  void OnToggleBackgroundWhite(wxCommandEvent & event);
66 
67  void DoCapture(wxString captureMode);
68  void OnCaptureSomething(wxCommandEvent & event);
69 
70  void TimeZoom(double seconds);
71  void OnOneSec(wxCommandEvent & event);
72  void OnTenSec(wxCommandEvent & event);
73  void OnOneMin(wxCommandEvent & event);
74  void OnFiveMin(wxCommandEvent & event);
75  void OnOneHour(wxCommandEvent & event);
76 
77  void SizeTracks(int h);
78  void OnShortTracks(wxCommandEvent & event);
79  void OnMedTracks(wxCommandEvent & event);
80  void OnTallTracks(wxCommandEvent & event);
81 
82  std::unique_ptr<ScreenshotCommand> CreateCommand();
83 
84  wxCheckBox *mDelayCheckBox;
85  wxTextCtrl *mDirectoryTextBox;
86  wxToggleButton *mBlue;
87  wxToggleButton *mWhite;
88  wxStatusBar *mStatus;
89 
90  std::unique_ptr<ScreenshotCommand> mCommand;
92 
93  DECLARE_EVENT_TABLE()
94 };
95 
96 // Static pointer to the unique ScreenFrame window.
97 // Formerly it was parentless, therefore this was a Destroy_ptr<ScreenFrame>
98 // But now the window is owned, so just use a bare pointer, and null it when
99 // the unique window is destroyed.
102 
104 
106 {
107  if (!mFrame) {
108  auto parent = wxGetApp().GetTopWindow();
109  if (!parent) {
110  wxASSERT(false);
111  return;
112  }
113  mFrame = ScreenFramePtr{ safenew ScreenFrame(parent, -1) };
114  }
115  mFrame->Show();
116  mFrame->Raise();
117 }
118 
120 {
121  mFrame = nullptr;
122 }
123 
125 
126 class ScreenFrameTimer final : public wxTimer
127 {
128  public:
130  wxEvent & event)
131  {
132  screenFrame = frame;
133  evt.reset(event.Clone());
134  }
135 
136  void Notify() override
137  {
138  // Process timer notification just once, then destroy self
139  evt->SetEventObject(NULL);
141  delete this;
142  }
143 
144  private:
146  std::unique_ptr<wxEvent> evt;
147 };
148 
150 
151 enum
152 {
155 
158 
164 
168 
170 
172  // No point delaying the capture of sets of things.
176 
177  // Put all events that need delay between AllDelayed and LastDelayed.
184 
197 
204 
206 
209 
210 };
211 
212 BEGIN_EVENT_TABLE(ScreenFrame, wxFrame)
213  EVT_CLOSE(ScreenFrame::OnCloseWindow)
214 
215  EVT_UPDATE_UI(IdCaptureFullScreen, ScreenFrame::OnUIUpdate)
216 
217  EVT_BUTTON(IdMainWindowSmall, ScreenFrame::OnMainWindowSmall)
218  EVT_BUTTON(IdMainWindowLarge, ScreenFrame::OnMainWindowLarge)
219  EVT_TOGGLEBUTTON(IdToggleBackgroundBlue, ScreenFrame::OnToggleBackgroundBlue)
220  EVT_TOGGLEBUTTON(IdToggleBackgroundWhite, ScreenFrame::OnToggleBackgroundWhite)
221  EVT_COMMAND_RANGE(IdCaptureFirst, IdCaptureLast, wxEVT_COMMAND_BUTTON_CLICKED, ScreenFrame::OnCaptureSomething)
222 
223  EVT_BUTTON(IdOneSec, ScreenFrame::OnOneSec)
224  EVT_BUTTON(IdTenSec, ScreenFrame::OnTenSec)
225  EVT_BUTTON(IdOneMin, ScreenFrame::OnOneMin)
226  EVT_BUTTON(IdFiveMin, ScreenFrame::OnFiveMin)
227  EVT_BUTTON(IdOneHour, ScreenFrame::OnOneHour)
228 
229  EVT_BUTTON(IdShortTracks, ScreenFrame::OnShortTracks)
230  EVT_BUTTON(IdMedTracks, ScreenFrame::OnMedTracks)
231  EVT_BUTTON(IdTallTracks, ScreenFrame::OnTallTracks)
232 
233  EVT_BUTTON(IdDirChoose, ScreenFrame::OnDirChoose)
235 
236 // Must not be called before CreateStatusBar!
237 std::unique_ptr<ScreenshotCommand> ScreenFrame::CreateCommand()
238 {
239  wxASSERT(mStatus != NULL);
240  auto output =
241  std::make_unique<CommandOutputTarget>(std::make_unique<NullProgressTarget>(),
242  std::make_shared<StatusBarTarget>(*mStatus),
243  std::make_shared<MessageBoxTarget>());
244  CommandType *type = CommandDirectory::Get()->LookUp(wxT("Screenshot"));
245  wxASSERT_MSG(type != NULL, wxT("Screenshot command doesn't exist!"));
246  return std::make_unique<ScreenshotCommand>(*type, std::move(output), this);
247 }
248 
249 ScreenFrame::ScreenFrame(wxWindow * parent, wxWindowID id)
250 : wxFrame(parent, id, _("Screen Capture Frame"),
251  wxDefaultPosition, wxDefaultSize,
252 
253 #if !defined(__WXMSW__)
254 
255  #if !defined(__WXMAC__) // bug1358
256  wxFRAME_TOOL_WINDOW |
257  #endif
258 
259 #else
260 
261  wxSTAY_ON_TOP|
262 
263 #endif
264 
265  wxSYSTEM_MENU|wxCAPTION|wxCLOSE_BOX),
266  mContext(&wxGetApp(), GetActiveProject())
267 {
268  mDelayCheckBox = NULL;
269  mDirectoryTextBox = NULL;
270 
271  mStatus = CreateStatusBar();
273 
274  Populate();
275 
276  // Reset the toolbars to a known state.
277  // Note that the audio could be playing.
278  // The monitoring will switch off temporarily
279  // because we've switched monitor mid play.
280  // Bug 383 - Resetting the toolbars is not wanted.
281  // Any that are invisible will be amde visible as/when needed.
282  //mContext.GetProject()->GetToolManager()->Reset();
283  Center();
284 }
285 
287 {
288  if (this == mFrame)
289  mFrame = nullptr;
290  else
291  // There should only be one!
292  wxASSERT(false);
293 }
294 
296 {
297  ShuttleGui S(this, eIsCreating);
299 }
300 
302 {
303  wxPanel *p = S.StartPanel();
304  {
305  S.SetBorder(3);
306 
307  S.StartStatic(_("Choose location to save files"));
308  {
309  S.StartMultiColumn(3, wxEXPAND);
310  {
311  S.SetStretchyCol(1);
312 
313  wxString dir =
314  gPrefs->Read(wxT("/ScreenshotPath"),
315  wxFileName::GetHomeDir());
317  S.Id(IdDirectory).AddTextBox(_("Save images to:"),
318  dir, 30);
319  S.Id(IdDirChoose).AddButton(_("Choose..."));
320  }
321  S.EndMultiColumn();
322  }
323  S.EndStatic();
324 
325  S.StartStatic(_("Capture entire window or screen"));
326  {
327  S.StartHorizontalLay();
328  {
329  S.Id(IdMainWindowSmall).AddButton(_("Resize Small"));
330  S.Id(IdMainWindowLarge).AddButton(_("Resize Large"));
331  /* i18n-hint: Bkgnd is short for background and appears on a small button
332  * It is OK to just translate this item as if it said 'Blue' */
333  wxASSERT(p); // To justify safenew
334  mBlue = safenew wxToggleButton(p,
336  _("Blue Bkgnd"));
337  S.AddWindow(mBlue);
338  /* i18n-hint: Bkgnd is short for background and appears on a small button
339  * It is OK to just translate this item as if it said 'White' */
340  mWhite = safenew wxToggleButton(p,
342  _("White Bkgnd"));
343  S.AddWindow(mWhite);
344  }
345  S.EndHorizontalLay();
346 
347  S.StartHorizontalLay();
348  {
349  S.Id(IdCaptureWindowContents).AddButton(_("Capture Window Only"));
350  S.Id(IdCaptureFullWindow).AddButton(_("Capture Full Window"));
351  S.Id(IdCaptureWindowPlus).AddButton(_("Capture Window Plus"));
352  }
353  S.EndHorizontalLay();
354 
355  S.StartHorizontalLay();
356  {
357  S.Id(IdCaptureFullScreen).AddButton(_("Capture Full Screen"));
358  }
359  S.EndHorizontalLay();
360 
361  S.StartHorizontalLay();
362  {
364  (_("Wait 5 seconds and capture frontmost window/dialog"),
365  _("false"));
366  }
367  S.EndHorizontalLay();
368  }
369  S.EndStatic();
370 
371  S.StartStatic(_("Capture part of a project window"));
372  {
373  S.StartHorizontalLay();
374  {
375  S.Id(IdCaptureToolbars).AddButton(_("All Toolbars"));
376 #ifdef EXPERIMENTAL_DOCS_AUTOMATION
377  S.Id(IdCaptureMenus).AddButton(_("All Menus"));
378  S.Id(IdCaptureEffects).AddButton(_("All Effects"));
379  S.Id(IdCapturePreferences).AddButton(_("All Preferences"));
380 #endif
381  }
382  S.EndHorizontalLay();
383 
384  S.StartHorizontalLay();
385  {
386  S.Id(IdCaptureSelectionBar).AddButton(_("SelectionBar"));
387  S.Id(IdCaptureSpectralSelection).AddButton(_("Spectral Selection"));
388  S.Id(IdCaptureTools).AddButton(_("Tools"));
389  S.Id(IdCaptureTransport).AddButton(_("Transport"));
390  }
391  S.EndHorizontalLay();
392 
393  S.StartHorizontalLay();
394  {
395  S.Id(IdCaptureMixer).AddButton(_("Mixer"));
396  S.Id(IdCaptureMeter).AddButton(_("Meter"));
397  S.Id(IdCapturePlayMeter).AddButton(_("Play Meter"));
398  S.Id(IdCaptureRecordMeter).AddButton(_("Record Meter"));
399  }
400  S.EndHorizontalLay();
401 
402  S.StartHorizontalLay();
403  {
404  S.Id(IdCaptureEdit).AddButton(_("Edit"));
405  S.Id(IdCaptureDevice).AddButton(_("Device"));
406  S.Id(IdCaptureTranscription).AddButton(_("Transcription"));
407  S.Id(IdCaptureScrub).AddButton(_("Scrub"));
408  }
409  S.EndHorizontalLay();
410 
411  S.StartHorizontalLay();
412  {
413  S.Id(IdCaptureTrackPanel).AddButton(_("Track Panel"));
414  S.Id(IdCaptureRuler).AddButton(_("Ruler"));
415  S.Id(IdCaptureTracks).AddButton(_("Tracks"));
416  S.Id(IdCaptureFirstTrack).AddButton(_("First Track"));
417  S.Id(IdCaptureSecondTrack).AddButton(_("Second Track"));
418  }
419  S.EndHorizontalLay();
420  }
421  S.EndStatic();
422 
423  S.StartStatic(_("Scale"));
424  {
425  S.StartHorizontalLay();
426  {
427  S.Id(IdOneSec).AddButton(_("One Sec"));
428  S.Id(IdTenSec).AddButton(_("Ten Sec"));
429  S.Id(IdOneMin).AddButton(_("One Min"));
430  S.Id(IdFiveMin).AddButton(_("Five Min"));
431  S.Id(IdOneHour).AddButton(_("One Hour"));
432  }
433  S.EndHorizontalLay();
434 
435  S.StartHorizontalLay();
436  {
437  S.Id(IdShortTracks).AddButton(_("Short Tracks"));
438  S.Id(IdMedTracks).AddButton(_("Medium Tracks"));
439  S.Id(IdTallTracks).AddButton(_("Tall Tracks"));
440  }
441  S.EndHorizontalLay();
442  }
443  S.EndStatic();
444  }
445  S.EndPanel();
446 
447  Layout();
448  GetSizer()->Fit(this);
449  SetMinSize(GetSize());
450 
451  int top = 0;
452 #ifdef __WXMAC__
453  // Allow for Mac menu bar
454  top += 20;
455 #endif
456 
457  int width, height;
458  GetSize(&width, &height);
459  int displayWidth, displayHeight;
460  wxDisplaySize(&displayWidth, &displayHeight);
461 
462  if (width > 100) {
463  Move(displayWidth - width - 16, top + 16);
464  }
465  else {
466  CentreOnParent();
467  }
468 
469  SetIcon(mContext.GetProject()->GetIcon());
470 }
471 
472 bool ScreenFrame::ProcessEvent(wxEvent & e)
473 {
474  int id = e.GetId();
475 
476  // If split into two parts to make for easier breakpoint
477  // when testing timer.
478  if (mDelayCheckBox &&
479  mDelayCheckBox->GetValue() &&
480  e.IsCommandEvent() &&
481  e.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED)
482  {
483  if( id >= IdAllDelayedEvents && id <= IdLastDelayedEvent &&
484  e.GetEventObject() != NULL) {
485  // safenew because it's a one-shot that deletes itself
486  ScreenFrameTimer *timer = safenew ScreenFrameTimer(this, e);
487  timer->Start(5000, true);
488  return true;
489  }
490  }
491 
492  if (e.IsCommandEvent() && e.GetEventObject() == NULL) {
493  e.SetEventObject(this);
494  }
495  return wxFrame::ProcessEvent(e);
496 }
497 
498 void ScreenFrame::OnCloseWindow(wxCloseEvent & WXUNUSED(event))
499 {
500  Destroy();
501 }
502 
503 void ScreenFrame::OnUIUpdate(wxUpdateUIEvent & WXUNUSED(event))
504 {
505 #ifdef __WXMAC__
506  wxTopLevelWindow *top = mCommand->GetFrontWindow(GetActiveProject());
507  bool needupdate = false;
508  bool enable = false;
509 
510  if ((!top || top->IsIconized()) && mDirectoryTextBox->IsEnabled()) {
511  needupdate = true;
512  enable = false;
513  }
514  else if ((top && !top->IsIconized()) && !mDirectoryTextBox->IsEnabled()) {
515  needupdate = true;
516  enable = true;
517  }
518 
519  if (needupdate) {
520  for (int i = IdMainWindowSmall; i < IdLastDelayedEvent; i++) {
521  wxWindow *w = wxWindow::FindWindowById(i, this);
522  if (w) {
523  w->Enable(enable);
524  }
525  }
526  }
527 #endif
528 }
529 
530 void ScreenFrame::OnDirChoose(wxCommandEvent & WXUNUSED(event))
531 {
532  wxString current = mDirectoryTextBox->GetValue();
533 
534  wxDirDialogWrapper dlog(this,
535  _("Choose a location to save screenshot images"),
536  current);
537 
538  dlog.ShowModal();
539  if (dlog.GetPath() != wxT("")) {
540  wxFileName tmpDirPath;
541  tmpDirPath.AssignDir(dlog.GetPath());
542  wxString path = tmpDirPath.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR);
543  mDirectoryTextBox->SetValue(path);
544  gPrefs->Write(wxT("/ScreenshotPath"), path);
545  gPrefs->Flush();
546  }
547 }
548 
549 void ScreenFrame::OnToggleBackgroundBlue(wxCommandEvent & WXUNUSED(event))
550 {
551  mWhite->SetValue(false);
552  mCommand->SetParameter(wxT("Background"),
553  mBlue->GetValue() ? wxT("Blue") : wxT("None"));
554 }
555 
556 void ScreenFrame::OnToggleBackgroundWhite(wxCommandEvent & WXUNUSED(event))
557 {
558  mBlue->SetValue(false);
559  mCommand->SetParameter(wxT("Background"),
560  mWhite->GetValue() ? wxT("White") : wxT("None"));
561 }
562 
563 void ScreenFrame::SizeMainWindow(int w, int h)
564 {
565  int top = 20;
566 
567  mContext.GetProject()->Maximize(false);
568  mContext.GetProject()->SetSize(16, 16 + top, w, h);
569  //Bug383 - Toolbar Resets not wanted.
570  //mContext.GetProject()->GetToolManager()->Reset();
571 }
572 
573 void ScreenFrame::OnMainWindowSmall(wxCommandEvent & WXUNUSED(event))
574 {
575  SizeMainWindow(680, 450);
576 }
577 
578 void ScreenFrame::OnMainWindowLarge(wxCommandEvent & WXUNUSED(event))
579 {
580  SizeMainWindow(900, 600);
581 }
582 
583 void ScreenFrame::DoCapture(wxString captureMode)
584 {
585  Hide();
586  mCommand->SetParameter(wxT("FilePath"), mDirectoryTextBox->GetValue());
587 
588  mCommand->SetParameter(wxT("CaptureMode"), captureMode);
589  if (!mCommand->Apply(mContext))
590  mStatus->SetStatusText(_("Capture failed!"), mainStatusBarField);
591  Show();
592 }
593 
594 void ScreenFrame::OnCaptureSomething(wxCommandEvent & event)
595 {
596  int i = event.GetId() - IdCaptureFirst;
597 
598  wxArrayString Names;
599 
600  Names.Add(wxT("menus"));
601  Names.Add(wxT("effects"));
602  Names.Add(wxT("preferences"));
603 
604  Names.Add(wxT("toolbars"));
605  Names.Add(wxT("window"));
606  Names.Add(wxT("fullwindow"));
607  Names.Add(wxT("windowplus"));
608  Names.Add(wxT("fullscreen"));
609  Names.Add(wxT("selectionbar"));
610  Names.Add(wxT("spectralselection"));
611  Names.Add(wxT("tools"));
612  Names.Add(wxT("transport"));
613  Names.Add(wxT("mixer"));
614  Names.Add(wxT("meter"));
615  Names.Add(wxT("playmeter"));
616  Names.Add(wxT("recordmeter"));
617  Names.Add(wxT("edit"));
618  Names.Add(wxT("device"));
619  Names.Add(wxT("transcription"));
620  Names.Add(wxT("scrub"));
621  Names.Add(wxT("trackpanel"));
622  Names.Add(wxT("ruler"));
623  Names.Add(wxT("tracks"));
624  Names.Add(wxT("firsttrack"));
625  Names.Add(wxT("secondtrack"));
626 
627  DoCapture(Names[i]);
628 }
629 
630 void ScreenFrame::TimeZoom(double seconds)
631 {
632  int width, height;
633  mContext.GetProject()->GetClientSize(&width, &height);
634  mContext.GetProject()->mViewInfo.SetZoom((0.75 * width) / seconds);
636 }
637 
638 void ScreenFrame::OnOneSec(wxCommandEvent & WXUNUSED(event))
639 {
640  TimeZoom(1.0);
641 }
642 
643 void ScreenFrame::OnTenSec(wxCommandEvent & WXUNUSED(event))
644 {
645  TimeZoom(10.0);
646 }
647 
648 void ScreenFrame::OnOneMin(wxCommandEvent & WXUNUSED(event))
649 {
650  TimeZoom(60.0);
651 }
652 
653 void ScreenFrame::OnFiveMin(wxCommandEvent & WXUNUSED(event))
654 {
655  TimeZoom(300.0);
656 }
657 
658 void ScreenFrame::OnOneHour(wxCommandEvent & WXUNUSED(event))
659 {
660  TimeZoom(3600.0);
661 }
662 
664 {
666  for (Track * t = iter.First(); t; t = iter.Next()) {
667  if (t->GetKind() == Track::Wave) {
668  if (t->GetLink()) {
669  t->SetHeight(h);
670  }
671  else {
672  t->SetHeight(h*2);
673  }
674  }
675  }
677 }
678 
679 void ScreenFrame::OnShortTracks(wxCommandEvent & WXUNUSED(event))
680 {
682  for (Track * t = iter.First(); t; t = iter.Next()) {
683  if (t->GetKind() == Track::Wave) {
684  t->SetHeight(t->GetMinimizedHeight());
685  }
686  }
688 }
689 
690 void ScreenFrame::OnMedTracks(wxCommandEvent & WXUNUSED(event))
691 {
692  SizeTracks(60);
693 }
694 
695 void ScreenFrame::OnTallTracks(wxCommandEvent & WXUNUSED(event))
696 {
697  SizeTracks(85);
698 }
bool ProcessEvent(wxEvent &event) override
Definition: Screenshot.cpp:472
void SetZoom(double pixelsPerSecond)
Definition: ViewInfo.cpp:94
EVT_COMMAND_RANGE(ID_Slider, ID_Slider+NUMBER_OF_BANDS-1, wxEVT_COMMAND_SLIDER_UPDATED, EffectEqualization::OnSlider) EffectEqualization
void DoCapture(wxString captureMode)
Definition: Screenshot.cpp:583
void RedrawProject(const bool bForceWaveTracks=false)
Definition: Project.cpp:1356
ScreenFrame(wxWindow *parent, wxWindowID id)
Definition: Screenshot.cpp:249
void OnShortTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:679
static CommandDirectory * Get()
Get a pointer to the singleton instance.
CommandExecutionContext mContext
Definition: Screenshot.cpp:91
void OnDirChoose(wxCommandEvent &event)
Definition: Screenshot.cpp:530
END_EVENT_TABLE()
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:366
void OnMedTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:690
void OnToggleBackgroundWhite(wxCommandEvent &event)
Definition: Screenshot.cpp:556
wxWindow * AddWindow(wxWindow *pWindow, int Flags=wxALIGN_CENTRE|wxALL)
Definition: ShuttleGui.cpp:257
void OnCaptureSomething(wxCommandEvent &event)
Definition: Screenshot.cpp:594
void EndMultiColumn()
void PopulateOrExchange(ShuttleGui &S)
Definition: Screenshot.cpp:301
void OnMainWindowLarge(wxCommandEvent &event)
Definition: Screenshot.cpp:578
wxPanel * StartPanel(int iStyle=0)
Definition: ShuttleGui.cpp:789
Contains declarations for CommandDirectory class.
std::unique_ptr< ScreenshotCommand > CreateCommand()
Definition: Screenshot.cpp:237
#define safenew
Definition: Audacity.h:223
wxToggleButton * mWhite
Definition: Screenshot.cpp:87
void OnTenSec(wxCommandEvent &event)
Definition: Screenshot.cpp:643
void EndHorizontalLay()
Definition: ShuttleGui.cpp:975
void SizeMainWindow(int w, int h)
Definition: Screenshot.cpp:563
CommandType * LookUp(const wxString &cmdName) const
void OnTallTracks(wxCommandEvent &event)
Definition: Screenshot.cpp:695
wxStatusBar * mStatus
Definition: Screenshot.cpp:88
wxFileConfig * gPrefs
Definition: Prefs.cpp:72
wxTextCtrl * mDirectoryTextBox
Definition: Screenshot.cpp:85
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:493
Base class for containing data common to all commands of a given type. Also acts as a factory...
Definition: CommandType.h:29
wxCheckBox * AddCheckBox(const wxString &Prompt, const wxString &Selected)
Definition: ShuttleGui.cpp:267
std::unique_ptr< ScreenshotCommand > mCommand
Definition: Screenshot.cpp:90
void OnToggleBackgroundBlue(wxCommandEvent &event)
Definition: Screenshot.cpp:549
void OnUIUpdate(wxUpdateUIEvent &event)
Definition: Screenshot.cpp:503
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:966
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:998
void OpenScreenshotTools()
Definition: Screenshot.cpp:105
wxToggleButton * mBlue
Definition: Screenshot.cpp:86
ShuttleGui & Id(int id)
void Notify() override
Definition: Screenshot.cpp:136
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:67
void TimeZoom(double seconds)
Definition: Screenshot.cpp:630
void SizeTracks(int h)
Definition: Screenshot.cpp:663
ViewInfo mViewInfo
Definition: Project.h:545
if(pTrack &&pTrack->GetDisplay()!=WaveTrack::Spectrum)
void OnOneMin(wxCommandEvent &event)
Definition: Screenshot.cpp:648
Implements a command for capturing various areas of the screen or project window. ...
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
wxCheckBox * mDelayCheckBox
Definition: Screenshot.cpp:84
void OnOneSec(wxCommandEvent &event)
Definition: Screenshot.cpp:638
An iterator for a TrackList.
Definition: Track.h:339
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
void CloseScreenshotTools()
Definition: Screenshot.cpp:119
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:302
void OnCloseWindow(wxCloseEvent &event)
Definition: Screenshot.cpp:498
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:701
Represents a context to which a command may be applied.
Definition: Command.h:50
AudacityApp & wxGetApp()
void OnOneHour(wxCommandEvent &event)
Definition: Screenshot.cpp:658
TrackList * GetTracks()
Definition: Project.h:177
void OnMainWindowSmall(wxCommandEvent &event)
Definition: Screenshot.cpp:573
void Populate()
Definition: Screenshot.cpp:295
AudacityProject * GetProject() const
Definition: Command.h:60
void OnFiveMin(wxCommandEvent &event)
Definition: Screenshot.cpp:653
std::unique_ptr< wxEvent > evt
Definition: Screenshot.cpp:146
void SetBorder(int Border)
Definition: ShuttleGui.h:251
ScreenFramePtr mFrame
Definition: Screenshot.cpp:101
virtual ~ScreenFrame()
Definition: Screenshot.cpp:286
ScreenFrame * screenFrame
Definition: Screenshot.cpp:145
wxButton * AddButton(const wxString &Text, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:301
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:192
ScreenFrameTimer(ScreenFrame *frame, wxEvent &event)
Definition: Screenshot.cpp:129