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
126 static VetoDialogHook::Scope scope{ MayCapture };
127}
static TransactionScope::Factory::Scope scope
static bool MayCapture(wxDialog *pDlg)

References MayCapture(), mbBringToTop, mIgnore, and scope.

Here is the call graph for this function:

Member Function Documentation

◆ Apply()

bool ScreenshotCommand::Apply ( const CommandContext context)
override

Definition at line 774 of file ScreenshotCommand.cpp.

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

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:75
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 582 of file ScreenshotCommand.cpp.

584{
585 using namespace std::chrono;
586 AudacityProject * pProject = &context.project;
588 wxString Str;
589 // Yucky static variables. Is there a better way? The problem is that we need the
590 // idle callback to know more about what to do.
591#ifdef __WXMSW__
592 mDirToWriteTo = mFileName.BeforeLast('\\') + "\\";
593#else
594 mDirToWriteTo = mFileName.BeforeLast('/') + "/";
595#endif
596 mpShooter = this;
597
598 for( size_t i=0;i<Commands.size();i++){
599 // The handler is cleared each time it is used.
600 SetIdleHandler( context.project );
601 Str = Commands[i];
602 const CommandContext projectContext( *pProject );
603 if( !manager.HandleTextualCommand( Str, projectContext, AlwaysEnabledFlag, true ) )
604 {
605 wxLogDebug("Command %s not found", Str);
606 }
607 // This particular sleep is not needed, but gives user a chance to see the
608 // dialogs as they whizz by.
609 std::this_thread::sleep_for(200ms);
610 }
611}
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 451 of file ScreenshotCommand.cpp.

454{
455 (void)pProject;
456 (void)&FileName;//compiler food.
457 (void)&context;
458#define TRICKY_CAPTURE
459#define CAPTURE_NYQUIST_TOO
460 // Commented out the effects that don't have dialogs.
461 // Also any problematic ones,
462 CaptureCommands( context, {
463#ifdef TRICKY_CAPTURE
464 //"Contrast...", // renamed
465 "ContrastAnalyser",
466 //"Plot Spectrum...", // renamed
467 "PlotSpectrum",
468
469 "Auto Duck...", // needs a track below.
470 //"Spectral Edit Multi Tool",
471 "Spectral Edit Parametric EQ...", // Needs a spectral selection.
472 "Spectral Edit Shelves...",
473
474 //"Noise Reduction...", // Exits twice...
475 //"SC4...", //Has 'Close' rather than 'Cancel'.
476#endif
477 "Amplify...",
478 "Bass and Treble...",
479 "Change Pitch...",
480 "Change Speed...",
481 "Change Tempo...",
482 "Click Removal...",
483 "Compressor...",
484 "Distortion...",
485 "Echo...",
486 //"Equalization...",
487 "Filter Curve EQ...",
488 "Graphic EQ...",
489 //"Fade In",
490 //"Fade Out",
491 //"Invert",
492 "Normalize...",
493 "Paulstretch...",
494 "Phaser...",
495 //"Repair",
496 "Repeat...",
497 "Reverb...",
498 //"Reverse",
499 "Sliding Stretch...",
500 "Truncate Silence...",
501 "Wahwah...",
502 // Sole LADSPA effect...
503#ifdef CAPTURE_NYQUIST_TOO
504 "Adjustable Fade...",
505 "Clip Fix...",
506 //"Crossfade Clips",
507 "Crossfade Tracks...",
508 "Delay...",
509 "High Pass Filter...",
510 "Limiter...",
511 "Low Pass Filter...",
512 "Notch Filter...",
513 "Nyquist Effects Prompt...",
514 //"Studio Fade Out",
515 "Tremolo...",
516 "Vocal Reduction and Isolation...",
517 "Vocal Remover...",
518 "Vocoder...",
519#endif
520 // Generators.....
521 "Chirp...",
522 "DTMF Tones...",
523 "Noise...",
524 "Silence...",
525 "Tone...",
526#ifdef CAPTURE_NYQUIST_TOO
527 "Pluck...",
528 "Rhythm Track...",
529 "Risset Drum...",
530 "Sample Data Import...",
531#endif
532 // Analyzers...
533 "Find Clipping...",
534#ifdef CAPTURE_NYQUIST_TOO
535 "Beat Finder...",
536 "Label Sounds...",
537 "Regular Interval Labels...",
538 "Sample Data Export...",
539#endif
540 } );
541}
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 CommandManager &commandManager = CommandManager::Get( *pProject );
421
422 // Yucky static variables. Is there a better way? The problem is that we need the
423 // idle callback to know more about what to do.
424#ifdef __WXMSW__
425 mDirToWriteTo = FileName.BeforeLast('\\') + "\\";
426#else
427 mDirToWriteTo = FileName.BeforeLast('/') + "/";
428#endif
429 mpShooter = this;
430 const int nPrefsPages = 19;
431
432 for( int i=0;i<nPrefsPages;i++){
433 // The handler is cleared each time it is used.
434 SetIdleHandler( context.project );
435 gPrefs->Write(wxT("/Prefs/PrefsCategory"), (long)i);
436 gPrefs->Flush();
437 CommandID Command{ wxT("Preferences") };
438 const CommandContext projectContext( *pProject );
439 if( !CommandDispatch::HandleTextualCommand( commandManager,
440 Command, projectContext, AlwaysEnabledFlag, true ) )
441 {
442 // using GET in a log message for devs' eyes only
443 wxLogDebug("Command %s not found", Command.GET() );
444 }
445 // This sleep is not needed, but gives user a chance to see the
446 // dialogs as they whizz by.
447 std::this_thread::sleep_for(200ms);
448 }
449}
wxT("CloseDown"))
FileConfig * gPrefs
Definition: Prefs.cpp:70
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
AUDACITY_DLL_API bool HandleTextualCommand(CommandManager &commandManager, const CommandID &Str, const CommandContext &context, CommandFlag flags, bool alwaysEnabled)
std::unique_ptr< CommandItem > Command(const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())

References AlwaysEnabledFlag, MenuTable::Command(), FileConfig::Flush(), CommandManager::Get(), gPrefs, CommandDispatch::HandleTextualCommand(), mDirToWriteTo, mpShooter, CommandContext::project, SetIdleHandler(), 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 543 of file ScreenshotCommand.cpp.

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

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:74
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 636 of file ScreenshotCommand.cpp.

637{
638 // Read the parameters that were passed in
641
642 // Build a suitable filename
644 kCaptureWhatStrings()[ mCaptureMode ].Translation() );
645
646 if (mBack == kBlue)
647 {
648 mBackground = true;
649 mBackColor = wxColour(51, 102, 153);
650 }
651 else if (mBack == kWhite)
652 {
653 mBackground = true;
654 mBackColor = wxColour(255, 255, 255);
655 }
656 else
657 {
658 mBackground = false;
659 }
660
661}
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( ProjectWindow::Find( 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}
static ProjectWindow * Find(AudacityProject *pProject)

References ProjectWindow::Find(), and mIgnore.

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 672 of file ScreenshotCommand.cpp.

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

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 704 of file ScreenshotCommand.cpp.

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

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 717 of file ScreenshotCommand.cpp.

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

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 697 of file ScreenshotCommand.cpp.

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

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 739 of file ScreenshotCommand.cpp.

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

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

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 728 of file ScreenshotCommand.cpp.

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

Referenced by Apply().

Here is the caller graph for this function:

◆ GetWindowRect()

wxRect ScreenshotCommand::GetWindowRect ( wxTopLevelWindow *  w)
private

Definition at line 663 of file ScreenshotCommand.cpp.

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

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:103
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

References PackedArray::begin(), 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 613 of file ScreenshotCommand.cpp.

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

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{
186 pIdleHandlerProject = &project;
187}
static AudacityProject * pIdleHandlerProject
void IdleHandler(wxIdleEvent &event)

References IdleHandler(), mIdleHandler, and pIdleHandlerProject.

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 765 of file ScreenshotCommand.cpp.

765 {
766 if (w != ProjectWindow::Find( proj ) && !w->GetTitle().empty()) {
768 kCaptureWhatStrings()[ mCaptureMode ].Translation() +
769 (wxT("-") + w->GetTitle() + wxT("-")));
770 }
771 return mFileName;
772}

References ProjectWindow::Find(), 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: