More const and override
This commit is contained in:
parent
9ddb5bb1f3
commit
81285ee0c1
|
@ -642,7 +642,7 @@ private:
|
|||
|
||||
friend void InitAudioIO();
|
||||
|
||||
TimeTrack *mTimeTrack;
|
||||
const TimeTrack *mTimeTrack;
|
||||
|
||||
// For cacheing supported sample rates
|
||||
static int mCachedPlaybackIndex;
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
|
||||
// This class only knows reading tags
|
||||
// void WriteXML(XMLWriter & WXUNUSED(xmlFile)) /* not override */ { wxASSERT(false); }
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -121,9 +121,9 @@ class PROFILE_DLL_API DirManager final : public XMLTagHandler {
|
|||
// Note: following affects only the loading of block files when opening a project
|
||||
void SetLoadingMaxSamples(size_t max) { mMaxSamples = max; }
|
||||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) { return NULL; }
|
||||
void WriteXML(XMLWriter & WXUNUSED(xmlFile)) { wxASSERT(false); } // This class only reads tags.
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) override
|
||||
{ return NULL; }
|
||||
bool AssignFile(wxFileNameWrapper &filename, const wxString &value, bool check);
|
||||
|
||||
// Clean the temp dir. Note that now where we have auto recovery the temp
|
||||
|
|
|
@ -331,7 +331,7 @@ float Envelope::ValueOfPixel( int y, int height, bool upper,
|
|||
/// a given time value:
|
||||
/// We have an upper and lower envelope line.
|
||||
/// Also we may be showing an inner envelope (at 0.5 the range).
|
||||
bool Envelope::HandleMouseButtonDown(wxMouseEvent & event, wxRect & r,
|
||||
bool Envelope::HandleMouseButtonDown(const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo,
|
||||
bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax)
|
||||
|
@ -476,7 +476,7 @@ void Envelope::MarkDragPointForDeletion()
|
|||
mEnv[mDragPoint].SetVal(mEnv[iNeighbourPoint].GetVal());
|
||||
}
|
||||
|
||||
void Envelope::MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
|
||||
void Envelope::MoveDraggedPoint( const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax)
|
||||
{
|
||||
|
@ -511,7 +511,7 @@ void Envelope::MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
|
|||
|
||||
}
|
||||
|
||||
bool Envelope::HandleDragging( wxMouseEvent & event, wxRect & r,
|
||||
bool Envelope::HandleDragging( const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax)
|
||||
{
|
||||
|
@ -559,7 +559,7 @@ void Envelope::Insert(int point, const EnvPoint &p)
|
|||
}
|
||||
|
||||
// Returns true if parent needs to be redrawn
|
||||
bool Envelope::MouseEvent(wxMouseEvent & event, wxRect & r,
|
||||
bool Envelope::MouseEvent(const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
double GetVal() const { return mVal; }
|
||||
inline void SetVal(double val);
|
||||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override
|
||||
{
|
||||
if (!wxStrcmp(tag, wxT("controlpoint"))) {
|
||||
while (*attrs) {
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag))
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -112,13 +112,13 @@ class Envelope final : public XMLTagHandler {
|
|||
|
||||
// Event Handlers
|
||||
// Each ofthese returns true if parents needs to be redrawn
|
||||
bool MouseEvent(wxMouseEvent & event, wxRect & r,
|
||||
bool MouseEvent(const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax);
|
||||
bool HandleMouseButtonDown( wxMouseEvent & event, wxRect & r,
|
||||
bool HandleMouseButtonDown( const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax);
|
||||
bool HandleDragging( wxMouseEvent & event, wxRect & r,
|
||||
bool HandleDragging( const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax);
|
||||
bool HandleMouseButtonUp();
|
||||
|
@ -200,7 +200,7 @@ private:
|
|||
float zoomMin, float zoomMax);
|
||||
void BinarySearchForTime( int &Lo, int &Hi, double t ) const;
|
||||
double GetInterpolationStartValueAtPoint( int iPoint ) const;
|
||||
void MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
|
||||
void MoveDraggedPoint( const wxMouseEvent & event, wxRect & r,
|
||||
const ZoomInfo &zoomInfo, bool dB, double dBRange,
|
||||
float zoomMin, float zoomMax);
|
||||
|
||||
|
|
|
@ -2261,7 +2261,7 @@ XMLTagHandler *LabelTrack::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void LabelTrack::WriteXML(XMLWriter &xmlFile)
|
||||
void LabelTrack::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
int len = mLabels.size();
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ class AUDACITY_DLL_API LabelTrack final : public Track
|
|||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) override;
|
||||
void WriteXML(XMLWriter &xmlFile) const override;
|
||||
|
||||
#if LEGACY_PROJECT_FILE_SUPPORT
|
||||
bool Load(wxTextFile * in, DirManager * dirManager) override;
|
||||
|
|
|
@ -5121,7 +5121,7 @@ void AudacityProject::OnToggleSpectralSelection()
|
|||
void AudacityProject::DoNextPeakFrequency(bool up)
|
||||
{
|
||||
// Find the first selected wave track that is in a spectrogram view.
|
||||
WaveTrack *pTrack = 0;
|
||||
const WaveTrack *pTrack {};
|
||||
SelectedTrackListOfKindIterator iter(Track::Wave, GetTracks());
|
||||
for (Track *t = iter.First(); t; t = iter.Next()) {
|
||||
WaveTrack *const wt = static_cast<WaveTrack*>(t);
|
||||
|
|
|
@ -564,7 +564,7 @@ bool NoteTrack::Shift(double t) // t is always seconds
|
|||
return true;
|
||||
}
|
||||
|
||||
double NoteTrack::NearestBeatTime(double time, double *beat)
|
||||
double NoteTrack::NearestBeatTime(double time, double *beat) const
|
||||
{
|
||||
wxASSERT(mSeq);
|
||||
// Alg_seq knows nothing about offset, so remove offset time
|
||||
|
@ -601,7 +601,7 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
Alg_seq *NoteTrack::MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup)
|
||||
Alg_seq *NoteTrack::MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup) const
|
||||
{
|
||||
cleanup.reset();
|
||||
double offset = GetOffset();
|
||||
|
@ -615,10 +615,16 @@ Alg_seq *NoteTrack::MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup)
|
|||
cleanup.reset( mSeq->copy(start, mSeq->get_dur() - start, false) );
|
||||
auto seq = cleanup.get();
|
||||
if (offset > 0) {
|
||||
{
|
||||
// Cheat a little
|
||||
NoteTrack *pMutable = const_cast< NoteTrack * >(this);
|
||||
|
||||
// swap cleanup and mSeq so that Shift operates on the NEW copy
|
||||
swap(mSeq, cleanup);
|
||||
Shift(offset);
|
||||
swap(mSeq, cleanup); // undo the swap
|
||||
swap(pMutable->mSeq, cleanup);
|
||||
auto cleanup2 = finally( [&] { swap(pMutable->mSeq, cleanup); } );
|
||||
|
||||
pMutable->Shift(offset);
|
||||
}
|
||||
#ifdef OLD_CODE
|
||||
// now shift events by offset. This must be done with an integer
|
||||
// number of measures, so first, find the beats-per-measure
|
||||
|
@ -720,7 +726,7 @@ Alg_seq *NoteTrack::MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup)
|
|||
}
|
||||
|
||||
|
||||
bool NoteTrack::ExportMIDI(const wxString &f)
|
||||
bool NoteTrack::ExportMIDI(const wxString &f) const
|
||||
{
|
||||
std::unique_ptr<Alg_seq> cleanup;
|
||||
auto seq = MakeExportableSeq(cleanup);
|
||||
|
@ -728,7 +734,7 @@ bool NoteTrack::ExportMIDI(const wxString &f)
|
|||
return rslt;
|
||||
}
|
||||
|
||||
bool NoteTrack::ExportAllegro(const wxString &f)
|
||||
bool NoteTrack::ExportAllegro(const wxString &f) const
|
||||
{
|
||||
double offset = GetOffset();
|
||||
bool in_seconds;
|
||||
|
@ -800,7 +806,7 @@ XMLTagHandler *NoteTrack::HandleXMLChild(const wxChar * WXUNUSED(tag))
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void NoteTrack::WriteXML(XMLWriter &xmlFile)
|
||||
void NoteTrack::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
std::ostringstream data;
|
||||
// Normally, Duplicate is called in pairs -- once to put NoteTrack
|
||||
|
@ -818,7 +824,7 @@ void NoteTrack::WriteXML(XMLWriter &xmlFile)
|
|||
// and perform WriteXML, we may need to restore NoteTracks from binary
|
||||
// blobs to regular data structures (with an Alg_seq member).
|
||||
Track::Holder holder;
|
||||
NoteTrack *saveme = this;
|
||||
const NoteTrack *saveme = this;
|
||||
if (!mSeq) { // replace saveme with an (unserialized) duplicate
|
||||
holder = Duplicate();
|
||||
saveme = static_cast<NoteTrack*>(holder.get());
|
||||
|
|
|
@ -78,9 +78,9 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
|
|||
|
||||
int GetVisibleChannels();
|
||||
|
||||
Alg_seq *MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup);
|
||||
bool ExportMIDI(const wxString &f);
|
||||
bool ExportAllegro(const wxString &f);
|
||||
Alg_seq *MakeExportableSeq(std::unique_ptr<Alg_seq> &cleanup) const;
|
||||
bool ExportMIDI(const wxString &f) const;
|
||||
bool ExportAllegro(const wxString &f) const;
|
||||
|
||||
/* REQUIRES PORTMIDI */
|
||||
// int GetLastMidiPosition() const { return mLastMidiPosition; }
|
||||
|
@ -102,7 +102,7 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
|
|||
void SetGain(float gain) { mGain = gain; }
|
||||
#endif
|
||||
|
||||
double NearestBeatTime(double time, double *beat);
|
||||
double NearestBeatTime(double time, double *beat) const;
|
||||
bool StretchRegion(double b0, double b1, double dur);
|
||||
|
||||
int GetBottomNote() const { return mBottomNote; }
|
||||
|
@ -172,7 +172,7 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
|
|||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) override;
|
||||
void WriteXML(XMLWriter &xmlFile) const override;
|
||||
|
||||
// channels are numbered as integers 0-15, visible channels
|
||||
// (mVisibleChannels) is a bit set. Channels are displayed as
|
||||
|
|
|
@ -59,7 +59,7 @@ Profiler::~Profiler()
|
|||
}
|
||||
|
||||
///start the task timer.
|
||||
void Profiler::Begin(char* fileName, int lineNum, char* taskDescription)
|
||||
void Profiler::Begin(const char* fileName, int lineNum, const char* taskDescription)
|
||||
{
|
||||
mTasksMutex.Lock();
|
||||
GetOrCreateTaskProfile(fileName,lineNum)->Begin(fileName,lineNum,taskDescription);
|
||||
|
@ -67,7 +67,7 @@ void Profiler::Begin(char* fileName, int lineNum, char* taskDescription)
|
|||
}
|
||||
|
||||
///end the task timer.
|
||||
void Profiler::End(char* fileName, int lineNum, char* taskDescription)
|
||||
void Profiler::End(const char* fileName, int lineNum, const char* taskDescription)
|
||||
{
|
||||
mTasksMutex.Lock();
|
||||
TaskProfile* tp;
|
||||
|
@ -87,7 +87,7 @@ Profiler* Profiler::Instance()
|
|||
}
|
||||
|
||||
///find a taskProfile for the given task, otherwise create
|
||||
TaskProfile* Profiler::GetOrCreateTaskProfile(char* fileName, int lineNum)
|
||||
TaskProfile* Profiler::GetOrCreateTaskProfile(const char* fileName, int lineNum)
|
||||
{
|
||||
for(int i=0;i<(int)mTasks.size();i++)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ TaskProfile* Profiler::GetOrCreateTaskProfile(char* fileName, int lineNum)
|
|||
return mTasks.back().get();
|
||||
}
|
||||
|
||||
TaskProfile* Profiler::GetTaskProfileByDescription(char* description)
|
||||
TaskProfile* Profiler::GetTaskProfileByDescription(const char* description)
|
||||
{
|
||||
for(int i=0;i<(int)mTasks.size();i++)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ TaskProfile::~TaskProfile()
|
|||
}
|
||||
|
||||
///start the task timer.
|
||||
void TaskProfile::Begin(char* fileName, int lineNum, char* taskDescription)
|
||||
void TaskProfile::Begin(const char* fileName, int lineNum, const char* taskDescription)
|
||||
{
|
||||
if(!mFileName)
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ void TaskProfile::Begin(char* fileName, int lineNum, char* taskDescription)
|
|||
}
|
||||
|
||||
///end the task timer.
|
||||
void TaskProfile::End(char* WXUNUSED(fileName), int WXUNUSED(lineNum), char* WXUNUSED(taskDescription))
|
||||
void TaskProfile::End(const char* WXUNUSED(fileName), int WXUNUSED(lineNum), const char* WXUNUSED(taskDescription))
|
||||
{
|
||||
mCumTime += clock() - mLastTime;
|
||||
mNumHits++;
|
||||
|
|
|
@ -44,9 +44,9 @@ class Profiler
|
|||
virtual ~Profiler();
|
||||
|
||||
///start the task timer.
|
||||
void Begin(char* fileName, int lineNum, char* taskDescription);
|
||||
void Begin(const char* fileName, int lineNum, const char* taskDescription);
|
||||
///end the task timer.
|
||||
void End(char* fileName, int lineNum, char* taskDescription);
|
||||
void End(const char* fileName, int lineNum, const char* taskDescription);
|
||||
|
||||
///Gets the singleton instance
|
||||
static Profiler* Instance();
|
||||
|
@ -56,8 +56,8 @@ class Profiler
|
|||
Profiler(){};
|
||||
|
||||
///find a taskProfile for the given task, otherwise create
|
||||
TaskProfile* GetOrCreateTaskProfile(char* fileName, int lineNum);
|
||||
TaskProfile* GetTaskProfileByDescription(char* description);
|
||||
TaskProfile* GetOrCreateTaskProfile(const char* fileName, int lineNum);
|
||||
TaskProfile* GetTaskProfileByDescription(const char* description);
|
||||
|
||||
//List of current Task to do.
|
||||
std::vector<movable_ptr<TaskProfile>> mTasks;
|
||||
|
@ -73,9 +73,9 @@ class Profiler
|
|||
virtual ~TaskProfile();
|
||||
|
||||
///start the task timer.
|
||||
void Begin(char* fileName, int lineNum, char* taskDescription);
|
||||
void Begin(const char* fileName, int lineNum, const char* taskDescription);
|
||||
///end the task timer.
|
||||
void End(char* fileName, int lineNum, char* taskDescription);
|
||||
void End(const char* fileName, int lineNum, const char* taskDescription);
|
||||
|
||||
double ComputeAverageRunTime();
|
||||
|
||||
|
|
|
@ -3511,7 +3511,7 @@ XMLTagHandler *AudacityProject::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void AudacityProject::WriteXMLHeader(XMLWriter &xmlFile)
|
||||
void AudacityProject::WriteXMLHeader(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.Write(wxT("<?xml "));
|
||||
xmlFile.Write(wxT("version=\"1.0\" "));
|
||||
|
@ -3570,9 +3570,9 @@ void AudacityProject::WriteXML(XMLWriter &xmlFile)
|
|||
|
||||
mTags->WriteXML(xmlFile);
|
||||
|
||||
Track *t;
|
||||
const Track *t;
|
||||
WaveTrack* pWaveTrack;
|
||||
TrackListIterator iter(GetTracks());
|
||||
TrackListConstIterator iter(GetTracks());
|
||||
t = iter.First();
|
||||
unsigned int ndx = 0;
|
||||
while (t) {
|
||||
|
@ -3617,7 +3617,6 @@ void AudacityProject::WriteXML(XMLWriter &xmlFile)
|
|||
|
||||
t = iter.Next();
|
||||
}
|
||||
mStrOtherNamesArray.Clear();
|
||||
|
||||
if (!mAutoSaving)
|
||||
{
|
||||
|
@ -3798,6 +3797,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
|
|||
|
||||
WriteXMLHeader(saveFile);
|
||||
WriteXML(saveFile);
|
||||
mStrOtherNamesArray.Clear();
|
||||
|
||||
saveFile.Close();
|
||||
}
|
||||
|
@ -4677,6 +4677,14 @@ ToolsToolBar *AudacityProject::GetToolsToolBar()
|
|||
NULL);
|
||||
}
|
||||
|
||||
const ToolsToolBar *AudacityProject::GetToolsToolBar() const
|
||||
{
|
||||
return (ToolsToolBar *)
|
||||
(mToolManager ?
|
||||
mToolManager->GetToolBar(ToolsBarID) :
|
||||
NULL);
|
||||
}
|
||||
|
||||
TranscriptionToolBar *AudacityProject::GetTranscriptionToolBar()
|
||||
{
|
||||
return (TranscriptionToolBar *)
|
||||
|
@ -5080,6 +5088,7 @@ void AudacityProject::AutoSave()
|
|||
AutoSaveFile buffer;
|
||||
WriteXMLHeader(buffer);
|
||||
WriteXML(buffer);
|
||||
mStrOtherNamesArray.Clear();
|
||||
|
||||
wxFFile saveFile;
|
||||
saveFile.Open(fn + wxT(".tmp"), wxT("wb"));
|
||||
|
|
|
@ -143,7 +143,8 @@ class ImportXMLTagHandler final : public XMLTagHandler
|
|||
ImportXMLTagHandler(AudacityProject* pProject) { mProject = pProject; }
|
||||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) override { return NULL; }
|
||||
XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) override
|
||||
{ return NULL; }
|
||||
|
||||
// Don't want a WriteXML method because ImportXMLTagHandler is not a WaveTrack.
|
||||
// <import> tags are instead written by AudacityProject::WriteXML.
|
||||
|
@ -168,6 +169,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
|
|||
AudioIOStartStreamOptions GetDefaultPlayOptions();
|
||||
|
||||
TrackList *GetTracks() { return mTracks.get(); }
|
||||
const TrackList *GetTracks() const { return mTracks.get(); }
|
||||
UndoManager *GetUndoManager() { return mUndoManager.get(); }
|
||||
|
||||
sampleFormat GetDefaultFormat() { return mDefaultFormat; }
|
||||
|
@ -261,6 +263,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
|
|||
|
||||
wxPanel *GetTopPanel() { return mTopPanel; }
|
||||
TrackPanel * GetTrackPanel() {return mTrackPanel;}
|
||||
const TrackPanel * GetTrackPanel() const {return mTrackPanel;}
|
||||
|
||||
bool GetIsEmpty();
|
||||
|
||||
|
@ -298,6 +301,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
|
|||
#include "Menus.h"
|
||||
|
||||
CommandManager *GetCommandManager() { return &mCommandManager; }
|
||||
const CommandManager *GetCommandManager() const { return &mCommandManager; }
|
||||
|
||||
// Keyboard capture
|
||||
static bool HasKeyboardCapture(const wxWindow *handler);
|
||||
|
@ -460,6 +464,7 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
|
|||
SpectralSelectionBar *GetSpectralSelectionBar();
|
||||
#endif
|
||||
ToolsToolBar *GetToolsToolBar();
|
||||
const ToolsToolBar *GetToolsToolBar() const;
|
||||
TranscriptionToolBar *GetTranscriptionToolBar();
|
||||
|
||||
Meter *GetPlaybackMeter();
|
||||
|
@ -506,7 +511,7 @@ public:
|
|||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) /* not override */;
|
||||
|
||||
void WriteXMLHeader(XMLWriter &xmlFile);
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
|
||||
PlayMode mLastPlayMode{ PlayMode::normalPlay };
|
||||
ViewInfo mViewInfo;
|
||||
|
@ -543,8 +548,8 @@ public:
|
|||
void DeleteCurrentAutoSaveFile();
|
||||
|
||||
public:
|
||||
bool IsSoloSimple() { return mSoloPref == wxT("Simple"); }
|
||||
bool IsSoloNone() { return mSoloPref == wxT("None"); }
|
||||
bool IsSoloSimple() const { return mSoloPref == wxT("Simple"); }
|
||||
bool IsSoloNone() const { return mSoloPref == wxT("None"); }
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -1024,7 +1024,7 @@ XMLTagHandler *Sequence::HandleXMLChild(const wxChar *tag)
|
|||
}
|
||||
|
||||
// Throws exceptions rather than reporting errors.
|
||||
void Sequence::WriteXML(XMLWriter &xmlFile)
|
||||
void Sequence::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
unsigned int b;
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ void Sequence::WriteXML(XMLWriter &xmlFile)
|
|||
xmlFile.WriteAttr(wxT("numsamples"), mNumSamples.as_long_long() );
|
||||
|
||||
for (b = 0; b < mBlock.size(); b++) {
|
||||
SeqBlock &bb = mBlock[b];
|
||||
const SeqBlock &bb = mBlock[b];
|
||||
|
||||
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=451.
|
||||
// Also, don't check against mMaxSamples for AliasBlockFiles, because if you convert sample format,
|
||||
|
|
|
@ -136,7 +136,7 @@ class PROFILE_DLL_API Sequence final : public XMLTagHandler{
|
|||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
void HandleXMLEndTag(const wxChar *tag) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) /* not override */;
|
||||
void WriteXML(XMLWriter &xmlFile) const /* not override */;
|
||||
|
||||
bool GetErrorOpening() { return mErrorOpening; }
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ XMLTagHandler *Tags::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void Tags::WriteXML(XMLWriter &xmlFile)
|
||||
void Tags::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("tags"));
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class AUDACITY_DLL_API Tags final : public XMLTagHandler {
|
|||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) /* not override */;
|
||||
void WriteXML(XMLWriter &xmlFile) const /* not override */;
|
||||
|
||||
void AllowEditTitle(bool editTitle);
|
||||
void AllowEditTrackNumber(bool editTrackNumber);
|
||||
|
|
|
@ -206,7 +206,7 @@ XMLTagHandler *TimeTrack::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void TimeTrack::WriteXML(XMLWriter &xmlFile)
|
||||
void TimeTrack::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("timetrack"));
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class TimeTrack final : public Track {
|
|||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
void HandleXMLEndTag(const wxChar *tag) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) override;
|
||||
void WriteXML(XMLWriter &xmlFile) const override;
|
||||
|
||||
// Lock and unlock the track: you must lock the track before
|
||||
// doing a copy and paste between projects.
|
||||
|
|
|
@ -106,7 +106,7 @@ class AUDACITY_DLL_API Track /* not final */ : public XMLTagHandler
|
|||
// This just returns a constant and can be overriden by subclasses
|
||||
// to specify a different height for the case that the track is minimized.
|
||||
virtual int GetMinimizedHeight() const;
|
||||
int GetActualHeight() { return mHeight; };
|
||||
int GetActualHeight() const { return mHeight; }
|
||||
|
||||
int GetIndex() const;
|
||||
void SetIndex(int index);
|
||||
|
@ -124,7 +124,7 @@ class AUDACITY_DLL_API Track /* not final */ : public XMLTagHandler
|
|||
bool GetMinimized() const;
|
||||
void SetMinimized(bool isMinimized);
|
||||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
float GetVirtualTrackPercentage() { return mPerY;}
|
||||
float GetVirtualTrackPercentage() const { return mPerY;}
|
||||
void SetVirtualTrackPercentage(float val) { mPerY = val;}
|
||||
bool GetVirtualStereo() { return mVirtualStereo;}
|
||||
void SetVirtualStereo(bool vStereo) { mVirtualStereo = vStereo;}
|
||||
|
@ -234,7 +234,7 @@ class AUDACITY_DLL_API Track /* not final */ : public XMLTagHandler
|
|||
virtual int GetKind() const { return None; }
|
||||
|
||||
// XMLTagHandler callback methods -- NEW virtual for writing
|
||||
virtual void WriteXML(XMLWriter &xmlFile) = 0;
|
||||
virtual void WriteXML(XMLWriter &xmlFile) const = 0;
|
||||
|
||||
// Returns true if an error was encountered while trying to
|
||||
// open the track from XML
|
||||
|
@ -544,7 +544,7 @@ class AUDACITY_DLL_API TrackFactory
|
|||
public:
|
||||
// These methods are defined in WaveTrack.cpp, NoteTrack.cpp,
|
||||
// LabelTrack.cpp, and TimeTrack.cpp respectively
|
||||
std::unique_ptr<WaveTrack> DuplicateWaveTrack(WaveTrack &orig);
|
||||
std::unique_ptr<WaveTrack> DuplicateWaveTrack(const WaveTrack &orig);
|
||||
std::unique_ptr<WaveTrack> NewWaveTrack(sampleFormat format = (sampleFormat)0,
|
||||
double rate = 0);
|
||||
std::unique_ptr<LabelTrack> NewLabelTrack();
|
||||
|
|
|
@ -1363,7 +1363,7 @@ bool TrackPanel::SetCursorByActivity( )
|
|||
return false;
|
||||
}
|
||||
|
||||
bool TrackPanel::SetCursorForCutline(WaveTrack * track, wxRect &rect, const wxMouseEvent &event)
|
||||
bool TrackPanel::SetCursorForCutline(WaveTrack * track, const wxRect &rect, const wxMouseEvent &event)
|
||||
{
|
||||
if (IsOverCutline(track, rect, event)) {
|
||||
bool unsafe = IsUnsafe();
|
||||
|
@ -1550,7 +1550,7 @@ void TrackPanel::HandleCenterFrequencyClick
|
|||
// we hover over, most notably when hovering over the selction boundaries.
|
||||
// Determine and set the cursor and tip accordingly.
|
||||
void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t,
|
||||
const wxMouseEvent & event, wxRect &rect, bool bMultiToolMode,
|
||||
const wxMouseEvent & event, const wxRect &rect, bool bMultiToolMode,
|
||||
wxString &tip, const wxCursor ** ppCursor )
|
||||
{
|
||||
// Do not set the default cursor here and re-set later, that causes
|
||||
|
@ -6234,7 +6234,7 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
bool TrackPanel::HandleTrackLocationMouseEvent(WaveTrack * track, wxRect &rect, wxMouseEvent &event)
|
||||
bool TrackPanel::HandleTrackLocationMouseEvent(WaveTrack * track, const wxRect &rect, wxMouseEvent &event)
|
||||
{
|
||||
// FIXME: Disable this and return true when CutLines aren't showing?
|
||||
// (Don't use gPrefs-> for the fix as registry access is slow).
|
||||
|
@ -6355,7 +6355,7 @@ bool TrackPanel::HandleTrackLocationMouseEvent(WaveTrack * track, wxRect &rect,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool TrackPanel::IsOverCutline(WaveTrack * track, wxRect &rect, const wxMouseEvent &event)
|
||||
bool TrackPanel::IsOverCutline(WaveTrack * track, const wxRect &rect, const wxMouseEvent &event)
|
||||
{
|
||||
for (auto loc: track->GetCachedLocations())
|
||||
{
|
||||
|
@ -6381,7 +6381,7 @@ bool TrackPanel::IsOverCutline(WaveTrack * track, wxRect &rect, const wxMouseEve
|
|||
|
||||
|
||||
/// Event has happened on a track and it has been determined to be a label track.
|
||||
bool TrackPanel::HandleLabelTrackClick(LabelTrack * lTrack, wxRect &rect, wxMouseEvent & event)
|
||||
bool TrackPanel::HandleLabelTrackClick(LabelTrack * lTrack, const wxRect &rect, wxMouseEvent & event)
|
||||
{
|
||||
if (!event.ButtonDown())
|
||||
return false;
|
||||
|
@ -6708,7 +6708,7 @@ int TrackPanel::DetermineToolToUse( ToolsToolBar * pTtb, const wxMouseEvent & ev
|
|||
|
||||
|
||||
#ifdef USE_MIDI
|
||||
bool TrackPanel::HitTestStretch(Track *track, wxRect &rect, const wxMouseEvent & event)
|
||||
bool TrackPanel::HitTestStretch(Track *track, const wxRect &rect, const wxMouseEvent & event)
|
||||
{
|
||||
// later, we may want a different policy, but for now, stretch is
|
||||
// selected when the cursor is near the center of the track and
|
||||
|
@ -6732,7 +6732,7 @@ bool TrackPanel::HitTestStretch(Track *track, wxRect &rect, const wxMouseEvent &
|
|||
|
||||
/// method that tells us if the mouse event landed on an
|
||||
/// envelope boundary.
|
||||
bool TrackPanel::HitTestEnvelope(Track *track, wxRect &rect, const wxMouseEvent & event)
|
||||
bool TrackPanel::HitTestEnvelope(Track *track, const wxRect &rect, const wxMouseEvent & event)
|
||||
{
|
||||
wxASSERT(track);
|
||||
if( track->GetKind() != Track::Wave )
|
||||
|
@ -6800,7 +6800,7 @@ bool TrackPanel::HitTestEnvelope(Track *track, wxRect &rect, const wxMouseEvent
|
|||
|
||||
/// method that tells us if the mouse event landed on an
|
||||
/// editable sample
|
||||
bool TrackPanel::HitTestSamples(Track *track, wxRect &rect, const wxMouseEvent & event)
|
||||
bool TrackPanel::HitTestSamples(Track *track, const wxRect &rect, const wxMouseEvent & event)
|
||||
{
|
||||
wxASSERT(track);
|
||||
if( track->GetKind() != Track::Wave )
|
||||
|
@ -6851,7 +6851,7 @@ bool TrackPanel::HitTestSamples(Track *track, wxRect &rect, const wxMouseEvent &
|
|||
|
||||
/// method that tells us if the mouse event landed on a
|
||||
/// time-slider that allows us to time shift the sequence.
|
||||
bool TrackPanel::HitTestSlide(Track * WXUNUSED(track), wxRect &rect, const wxMouseEvent & event)
|
||||
bool TrackPanel::HitTestSlide(Track * WXUNUSED(track), const wxRect &rect, const wxMouseEvent & event)
|
||||
{
|
||||
// Perhaps we should delegate this to TrackArtist as only TrackArtist
|
||||
// knows what the real sizes are??
|
||||
|
@ -7339,7 +7339,7 @@ void TrackPanel::UpdateVRuler(Track *t)
|
|||
UpdateVRulerSize();
|
||||
}
|
||||
|
||||
void TrackPanel::UpdateTrackVRuler(Track *t)
|
||||
void TrackPanel::UpdateTrackVRuler(const Track *t)
|
||||
{
|
||||
wxASSERT(t);
|
||||
if (!t)
|
||||
|
@ -7351,7 +7351,7 @@ void TrackPanel::UpdateTrackVRuler(Track *t)
|
|||
t->GetHeight() - (kTopMargin + kBottomMargin));
|
||||
|
||||
mTrackArtist->UpdateVRuler(t, rect);
|
||||
Track *l = t->GetLink();
|
||||
const Track *l = t->GetLink();
|
||||
if (l)
|
||||
{
|
||||
rect.height = l->GetHeight() - (kTopMargin + kBottomMargin);
|
||||
|
|
|
@ -224,7 +224,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
|
|||
|
||||
virtual void UpdateVRulers();
|
||||
virtual void UpdateVRuler(Track *t);
|
||||
virtual void UpdateTrackVRuler(Track *t);
|
||||
virtual void UpdateTrackVRuler(const Track *t);
|
||||
virtual void UpdateVRulerSize();
|
||||
|
||||
// Returns the time corresponding to the pixel column one past the track area
|
||||
|
@ -247,20 +247,20 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
|
|||
|
||||
virtual bool IsAudioActive();
|
||||
virtual bool IsUnsafe();
|
||||
virtual bool HandleLabelTrackClick(LabelTrack * lTrack, wxRect &rect, wxMouseEvent & event);
|
||||
virtual bool HandleLabelTrackClick(LabelTrack * lTrack, const wxRect &rect, wxMouseEvent & event);
|
||||
virtual void HandleGlyphDragRelease(LabelTrack * lTrack, wxMouseEvent & event);
|
||||
virtual void HandleTextDragRelease(LabelTrack * lTrack, wxMouseEvent & event);
|
||||
virtual bool HandleTrackLocationMouseEvent(WaveTrack * track, wxRect &rect, wxMouseEvent &event);
|
||||
virtual bool IsOverCutline(WaveTrack * track, wxRect &rect, const wxMouseEvent &event);
|
||||
virtual bool HandleTrackLocationMouseEvent(WaveTrack * track, const wxRect &rect, wxMouseEvent &event);
|
||||
virtual bool IsOverCutline(WaveTrack * track, const wxRect &rect, const wxMouseEvent &event);
|
||||
virtual void HandleTrackSpecificMouseEvent(wxMouseEvent & event);
|
||||
|
||||
virtual void ScrollDuringDrag();
|
||||
|
||||
// Working out where to dispatch the event to.
|
||||
virtual int DetermineToolToUse( ToolsToolBar * pTtb, const wxMouseEvent & event);
|
||||
virtual bool HitTestEnvelope(Track *track, wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestSamples(Track *track, wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestSlide(Track *track, wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestEnvelope(Track *track, const wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestSamples(Track *track, const wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestSlide(Track *track, const wxRect &rect, const wxMouseEvent & event);
|
||||
#ifdef USE_MIDI
|
||||
// data for NoteTrack interactive stretch operations:
|
||||
// Stretching applies to a selected region after quantizing the
|
||||
|
@ -285,7 +285,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
|
|||
double mStretchSel1; // initial sel1 (left) quantized to nearest beat
|
||||
double mStretchLeftBeats; // how many beats from left to cursor
|
||||
double mStretchRightBeats; // how many beats from cursor to right
|
||||
virtual bool HitTestStretch(Track *track, wxRect &rect, const wxMouseEvent & event);
|
||||
virtual bool HitTestStretch(Track *track, const wxRect &rect, const wxMouseEvent & event);
|
||||
virtual void Stretch(int mouseXCoordinate, int trackLeftEdge, Track *pTrack);
|
||||
#endif
|
||||
|
||||
|
@ -332,12 +332,12 @@ protected:
|
|||
|
||||
// AS: Cursor handling
|
||||
virtual bool SetCursorByActivity( );
|
||||
virtual bool SetCursorForCutline(WaveTrack * track, wxRect &rect, const wxMouseEvent &event);
|
||||
virtual bool SetCursorForCutline(WaveTrack * track, const wxRect &rect, const wxMouseEvent &event);
|
||||
virtual void SetCursorAndTipWhenInLabel( Track * t, const wxMouseEvent &event, wxString &tip );
|
||||
virtual void SetCursorAndTipWhenInVResizeArea( bool blinked, wxString &tip );
|
||||
virtual void SetCursorAndTipWhenInLabelTrack( LabelTrack * pLT, const wxMouseEvent & event, wxString &tip );
|
||||
virtual void SetCursorAndTipWhenSelectTool
|
||||
( Track * t, const wxMouseEvent & event, wxRect &rect, bool bMultiToolMode, wxString &tip, const wxCursor ** ppCursor );
|
||||
( Track * t, const wxMouseEvent & event, const wxRect &rect, bool bMultiToolMode, wxString &tip, const wxCursor ** ppCursor );
|
||||
virtual void SetCursorAndTipByTool( int tool, const wxMouseEvent & event, wxString &tip );
|
||||
|
||||
public:
|
||||
|
@ -540,6 +540,7 @@ protected:
|
|||
TrackInfo mTrackInfo;
|
||||
public:
|
||||
TrackInfo *GetTrackInfo() { return &mTrackInfo; }
|
||||
const TrackInfo *GetTrackInfo() const { return &mTrackInfo; }
|
||||
|
||||
protected:
|
||||
TrackPanelListener *mListener;
|
||||
|
|
|
@ -161,7 +161,7 @@ void ViewInfo::SetBeforeScreenWidth(wxInt64 beforeWidth, wxInt64 screenWidth, do
|
|||
beforeWidth / zoom));
|
||||
}
|
||||
|
||||
void ViewInfo::WriteXMLAttributes(XMLWriter &xmlFile)
|
||||
void ViewInfo::WriteXMLAttributes(XMLWriter &xmlFile) const
|
||||
{
|
||||
selectedRegion.WriteXMLAttributes(xmlFile, wxT("sel0"), wxT("sel1"));
|
||||
xmlFile.WriteAttr(wxT("vpos"), vpos);
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
// various other drawing code can use the exact same value.
|
||||
double mRecentStreamTime;
|
||||
|
||||
void WriteXMLAttributes(XMLWriter &xmlFile);
|
||||
void WriteXMLAttributes(XMLWriter &xmlFile) const;
|
||||
bool ReadXMLAttribute(const wxChar *attr, const wxChar *value);
|
||||
|
||||
// Receive track panel timer notifications
|
||||
|
|
|
@ -1452,7 +1452,7 @@ XMLTagHandler *WaveClip::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void WaveClip::WriteXML(XMLWriter &xmlFile)
|
||||
void WaveClip::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("waveclip"));
|
||||
xmlFile.WriteAttr(wxT("offset"), mOffset, 8);
|
||||
|
|
|
@ -366,7 +366,7 @@ public:
|
|||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
void HandleXMLEndTag(const wxChar *tag) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) /* not override */;
|
||||
void WriteXML(XMLWriter &xmlFile) const /* not override */;
|
||||
|
||||
// Cache of values to colour pixels of Spectrogram - used by TrackArtist
|
||||
mutable std::unique_ptr<SpecPxCache> mSpecPxCache;
|
||||
|
|
|
@ -63,7 +63,7 @@ using std::max;
|
|||
bool WaveTrack::mMonoAsVirtualStereo;
|
||||
#endif
|
||||
|
||||
WaveTrack::Holder TrackFactory::DuplicateWaveTrack(WaveTrack &orig)
|
||||
WaveTrack::Holder TrackFactory::DuplicateWaveTrack(const WaveTrack &orig)
|
||||
{
|
||||
return std::unique_ptr<WaveTrack>
|
||||
{ static_cast<WaveTrack*>(orig.Duplicate().release()) };
|
||||
|
@ -507,7 +507,7 @@ bool WaveTrack::ConvertToSampleFormat(sampleFormat format)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WaveTrack::IsEmpty(double t0, double t1)
|
||||
bool WaveTrack::IsEmpty(double t0, double t1) const
|
||||
{
|
||||
//printf("Searching for overlap in %.6f...%.6f\n", t0, t1);
|
||||
for (const auto &clip : mClips)
|
||||
|
@ -1592,7 +1592,7 @@ bool WaveTrack::AppendCoded(const wxString &fName, sampleCount start,
|
|||
}
|
||||
|
||||
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
||||
unsigned int WaveTrack::GetODFlags()
|
||||
unsigned int WaveTrack::GetODFlags() const
|
||||
{
|
||||
unsigned int ret = 0;
|
||||
for (const auto &clip : mClips)
|
||||
|
@ -1789,7 +1789,7 @@ XMLTagHandler *WaveTrack::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void WaveTrack::WriteXML(XMLWriter &xmlFile)
|
||||
void WaveTrack::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("wavetrack"));
|
||||
if (mAutoSaveIdent)
|
||||
|
@ -1958,7 +1958,7 @@ bool WaveTrack::GetMinMax(float *min, float *max,
|
|||
return result;
|
||||
}
|
||||
|
||||
bool WaveTrack::GetRMS(float *rms, double t0, double t1)
|
||||
bool WaveTrack::GetRMS(float *rms, double t0, double t1) const
|
||||
{
|
||||
*rms = float(0.0);
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
|||
#ifdef EXPERIMENTAL_OUTPUT_DISPLAY
|
||||
void SetVirtualState(bool state, bool half=false);
|
||||
#endif
|
||||
sampleFormat GetSampleFormat() { return mFormat; }
|
||||
sampleFormat GetSampleFormat() const { return mFormat; }
|
||||
bool ConvertToSampleFormat(sampleFormat format);
|
||||
|
||||
const SpectrogramSettings &GetSpectrogramSettings() const;
|
||||
|
@ -201,7 +201,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
|||
* @return true if no clips in the track overlap the specified time range,
|
||||
* false otherwise.
|
||||
*/
|
||||
bool IsEmpty(double t0, double t1);
|
||||
bool IsEmpty(double t0, double t1) const;
|
||||
|
||||
/** @brief Append the sample data to the WaveTrack. You must call Flush()
|
||||
* after the last Append.
|
||||
|
@ -227,7 +227,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
|||
size_t len, int channel, int decodeType);
|
||||
|
||||
///gets an int with OD flags so that we can determine which ODTasks should be run on this track after save/open, etc.
|
||||
unsigned int GetODFlags();
|
||||
unsigned int GetODFlags() const;
|
||||
|
||||
///Invalidates all clips' wavecaches. Careful, This may not be threadsafe.
|
||||
void ClearWaveCaches();
|
||||
|
@ -253,7 +253,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
|||
double t0) const;
|
||||
bool GetMinMax(float *min, float *max,
|
||||
double t0, double t1) const;
|
||||
bool GetRMS(float *rms, double t0, double t1);
|
||||
bool GetRMS(float *rms, double t0, double t1) const;
|
||||
|
||||
//
|
||||
// MM: We now have more than one sequence and envelope per track, so
|
||||
|
@ -288,7 +288,7 @@ class AUDACITY_DLL_API WaveTrack final : public Track {
|
|||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
void HandleXMLEndTag(const wxChar *tag) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) override;
|
||||
void WriteXML(XMLWriter &xmlFile) const override;
|
||||
|
||||
// Returns true if an error occurred while reading from XML
|
||||
bool GetErrorOpening() override;
|
||||
|
|
|
@ -1359,9 +1359,11 @@ wxString CommandManager::GetCategoryFromName(const wxString &name)
|
|||
return entry->labelTop;
|
||||
}
|
||||
|
||||
wxString CommandManager::GetKeyFromName(const wxString &name)
|
||||
wxString CommandManager::GetKeyFromName(const wxString &name) const
|
||||
{
|
||||
CommandListEntry *entry = mCommandNameHash[name];
|
||||
CommandListEntry *entry =
|
||||
// May create a NULL entry
|
||||
const_cast<CommandManager*>(this)->mCommandNameHash[name];
|
||||
if (!entry)
|
||||
return wxT("");
|
||||
|
||||
|
@ -1426,7 +1428,7 @@ XMLTagHandler *CommandManager::HandleXMLChild(const wxChar * WXUNUSED(tag))
|
|||
return this;
|
||||
}
|
||||
|
||||
void CommandManager::WriteXML(XMLWriter &xmlFile)
|
||||
void CommandManager::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("audacitykeyboard"));
|
||||
xmlFile.WriteAttr(wxT("audacityversion"), AUDACITY_VERSION_STRING);
|
||||
|
|
|
@ -241,7 +241,7 @@ class AUDACITY_DLL_API CommandManager final : public XMLTagHandler
|
|||
wxString GetLabelFromName(const wxString &name);
|
||||
wxString GetPrefixedLabelFromName(const wxString &name);
|
||||
wxString GetCategoryFromName(const wxString &name);
|
||||
wxString GetKeyFromName(const wxString &name);
|
||||
wxString GetKeyFromName(const wxString &name) const;
|
||||
wxString GetDefaultKeyFromName(const wxString &name);
|
||||
|
||||
bool GetEnabled(const wxString &name);
|
||||
|
@ -254,7 +254,7 @@ class AUDACITY_DLL_API CommandManager final : public XMLTagHandler
|
|||
// Loading/Saving
|
||||
//
|
||||
|
||||
void WriteXML(XMLWriter &xmlFile) /* not override */;
|
||||
void WriteXML(XMLWriter &xmlFile) const /* not override */;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ class CompareAudioCommand final : public CommandImplementation
|
|||
{
|
||||
private:
|
||||
double mT0, mT1;
|
||||
WaveTrack *mTrack0;
|
||||
WaveTrack *mTrack1;
|
||||
const WaveTrack *mTrack0;
|
||||
const WaveTrack *mTrack1;
|
||||
|
||||
// Update member variables with project selection data (and validate)
|
||||
bool GetSelection(AudacityProject &proj);
|
||||
|
|
|
@ -1999,7 +1999,8 @@ bool Effect::TrackGroupProgress(int whichGroup, double frac, const wxString &msg
|
|||
return (updateResult != eProgressSuccess);
|
||||
}
|
||||
|
||||
void Effect::GetSamples(WaveTrack *track, sampleCount *start, sampleCount *len)
|
||||
void Effect::GetSamples(
|
||||
const WaveTrack *track, sampleCount *start, sampleCount *len)
|
||||
{
|
||||
double trackStart = track->GetStartTime();
|
||||
double trackEnd = track->GetEndTime();
|
||||
|
|
|
@ -324,7 +324,8 @@ protected:
|
|||
int GetNumWaveGroups() { return mNumGroups; }
|
||||
|
||||
// Calculates the start time and selection length in samples
|
||||
void GetSamples(WaveTrack *track, sampleCount *start, sampleCount *len);
|
||||
void GetSamples(
|
||||
const WaveTrack *track, sampleCount *start, sampleCount *len);
|
||||
|
||||
void SetTimeWarper(std::unique_ptr<TimeWarper> &&warper);
|
||||
TimeWarper *GetTimeWarper();
|
||||
|
|
|
@ -2071,7 +2071,7 @@ XMLTagHandler *EffectEqualization::HandleXMLChild(const wxChar *tag)
|
|||
//
|
||||
// Write all of the curves to the XML file
|
||||
//
|
||||
void EffectEqualization::WriteXML(XMLWriter &xmlFile)
|
||||
void EffectEqualization::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
// Start our heirarchy
|
||||
xmlFile.StartTag( wxT( "equalizationeffect" ) );
|
||||
|
|
|
@ -152,9 +152,9 @@ private:
|
|||
bool GetDefaultFileName(wxFileName &fileName);
|
||||
|
||||
// XMLTagHandler callback methods for loading and saving
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag);
|
||||
void WriteXML(XMLWriter &xmlFile);
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXML(XMLWriter &xmlFile) const;
|
||||
|
||||
void UpdateCurves();
|
||||
void UpdateDraw();
|
||||
|
|
|
@ -333,7 +333,7 @@ bool EffectNormalize::TransferDataFromWindow()
|
|||
|
||||
// EffectNormalize implementation
|
||||
|
||||
void EffectNormalize::AnalyseTrack(WaveTrack * track, const wxString &msg)
|
||||
void EffectNormalize::AnalyseTrack(const WaveTrack * track, const wxString &msg)
|
||||
{
|
||||
if(mGain) {
|
||||
// Since we need complete summary data, we need to block until the OD tasks are done for this track
|
||||
|
@ -361,7 +361,7 @@ void EffectNormalize::AnalyseTrack(WaveTrack * track, const wxString &msg)
|
|||
//AnalyseDC() takes a track, transforms it to bunch of buffer-blocks,
|
||||
//and executes AnalyzeData on it...
|
||||
// sets mOffset
|
||||
bool EffectNormalize::AnalyseDC(WaveTrack * track, const wxString &msg)
|
||||
bool EffectNormalize::AnalyseDC(const WaveTrack * track, const wxString &msg)
|
||||
{
|
||||
bool rc = true;
|
||||
|
||||
|
|
|
@ -57,9 +57,9 @@ private:
|
|||
// EffectNormalize implementation
|
||||
|
||||
bool ProcessOne(WaveTrack * t, const wxString &msg);
|
||||
void AnalyseTrack(WaveTrack * track, const wxString &msg);
|
||||
void AnalyseTrack(const WaveTrack * track, const wxString &msg);
|
||||
void AnalyzeData(float *buffer, size_t len);
|
||||
bool AnalyseDC(WaveTrack * track, const wxString &msg);
|
||||
bool AnalyseDC(const WaveTrack * track, const wxString &msg);
|
||||
void ProcessData(float *buffer, size_t len);
|
||||
|
||||
void OnUpdateUI(wxCommandEvent & evt);
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
protected:
|
||||
// Generator implementation
|
||||
|
||||
bool GenerateTrack(WaveTrack *tmp, const WaveTrack &track, int ntrack);
|
||||
bool GenerateTrack(WaveTrack *tmp, const WaveTrack &track, int ntrack) override;
|
||||
|
||||
private:
|
||||
NumericTextCtrl *mDurationT;
|
||||
|
|
|
@ -535,7 +535,7 @@ bool EffectTruncSilence::DoRemoval
|
|||
|
||||
bool EffectTruncSilence::Analyze(RegionList& silenceList,
|
||||
RegionList& trackSilences,
|
||||
WaveTrack* wt,
|
||||
const WaveTrack *wt,
|
||||
sampleCount* silentFrame,
|
||||
sampleCount* index,
|
||||
int whichTrack,
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
// amount of input for previewing.
|
||||
bool Analyze(RegionList &silenceList,
|
||||
RegionList &trackSilences,
|
||||
WaveTrack* wt,
|
||||
const WaveTrack *wt,
|
||||
sampleCount* silentFrame,
|
||||
sampleCount* index,
|
||||
int whichTrack,
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
private:
|
||||
bool ProcessOne(WaveTrack * t,
|
||||
sampleCount start, sampleCount end);
|
||||
bool ProcessPass();
|
||||
bool ProcessPass() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -827,7 +827,7 @@ XMLTagHandler *FFmpegPresets::HandleXMLChild(const wxChar *tag)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void FFmpegPresets::WriteXMLHeader(XMLWriter &xmlFile)
|
||||
void FFmpegPresets::WriteXMLHeader(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.Write(wxT("<?xml "));
|
||||
xmlFile.Write(wxT("version=\"1.0\" "));
|
||||
|
@ -846,14 +846,14 @@ void FFmpegPresets::WriteXMLHeader(XMLWriter &xmlFile)
|
|||
xmlFile.Write(wxT(">\n"));
|
||||
}
|
||||
|
||||
void FFmpegPresets::WriteXML(XMLWriter &xmlFile)
|
||||
void FFmpegPresets::WriteXML(XMLWriter &xmlFile) const
|
||||
{
|
||||
xmlFile.StartTag(wxT("ffmpeg_presets"));
|
||||
xmlFile.WriteAttr(wxT("version"),wxT("1.0"));
|
||||
FFmpegPresetMap::iterator iter;
|
||||
FFmpegPresetMap::const_iterator iter;
|
||||
for (iter = mPresets.begin(); iter != mPresets.end(); ++iter)
|
||||
{
|
||||
FFmpegPreset *preset = &iter->second;
|
||||
auto preset = &iter->second;
|
||||
xmlFile.StartTag(wxT("preset"));
|
||||
xmlFile.WriteAttr(wxT("name"),preset->mPresetName);
|
||||
for (long i = FEFirstID + 1; i < FELastID; i++)
|
||||
|
|
|
@ -333,10 +333,10 @@ public:
|
|||
void ImportPresets(wxString &filename);
|
||||
void ExportPresets(wxString &filename);
|
||||
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag);
|
||||
void WriteXMLHeader(XMLWriter &xmlFile);
|
||||
void WriteXML(XMLWriter &xmlFile);
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
void WriteXML(XMLWriter &xmlFile) const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public:
|
|||
bool InitCodecs();
|
||||
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
|
||||
///! Imports audio
|
||||
|
@ -240,7 +240,7 @@ public:
|
|||
|
||||
///! Called by Import.cpp
|
||||
///\return number of readable streams in the file
|
||||
wxInt32 GetStreamCount()
|
||||
wxInt32 GetStreamCount() override
|
||||
{
|
||||
return mNumStreams;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public:
|
|||
///! Called by Import.cpp
|
||||
///\param StreamID - index of the stream in mStreamInfo and mScs arrays
|
||||
///\param Use - true if this stream should be imported, false otherwise
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use)
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use) override
|
||||
{
|
||||
if (StreamID < mNumStreams)
|
||||
mScs->get()[StreamID]->m_use = Use;
|
||||
|
|
|
@ -152,12 +152,12 @@ public:
|
|||
|
||||
bool Init();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||
Tags *tags) override;
|
||||
|
||||
wxInt32 GetStreamCount(){ return 1; }
|
||||
wxInt32 GetStreamCount() override { return 1; }
|
||||
|
||||
const wxArrayString &GetStreamInfo() override
|
||||
{
|
||||
|
@ -165,7 +165,8 @@ public:
|
|||
return empty;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)){}
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)) override
|
||||
{}
|
||||
|
||||
private:
|
||||
sampleFormat mFormat;
|
||||
|
|
|
@ -169,12 +169,12 @@ public:
|
|||
///\return true if successful, false otherwise
|
||||
bool Init();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
|
||||
///! Called by Import.cpp
|
||||
///\return number of readable audio streams in the file
|
||||
wxInt32 GetStreamCount();
|
||||
wxInt32 GetStreamCount() override;
|
||||
|
||||
///! Called by Import.cpp
|
||||
///\return array of strings - descriptions of the streams
|
||||
|
@ -183,7 +183,7 @@ public:
|
|||
///! Called by Import.cpp
|
||||
///\param index - index of the stream in mStreamInfo and mStreams arrays
|
||||
///\param use - true if this stream should be imported, false otherwise
|
||||
void SetStreamUsage(wxInt32 index, bool use);
|
||||
void SetStreamUsage(wxInt32 index, bool use) override;
|
||||
|
||||
///! Imports audio
|
||||
///\return import status (see Import.cpp)
|
||||
|
|
|
@ -123,12 +123,12 @@ public:
|
|||
LOFImportFileHandle(const wxString & name, std::unique_ptr<wxTextFile> &&file);
|
||||
~LOFImportFileHandle();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||
Tags *tags) override;
|
||||
|
||||
wxInt32 GetStreamCount(){ return 1; }
|
||||
wxInt32 GetStreamCount() override { return 1; }
|
||||
|
||||
const wxArrayString &GetStreamInfo() override
|
||||
{
|
||||
|
@ -136,7 +136,8 @@ public:
|
|||
return empty;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)){}
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)) override
|
||||
{}
|
||||
|
||||
private:
|
||||
// Takes a line of text in lof file and interprets it and opens files
|
||||
|
|
|
@ -131,12 +131,12 @@ public:
|
|||
|
||||
~MP3ImportFileHandle();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||
Tags *tags) override;
|
||||
|
||||
wxInt32 GetStreamCount(){ return 1; }
|
||||
wxInt32 GetStreamCount() override { return 1; }
|
||||
|
||||
const wxArrayString &GetStreamInfo() override
|
||||
{
|
||||
|
@ -144,7 +144,8 @@ public:
|
|||
return empty;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)){}
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)) override
|
||||
{}
|
||||
|
||||
private:
|
||||
void ImportID3(Tags *tags);
|
||||
|
|
|
@ -122,12 +122,12 @@ public:
|
|||
}
|
||||
~OggImportFileHandle();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||
Tags *tags) override;
|
||||
|
||||
wxInt32 GetStreamCount()
|
||||
wxInt32 GetStreamCount() override
|
||||
{
|
||||
if (mVorbisFile)
|
||||
return mVorbisFile->links;
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
return mStreamInfo;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use)
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use) override
|
||||
{
|
||||
if (mVorbisFile)
|
||||
{
|
||||
|
|
|
@ -92,12 +92,12 @@ public:
|
|||
PCMImportFileHandle(wxString name, SFFile &&file, SF_INFO info);
|
||||
~PCMImportFileHandle();
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
int Import(TrackFactory *trackFactory, TrackHolders &outTracks,
|
||||
Tags *tags) override;
|
||||
|
||||
wxInt32 GetStreamCount(){ return 1; }
|
||||
wxInt32 GetStreamCount() override { return 1; }
|
||||
|
||||
const wxArrayString &GetStreamInfo() override
|
||||
{
|
||||
|
@ -105,7 +105,8 @@ public:
|
|||
return empty;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)){}
|
||||
void SetStreamUsage(wxInt32 WXUNUSED(StreamID), bool WXUNUSED(Use)) override
|
||||
{}
|
||||
|
||||
private:
|
||||
SFFile mFile;
|
||||
|
|
|
@ -139,10 +139,10 @@ class QTImportFileHandle final : public ImportFileHandle
|
|||
}
|
||||
}
|
||||
|
||||
wxString GetFileDescription();
|
||||
wxString GetFileDescription() override;
|
||||
ByteCount GetFileUncompressedBytes() override;
|
||||
|
||||
wxInt32 GetStreamCount()
|
||||
wxInt32 GetStreamCount() override
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ class QTImportFileHandle final : public ImportFileHandle
|
|||
return empty;
|
||||
}
|
||||
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use)
|
||||
void SetStreamUsage(wxInt32 StreamID, bool Use) override
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -525,7 +525,7 @@ bool ODManager::HasLoadedODFlag()
|
|||
}
|
||||
|
||||
///fills in the status bar message for a given track
|
||||
void ODManager::FillTipForWaveTrack( WaveTrack * t, wxString &tip )
|
||||
void ODManager::FillTipForWaveTrack( const WaveTrack * t, wxString &tip )
|
||||
{
|
||||
mQueuesMutex.Lock();
|
||||
for(unsigned int i=0;i<mQueues.size();i++)
|
||||
|
|
|
@ -98,7 +98,7 @@ class ODManager final
|
|||
static bool IsInstanceCreated();
|
||||
|
||||
///fills in the status bar message for a given track
|
||||
void FillTipForWaveTrack( WaveTrack * t, wxString &tip );
|
||||
void FillTipForWaveTrack( const WaveTrack * t, wxString &tip );
|
||||
|
||||
///Gets the total percent complete for all tasks combined.
|
||||
float GetOverallPercentComplete();
|
||||
|
|
|
@ -76,7 +76,7 @@ void ODWaveTrackTaskQueue::MergeWaveTrack(WaveTrack* track)
|
|||
}
|
||||
|
||||
///returns true if the argument is in the WaveTrack list.
|
||||
bool ODWaveTrackTaskQueue::ContainsWaveTrack(WaveTrack* track)
|
||||
bool ODWaveTrackTaskQueue::ContainsWaveTrack(const WaveTrack* track)
|
||||
{
|
||||
mTracksMutex.Lock();
|
||||
for(unsigned int i=0;i<mTracks.size();i++)
|
||||
|
@ -326,7 +326,7 @@ ODTask* ODWaveTrackTaskQueue::GetFrontTask()
|
|||
}
|
||||
|
||||
///fills in the status bar message for a given track
|
||||
void ODWaveTrackTaskQueue::FillTipForWaveTrack( WaveTrack * t, wxString &tip )
|
||||
void ODWaveTrackTaskQueue::FillTipForWaveTrack( const WaveTrack * t, wxString &tip )
|
||||
{
|
||||
if(ContainsWaveTrack(t) && GetNumTasks())
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ class ODWaveTrackTaskQueue final
|
|||
|
||||
|
||||
//returns true if the agrument is in the WaveTrack list.
|
||||
bool ContainsWaveTrack(WaveTrack* track);
|
||||
bool ContainsWaveTrack(const WaveTrack* track);
|
||||
|
||||
//returns the wavetrack at position x.
|
||||
WaveTrack* GetWaveTrack(size_t x);
|
||||
|
@ -93,7 +93,7 @@ class ODWaveTrackTaskQueue final
|
|||
ODTask* GetTask(size_t x);
|
||||
|
||||
///fills in the status bar message for a given track
|
||||
void FillTipForWaveTrack( WaveTrack * t, wxString &tip );
|
||||
void FillTipForWaveTrack( const WaveTrack * t, wxString &tip );
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -1183,7 +1183,7 @@ void ControlToolBar::SetupCutPreviewTracks(double WXUNUSED(playStart), double cu
|
|||
AudacityProject *p = GetActiveProject();
|
||||
if (p) {
|
||||
// Find first selected track (stereo or mono) and duplicate it
|
||||
Track *track1 = NULL, *track2 = NULL;
|
||||
const Track *track1 = NULL, *track2 = NULL;
|
||||
TrackListIterator it(p->GetTracks());
|
||||
for (Track *t = it.First(); t; t = it.Next())
|
||||
{
|
||||
|
|
|
@ -205,7 +205,7 @@ void ToolsToolBar::Populate()
|
|||
/// Gets the currently active tool
|
||||
/// In Multi-mode this might not return the multi-tool itself
|
||||
/// since the active tool may be changed by what you hover over.
|
||||
int ToolsToolBar::GetCurrentTool()
|
||||
int ToolsToolBar::GetCurrentTool() const
|
||||
{
|
||||
return mCurrentTool;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ void ToolsToolBar::SetCurrentTool(int tool, bool show)
|
|||
}
|
||||
}
|
||||
|
||||
bool ToolsToolBar::IsDown(int tool)
|
||||
bool ToolsToolBar::IsDown(int tool) const
|
||||
{
|
||||
return mTool[tool]->IsDown();
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ int ToolsToolBar::GetDownTool()
|
|||
return firstTool; // Should never happen
|
||||
}
|
||||
|
||||
const wxChar * ToolsToolBar::GetMessageForTool( int ToolNumber )
|
||||
const wxChar * ToolsToolBar::GetMessageForTool( int ToolNumber ) const
|
||||
{
|
||||
wxASSERT( ToolNumber >= 0 );
|
||||
wxASSERT( ToolNumber < numTools );
|
||||
|
|
|
@ -58,11 +58,11 @@ class ToolsToolBar final : public ToolBar {
|
|||
void SetCurrentTool(int tool, bool show);
|
||||
|
||||
//These interrogate the state of the buttons or controls.
|
||||
int GetCurrentTool();
|
||||
bool IsDown(int tool);
|
||||
int GetCurrentTool() const;
|
||||
bool IsDown(int tool) const;
|
||||
int GetDownTool();
|
||||
|
||||
const wxChar * GetMessageForTool( int ToolNumber );
|
||||
const wxChar * GetMessageForTool( int ToolNumber ) const;
|
||||
|
||||
void Populate();
|
||||
void Repaint(wxDC * WXUNUSED(dc)) override {};
|
||||
|
|
Loading…
Reference in New Issue