Audacity  2.2.0
ScreenshotCommand Class Referencefinal

Implements a command for capturing various areas of the screen or project window. More...

#include <ScreenshotCommand.h>

Inheritance diagram for ScreenshotCommand:
CommandImplementation Command

Public Member Functions

void CaptureWindowOnIdle (wxWindow *pWin)
wxTopLevelWindow * GetFrontWindow (AudacityProject *project)
 ScreenshotCommand (CommandType &type, std::unique_ptr< CommandOutputTarget > &&output, wxWindow *ignore=NULL)
bool Apply (CommandExecutionContext context)
- Public Member Functions inherited from CommandImplementation
void Progress (double completed)
void Status (const wxString &status) override
void Error (const wxString &message) override
 CommandImplementation (CommandType &type, std::unique_ptr< CommandOutputTarget > &&output)
virtual ~CommandImplementation ()
wxString GetName ()
 An instance method for getting the command name (for consistency) More...
CommandSignatureGetSignature ()
 Get the signature of the command. More...
bool SetParameter (const wxString &paramName, const wxVariant &paramValue)
- Public Member Functions inherited from Command
virtual ~Command ()

Static Public Member Functions

static void SetIdleHandler (void(*pHandler)(wxIdleEvent &event))
static bool MayCapture (wxDialog *pDlg)

Static Public Attributes

static ScreenshotCommandmpShooter =NULL
static void(* mIdleHandler )(wxIdleEvent &event) = NULL

Private Member Functions

wxString MakeFileName (const wxString &path, const wxString &basename)
wxRect GetBackgroundRect ()
void CaptureToolbar (ToolManager *man, int type, const wxString &name)
void CaptureDock (wxWindow *win, const wxString &fileName)
void CaptureMenus (wxMenuBar *pBar, const wxString &fileName)
void CaptureEffects (AudacityProject *pProject, const wxString &fileName)
void CapturePreferences (AudacityProject *pProject, const wxString &fileName)
void Capture (const wxString &basename, wxWindow *window, int x, int y, int width, int height, bool bg=false)

Private Attributes

wxWindow * mIgnore
bool mBackground
wxColour mBackColor
wxString mDirToWriteTo

Additional Inherited Members

- Protected Member Functions inherited from CommandImplementation
void TypeCheck (const wxString &typeName, const wxString &paramName, const wxVariant &param)
void CheckParam (const wxString &paramName)
bool GetBool (const wxString &paramName)
long GetLong (const wxString &paramName)
double GetDouble (const wxString &paramName)
wxString GetString (const wxString &paramName)
- Protected Attributes inherited from CommandImplementation
< CommandOutputTarget

Detailed Description

Implements a command for capturing various areas of the screen or project window.

Constructor & Destructor Documentation

ScreenshotCommand::ScreenshotCommand ( CommandType type,
std::unique_ptr< CommandOutputTarget > &&  output,
wxWindow *  ignore = NULL 

Member Function Documentation

void ScreenshotCommand::Capture ( const wxString &  basename,
wxWindow *  window,
int  x,
int  y,
int  width,
int  height,
bool  bg = false 
void ScreenshotCommand::CaptureDock ( wxWindow *  win,
const wxString &  fileName 

References Capture().

Referenced by Apply().

void ScreenshotCommand::CaptureEffects ( AudacityProject pProject,
const wxString &  fileName 
void ScreenshotCommand::CaptureMenus ( wxMenuBar *  pBar,
const wxString &  fileName 

References Capture(), and ExploreMenu().

Referenced by Apply().

void ScreenshotCommand::CapturePreferences ( AudacityProject pProject,
const wxString &  fileName 
void ScreenshotCommand::CaptureToolbar ( ToolManager man,
int  type,
const wxString &  name 
void ScreenshotCommand::CaptureWindowOnIdle ( wxWindow *  pWin)

References Capture(), and mDirToWriteTo.

Referenced by IdleHandler().

wxRect ScreenshotCommand::GetBackgroundRect ( )

Referenced by Apply(), and Capture().

wxTopLevelWindow * ScreenshotCommand::GetFrontWindow ( AudacityProject project)

References mIgnore.

Referenced by Apply().

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

Referenced by Apply().

bool ScreenshotCommand::MayCapture ( wxDialog *  pDlg)
static void ScreenshotCommand::SetIdleHandler ( void(*)(wxIdleEvent &event)  pHandler)

References mIdleHandler.

Referenced by CaptureEffects(), and CapturePreferences().

Member Data Documentation

wxColour ScreenshotCommand::mBackColor

Referenced by Apply(), and Capture().

bool ScreenshotCommand::mBackground

Referenced by Apply(), and Capture().

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

Referenced by MayCapture(), and SetIdleHandler().

wxWindow* ScreenshotCommand::mIgnore

Referenced by CaptureToolbar(), and GetFrontWindow().

ScreenshotCommand * ScreenshotCommand::mpShooter =NULL

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