mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-12 15:45:54 +01:00
Remove mod-track-panel and all mention of it
This commit is contained in:
@@ -1,212 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ModTrackPanelCallback.cpp
|
||||
|
||||
James Crook
|
||||
|
||||
Audacity is free software.
|
||||
This file is licensed under the wxWidgets license, see License.txt
|
||||
|
||||
********************************************************************//**
|
||||
|
||||
\class ModTrackPanelCallback
|
||||
\brief ModTrackPanelCallback is a class containing all the callback
|
||||
functions for the second generation TrackPanel. These functions are
|
||||
added into the standard Audacity Project Menus.
|
||||
|
||||
*//*****************************************************************//**
|
||||
|
||||
\class ModTrackPanelCommandFunctor
|
||||
\brief We create one of these functors for each menu item or
|
||||
command which we register with the Command Manager. These take the
|
||||
click from the menu into the actual function to be called.
|
||||
|
||||
*//********************************************************************/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "ModTrackPanelCallback.h"
|
||||
#include "Audacity.h"
|
||||
#include "ShuttleGui.h"
|
||||
#include "Project.h"
|
||||
#include "ModuleManager.h"
|
||||
#include "Registrar.h"
|
||||
#include "TrackPanel2.h"
|
||||
|
||||
/*
|
||||
There are several functions that can be used in a GUI module.
|
||||
|
||||
//#define versionFnName "GetVersionString"
|
||||
If the version is wrong, the module will be rejected.
|
||||
That is it will be loaded and then unloaded.
|
||||
|
||||
//#define ModuleDispatchName "ModuleDispatch"
|
||||
The most useful function. See the example in this
|
||||
file. It has several cases/options in it.
|
||||
|
||||
//#define scriptFnName "RegScriptServerFunc"
|
||||
This function is run from a non gui thread. It was originally
|
||||
created for the benefit of mod-script-pipe.
|
||||
|
||||
//#define mainPanelFnName "MainPanelFunc"
|
||||
This function is the hijacking function, to take over Audacity
|
||||
and replace the main project window with our own wxFrame.
|
||||
|
||||
*/
|
||||
|
||||
// The machinery here is somewhat overkill for what we need.
|
||||
// It allows us to add lots of menu and other actions into Audacity.
|
||||
// We need to jump through these hoops even if only adding
|
||||
// two menu items into Audacity.
|
||||
|
||||
// The OnFunc functrions are functions which can be invoked
|
||||
// by Audacity. Mostly they are for menu items. They could
|
||||
// be for buttons. They could be for commands invokable by
|
||||
// script (but no examples of that yet).
|
||||
class ModTrackPanelCallback
|
||||
{
|
||||
public:
|
||||
void OnFuncShowAudioExplorer();
|
||||
void OnFuncReplaceTrackPanel();
|
||||
};
|
||||
|
||||
typedef void (ModTrackPanelCallback::*ModTrackPanelCommandFunction)();
|
||||
|
||||
// We have an instance of this CommandFunctor for each
|
||||
// instance of a command we attach to Audacity.
|
||||
// Although the commands have void argument,
|
||||
// they do receive an instance of ModTrackPanelCallback as a 'this',
|
||||
// so if we want to, we can pass data to each function instance.
|
||||
class ModTrackPanelCommandFunctor:public CommandFunctor
|
||||
{
|
||||
public:
|
||||
ModTrackPanelCommandFunctor(ModTrackPanelCallback *pData,
|
||||
ModTrackPanelCommandFunction pFunction);
|
||||
virtual void operator()(int index = 0, const wxEvent * evt=NULL);
|
||||
public:
|
||||
ModTrackPanelCallback * mpData;
|
||||
ModTrackPanelCommandFunction mpFunction;
|
||||
};
|
||||
|
||||
// If pData is NULL we will later be passing a NULL 'this' to pFunction.
|
||||
// This may be quite OK if the class function is written as if it
|
||||
// could be static.
|
||||
ModTrackPanelCommandFunctor::ModTrackPanelCommandFunctor(ModTrackPanelCallback *pData,
|
||||
ModTrackPanelCommandFunction pFunction)
|
||||
{
|
||||
mpData = pData;
|
||||
mpFunction = pFunction;
|
||||
}
|
||||
|
||||
// The dispatching function in the command functor.
|
||||
void ModTrackPanelCommandFunctor::operator()(int index, const wxEvent * WXUNUSED(evt) )
|
||||
{
|
||||
(mpData->*(mpFunction))();
|
||||
}
|
||||
|
||||
#define ModTrackPanelFN(X) new ModTrackPanelCommandFunctor(pModTrackPanelCallback, \
|
||||
(ModTrackPanelCommandFunction)(&ModTrackPanelCallback::X))
|
||||
|
||||
|
||||
void ModTrackPanelCallback::OnFuncShowAudioExplorer()
|
||||
{
|
||||
int k=3;
|
||||
Registrar::ShowNewPanel();
|
||||
}
|
||||
|
||||
void ModTrackPanelCallback::OnFuncReplaceTrackPanel()
|
||||
{
|
||||
// Upgrade the factory. Now all TrackPanels will be created as TrackPanel 2's
|
||||
|
||||
#if 0
|
||||
AudacityProject *p = GetActiveProject();
|
||||
wxASSERT( p!= NULL );
|
||||
// Change it's type (No new storage allocated).
|
||||
TrackPanel2::Upgrade( &p->mTrackPanel );
|
||||
int k=4;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Oooh look, we're using a NULL object, and hence a NULL 'this'.
|
||||
// That's OK.
|
||||
ModTrackPanelCallback * pModTrackPanelCallback=NULL;
|
||||
|
||||
//This is the DLL related machinery that actually gets called by Audacity
|
||||
//as prt of loading and using a DLL.
|
||||
//It is MUCH simpler to use C for this interface because then the
|
||||
//function names are not 'mangled'.
|
||||
//The function names are important, because they are what Audacity looks
|
||||
//for. Change the name and they won't be found.
|
||||
//Change the signature, e.g. return type, and you probably have a crash.
|
||||
extern "C" {
|
||||
// GetVersionString
|
||||
// REQUIRED for the module to be accepted by Audacity.
|
||||
// Without it Audacity will see a version number mismatch.
|
||||
MOD_TRACK_PANEL_DLL_API wxChar * GetVersionString()
|
||||
{
|
||||
// Make sure that this version of the module requires the version
|
||||
// of Audacity it is built with.
|
||||
// For now, the versions must match exactly for Audacity to
|
||||
// agree to load the module.
|
||||
return AUDACITY_VERSION_STRING;
|
||||
}
|
||||
|
||||
// This is the function that connects us to Audacity.
|
||||
MOD_TRACK_PANEL_DLL_API int ModuleDispatch(ModuleDispatchTypes type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case AppInitialized:
|
||||
Registrar::Start();
|
||||
// Demand that all track panels be created using the TrackPanel2Factory.
|
||||
TrackPanel::FactoryFunction = TrackPanel2Factory;
|
||||
break;
|
||||
case AppQuiting:
|
||||
Registrar::Finish();
|
||||
break;
|
||||
case ProjectInitialized:
|
||||
case MenusRebuilt:
|
||||
{
|
||||
AudacityProject *p = GetActiveProject();
|
||||
if( p== NULL )
|
||||
return 0;
|
||||
|
||||
wxMenuBar * pBar = p->GetMenuBar();
|
||||
wxMenu * pMenu = pBar->GetMenu( 7 ); // Menu 7 is the Analyze Menu.
|
||||
CommandManager * c = p->GetCommandManager();
|
||||
|
||||
c->SetToMenu( pMenu );
|
||||
c->AddSeparator();
|
||||
// We add two new commands into the Analyze menu.
|
||||
c->AddItem( _T("Extra Dialog..."), _T("Experimental Extra Dialog for whatever you want."),
|
||||
ModTrackPanelFN( OnFuncShowAudioExplorer ) );
|
||||
//Second menu tweak no longer needed as we always make TrackPanel2's.
|
||||
//c->AddItem( _T("Replace TrackPanel..."), _T("Replace Current TrackPanel with TrackPanel2"),
|
||||
// ModTrackPanelFN( OnFuncReplaceTrackPanel ) );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Example code commented out.
|
||||
#if 1
|
||||
// This is an example function to hijack the main panel
|
||||
int MOD_TRACK_PANEL_DLL_API MainPanelFunc(int ix)
|
||||
{
|
||||
ix=ix;//compiler food
|
||||
// If we wanted to hide Audacity's Project,
|
||||
// we'd create a new wxFrame right here and return a pointer to it
|
||||
// as our return result.
|
||||
|
||||
// Don't hijack the main panel, just return a NULL;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
} // End extern "C"
|
||||
@@ -1,38 +0,0 @@
|
||||
// The following ifdef block is the standard way of creating macros which make exporting
|
||||
// from a DLL simpler. All files within this DLL are compiled with the LIBSCRIPT_EXPORTS
|
||||
// symbol defined on the command line. this symbol should not be defined on any project
|
||||
// that uses this DLL. This way any other project whose source files include this file see
|
||||
// MOD_TRACK_PANEL_DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
|
||||
|
||||
/* Magic for dynamic library import and export. This is unfortunately
|
||||
* compiler-specific because there isn't a standard way to do it. Currently it
|
||||
* works with the Visual Studio compiler for windows, and for GCC 4+. Anything
|
||||
* else gets all symbols made public, which gets messy */
|
||||
/* The Visual Studio implementation */
|
||||
#ifdef _MSC_VER
|
||||
#define MOD_TRACK_PANEL_DLL_IMPORT _declspec(dllimport)
|
||||
#ifdef BUILDING_MOD_TRACK_PANEL
|
||||
#define MOD_TRACK_PANEL_DLL_API _declspec(dllexport)
|
||||
#elif _DLL
|
||||
#define MOD_TRACK_PANEL_DLL_API _declspec(dllimport)
|
||||
#else
|
||||
#define AUDACITY_DLL_API
|
||||
#endif
|
||||
#endif //_MSC_VER
|
||||
|
||||
/* The GCC implementation */
|
||||
#ifdef CC_HASVISIBILITY // this is provided by the configure script, is only
|
||||
// enabled for suitable GCC versions
|
||||
/* The incantation is a bit weird here because it uses ELF symbol stuff. If we
|
||||
* make a symbol "default" it makes it visible (for import or export). Making it
|
||||
* "hidden" means it is invisible outside the shared object. */
|
||||
#define MOD_TRACK_PANEL_DLL_IMPORT __attribute__((visibility("default")))
|
||||
#ifdef BUILDING_MOD_TRACK_PANEL
|
||||
#define MOD_TRACK_PANEL_DLL_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define MOD_TRACK_PANEL_DLL_API __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
Registrar.cpp
|
||||
|
||||
James Crook
|
||||
|
||||
Audacity is free software.
|
||||
This file is licensed under the wxWidgets license, see License.txt
|
||||
|
||||
********************************************************************//**
|
||||
|
||||
\class Registrar
|
||||
\brief Registrar is a class that other classes register resources of
|
||||
various kinds with. It makes a system that is much more amenable to
|
||||
plugging in of new resources.
|
||||
|
||||
*//********************************************************************/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "Registrar.h"
|
||||
|
||||
Registrar * pRegistrar = NULL;
|
||||
|
||||
// By defining the external function and including it here, we save ourselves maintaing two lists.
|
||||
// Also we save ourselves recompiling Registrar each time the classes that regiser change.
|
||||
// Part of the idea is that the Registrar knows very little about the classes that
|
||||
// register with it.
|
||||
#define DISPATCH( Name ) extern int Name##Dispatch( Registrar & R, t_RegistrarDispatchType Type );\
|
||||
Name##Dispatch( *pRegistrar, Type )
|
||||
|
||||
// Not a class function, otherwise the functions called
|
||||
// are treated as belonging to the class.
|
||||
int RegistrarDispatch( t_RegistrarDispatchType Type )
|
||||
{
|
||||
wxASSERT( pRegistrar != NULL );
|
||||
|
||||
DISPATCH( SkewedRuler );
|
||||
DISPATCH( MidiArtist );
|
||||
DISPATCH( WaveArtist );
|
||||
DISPATCH( EnvelopeArtist );
|
||||
DISPATCH( LabelArtist );
|
||||
DISPATCH( DragGridSizer );
|
||||
DISPATCH( TrackPanel2 );
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Start()
|
||||
// Static function. Allocates Registrar.
|
||||
void Registrar::Start()
|
||||
{
|
||||
wxASSERT( pRegistrar ==NULL );
|
||||
pRegistrar = new Registrar();
|
||||
|
||||
RegistrarDispatch( RegResource );
|
||||
RegistrarDispatch( RegArtist );
|
||||
RegistrarDispatch( RegDataType );
|
||||
RegistrarDispatch( RegCommand );
|
||||
RegistrarDispatch( RegMenuItem );
|
||||
}
|
||||
|
||||
// Finish()
|
||||
// Static function. DeAllocates Registrar.
|
||||
void Registrar::Finish()
|
||||
{
|
||||
wxASSERT( pRegistrar !=NULL );
|
||||
delete pRegistrar;
|
||||
pRegistrar = NULL;
|
||||
}
|
||||
|
||||
void Registrar::ShowNewPanel()
|
||||
{
|
||||
wxASSERT( pRegistrar !=NULL );
|
||||
if( pRegistrar->pShowFn != NULL)
|
||||
pRegistrar->pShowFn();
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
Registrar.h
|
||||
|
||||
James Crook
|
||||
|
||||
Manages centralised registration of resources.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_REGISTRAR__
|
||||
#define __AUDACITY_REGISTRAR__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RegResource,
|
||||
RegArtist,
|
||||
RegDataType,
|
||||
RegCommand,
|
||||
RegMenuItem,
|
||||
RegLast
|
||||
} t_RegistrarDispatchType;
|
||||
|
||||
class Registrar {
|
||||
Registrar::Registrar(){
|
||||
pShowFn = NULL;}
|
||||
public:
|
||||
// Fairly generic registrar functions.
|
||||
static void Start();
|
||||
static void Finish();
|
||||
|
||||
// Somewhat specific to this application registrar functions.
|
||||
// These mostly reflect one-offs, where a more sophisticated
|
||||
// system would manage a list.
|
||||
static void ShowNewPanel();
|
||||
public:
|
||||
void (*pShowFn)(void);
|
||||
};
|
||||
|
||||
|
||||
extern int RegistrarDispatch( t_RegistrarDispatchType Type );
|
||||
|
||||
#endif
|
||||
@@ -1,136 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
Registrar.cpp
|
||||
|
||||
James Crook
|
||||
|
||||
Audacity is free software.
|
||||
This file is licensed under the wxWidgets license, see License.txt
|
||||
|
||||
********************************************************************//**
|
||||
|
||||
\class SkewedRuller
|
||||
\brief SkewedRuler draws a ruler for aligning two sequences.
|
||||
|
||||
*//********************************************************************/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "Registrar.h"
|
||||
#include "SkewedRuler.h"
|
||||
|
||||
extern int SkewedRulerDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// For now I've bunged these empty dispatch functions into the same
|
||||
// file as SkewedRuler.
|
||||
// When I am ready to work on them I will create new files for them.
|
||||
int MidiArtistDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern int WaveArtistDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int EnvelopeArtistDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LabelArtistDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int DragGridSizerDispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
SkewedRuler.h
|
||||
|
||||
James Crook
|
||||
|
||||
Draws a ruler used for aligning two time sequences.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_SKEWED_RULER__
|
||||
#define __AUDACITY_SKEWED_RULER__
|
||||
|
||||
|
||||
|
||||
class SkewedRuler {
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,133 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
Registrar.cpp
|
||||
|
||||
James Crook
|
||||
|
||||
Audacity is free software.
|
||||
This file is licensed under the wxWidgets license, see License.txt
|
||||
|
||||
********************************************************************//**
|
||||
|
||||
\class TrackPanel2
|
||||
\brief TrackPanel2 is the start of the new TrackPanel.
|
||||
|
||||
*//********************************************************************/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "ShuttleGui.h"
|
||||
#include "widgets/LinkingHtmlWindow.h"
|
||||
#include "SkewedRuler.h"
|
||||
#include "Registrar.h"
|
||||
#include "TrackPanel2.h"
|
||||
|
||||
TrackPanel * TrackPanel2Factory(wxWindow * parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos,
|
||||
const wxSize & size,
|
||||
TrackList * tracks,
|
||||
ViewInfo * viewInfo,
|
||||
TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler)
|
||||
{
|
||||
return new TrackPanel2(
|
||||
parent,
|
||||
id,
|
||||
pos,
|
||||
size,
|
||||
tracks,
|
||||
viewInfo,
|
||||
listener,
|
||||
ruler);
|
||||
}
|
||||
|
||||
void ShowExtraDialog()
|
||||
{
|
||||
int k=42;
|
||||
|
||||
wxDialog Dlg(NULL, wxID_ANY, wxString(wxT("Experimental Extra Dialog")));
|
||||
ShuttleGui S(&Dlg, eIsCreating);
|
||||
S.StartNotebook();
|
||||
{
|
||||
S.StartNotebookPage( _("Panel 1") );
|
||||
S.StartVerticalLay(1);
|
||||
{
|
||||
HtmlWindow *html = new LinkingHtmlWindow(S.GetParent(), -1,
|
||||
wxDefaultPosition,
|
||||
wxSize(600, 359),
|
||||
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
||||
html->SetFocus();
|
||||
html->SetPage(wxT("<h1><font color=\"blue\">An Html Window</font></h1>Replace with whatever you like."));
|
||||
S.Prop(1).AddWindow( html, wxEXPAND );
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
S.EndNotebookPage();
|
||||
|
||||
S.StartNotebookPage( _("Diagnostics") );
|
||||
S.StartVerticalLay(1);
|
||||
{
|
||||
HtmlWindow *html = new LinkingHtmlWindow(S.GetParent(), -1,
|
||||
wxDefaultPosition,
|
||||
wxSize(600, 359),
|
||||
wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
|
||||
html->SetFocus();
|
||||
html->SetPage(wxT("<h1>Diagnostics</h1>This is an html diagnostics page"));
|
||||
S.Prop(1).AddWindow( html, wxEXPAND );
|
||||
}
|
||||
S.EndVerticalLay();
|
||||
S.EndNotebookPage();
|
||||
}
|
||||
S.EndNotebook();
|
||||
|
||||
wxButton *ok = new wxButton(S.GetParent(), wxID_OK, _("OK... Audacious!"));
|
||||
ok->SetDefault();
|
||||
S.Prop(0).AddWindow( ok );
|
||||
|
||||
Dlg.Fit();
|
||||
|
||||
Dlg.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
int TrackPanel2Dispatch( Registrar & R, t_RegistrarDispatchType Type )
|
||||
{
|
||||
switch( Type )
|
||||
{
|
||||
case RegResource:
|
||||
R.pShowFn = ShowExtraDialog;
|
||||
break;
|
||||
case RegArtist:
|
||||
break;
|
||||
case RegDataType:
|
||||
break;
|
||||
case RegCommand:
|
||||
break;
|
||||
case RegMenuItem:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
TrackPanel2::TrackPanel2(
|
||||
wxWindow * parent, wxWindowID id, const wxPoint & pos, const wxSize & size,
|
||||
TrackList * tracks, ViewInfo * viewInfo, TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler) :
|
||||
TrackPanel(
|
||||
parent, id, pos, size,
|
||||
tracks, viewInfo, listener, ruler)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// Here is a sample function that shows that TrackPanel2 is being invoked.
|
||||
void TrackPanel2::OnPaint(wxPaintEvent & event)
|
||||
{
|
||||
// Hmm... Log debug will only show if you open the log window.
|
||||
// wxLogDebug( wxT("Paint TrackPanel2 requested") );
|
||||
TrackPanel::OnPaint( event );
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
TrackPanel2.h
|
||||
|
||||
James Crook
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_TRACK_PANEL2__
|
||||
#define __AUDACITY_TRACK_PANEL2__
|
||||
|
||||
#include "TrackPanel.h"
|
||||
|
||||
class TrackPanel2 : public TrackPanel
|
||||
{
|
||||
public:
|
||||
TrackPanel2(
|
||||
wxWindow * parent, wxWindowID id,
|
||||
const wxPoint & pos,
|
||||
const wxSize & size,
|
||||
TrackList * tracks,
|
||||
ViewInfo * viewInfo,
|
||||
TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler);
|
||||
|
||||
// Upgrades an existing TrackPanel to a TrackPanel2
|
||||
static void Upgrade( TrackPanel ** ppTrackPanel );
|
||||
|
||||
virtual void OnPaint(wxPaintEvent & event);
|
||||
};
|
||||
|
||||
// Factory function.
|
||||
TrackPanel * TrackPanel2Factory(wxWindow * parent,
|
||||
wxWindowID id,
|
||||
const wxPoint & pos,
|
||||
const wxSize & size,
|
||||
TrackList * tracks,
|
||||
ViewInfo * viewInfo,
|
||||
TrackPanelListener * listener,
|
||||
AdornedRulerPanel * ruler);
|
||||
|
||||
#endif
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2013 for Windows Desktop
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod-track-panel", "mod-track-panel.vcxproj", "{1D40165D-E385-4EAB-A755-CF5EA645F4FA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1D40165D-E385-4EAB-A755-CF5EA645F4FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1D40165D-E385-4EAB-A755-CF5EA645F4FA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1D40165D-E385-4EAB-A755-CF5EA645F4FA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1D40165D-E385-4EAB-A755-CF5EA645F4FA}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1D40165D-E385-4EAB-A755-CF5EA645F4FA}</ProjectGuid>
|
||||
<RootNamespace>modtrackpanel2</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(WXWIN)\lib\vc_dll\mswud;$(WXWIN)\include;$(SolutionDir);..\..\include;..\..\src;..\..\src\include\win32;..\..\src\include;..\..\win\;..\FileDialog;..\expat;..\lib-widget-extra;..\libflac\include;..\libid3tag;..\liblrdf;..\libmad;..\libnyquist;..\libogg\include;..\libresample\include;..\libsamplerate\src;..\libscorealign;..\libsndfile;..\libvamp;..\libvorbis\include;..\portaudio-v19\include;..\portmixer\include;..\portsmf;..\redland\raptor\src;..\slv2;..\sbsms\include;..\soundtouch\include;..\twolame\libtwolame;..\portmidi\pm_common;..\portmidi\pm_win;..\portmidi\porttime;..\ffmpeg\win32;..\ffmpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BUILDING_MOD_TRACK_PANEL;WXUSINGDLL;__WXMSW__;__WXDEBUG__;WIN32;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>wxmsw30ud_core.lib;wxbase30ud.lib;wxmsw30ud_html.lib;odbc32.lib;odbccp32.lib;oldnames.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;netapi32.lib;Audacity.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)modules\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(WXWIN)\lib\vc_dll;..\..\win\$(IntDir);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(WXWIN)\lib\vc_dll\mswu;$(WXWIN)\include;$(SolutionDir);..\..\include;..\..\src;..\..\src\include\win32;..\..\src\include;..\..\win;..\FileDialog;..\expat;..\lib-widget-extra;..\libflac\include;..\libid3tag;..\liblrdf;..\libmad;..\libnyquist;..\libogg\include;..\libresample\include;..\libsamplerate\src;..\libscorealign;..\libsndfile;..\libvamp;..\libvorbis\include;..\portaudio-v19\include;..\portmixer\include;..\portsmf;..\redland\raptor\src;..\slv2;..\sbsms\include;..\soundtouch\include;..\twolame\libtwolame;..\portmidi\pm_common;..\portmidi\pm_win;..\portmidi\porttime;..\ffmpeg\win32;..\ffmpeg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>BUILDING_MOD_TRACK_PANEL;WXUSINGDLL;__WXMSW__;NDEBUG;_WINDOWS;WIN32;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>wxmsw30u_core.lib;wxbase30u.lib;wxmsw30u_html.lib;odbc32.lib;odbccp32.lib;oldnames.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;netapi32.lib;Audacity.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)modules\$(ProjectName).dll</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(WXWIN)\lib\vc_dll;..\..\win\$(IntDir);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ModTrackPanelCallback.cpp" />
|
||||
<ClCompile Include="Registrar.cpp" />
|
||||
<ClCompile Include="SkewedRuler.cpp" />
|
||||
<ClCompile Include="TrackPanel2.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ModTrackPanelCallback.h" />
|
||||
<ClInclude Include="Registrar.h" />
|
||||
<ClInclude Include="SkewedRuler.h" />
|
||||
<ClInclude Include="TrackPanel2.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ModTrackPanelCallback.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Registrar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SkewedRuler.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TrackPanel2.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ModTrackPanelCallback.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Registrar.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SkewedRuler.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TrackPanel2.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user