mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 08:29:27 +02:00
Make TrackInfo routines that calculate rectangles static
This commit is contained in:
parent
e2d77b399d
commit
bf3f041abe
@ -8891,7 +8891,7 @@ int TrackInfo::GetTrackInfoWidth() const
|
|||||||
return kTrackInfoWidth;
|
return kTrackInfoWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetCloseBoxRect(const wxRect & rect, wxRect & dest) const
|
void TrackInfo::GetCloseBoxRect(const wxRect & rect, wxRect & dest)
|
||||||
{
|
{
|
||||||
dest.x = rect.x;
|
dest.x = rect.x;
|
||||||
auto results = CalcItemY( commonTrackTCPLines, kItemBarButtons );
|
auto results = CalcItemY( commonTrackTCPLines, kItemBarButtons );
|
||||||
@ -8900,7 +8900,7 @@ void TrackInfo::GetCloseBoxRect(const wxRect & rect, wxRect & dest) const
|
|||||||
dest.height = results.second;
|
dest.height = results.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetTitleBarRect(const wxRect & rect, wxRect & dest) const
|
void TrackInfo::GetTitleBarRect(const wxRect & rect, wxRect & dest)
|
||||||
{
|
{
|
||||||
// to right of CloseBoxRect, plus a little more
|
// to right of CloseBoxRect, plus a little more
|
||||||
dest.x = rect.x + kTrackInfoBtnSize + 1;
|
dest.x = rect.x + kTrackInfoBtnSize + 1;
|
||||||
@ -8911,7 +8911,7 @@ void TrackInfo::GetTitleBarRect(const wxRect & rect, wxRect & dest) const
|
|||||||
dest.height = results.second;
|
dest.height = results.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetMuteSoloRect(const wxRect & rect, wxRect & dest, bool solo, bool bHasSoloButton, const Track *pTrack) const
|
void TrackInfo::GetMuteSoloRect(const wxRect & rect, wxRect & dest, bool solo, bool bHasSoloButton, const Track *pTrack)
|
||||||
{
|
{
|
||||||
|
|
||||||
dest.x = rect.x;
|
dest.x = rect.x;
|
||||||
@ -8949,7 +8949,7 @@ void TrackInfo::GetMuteSoloRect(const wxRect & rect, wxRect & dest, bool solo, b
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetGainRect(const wxPoint &topleft, wxRect & dest) const
|
void TrackInfo::GetGainRect(const wxPoint &topleft, wxRect & dest)
|
||||||
{
|
{
|
||||||
dest.x = topleft.x + 6;
|
dest.x = topleft.x + 6;
|
||||||
auto results = CalcItemY( waveTrackTCPLines, kItemGain );
|
auto results = CalcItemY( waveTrackTCPLines, kItemGain );
|
||||||
@ -8958,7 +8958,7 @@ void TrackInfo::GetGainRect(const wxPoint &topleft, wxRect & dest) const
|
|||||||
dest.height = results.second;
|
dest.height = results.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetPanRect(const wxPoint &topleft, wxRect & dest) const
|
void TrackInfo::GetPanRect(const wxPoint &topleft, wxRect & dest)
|
||||||
{
|
{
|
||||||
GetGainRect( topleft, dest );
|
GetGainRect( topleft, dest );
|
||||||
auto results = CalcItemY( waveTrackTCPLines, kItemPan );
|
auto results = CalcItemY( waveTrackTCPLines, kItemPan );
|
||||||
@ -8966,7 +8966,7 @@ void TrackInfo::GetPanRect(const wxPoint &topleft, wxRect & dest) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
void TrackInfo::GetVelocityRect(const wxPoint &topleft, wxRect & dest) const
|
void TrackInfo::GetVelocityRect(const wxPoint &topleft, wxRect & dest)
|
||||||
{
|
{
|
||||||
dest.x = topleft.x + 6;
|
dest.x = topleft.x + 6;
|
||||||
auto results = CalcItemY( noteTrackTCPLines, kItemVelocity );
|
auto results = CalcItemY( noteTrackTCPLines, kItemVelocity );
|
||||||
@ -8976,7 +8976,7 @@ void TrackInfo::GetVelocityRect(const wxPoint &topleft, wxRect & dest) const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest) const
|
void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest)
|
||||||
{
|
{
|
||||||
const int space = 0;// was 3.
|
const int space = 0;// was 3.
|
||||||
dest.x = rect.x + space;
|
dest.x = rect.x + space;
|
||||||
@ -8989,7 +8989,7 @@ void TrackInfo::GetMinimizeRect(const wxRect & rect, wxRect &dest) const
|
|||||||
dest.height = results.second;
|
dest.height = results.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::GetSyncLockIconRect(const wxRect & rect, wxRect &dest) const
|
void TrackInfo::GetSyncLockIconRect(const wxRect & rect, wxRect &dest)
|
||||||
{
|
{
|
||||||
dest.x = rect.x + rect.width - kTrackInfoBtnSize; // to right of minimize button
|
dest.x = rect.x + rect.width - kTrackInfoBtnSize; // to right of minimize button
|
||||||
auto results = CalcBottomItemY
|
auto results = CalcBottomItemY
|
||||||
@ -9000,7 +9000,7 @@ void TrackInfo::GetSyncLockIconRect(const wxRect & rect, wxRect &dest) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
void TrackInfo::GetMidiControlsRect(const wxRect & rect, wxRect & dest) const
|
void TrackInfo::GetMidiControlsRect(const wxRect & rect, wxRect & dest)
|
||||||
{
|
{
|
||||||
dest.x = rect.x + 1; // To center slightly
|
dest.x = rect.x + 1; // To center slightly
|
||||||
// PRL: TODO: kMidiCellWidth is defined in terms of the other constant
|
// PRL: TODO: kMidiCellWidth is defined in terms of the other constant
|
||||||
|
@ -102,19 +102,19 @@ private:
|
|||||||
// Draw the minimize button *and* the sync-lock track icon, if necessary.
|
// Draw the minimize button *and* the sync-lock track icon, if necessary.
|
||||||
void DrawMinimize(wxDC * dc, const wxRect & rect, Track * t, bool down) const;
|
void DrawMinimize(wxDC * dc, const wxRect & rect, Track * t, bool down) const;
|
||||||
|
|
||||||
void GetCloseBoxRect(const wxRect & rect, wxRect &dest) const;
|
static void GetCloseBoxRect(const wxRect & rect, wxRect &dest);
|
||||||
void GetTitleBarRect(const wxRect & rect, wxRect &dest) const;
|
static void GetTitleBarRect(const wxRect & rect, wxRect &dest);
|
||||||
void GetMuteSoloRect(const wxRect & rect, wxRect &dest, bool solo, bool bHasSoloButton,
|
static void GetMuteSoloRect(const wxRect & rect, wxRect &dest, bool solo, bool bHasSoloButton,
|
||||||
const Track *pTrack) const;
|
const Track *pTrack);
|
||||||
void GetGainRect(const wxPoint & topLeft, wxRect &dest) const;
|
static void GetGainRect(const wxPoint & topLeft, wxRect &dest);
|
||||||
void GetPanRect(const wxPoint & topLeft, wxRect &dest) const;
|
static void GetPanRect(const wxPoint & topLeft, wxRect &dest);
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
void GetVelocityRect(const wxPoint & topLeft, wxRect &dest) const;
|
static void GetVelocityRect(const wxPoint & topLeft, wxRect &dest);
|
||||||
#endif
|
#endif
|
||||||
void GetMinimizeRect(const wxRect & rect, wxRect &dest) const;
|
static void GetMinimizeRect(const wxRect & rect, wxRect &dest);
|
||||||
void GetSyncLockIconRect(const wxRect & rect, wxRect &dest) const;
|
static void GetSyncLockIconRect(const wxRect & rect, wxRect &dest);
|
||||||
#ifdef USE_MIDI
|
#ifdef USE_MIDI
|
||||||
void GetMidiControlsRect(const wxRect & rect, wxRect &dest) const;
|
static void GetMidiControlsRect(const wxRect & rect, wxRect &dest);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user