mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 14:13:57 +01:00
Capture screenshots of effects.
Only available if you define EXPERIMENTAL_DOCS_AUTOMATION. This code is still a bit ropey and not suited for prime time, but fine for our own (careful) use in preparing the manual. It captures most of the effects, generator and analyze built ins and nyquist dialogs. Use it by creating a track, making a selection and then clicking the 'All Effects' button in the screenshot tools. The dialogs will be captured to your user directory.
This commit is contained in:
@@ -88,6 +88,9 @@ const wxString Effect::kFactoryPresetIdent = wxT("Factory Preset:");
|
||||
const wxString Effect::kCurrentSettingsIdent = wxT("<Current Settings>");
|
||||
const wxString Effect::kFactoryDefaultsIdent = wxT("<Factory Defaults>");
|
||||
|
||||
// static member variable.
|
||||
void (*Effect::mIdleHandler)(wxIdleEvent& event) = NULL;
|
||||
|
||||
WX_DECLARE_VOIDPTR_HASH_MAP( bool, t2bHash );
|
||||
|
||||
Effect::Effect()
|
||||
@@ -541,11 +544,19 @@ bool Effect::ShowInterface(wxWindow *parent, bool forceModal)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
mUIDialog->Layout();
|
||||
mUIDialog->Fit();
|
||||
mUIDialog->SetMinSize(mUIDialog->GetSize());
|
||||
|
||||
if (SupportsRealtime() && !forceModal)
|
||||
// Idle event handler is used for example to take a screenshot.
|
||||
if( mIdleHandler != NULL ){
|
||||
mUIDialog->Bind( wxEVT_IDLE, mIdleHandler );
|
||||
mIdleHandler = NULL;
|
||||
forceModal = true;
|
||||
}
|
||||
|
||||
if( SupportsRealtime() && !forceModal )
|
||||
{
|
||||
mUIDialog->Show();
|
||||
cleanup.release();
|
||||
@@ -2828,7 +2839,6 @@ EffectUIHost::EffectUIHost(wxWindow *parent,
|
||||
mEnabled = true;
|
||||
|
||||
mPlayPos = 0.0;
|
||||
|
||||
mClient->SetHostUI(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/event.h> // for idle event.
|
||||
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
@@ -259,6 +260,7 @@ class AUDACITY_DLL_API Effect /* not final */ : public wxEvtHandler,
|
||||
/* not virtual */ bool IsRealtimeActive();
|
||||
|
||||
virtual bool IsHidden();
|
||||
static void SetIdleHandler( void (*pHandler)(wxIdleEvent& event) ){mIdleHandler=pHandler;};
|
||||
|
||||
//
|
||||
// protected virtual methods
|
||||
@@ -437,6 +439,8 @@ protected:
|
||||
// may be needed by any particular subclass of Effect.
|
||||
//
|
||||
protected:
|
||||
static void (*mIdleHandler)(wxIdleEvent& event);
|
||||
|
||||
ProgressDialog *mProgress; // Temporary pointer, NOT deleted in destructor.
|
||||
double mProjectRate; // Sample rate of the project - NEW tracks should
|
||||
// be created with this rate...
|
||||
|
||||
Reference in New Issue
Block a user