Audacity 3.2.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
ScreenshotCommand Class Reference

Implements a command for capturing various areas of the screen or project window. It's one big if-elseif switch statement with lots of small calculations of rectangles. More...

#include <ScreenshotCommand.h>

Inheritance diagram for ScreenshotCommand:
[legend]
Collaboration diagram for ScreenshotCommand:
[legend]

Public Types

enum  kBackgrounds { kBlue , kWhite , kNone , nBackgrounds }
 
enum  kCaptureTypes {
  kwindow , kfullwindow , kwindowplus , kfullscreen ,
  ktoolbars , keffects , kscriptables , kpreferences ,
  ktrackpanel , kruler , ktracks , kfirsttrack ,
  kfirsttwotracks , kfirstthreetracks , kfirstfourtracks , ksecondtrack ,
  ktracksplus , kfirsttrackplus , kalltracks , kalltracksplus ,
  nCaptureWhats
}
 
- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 

Public Member Functions

EnumValueSymbols kCaptureWhatStrings ()
 
 ScreenshotCommand ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
template<bool Const>
bool VisitSettings (SettingsVisitorBase< Const > &S)
 
bool VisitSettings (SettingsVisitor &S) override
 
bool VisitSettings (ConstSettingsVisitor &S) override
 
void PopulateOrExchange (ShuttleGui &S) override
 
ManualPageID ManualPage () override
 
bool Apply (const CommandContext &context) override
 
void GetDerivedParams ()
 
void CaptureWindowOnIdle (const CommandContext &context, wxWindow *pWin)
 
wxTopLevelWindow * GetFrontWindow (AudacityProject *project)
 
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
 
virtual ~AudacityCommand ()
 
PluginPath GetPath () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
ComponentInterfaceSymbol GetSymbol () const override=0
 
virtual TranslatableString GetDescription () const override
 
virtual ManualPageID ManualPage ()
 
virtual bool IsBatchProcessing () const
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
bool SaveSettingsAsString (wxString &parms)
 
bool LoadSettingsFromString (const wxString &parms)
 
bool DoAudacityCommand (wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
virtual bool Init ()
 
virtual bool PromptUser (wxWindow *parent)
 
virtual bool CheckWhetherSkipAudacityCommand ()
 
virtual void End ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
virtual bool VisitSettings (SettingsVisitor &)
 
virtual bool VisitSettings (ConstSettingsVisitor &)
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

Static Public Member Functions

static void SetIdleHandler (AudacityProject &project)
 
static bool MayCapture (wxDialog *pDlg)
 

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Screenshot") }
 
static ScreenshotCommandmpShooter =NULL
 
static void(* mIdleHandler )(wxIdleEvent &event) = NULL
 

Private Member Functions

wxString MakeFileName (const wxString &path, const wxString &basename)
 
wxRect GetBackgroundRect ()
 
bool CaptureToolbar (const CommandContext &Context, ToolManager *man, Identifier type, const wxString &name)
 
bool CaptureDock (const CommandContext &Context, wxWindow *win, const wxString &fileName)
 
void CaptureCommands (const CommandContext &Context, const wxArrayStringEx &Commands)
 
void CaptureEffects (const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
 
void CaptureScriptables (const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
 
void CapturePreferences (const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
 
bool Capture (const CommandContext &Context, const wxString &basename, wxWindow *window, wxRect rect, bool bg=false)
 
wxRect GetWindowRect (wxTopLevelWindow *w)
 
wxRect GetFullWindowRect (wxTopLevelWindow *w)
 
wxRect GetScreenRect ()
 
wxRect GetPanelRect (TrackPanel *panel)
 
wxRect GetRulerRect (AdornedRulerPanel *ruler)
 
wxRect GetTracksRect (TrackPanel *panel)
 
wxRect GetTrackRect (AudacityProject *pProj, TrackPanel *panel, int n)
 
wxString WindowFileName (AudacityProject *proj, wxTopLevelWindow *w)
 

Private Attributes

int mWhat
 
int mBack
 
wxString mPath
 
bool mbBringToTop
 
bool bHasBackground
 
bool bHasBringToTop
 
EnumValueSymbols mSymbols
 
wxWindow * mIgnore
 
bool mBackground
 
wxColour mBackColor
 
wxString mDirToWriteTo
 
wxString mFilePath
 
wxString mFileName
 
int mCaptureMode
 

Friends

class ScreenshotBigDialog
 

Additional Inherited Members

- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 

Detailed Description

Implements a command for capturing various areas of the screen or project window. It's one big if-elseif switch statement with lots of small calculations of rectangles.

Definition at line 31 of file ScreenshotCommand.h.

Member Enumeration Documentation

◆ kBackgrounds

Enumerator
kBlue 
kWhite 
kNone 
nBackgrounds 

Definition at line 34 of file ScreenshotCommand.h.

◆ kCaptureTypes

Enumerator
kwindow 
kfullwindow 
kwindowplus 
kfullscreen 
ktoolbars 
keffects 
kscriptables 
kpreferences 
ktrackpanel 
kruler 
ktracks 
kfirsttrack 
kfirsttwotracks 
kfirstthreetracks 
kfirstfourtracks 
ksecondtrack 
ktracksplus 
kfirsttrackplus 
kalltracks 
kalltracksplus 
nCaptureWhats 

Definition at line 42 of file ScreenshotCommand.h.

43 {
44 kwindow,
53 kruler,
54 ktracks,
65 };

Constructor & Destructor Documentation

◆ ScreenshotCommand()

ScreenshotCommand::ScreenshotCommand ( )

Definition at line 121 of file ScreenshotCommand.cpp.

122{
123 mbBringToTop=true;
124 mIgnore=NULL;
125
127}
typename GlobalVariable< VetoDialogHook, const std::function< bool(wxDialog *) >, nullptr, Options... >::Scope Scope
static bool MayCapture(wxDialog *pDlg)
static CommandContext::TargetFactory::SubstituteInUnique< InteractiveOutputTargets > scope

References MayCapture(), mbBringToTop, mIgnore, and anonymous_namespace{wxCommandTargets.cpp}::scope.

Here is the call graph for this function:

Member Function Documentation

◆ Apply()

bool ScreenshotCommand::Apply ( const CommandContext context)
override

Definition at line 773 of file ScreenshotCommand.cpp.

774{
776 //Don't reset the toolbars to a known state.
777 //We will be capturing variations of them.
778 //ToolManager::Get( context.project ).Reset();
779
780 wxTopLevelWindow *w = GetFrontWindow(&context.project);
781 if (!w)
782 return false;
783
784 TrackPanel *panel = &TrackPanel::Get( context.project );
785 AdornedRulerPanel *ruler = panel->GetRuler();
786
787 int nTracks = TrackList::Get(context.project).Size();
788
789 int x1,y1,x2,y2;
790 w->ClientToScreen(&x1, &y1);
791 panel->ClientToScreen(&x2, &y2);
792
793 wxPoint p( x2-x1, y2-y1);
794
795 auto &toolManager = ToolManager::Get( context.project );
796
798 switch (mCaptureMode) {
799 case kwindow:
800 return Capture(context, WindowFileName( &context.project, w ) , w, GetWindowRect(w));
801 case kfullwindow:
802 case kwindowplus:
803 return Capture(context, WindowFileName( &context.project, w ) , w, GetFullWindowRect(w));
804 case kfullscreen:
805 return Capture(context, mFileName, w,GetScreenRect());
806 case ktoolbars:
807 return CaptureDock(context, toolManager.GetTopDock(), mFileName);
808 case kscriptables:
809 CaptureScriptables(context, &context.project, mFileName);
810 return true;
811 case keffects:
812 CaptureEffects(context, &context.project, mFileName);
813 return true;
814 case kpreferences:
815 CapturePreferences(context, &context.project, mFileName);
816 return true;
817 case ktrackpanel:
818 return Capture(context, mFileName, panel, GetPanelRect(panel));
819 case kruler:
820 return Capture(context, mFileName, ruler, GetRulerRect(ruler) );
821 case ktracks:
822 return Capture(context, mFileName, panel, GetTracksRect(panel));
823 case kfirsttrack:
824 return Capture(context, mFileName, panel, GetTrackRect( &context.project, panel, 0 ) );
825 case ksecondtrack:
826 return Capture(context, mFileName, panel, GetTrackRect( &context.project, panel, 1 ) );
827 case ktracksplus:
828 { wxRect r = GetTracksRect(panel);
829 r.SetTop( r.GetTop() - ruler->GetRulerHeight() );
830 r.SetHeight( r.GetHeight() + ruler->GetRulerHeight() );
831 return Capture(context, mFileName, panel, r);
832 }
833 case kfirsttrackplus:
834 { wxRect r = GetTrackRect(&context.project, panel, 0 );
835 r.SetTop( r.GetTop() - ruler->GetRulerHeight() );
836 r.SetHeight( r.GetHeight() + ruler->GetRulerHeight() );
837 return Capture(context, mFileName, panel, r );
838 }
839 case kfirsttwotracks:
840 { wxRect r = GetTrackRect( &context.project, panel, 0 );
841 r = r.Union( GetTrackRect( &context.project, panel, 1 ));
842 return Capture(context, mFileName, panel, r );
843 }
845 { wxRect r = GetTrackRect( &context.project, panel, 0 );
846 r = r.Union( GetTrackRect( &context.project, panel, 2 ));
847 return Capture(context, mFileName, panel, r );
848 }
849 case kfirstfourtracks:
850 { wxRect r = GetTrackRect( &context.project, panel, 0 );
851 r = r.Union( GetTrackRect( &context.project, panel, 3 ));
852 return Capture(context, mFileName, panel, r );
853 }
854 case kalltracks:
855 { wxRect r = GetTrackRect( &context.project, panel, 0 );
856 r = r.Union( GetTrackRect( &context.project, panel, nTracks-1 ));
857 return Capture(context, mFileName, panel, r );
858 }
859 case kalltracksplus:
860 { wxRect r = GetTrackRect( &context.project, panel, 0 );
861 r.SetTop( r.GetTop() - ruler->GetRulerHeight() );
862 r.SetHeight( r.GetHeight() + ruler->GetRulerHeight() );
863 r = r.Union( GetTrackRect( &context.project, panel, nTracks-1 ));
864 return Capture(context, mFileName, panel, r );
865 }
866 default:
867 return false;
868 }
869 }
870 else if (mCaptureMode < nCaptureWhats + toolManager.CountBars()) {
871 auto id = kCaptureWhatStrings()[mCaptureMode].Internal();
872 return CaptureToolbar(context, &toolManager, id, mFileName);
873 }
874 else
875 return false;
876}
This is an Audacity Specific ruler panel which additionally has border, selection markers,...
AudacityProject & project
bool CaptureToolbar(const CommandContext &Context, ToolManager *man, Identifier type, const wxString &name)
wxRect GetTracksRect(TrackPanel *panel)
void CaptureScriptables(const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
wxRect GetRulerRect(AdornedRulerPanel *ruler)
EnumValueSymbols kCaptureWhatStrings()
bool Capture(const CommandContext &Context, const wxString &basename, wxWindow *window, wxRect rect, bool bg=false)
wxString WindowFileName(AudacityProject *proj, wxTopLevelWindow *w)
wxTopLevelWindow * GetFrontWindow(AudacityProject *project)
wxRect GetPanelRect(TrackPanel *panel)
wxRect GetTrackRect(AudacityProject *pProj, TrackPanel *panel, int n)
bool CaptureDock(const CommandContext &Context, wxWindow *win, const wxString &fileName)
void CaptureEffects(const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
wxRect GetWindowRect(wxTopLevelWindow *w)
void CapturePreferences(const CommandContext &Context, AudacityProject *pProject, const wxString &fileName)
wxRect GetFullWindowRect(wxTopLevelWindow *w)
static ToolManager & Get(AudacityProject &project)
size_t Size() const
Definition: Track.h:1241
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:347
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Definition: TrackPanel.h:63
AdornedRulerPanel * GetRuler()
Definition: TrackPanel.h:169
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:233

References Capture(), CaptureDock(), CaptureEffects(), CapturePreferences(), CaptureScriptables(), CaptureToolbar(), TrackList::Get(), ToolManager::Get(), TrackPanel::Get(), GetDerivedParams(), GetFrontWindow(), GetFullWindowRect(), GetPanelRect(), TrackPanel::GetRuler(), GetRulerRect(), GetScreenRect(), GetTrackRect(), GetTracksRect(), GetWindowRect(), kalltracks, kalltracksplus, kCaptureWhatStrings(), keffects, kfirstfourtracks, kfirstthreetracks, kfirsttrack, kfirsttrackplus, kfirsttwotracks, kfullscreen, kfullwindow, kpreferences, kruler, kscriptables, ksecondtrack, ktoolbars, ktrackpanel, ktracks, ktracksplus, kwindow, kwindowplus, mCaptureMode, mFileName, nCaptureWhats, CommandContext::project, anonymous_namespace{TimeTrackVRulerControls.cpp}::ruler(), TrackList::Size(), and WindowFileName().

Here is the call graph for this function:

◆ Capture()

bool ScreenshotCommand::Capture ( const CommandContext Context,
const wxString &  basename,
wxWindow *  window,
wxRect  rect,
bool  bg = false 
)
private

Definition at line 233 of file ScreenshotCommand.cpp.

238{
239 int width = r.width;
240 int height = r.height;
241 if( r.width == 0 )
242 return false;
243 if (window ) {
244 wxWindow * win = window;
245 wxTopLevelWindow * top_win= nullptr;
246 if( !window->IsTopLevel())
247 win = wxGetTopLevelParent(window);
248 top_win = dynamic_cast<wxTopLevelWindow*>( win );
249 if( (!bHasBringToTop || mbBringToTop) && (!top_win || !top_win->IsActive()) ){
250 win->Raise();
251 Yield();
252 }
253 }
254
255
256 int screenW, screenH;
257 wxDisplaySize(&screenW, &screenH);
258 // Bug 1378 workaround.
259 // wx 3.0.2 has a bug in Blit from ScreenDC where in default mode
260 // much is drawn transparent - including for example black text!
261 // Forcing 24 bit here is a workaround.
262 wxBitmap full(screenW, screenH, 24);
263
264 wxScreenDC screenDC;
265 wxMemoryDC fullDC;
266
267#if defined(__WXMAC__) && !wxCHECK_VERSION(3, 0, 0)
268 full = DoGetAsBitmap(NULL);
269#else
270 // We grab the whole screen image since there seems to be a problem with
271 // using non-zero source coordinates on OSX. (as of wx2.8.9)
272 fullDC.SelectObject(full);
273 fullDC.Blit(0, 0, screenW, screenH, &screenDC, 0, 0);
274 fullDC.SelectObject(wxNullBitmap);
275#endif
276
277 //wxRect r(x, y, width, height);
278
279
280 // Convert to screen coordinates if needed
281 if (window && window->GetParent() && !window->IsTopLevel()) {
282 r.SetPosition(window->GetParent()->ClientToScreen(r.GetPosition()));
283 }
284
285 // Ensure within bounds (x/y are negative on Windows when maximized)
286 r.Intersect(wxRect(0, 0, screenW, screenH));
287
288 // Extract the actual image
289 wxBitmap part = full.GetSubBitmap(r);
290
291 // Add a background
292 if (bg && mBackground) {
293 wxRect b = GetBackgroundRect();
294
295 wxBitmap back(width + b.width, height + b.height);
296 fullDC.SelectObject(back);
297
298 fullDC.SetBackground(wxBrush(mBackColor, wxBRUSHSTYLE_SOLID));
299 fullDC.Clear();
300
301 fullDC.DrawBitmap(part, b.x, b.y);
302 fullDC.SelectObject(wxNullBitmap);
303
304 part = back;
305 }
306
307 // Save the final image
308 wxImage image = part.ConvertToImage();
309 ::wxBell();
310
311 if (image.SaveFile(filename)) {
312 // flush
313 context.Status( wxString::Format( _("Saved %s"), filename ), true );
314 }
315 else {
316 context.Error(
317 wxString::Format( _("Error trying to save file: %s"), filename ) );
318 return false;
319 }
320 return true;
321}
wxImage(22, 22)
#define _(s)
Definition: Internat.h:73
static void Yield()

References _, bHasBringToTop, CommandContext::Error(), GetBackgroundRect(), mBackColor, mBackground, mbBringToTop, CommandContext::Status(), wxImage(), and Yield().

Referenced by Apply(), CaptureDock(), CaptureToolbar(), and CaptureWindowOnIdle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureCommands()

void ScreenshotCommand::CaptureCommands ( const CommandContext Context,
const wxArrayStringEx Commands 
)
private

Definition at line 581 of file ScreenshotCommand.cpp.

583{
584 using namespace std::chrono;
585 AudacityProject * pProject = &context.project;
587 wxString Str;
588 // Yucky static variables. Is there a better way? The problem is that we need the
589 // idle callback to know more about what to do.
590#ifdef __WXMSW__
591 mDirToWriteTo = mFileName.BeforeLast('\\') + "\\";
592#else
593 mDirToWriteTo = mFileName.BeforeLast('/') + "/";
594#endif
595 mpShooter = this;
596
597 for( size_t i=0;i<Commands.size();i++){
598 // The handler is cleared each time it is used.
599 SetIdleHandler( context.project );
600 Str = Commands[i];
601 const CommandContext projectContext( *pProject );
602 if( !manager.HandleTextualCommand( Str, projectContext, AlwaysEnabledFlag, true ) )
603 {
604 wxLogDebug("Command %s not found", Str);
605 }
606 // This particular sleep is not needed, but gives user a chance to see the
607 // dialogs as they whizz by.
608 std::this_thread::sleep_for(200ms);
609 }
610}
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:34
static const AttachedProjectObjects::RegisteredFactory manager
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
CommandManager implements a system for organizing all user-callable commands.
static CommandManager & Get(AudacityProject &project)
static ScreenshotCommand * mpShooter
static void SetIdleHandler(AudacityProject &project)

References AlwaysEnabledFlag, CommandManager::Get(), manager, mDirToWriteTo, mFileName, mpShooter, CommandContext::project, and SetIdleHandler().

Referenced by CaptureEffects(), and CaptureScriptables().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureDock()

bool ScreenshotCommand::CaptureDock ( const CommandContext Context,
wxWindow *  win,
const wxString &  fileName 
)
private

Definition at line 354 of file ScreenshotCommand.cpp.

357{
358 int x = 0, y = 0;
359 int width, height;
360
361 win->ClientToScreen(&x, &y);
362 win->GetParent()->ScreenToClient(&x, &y);
363 win->GetClientSize(&width, &height);
364
365 return Capture(context, FileName, win, wxRect(x, y, width, height));
366}

References Capture().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureEffects()

void ScreenshotCommand::CaptureEffects ( const CommandContext Context,
AudacityProject pProject,
const wxString &  fileName 
)
private

Definition at line 450 of file ScreenshotCommand.cpp.

453{
454 (void)pProject;
455 (void)&FileName;//compiler food.
456 (void)&context;
457#define TRICKY_CAPTURE
458#define CAPTURE_NYQUIST_TOO
459 // Commented out the effects that don't have dialogs.
460 // Also any problematic ones,
461 CaptureCommands( context, {
462#ifdef TRICKY_CAPTURE
463 //"Contrast...", // renamed
464 "ContrastAnalyser",
465 //"Plot Spectrum...", // renamed
466 "PlotSpectrum",
467
468 "Auto Duck...", // needs a track below.
469 //"Spectral Edit Multi Tool",
470 "Spectral Edit Parametric EQ...", // Needs a spectral selection.
471 "Spectral Edit Shelves...",
472
473 //"Noise Reduction...", // Exits twice...
474 //"SC4...", //Has 'Close' rather than 'Cancel'.
475#endif
476 "Amplify...",
477 "Bass and Treble...",
478 "Change Pitch...",
479 "Change Speed...",
480 "Change Tempo...",
481 "Click Removal...",
482 "Compressor...",
483 "Distortion...",
484 "Echo...",
485 //"Equalization...",
486 "Filter Curve EQ...",
487 "Graphic EQ...",
488 //"Fade In",
489 //"Fade Out",
490 //"Invert",
491 "Normalize...",
492 "Paulstretch...",
493 "Phaser...",
494 //"Repair",
495 "Repeat...",
496 "Reverb...",
497 //"Reverse",
498 "Sliding Stretch...",
499 "Truncate Silence...",
500 "Wahwah...",
501 // Sole LADSPA effect...
502#ifdef CAPTURE_NYQUIST_TOO
503 "Adjustable Fade...",
504 "Clip Fix...",
505 //"Crossfade Clips",
506 "Crossfade Tracks...",
507 "Delay...",
508 "High Pass Filter...",
509 "Limiter...",
510 "Low Pass Filter...",
511 "Notch Filter...",
512 "Nyquist Effects Prompt...",
513 //"Studio Fade Out",
514 "Tremolo...",
515 "Vocal Reduction and Isolation...",
516 "Vocal Remover...",
517 "Vocoder...",
518#endif
519 // Generators.....
520 "Chirp...",
521 "DTMF Tones...",
522 "Noise...",
523 "Silence...",
524 "Tone...",
525#ifdef CAPTURE_NYQUIST_TOO
526 "Pluck...",
527 "Rhythm Track...",
528 "Risset Drum...",
529 "Sample Data Import...",
530#endif
531 // Analyzers...
532 "Find Clipping...",
533#ifdef CAPTURE_NYQUIST_TOO
534 "Beat Finder...",
535 "Label Sounds...",
536 "Regular Interval Labels...",
537 "Sample Data Export...",
538#endif
539 } );
540}
void CaptureCommands(const CommandContext &Context, const wxArrayStringEx &Commands)

References CaptureCommands().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CapturePreferences()

void ScreenshotCommand::CapturePreferences ( const CommandContext Context,
AudacityProject pProject,
const wxString &  fileName 
)
private

Definition at line 413 of file ScreenshotCommand.cpp.

416{
417 using namespace std::chrono;
418 (void)&FileName;//compiler food.
419 (void)&context;
420
421 // Yucky static variables. Is there a better way? The problem is that we need the
422 // idle callback to know more about what to do.
423#ifdef __WXMSW__
424 mDirToWriteTo = FileName.BeforeLast('\\') + "\\";
425#else
426 mDirToWriteTo = FileName.BeforeLast('/') + "/";
427#endif
428 mpShooter = this;
429 const int nPrefsPages = 19;
430
431 for( int i=0;i<nPrefsPages;i++){
432 // The handler is cleared each time it is used.
433 SetIdleHandler( context.project );
434 gPrefs->Write(wxT("/Prefs/PrefsCategory"), (long)i);
435 gPrefs->Flush();
436 CommandID Command{ wxT("Preferences") };
437 const CommandContext projectContext( *pProject );
439 Command, projectContext, AlwaysEnabledFlag, true ) )
440 {
441 // using GET in a log message for devs' eyes only
442 wxLogDebug("Command %s not found", Command.GET() );
443 }
444 // This sleep is not needed, but gives user a chance to see the
445 // dialogs as they whizz by.
446 std::this_thread::sleep_for(200ms);
447 }
448}
wxT("CloseDown"))
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
virtual bool Flush() noexcept=0
virtual bool Write(const wxString &key, bool value)=0
AUDACITY_DLL_API bool HandleTextualCommand(const CommandID &Str, const CommandContext &context, CommandFlag flags, bool alwaysEnabled)
constexpr auto Command
Definition: MenuRegistry.h:456

References AlwaysEnabledFlag, MenuRegistry::Command, audacity::BasicSettings::Flush(), gPrefs, CommandDispatch::HandleTextualCommand(), mDirToWriteTo, mpShooter, CommandContext::project, SetIdleHandler(), audacity::BasicSettings::Write(), and wxT().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureScriptables()

void ScreenshotCommand::CaptureScriptables ( const CommandContext Context,
AudacityProject pProject,
const wxString &  fileName 
)
private

Definition at line 542 of file ScreenshotCommand.cpp.

545{
546 (void)pProject;
547 (void)&FileName;//compiler food.
548 (void)&context;
549
550 CaptureCommands( context, {
551 "SelectTime",
552 "SelectFrequencies",
553 "SelectTracks",
554 "SetTrackStatus",
555 "SetTrackAudio",
556 "SetTrackVisuals",
557 "GetPreference",
558 "SetPreference",
559 "SetClip",
560 "SetEnvelope",
561 "SetLabel",
562 "SetProject",
563
564 "Select",
565 "SetTrack",
566 "GetInfo",
567 "Message",
568 "Help", // Help on individual commands
569 "Import2",
570 "Export2",
571 "OpenProject2",
572 "SaveProject2",
573 "Drag",
574 "CompareAudio",
575 "Screenshot",
576 } );
577
578}

References CaptureCommands().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureToolbar()

bool ScreenshotCommand::CaptureToolbar ( const CommandContext Context,
ToolManager man,
Identifier  type,
const wxString &  name 
)
private

Definition at line 323 of file ScreenshotCommand.cpp.

326{
327 bool visible = man->IsVisible(type);
328 if (!visible) {
329 man->ShowHide(type);
330 Yield();
331 }
332
333 wxWindow *w = man->GetToolBar(type);
334 if (!w)
335 return false;
336
337 int x = 0, y = 0;
338 int width, height;
339
340 w->ClientToScreen(&x, &y);
341 w->GetParent()->ScreenToClient(&x, &y);
342 w->GetClientSize(&width, &height);
343
344 bool result = Capture(context, name, w, wxRect(x, y, width, height));
345
346 if (!visible) {
347 man->ShowHide(type);
348 if (mIgnore)
349 mIgnore->Raise();
350 }
351 return result;
352}
const TranslatableString name
Definition: Distortion.cpp:76
void ShowHide(Identifier type)
ToolBar * GetToolBar(const Identifier &type) const
bool IsVisible(Identifier type) const

References Capture(), ToolManager::GetToolBar(), ToolManager::IsVisible(), mIgnore, name, ToolManager::ShowHide(), and Yield().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CaptureWindowOnIdle()

void ScreenshotCommand::CaptureWindowOnIdle ( const CommandContext context,
wxWindow *  pWin 
)

Definition at line 379 of file ScreenshotCommand.cpp.

382{
383 using namespace std::chrono;
384 wxDialog * pDlg = dynamic_cast<wxDialog*>(pWin);
385 if( !pDlg ){
386 wxLogDebug("Event from bogus dlg" );
387 return;
388 }
389
390 wxPoint Pos = pDlg->GetScreenPosition();
391 wxSize Siz = pDlg->GetSize();
392 wxString Title = pDlg->GetTitle();
393
394 // Remove '/' from "Sliding Time Scale/Pitch Shift..."
395 // and any other effects that have illegal filename characters.
396 Title.Replace( "/", "" );
397 Title.Replace( ":", "" );
398 wxString Name = mDirToWriteTo + Title + ".png";
399
400 wxLogDebug("Taking screenshot of window %s (%i,%i,%i,%i)", Name,
401 Pos.x, Pos.y, Siz.x, Siz.y );
402 // This delay is needed, as dialogs take a moment or two to fade in.
403 std::this_thread::sleep_for(400ms);
404 // JKC: The border of 7 pixels was determined from a trial capture and then measuring
405 // in the GIMP. I'm unsure where the border comes from.
406 Capture( context, Name, pDlg, wxRect((int)Pos.x+7, (int)Pos.y, (int)Siz.x-14, (int)Siz.y-7) );
407
408 // We've captured the dialog, so now dismiss the dialog.
409 wxCommandEvent Evt( wxEVT_BUTTON, wxID_CANCEL );
410 pDlg->GetEventHandler()->AddPendingEvent( Evt );
411}

References Capture(), and mDirToWriteTo.

Referenced by IdleHandler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBackgroundRect()

wxRect ScreenshotCommand::GetBackgroundRect ( )
private

Definition at line 210 of file ScreenshotCommand.cpp.

211{
212 wxRect r;
213
214 r.x = 16;
215 r.y = 16;
216 r.width = r.x * 2;
217 r.height = r.y * 2;
218
219 return r;
220}

Referenced by Capture(), and GetFullWindowRect().

Here is the caller graph for this function:

◆ GetDerivedParams()

void ScreenshotCommand::GetDerivedParams ( )

Definition at line 635 of file ScreenshotCommand.cpp.

636{
637 // Read the parameters that were passed in
640
641 // Build a suitable filename
643 kCaptureWhatStrings()[ mCaptureMode ].Translation() );
644
645 if (mBack == kBlue)
646 {
647 mBackground = true;
648 mBackColor = wxColour(51, 102, 153);
649 }
650 else if (mBack == kWhite)
651 {
652 mBackground = true;
653 mBackColor = wxColour(255, 255, 255);
654 }
655 else
656 {
657 mBackground = false;
658 }
659
660}
wxString MakeFileName(const wxString &path, const wxString &basename)

References kBlue, kCaptureWhatStrings(), kWhite, MakeFileName(), mBack, mBackColor, mBackground, mCaptureMode, mFileName, mFilePath, mPath, and mWhat.

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDescription()

TranslatableString ScreenshotCommand::GetDescription ( ) const
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 74 of file ScreenshotCommand.h.

74{return XO("Takes screenshots.");};
XO("Cut/Copy/Paste")

References XO().

Here is the call graph for this function:

◆ GetFrontWindow()

wxTopLevelWindow * ScreenshotCommand::GetFrontWindow ( AudacityProject project)

Definition at line 189 of file ScreenshotCommand.cpp.

190{
191 wxWindow *front = NULL;
192 wxWindow *proj = wxGetTopLevelParent(FindProjectFrame(project));
193
194 for (auto & win : wxTopLevelWindows)
195 {
196 win = wxGetTopLevelParent(win);
197 if (win != mIgnore && win != proj && win->IsShown()) {
198 front = win;
199 break;
200 }
201 }
202
203 if (!front || !front->IsTopLevel()) {
204 return (wxTopLevelWindow *)proj;
205 }
206
207 return (wxTopLevelWindow *)front;
208}
wxFrame * FindProjectFrame(AudacityProject *project)
Get a pointer to the window associated with a project, or null if the given pointer is null,...
const auto project

References FindProjectFrame(), mIgnore, and project.

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFullWindowRect()

wxRect ScreenshotCommand::GetFullWindowRect ( wxTopLevelWindow *  w)
private

Definition at line 671 of file ScreenshotCommand.cpp.

671 {
672
673 wxRect r = w->GetRect();
674 r.SetPosition(w->GetScreenPosition());
675 r = w->GetScreenRect();
676
677#if defined(__WXGTK__)
678 // In wxGTK, we need to include decoration sizes
679 r.width += (wxSystemSettings::GetMetric(wxSYS_BORDER_X, w) * 2);
680 r.height += wxSystemSettings::GetMetric(wxSYS_CAPTION_Y, w) +
681 wxSystemSettings::GetMetric(wxSYS_BORDER_Y, w);
682#endif
684 {
685 // background colour not selected but we want a background
686 wxRect b = GetBackgroundRect();
687 r.x = (r.x - b.x) >= 0 ? (r.x - b.x): 0;
688 r.y = (r.y - b.y) >= 0 ? (r.y - b.y): 0;
689 r.width += b.width;
690 r.height += b.height;
691 }
692
693 return r;
694}

References GetBackgroundRect(), kwindowplus, mBackground, and mCaptureMode.

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPanelRect()

wxRect ScreenshotCommand::GetPanelRect ( TrackPanel panel)
private

Definition at line 703 of file ScreenshotCommand.cpp.

703 {
704 //AdornedRulerPanel *ruler = panel->mRuler;
705
706 int h = panel->GetRuler()->GetRulerHeight();
707 int x = 0, y = -h;
708 int width, height;
709
710 panel->ClientToScreen(&x, &y);
711 panel->GetParent()->ScreenToClient(&x, &y);
712 panel->GetClientSize(&width, &height);
713 return wxRect(x, y, width, height + h);
714}

References TrackPanel::GetRuler(), and AdornedRulerPanel::GetRulerHeight().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRulerRect()

wxRect ScreenshotCommand::GetRulerRect ( AdornedRulerPanel ruler)
private

Definition at line 716 of file ScreenshotCommand.cpp.

716 {
717 int x = 0, y = 0;
718 int width, height;
719
720 ruler->ClientToScreen(&x, &y);
721 ruler->GetParent()->ScreenToClient(&x, &y);
722 ruler->GetClientSize(&width, &height);
723 height = ruler->GetRulerHeight();
724 return wxRect( x, y, width, height);
725}

References anonymous_namespace{TimeTrackVRulerControls.cpp}::ruler().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScreenRect()

wxRect ScreenshotCommand::GetScreenRect ( )
private

Definition at line 696 of file ScreenshotCommand.cpp.

696 {
697 int width, height;
698 wxDisplaySize(&width, &height);
699
700 return wxRect( 0,0,width,height);
701}

Referenced by Apply().

Here is the caller graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol ScreenshotCommand::GetSymbol ( ) const
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 73 of file ScreenshotCommand.h.

73{return Symbol;};
static const ComponentInterfaceSymbol Symbol

◆ GetTrackRect()

wxRect ScreenshotCommand::GetTrackRect ( AudacityProject pProj,
TrackPanel panel,
int  n 
)
private

Definition at line 738 of file ScreenshotCommand.cpp.

738 {
739 auto FindRectangle = []( TrackPanel &panel, Track &t )
740 {
741 wxRect rect = panel.FindFocusedTrackRect( &t );
742
743 // Reposition it relative to parent of panel
744 rect.SetPosition(
745 panel.GetParent()->ScreenToClient(
746 panel.ClientToScreen(
747 rect.GetPosition())));
748
749 return rect;
750 };
751
752 int count = 0;
753 for (auto t : TrackList::Get( *pProj )) {
754 count += 1;
755 if( count > n )
756 {
757 wxRect r = FindRectangle( *panel, *t );
758 return r;
759 }
760 }
761 return wxRect( 0,0,0,0);
762}
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:122
wxRect FindFocusedTrackRect(const Track *target)

References TrackPanel::FindFocusedTrackRect(), and TrackList::Get().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTracksRect()

wxRect ScreenshotCommand::GetTracksRect ( TrackPanel panel)
private

Definition at line 727 of file ScreenshotCommand.cpp.

727 {
728 int x = 0, y = 0;
729 int width, height;
730
731 panel->ClientToScreen(&x, &y);
732 panel->GetParent()->ScreenToClient(&x, &y);
733 panel->GetClientSize(&width, &height);
734
735 return wxRect( x, y, width, height);
736}

Referenced by Apply().

Here is the caller graph for this function:

◆ GetWindowRect()

wxRect ScreenshotCommand::GetWindowRect ( wxTopLevelWindow *  w)
private

Definition at line 662 of file ScreenshotCommand.cpp.

662 {
663 int x = 0, y = 0;
664 int width, height;
665
666 w->ClientToScreen(&x, &y);
667 w->GetClientSize(&width, &height);
668 return wxRect( x,y,width,height);
669}

Referenced by Apply().

Here is the caller graph for this function:

◆ kCaptureWhatStrings()

EnumValueSymbols ScreenshotCommand::kCaptureWhatStrings ( )

Definition at line 57 of file ScreenshotCommand.cpp.

58{
59 static EnumValueSymbol symbols[]{
60 { XO("Window") },
61 { wxT("FullWindow"), XO("Full Window") },
62 { wxT("WindowPlus"), XO("Window Plus") },
63 { XO("Fullscreen") },
64 { XO("Toolbars") },
65 { XO("Effects") },
66 { XO("Scriptables") },
67 { XO("Preferences") },
68 { XO("Trackpanel") },
69 { XO("Ruler") },
70 { XO("Tracks") },
71 { wxT("FirstTrack"), XO("First Track") },
72 { wxT("FirstTwoTracks"), XO("First Two Tracks") },
73 { wxT("FirstThreeTracks"), XO("First Three Tracks") },
74 { wxT("FirstFourTracks"), XO("First Four Tracks") },
75 { wxT("SecondTrack"), XO("Second Track") },
76 { wxT("TracksPlus"), XO("Tracks Plus") },
77 { wxT("FirstTrackPlus"), XO("First Track Plus") },
78 { wxT("AllTracks"), XO("All Tracks") },
79 { wxT("AllTracksPlus"), XO("All Tracks Plus") },
80 };
81
82 if (mSymbols.empty()) {
83 // Compute the table of strings once
84
85 // Some fixed choices
86 copy(std::begin(symbols), std::end(symbols), back_inserter(mSymbols));
87 auto nFixed = mSymbols.size();
88
89 // Discover the set of toolbars -- don't hard-code it here
90 /*
91 There is no context passed in for a project.
92 So this need to use the active project is unfortunate, but the set of
93 toolbars and their identifying strings should not vary among projects
94 */
95 auto pProject = ::GetActiveProject().lock();
96 if ( pProject ) {
97 // Toolbars will be sorted by textual ID.
98 // Macro programmers do use these English ids no matter what their
99 // preferred language is.
100 ToolManager::Get(*pProject).ForEach([&](ToolBar *pBar){
101 mSymbols.emplace_back( pBar->GetSection(), pBar->GetLabel() );
102 });
103 }
104 }
105
106 return mSymbols;
107};
AUDACITY_DLL_API std::weak_ptr< AudacityProject > GetActiveProject()
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
EnumValueSymbols mSymbols
Works with ToolManager and ToolDock to provide a dockable window in which buttons can be placed.
Definition: ToolBar.h:74
void ForEach(F &&fun)
Visit bars, lexicographically by their textual ids.
Definition: ToolManager.h:102
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:150
void copy(const T *src, T *dst, int32_t n)
Definition: VectorOps.h:40

References PackedArray::begin(), staffpad::vo::copy(), PackedArray::end(), ToolManager::ForEach(), ToolManager::Get(), GetActiveProject(), mSymbols, wxT(), and XO().

Referenced by Apply(), GetDerivedParams(), PopulateOrExchange(), VisitSettings(), and WindowFileName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeFileName()

wxString ScreenshotCommand::MakeFileName ( const wxString &  path,
const wxString &  basename 
)
private

Definition at line 612 of file ScreenshotCommand.cpp.

613{
614 // If the path is a full file name, then use it.
615 if( path.EndsWith( ".png" ) )
616 return path;
617
618 // Otherwise make up a file name that has not been used already.
619 wxFileName prefixPath;
620 prefixPath.AssignDir(path);
621 wxString prefix = prefixPath.GetPath
622 (wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR);
623
624 wxString filename;
625 int i = 0;
626 do {
627 filename.Printf(wxT("%s%s%03d.png"),
628 prefix, basename, i);
629 i++;
630 } while (::wxFileExists(filename));
631
632 return filename;
633}

References wxT().

Referenced by GetDerivedParams(), and WindowFileName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ManualPage()

ManualPageID ScreenshotCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 81 of file ScreenshotCommand.h.

81{return L"Extra_Menu:_Scriptables_II#screenshot_short_format";}

◆ MayCapture()

bool ScreenshotCommand::MayCapture ( wxDialog *  pDlg)
static

Definition at line 369 of file ScreenshotCommand.cpp.

370{
371 if( mIdleHandler == NULL )
372 return false;
373 pDlg->Bind( wxEVT_IDLE, mIdleHandler );
374 mIdleHandler = NULL;
375 pDlg->ShowModal();
376 return true;
377}
static void(* mIdleHandler)(wxIdleEvent &event)

References mIdleHandler.

Referenced by ScreenshotCommand().

Here is the caller graph for this function:

◆ PopulateOrExchange()

void ScreenshotCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 145 of file ScreenshotCommand.cpp.

146{
147 auto strings = kCaptureWhatStrings();
148 S.AddSpace(0, 5);
149
150 S.StartMultiColumn(2, wxALIGN_CENTER);
151 {
152 S.TieTextBox( XXO("Path:"), mPath);
153 S.TieChoice( XXO("Capture What:"),
154 mWhat, Msgids(strings.data(), strings.size()));
155 S.TieChoice( XXO("Background:"),
157 S.TieCheckBox( XXO("Bring To Top"), mbBringToTop);
158 }
159 S.EndMultiColumn();
160}
XXO("&Cut/Copy/Paste Toolbar")
static const EnumValueSymbol kBackgroundStrings[ScreenshotCommand::nBackgrounds]
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
#define S(N)
Definition: ToChars.cpp:64

References kBackgroundStrings, kCaptureWhatStrings(), mBack, mbBringToTop, mPath, Msgids(), mWhat, nBackgrounds, S, and XXO().

Here is the call graph for this function:

◆ SetIdleHandler()

void ScreenshotCommand::SetIdleHandler ( AudacityProject project)
static

Definition at line 183 of file ScreenshotCommand.cpp.

184{
187}
static AudacityProject * pIdleHandlerProject
void IdleHandler(wxIdleEvent &event)

References IdleHandler(), mIdleHandler, pIdleHandlerProject, and project.

Referenced by CaptureCommands(), and CapturePreferences().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VisitSettings() [1/3]

bool ScreenshotCommand::VisitSettings ( ConstSettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 142 of file ScreenshotCommand.cpp.

143 { return VisitSettings<true>(S); }

References S.

◆ VisitSettings() [2/3]

bool ScreenshotCommand::VisitSettings ( SettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 139 of file ScreenshotCommand.cpp.

140 { return VisitSettings<false>(S); }

References S.

◆ VisitSettings() [3/3]

template<bool Const>
bool ScreenshotCommand::VisitSettings ( SettingsVisitorBase< Const > &  S)

Definition at line 130 of file ScreenshotCommand.cpp.

130 {
131 auto strings = kCaptureWhatStrings();
132 S.Define( mPath, wxT("Path"), wxString{});
133 S.DefineEnum( mWhat, wxT("CaptureWhat"), kwindow, strings.data(), strings.size() );
134 S.DefineEnum( mBack, wxT("Background"), kNone, kBackgroundStrings, nBackgrounds );
135 S.Define( mbBringToTop, wxT("ToTop"), true );
136 return true;
137};

References kBackgroundStrings, kCaptureWhatStrings(), kNone, kwindow, mBack, mbBringToTop, mPath, mWhat, nBackgrounds, S, and wxT().

Here is the call graph for this function:

◆ WindowFileName()

wxString ScreenshotCommand::WindowFileName ( AudacityProject proj,
wxTopLevelWindow *  w 
)
private

Definition at line 764 of file ScreenshotCommand.cpp.

764 {
765 if (w != FindProjectFrame(proj) && !w->GetTitle().empty()) {
767 kCaptureWhatStrings()[ mCaptureMode ].Translation() +
768 (wxT("-") + w->GetTitle() + wxT("-")));
769 }
770 return mFileName;
771}

References FindProjectFrame(), kCaptureWhatStrings(), MakeFileName(), mCaptureMode, mFileName, mFilePath, and wxT().

Referenced by Apply().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ScreenshotBigDialog

friend class ScreenshotBigDialog
friend

Definition at line 90 of file ScreenshotCommand.h.

Member Data Documentation

◆ bHasBackground

bool ScreenshotCommand::bHasBackground
private

Definition at line 88 of file ScreenshotCommand.h.

◆ bHasBringToTop

bool ScreenshotCommand::bHasBringToTop
private

Definition at line 89 of file ScreenshotCommand.h.

Referenced by Capture().

◆ mBack

int ScreenshotCommand::mBack
private

Definition at line 85 of file ScreenshotCommand.h.

Referenced by GetDerivedParams(), PopulateOrExchange(), and VisitSettings().

◆ mBackColor

wxColour ScreenshotCommand::mBackColor
private

Definition at line 104 of file ScreenshotCommand.h.

Referenced by Capture(), and GetDerivedParams().

◆ mBackground

bool ScreenshotCommand::mBackground
private

Definition at line 103 of file ScreenshotCommand.h.

Referenced by Capture(), GetDerivedParams(), and GetFullWindowRect().

◆ mbBringToTop

bool ScreenshotCommand::mbBringToTop
private

Definition at line 87 of file ScreenshotCommand.h.

Referenced by Capture(), PopulateOrExchange(), ScreenshotCommand(), and VisitSettings().

◆ mCaptureMode

int ScreenshotCommand::mCaptureMode
private

Definition at line 109 of file ScreenshotCommand.h.

Referenced by Apply(), GetDerivedParams(), GetFullWindowRect(), and WindowFileName().

◆ mDirToWriteTo

wxString ScreenshotCommand::mDirToWriteTo
private

Definition at line 105 of file ScreenshotCommand.h.

Referenced by CaptureCommands(), CapturePreferences(), and CaptureWindowOnIdle().

◆ mFileName

wxString ScreenshotCommand::mFileName
private

Definition at line 108 of file ScreenshotCommand.h.

Referenced by Apply(), CaptureCommands(), GetDerivedParams(), and WindowFileName().

◆ mFilePath

wxString ScreenshotCommand::mFilePath
private

Definition at line 107 of file ScreenshotCommand.h.

Referenced by GetDerivedParams(), and WindowFileName().

◆ mIdleHandler

void(* ScreenshotCommand::mIdleHandler)(wxIdleEvent &event) = NULL
static

Definition at line 137 of file ScreenshotCommand.h.

Referenced by MayCapture(), and SetIdleHandler().

◆ mIgnore

wxWindow* ScreenshotCommand::mIgnore
private

Definition at line 101 of file ScreenshotCommand.h.

Referenced by CaptureToolbar(), GetFrontWindow(), and ScreenshotCommand().

◆ mPath

wxString ScreenshotCommand::mPath
private

Definition at line 86 of file ScreenshotCommand.h.

Referenced by GetDerivedParams(), PopulateOrExchange(), and VisitSettings().

◆ mpShooter

ScreenshotCommand * ScreenshotCommand::mpShooter =NULL
static

Definition at line 136 of file ScreenshotCommand.h.

Referenced by CaptureCommands(), CapturePreferences(), and IdleHandler().

◆ mSymbols

EnumValueSymbols ScreenshotCommand::mSymbols
private

Definition at line 97 of file ScreenshotCommand.h.

Referenced by kCaptureWhatStrings().

◆ mWhat

int ScreenshotCommand::mWhat
private

Definition at line 84 of file ScreenshotCommand.h.

Referenced by GetDerivedParams(), PopulateOrExchange(), and VisitSettings().

◆ Symbol

const ComponentInterfaceSymbol ScreenshotCommand::Symbol { XO("Screenshot") }
static

Definition at line 69 of file ScreenshotCommand.h.


The documentation for this class was generated from the following files: