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