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