1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00
audacity/src/TrackPanelListener.h
Leland Lucius 2457579091 Bug 765 - Delays using Edit commands and Draw Tool in long projects
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by

(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.

Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
2015-04-07 12:20:50 +01:00

44 lines
1.4 KiB
C++

/**********************************************************************
Audacity: A Digital Audio Editor
TrackPanelListener.h
Dominic Mazzoni
**********************************************************************/
#ifndef __AUDACITY_TRACK_PANEL_LISTENER__
#define __AUDACITY_TRACK_PANEL_LISTENER__
class ToolsToolBar;
class ControlToolBar;
class AUDACITY_DLL_API TrackPanelListener {
public:
TrackPanelListener(){};
virtual ~TrackPanelListener(){};
virtual void TP_DisplaySelection() = 0;
virtual void TP_DisplayStatusMessage(wxString msg) = 0;
virtual int TP_GetCurrentTool() = 0;
virtual ToolsToolBar * TP_GetToolsToolBar() = 0;
virtual ControlToolBar * TP_GetControlToolBar() = 0;
virtual void TP_OnPlayKey() = 0;
virtual void TP_PushState(wxString shortDesc, wxString longDesc,
int flags = PUSH_AUTOSAVE) = 0;
virtual void TP_ModifyState(bool bWantsAutoSave) = 0; // if true, writes auto-save file. Should set only if you really want the state change restored after
// a crash, as it can take many seconds for large (eg. 10 track-hours) projects
virtual void TP_RedrawScrollbars() = 0;
virtual void TP_ScrollLeft() = 0;
virtual void TP_ScrollRight() = 0;
virtual void TP_ScrollWindow(double scrollto) = 0;
virtual void TP_ScrollUpDown(int delta) = 0;
virtual void TP_HandleResize() = 0;
};
#endif