mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 17:39:25 +02:00
Static TrackInfo slider accessors, const Track* arguments
This commit is contained in:
parent
1d1dded9ba
commit
b15bf441ec
@ -3657,7 +3657,7 @@ void AudacityProject::OnTrackPan()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->PanSlider(wt);
|
LWSlider *slider = mTrackPanel->PanSlider(wt);
|
||||||
if (slider->ShowDialog()) {
|
if (slider->ShowDialog()) {
|
||||||
SetTrackPan(wt, slider);
|
SetTrackPan(wt, slider);
|
||||||
}
|
}
|
||||||
@ -3671,7 +3671,7 @@ void AudacityProject::OnTrackPanLeft()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->PanSlider(wt);
|
LWSlider *slider = mTrackPanel->PanSlider(wt);
|
||||||
slider->Decrease(1);
|
slider->Decrease(1);
|
||||||
SetTrackPan(wt, slider);
|
SetTrackPan(wt, slider);
|
||||||
}
|
}
|
||||||
@ -3684,7 +3684,7 @@ void AudacityProject::OnTrackPanRight()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->PanSlider(wt);
|
LWSlider *slider = mTrackPanel->PanSlider(wt);
|
||||||
slider->Increase(1);
|
slider->Increase(1);
|
||||||
SetTrackPan(wt, slider);
|
SetTrackPan(wt, slider);
|
||||||
}
|
}
|
||||||
@ -3698,7 +3698,7 @@ void AudacityProject::OnTrackGain()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->GainSlider(wt);
|
LWSlider *slider = mTrackPanel->GainSlider(wt);
|
||||||
if (slider->ShowDialog()) {
|
if (slider->ShowDialog()) {
|
||||||
SetTrackGain(wt, slider);
|
SetTrackGain(wt, slider);
|
||||||
}
|
}
|
||||||
@ -3712,7 +3712,7 @@ void AudacityProject::OnTrackGainInc()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->GainSlider(wt);
|
LWSlider *slider = mTrackPanel->GainSlider(wt);
|
||||||
slider->Increase(1);
|
slider->Increase(1);
|
||||||
SetTrackGain(wt, slider);
|
SetTrackGain(wt, slider);
|
||||||
}
|
}
|
||||||
@ -3725,7 +3725,7 @@ void AudacityProject::OnTrackGainDec()
|
|||||||
}
|
}
|
||||||
const auto wt = static_cast<WaveTrack*>(track);
|
const auto wt = static_cast<WaveTrack*>(track);
|
||||||
|
|
||||||
LWSlider *slider = mTrackPanel->GetTrackInfo()->GainSlider(wt);
|
LWSlider *slider = mTrackPanel->GainSlider(wt);
|
||||||
slider->Decrease(1);
|
slider->Decrease(1);
|
||||||
SetTrackGain(wt, slider);
|
SetTrackGain(wt, slider);
|
||||||
}
|
}
|
||||||
|
@ -570,6 +570,32 @@ TrackPanel::~TrackPanel()
|
|||||||
DeleteMenus();
|
DeleteMenus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LWSlider *TrackPanel::GainSlider( const WaveTrack *wt )
|
||||||
|
{
|
||||||
|
auto rect = FindTrackRect( wt, true );
|
||||||
|
wxRect sliderRect;
|
||||||
|
TrackInfo::GetGainRect( rect.GetTopLeft(), sliderRect );
|
||||||
|
return TrackInfo::GainSlider(sliderRect, wt, false, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
LWSlider *TrackPanel::PanSlider( const WaveTrack *wt )
|
||||||
|
{
|
||||||
|
auto rect = FindTrackRect( wt, true );
|
||||||
|
wxRect sliderRect;
|
||||||
|
TrackInfo::GetPanRect( rect.GetTopLeft(), sliderRect );
|
||||||
|
return TrackInfo::PanSlider(sliderRect, wt, false, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
|
LWSlider *TrackPanel::VelocitySlider( const NoteTrack *nt )
|
||||||
|
{
|
||||||
|
auto rect = FindTrackRect( nt, true );
|
||||||
|
wxRect sliderRect;
|
||||||
|
TrackInfo::GetVelocityRect( rect.GetTopLeft(), sliderRect );
|
||||||
|
return TrackInfo::VelocitySlider(sliderRect, nt, false, this);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SelectionState &TrackPanel::GetSelectionState()
|
SelectionState &TrackPanel::GetSelectionState()
|
||||||
{
|
{
|
||||||
return GetProject()->GetSelectionState();
|
return GetProject()->GetSelectionState();
|
||||||
@ -4865,10 +4891,17 @@ void TrackPanel::HandleSliders(wxMouseEvent &event, bool pan)
|
|||||||
// is displayed, but it doesn't hurt to do this for all plats.
|
// is displayed, but it doesn't hurt to do this for all plats.
|
||||||
WaveTrack *capturedTrack = (WaveTrack *) mCapturedTrack;
|
WaveTrack *capturedTrack = (WaveTrack *) mCapturedTrack;
|
||||||
|
|
||||||
if (pan)
|
auto rect = FindTrackRect( capturedTrack, true );
|
||||||
slider = mTrackInfo.PanSlider(capturedTrack, true);
|
if (pan) {
|
||||||
else
|
wxRect sliderRect;
|
||||||
slider = mTrackInfo.GainSlider(capturedTrack, true);
|
TrackInfo::GetPanRect(rect.GetTopLeft(), sliderRect);
|
||||||
|
slider = mTrackInfo.PanSlider(sliderRect, capturedTrack, true, this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
wxRect sliderRect;
|
||||||
|
TrackInfo::GetGainRect(rect.GetTopLeft(), sliderRect);
|
||||||
|
slider = mTrackInfo.GainSlider(sliderRect, capturedTrack, true, this);
|
||||||
|
}
|
||||||
|
|
||||||
slider->OnMouseEvent(event);
|
slider->OnMouseEvent(event);
|
||||||
|
|
||||||
@ -4923,7 +4956,10 @@ void TrackPanel::HandleVelocitySlider(wxMouseEvent &event)
|
|||||||
wxASSERT(mCapturedTrack->GetKind() == Track::Note);
|
wxASSERT(mCapturedTrack->GetKind() == Track::Note);
|
||||||
NoteTrack *capturedTrack = static_cast<NoteTrack *>(mCapturedTrack);
|
NoteTrack *capturedTrack = static_cast<NoteTrack *>(mCapturedTrack);
|
||||||
|
|
||||||
LWSlider *slider = mTrackInfo.VelocitySlider(capturedTrack, true);
|
auto rect = FindTrackRect( capturedTrack, true );
|
||||||
|
wxRect sliderRect;
|
||||||
|
TrackInfo::GetVelocityRect(rect.GetTopLeft(), sliderRect);
|
||||||
|
auto slider = mTrackInfo.VelocitySlider(sliderRect, capturedTrack, true, this);
|
||||||
|
|
||||||
slider->OnMouseEvent(event);
|
slider->OnMouseEvent(event);
|
||||||
|
|
||||||
@ -8715,7 +8751,7 @@ TrackPanel::FoundCell TrackPanel::FindCell(int mouseX, int mouseY)
|
|||||||
|
|
||||||
/// This finds the rectangle of a given track, either the
|
/// This finds the rectangle of a given track, either the
|
||||||
/// of the label 'adornment' or the track itself
|
/// of the label 'adornment' or the track itself
|
||||||
wxRect TrackPanel::FindTrackRect(Track * target, bool label)
|
wxRect TrackPanel::FindTrackRect( const Track * target, bool label )
|
||||||
{
|
{
|
||||||
if (!target) {
|
if (!target) {
|
||||||
return { 0, 0, 0, 0 };
|
return { 0, 0, 0, 0 };
|
||||||
@ -8813,11 +8849,6 @@ TrackInfo::TrackInfo(TrackPanel * pParentIn)
|
|||||||
{
|
{
|
||||||
pParent = pParentIn;
|
pParent = pParentIn;
|
||||||
|
|
||||||
mGain = NULL;
|
|
||||||
mGainCaptured=NULL;
|
|
||||||
mPan = NULL;
|
|
||||||
mPanCaptured=NULL;
|
|
||||||
|
|
||||||
ReCreateSliders();
|
ReCreateSliders();
|
||||||
|
|
||||||
UpdatePrefs();
|
UpdatePrefs();
|
||||||
@ -8834,48 +8865,48 @@ void TrackInfo::ReCreateSliders(){
|
|||||||
|
|
||||||
float defPos = 1.0;
|
float defPos = 1.0;
|
||||||
/* i18n-hint: Title of the Gain slider, used to adjust the volume */
|
/* i18n-hint: Title of the Gain slider, used to adjust the volume */
|
||||||
mGain = std::make_unique<LWSlider>(pParent, _("Gain"),
|
gGain = std::make_unique<LWSlider>(pParent, _("Gain"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
DB_SLIDER);
|
DB_SLIDER);
|
||||||
mGain->SetDefaultValue(defPos);
|
gGain->SetDefaultValue(defPos);
|
||||||
|
|
||||||
mGainCaptured = std::make_unique<LWSlider>(pParent, _("Gain"),
|
gGainCaptured = std::make_unique<LWSlider>(pParent, _("Gain"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
DB_SLIDER);
|
DB_SLIDER);
|
||||||
mGainCaptured->SetDefaultValue(defPos);
|
gGainCaptured->SetDefaultValue(defPos);
|
||||||
|
|
||||||
GetPanRect(point, sliderRect);
|
GetPanRect(point, sliderRect);
|
||||||
|
|
||||||
defPos = 0.0;
|
defPos = 0.0;
|
||||||
/* i18n-hint: Title of the Pan slider, used to move the sound left or right */
|
/* i18n-hint: Title of the Pan slider, used to move the sound left or right */
|
||||||
mPan = std::make_unique<LWSlider>(pParent, _("Pan"),
|
gPan = std::make_unique<LWSlider>(pParent, _("Pan"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
PAN_SLIDER);
|
PAN_SLIDER);
|
||||||
mPan->SetDefaultValue(defPos);
|
gPan->SetDefaultValue(defPos);
|
||||||
|
|
||||||
mPanCaptured = std::make_unique<LWSlider>(pParent, _("Pan"),
|
gPanCaptured = std::make_unique<LWSlider>(pParent, _("Pan"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
PAN_SLIDER);
|
PAN_SLIDER);
|
||||||
mPanCaptured->SetDefaultValue(defPos);
|
gPanCaptured->SetDefaultValue(defPos);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
GetVelocityRect(point, sliderRect);
|
GetVelocityRect(point, sliderRect);
|
||||||
|
|
||||||
/* i18n-hint: Title of the Velocity slider, used to adjust the volume of note tracks */
|
/* i18n-hint: Title of the Velocity slider, used to adjust the volume of note tracks */
|
||||||
mVelocity = std::make_unique<LWSlider>(pParent, _("Velocity"),
|
gVelocity = std::make_unique<LWSlider>(pParent, _("Velocity"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
VEL_SLIDER);
|
VEL_SLIDER);
|
||||||
mVelocity->SetDefaultValue(0.0);
|
gVelocity->SetDefaultValue(0.0);
|
||||||
mVelocityCaptured = std::make_unique<LWSlider>(pParent, _("Velocity"),
|
gVelocityCaptured = std::make_unique<LWSlider>(pParent, _("Velocity"),
|
||||||
wxPoint(sliderRect.x, sliderRect.y),
|
wxPoint(sliderRect.x, sliderRect.y),
|
||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
VEL_SLIDER);
|
VEL_SLIDER);
|
||||||
mVelocityCaptured->SetDefaultValue(0.0);
|
gVelocityCaptured->SetDefaultValue(0.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -9275,11 +9306,11 @@ void TrackInfo::DrawSliders(wxDC *dc, WaveTrack *t, wxRect rect, bool captured)
|
|||||||
|
|
||||||
GetGainRect(rect.GetTopLeft(), sliderRect);
|
GetGainRect(rect.GetTopLeft(), sliderRect);
|
||||||
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) )
|
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) )
|
||||||
GainSlider(t, captured)->OnPaint(*dc);
|
GainSlider(sliderRect, t, captured, pParent)->OnPaint(*dc);
|
||||||
|
|
||||||
GetPanRect(rect.GetTopLeft(), sliderRect);
|
GetPanRect(rect.GetTopLeft(), sliderRect);
|
||||||
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) )
|
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) )
|
||||||
PanSlider(t, captured)->OnPaint(*dc);
|
PanSlider(sliderRect, t, captured, pParent)->OnPaint(*dc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
@ -9289,7 +9320,7 @@ void TrackInfo::DrawVelocitySlider(wxDC *dc, NoteTrack *t, wxRect rect, bool cap
|
|||||||
|
|
||||||
GetVelocityRect( rect.GetTopLeft(), sliderRect );
|
GetVelocityRect( rect.GetTopLeft(), sliderRect );
|
||||||
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) ) {
|
if ( !TrackInfo::HideTopItem( rect, sliderRect, kTrackInfoSliderAllowance ) ) {
|
||||||
VelocitySlider(t, captured)->OnPaint(*dc);
|
VelocitySlider(sliderRect, t, captured, pParent)->OnPaint(*dc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -9315,59 +9346,64 @@ unsigned TrackInfo::DefaultWaveTrackHeight()
|
|||||||
return (unsigned) std::max( needed, (int) Track::DefaultHeight );
|
return (unsigned) std::max( needed, (int) Track::DefaultHeight );
|
||||||
}
|
}
|
||||||
|
|
||||||
LWSlider * TrackInfo::GainSlider(WaveTrack *t, bool captured) const
|
std::unique_ptr<LWSlider>
|
||||||
{
|
TrackInfo::gGainCaptured
|
||||||
wxPoint topLeft{
|
, TrackInfo::gPanCaptured
|
||||||
kLeftMargin, t->GetY() - pParent->GetViewInfo()->vpos + kTopMargin };
|
, TrackInfo::gGain
|
||||||
wxRect sliderRect;
|
, TrackInfo::gPan
|
||||||
GetGainRect(topLeft, sliderRect);
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
|
, TrackInfo::gVelocityCaptured
|
||||||
|
, TrackInfo::gVelocity
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
LWSlider * TrackInfo::GainSlider
|
||||||
|
(const wxRect &sliderRect, const WaveTrack *t, bool captured, wxWindow *pParent)
|
||||||
|
{
|
||||||
wxPoint pos = sliderRect.GetPosition();
|
wxPoint pos = sliderRect.GetPosition();
|
||||||
float gain = t->GetGain();
|
float gain = t->GetGain();
|
||||||
|
|
||||||
mGain->Move(pos);
|
gGain->Move(pos);
|
||||||
mGain->Set(gain);
|
gGain->Set(gain);
|
||||||
mGainCaptured->Move(pos);
|
gGainCaptured->Move(pos);
|
||||||
mGainCaptured->Set(gain);
|
gGainCaptured->Set(gain);
|
||||||
|
|
||||||
return (captured ? mGainCaptured : mGain).get();
|
auto slider = (captured ? gGainCaptured : gGain).get();
|
||||||
|
slider->SetParent( pParent ? pParent : ::GetActiveProject() );
|
||||||
|
return slider;
|
||||||
}
|
}
|
||||||
|
|
||||||
LWSlider * TrackInfo::PanSlider(WaveTrack *t, bool captured) const
|
LWSlider * TrackInfo::PanSlider
|
||||||
|
(const wxRect &sliderRect, const WaveTrack *t, bool captured, wxWindow *pParent)
|
||||||
{
|
{
|
||||||
wxPoint topLeft{
|
|
||||||
kLeftMargin, t->GetY() - pParent->GetViewInfo()->vpos + kTopMargin };
|
|
||||||
wxRect sliderRect;
|
|
||||||
GetPanRect(topLeft, sliderRect);
|
|
||||||
|
|
||||||
wxPoint pos = sliderRect.GetPosition();
|
wxPoint pos = sliderRect.GetPosition();
|
||||||
float pan = t->GetPan();
|
float pan = t->GetPan();
|
||||||
|
|
||||||
mPan->Move(pos);
|
gPan->Move(pos);
|
||||||
mPan->Set(pan);
|
gPan->Set(pan);
|
||||||
mPanCaptured->Move(pos);
|
gPanCaptured->Move(pos);
|
||||||
mPanCaptured->Set(pan);
|
gPanCaptured->Set(pan);
|
||||||
|
|
||||||
return (captured ? mPanCaptured : mPan).get();
|
auto slider = (captured ? gPanCaptured : gPan).get();
|
||||||
|
slider->SetParent( pParent ? pParent : ::GetActiveProject() );
|
||||||
|
return slider;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
LWSlider * TrackInfo::VelocitySlider(NoteTrack *t, bool captured) const
|
LWSlider * TrackInfo::VelocitySlider
|
||||||
|
(const wxRect &sliderRect, const NoteTrack *t, bool captured, wxWindow *pParent)
|
||||||
{
|
{
|
||||||
wxPoint topLeft{
|
|
||||||
kLeftMargin, t->GetY() - pParent->GetViewInfo()->vpos + kTopMargin };
|
|
||||||
wxRect sliderRect;
|
|
||||||
GetVelocityRect(topLeft, sliderRect);
|
|
||||||
|
|
||||||
wxPoint pos = sliderRect.GetPosition();
|
wxPoint pos = sliderRect.GetPosition();
|
||||||
float velocity = t->GetVelocity();
|
float velocity = t->GetVelocity();
|
||||||
|
|
||||||
mVelocity->Move(pos);
|
gVelocity->Move(pos);
|
||||||
mVelocity->Set(velocity);
|
gVelocity->Set(velocity);
|
||||||
mVelocityCaptured->Move(pos);
|
gVelocityCaptured->Move(pos);
|
||||||
mVelocityCaptured->Set(velocity);
|
gVelocityCaptured->Set(velocity);
|
||||||
|
|
||||||
return (captured ? mVelocityCaptured : mVelocity).get();
|
auto slider = (captured ? gVelocityCaptured : gVelocity).get();
|
||||||
|
slider->SetParent( pParent ? pParent : ::GetActiveProject() );
|
||||||
|
return slider;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -124,11 +124,17 @@ public:
|
|||||||
static unsigned DefaultNoteTrackHeight();
|
static unsigned DefaultNoteTrackHeight();
|
||||||
static unsigned DefaultWaveTrackHeight();
|
static unsigned DefaultWaveTrackHeight();
|
||||||
|
|
||||||
LWSlider * GainSlider(WaveTrack *t, bool captured = false) const;
|
static LWSlider * GainSlider
|
||||||
LWSlider * PanSlider(WaveTrack *t, bool captured = false) const;
|
(const wxRect &sliderRect, const WaveTrack *t, bool captured,
|
||||||
|
wxWindow *pParent);
|
||||||
|
static LWSlider * PanSlider
|
||||||
|
(const wxRect &sliderRect, const WaveTrack *t, bool captured,
|
||||||
|
wxWindow *pParent);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
LWSlider * VelocitySlider(NoteTrack *t, bool captured = false) const;
|
static LWSlider * VelocitySlider
|
||||||
|
(const wxRect &sliderRect, const NoteTrack *t, bool captured,
|
||||||
|
wxWindow *pParent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -136,10 +142,10 @@ private:
|
|||||||
|
|
||||||
TrackPanel * pParent;
|
TrackPanel * pParent;
|
||||||
static wxFont gFont;
|
static wxFont gFont;
|
||||||
std::unique_ptr<LWSlider>
|
static std::unique_ptr<LWSlider>
|
||||||
mGainCaptured, mPanCaptured, mGain, mPan;
|
gGainCaptured, gPanCaptured, gGain, gPan;
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
std::unique_ptr<LWSlider> mVelocityCaptured, mVelocity;
|
static std::unique_ptr<LWSlider> gVelocityCaptured, gVelocity;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
friend class TrackPanel;
|
friend class TrackPanel;
|
||||||
@ -538,7 +544,7 @@ protected:
|
|||||||
// If label, rectangle includes track control panel only.
|
// If label, rectangle includes track control panel only.
|
||||||
// If !label, rectangle includes all of that, and the vertical ruler, and
|
// If !label, rectangle includes all of that, and the vertical ruler, and
|
||||||
// the proper track area.
|
// the proper track area.
|
||||||
virtual wxRect FindTrackRect(Track * target, bool label);
|
virtual wxRect FindTrackRect( const Track * target, bool label );
|
||||||
|
|
||||||
virtual int GetVRulerWidth() const;
|
virtual int GetVRulerWidth() const;
|
||||||
virtual int GetVRulerOffset() const { return mTrackInfo.GetTrackInfoWidth(); }
|
virtual int GetVRulerOffset() const { return mTrackInfo.GetTrackInfoWidth(); }
|
||||||
@ -593,7 +599,15 @@ protected:
|
|||||||
virtual wxString TrackSubText(WaveTrack *t);
|
virtual wxString TrackSubText(WaveTrack *t);
|
||||||
|
|
||||||
TrackInfo mTrackInfo;
|
TrackInfo mTrackInfo;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
LWSlider *GainSlider( const WaveTrack *wt );
|
||||||
|
LWSlider *PanSlider( const WaveTrack *wt );
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
|
LWSlider *VelocitySlider( const NoteTrack *nt );
|
||||||
|
#endif
|
||||||
|
|
||||||
TrackInfo *GetTrackInfo() { return &mTrackInfo; }
|
TrackInfo *GetTrackInfo() { return &mTrackInfo; }
|
||||||
const TrackInfo *GetTrackInfo() const { return &mTrackInfo; }
|
const TrackInfo *GetTrackInfo() const { return &mTrackInfo; }
|
||||||
|
|
||||||
|
@ -156,6 +156,8 @@ class LWSlider
|
|||||||
|
|
||||||
static void DeleteSharedTipPanel();
|
static void DeleteSharedTipPanel();
|
||||||
|
|
||||||
|
void SetParent(wxWindow *parent) { mParent = parent; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
wxString GetTip(float value) const;
|
wxString GetTip(float value) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user