Audacity 3.2.0
|
Functions for drawing the track control panel, which is shown to the side of a track It has the menus, pan and gain controls displayed in it. So "Info" is somewhat a misnomer. Should possibly be "TrackControls". More...
Typedefs | |
using | TCPLine = TrackInfo::TCPLine |
using | TCPLines = TrackInfo::TCPLines |
Functions | |
AUDACITY_DLL_API unsigned | MinimumTrackHeight () |
AUDACITY_DLL_API unsigned | DefaultTrackHeight (const TCPLines &topLines) |
AUDACITY_DLL_API void | DrawItems (TrackPanelDrawingContext &context, const wxRect &rect, const Track &track) |
AUDACITY_DLL_API void | DrawItems (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack, const std::vector< TCPLine > &topLines, const std::vector< TCPLine > &bottomLines) |
AUDACITY_DLL_API void | DrawCloseButton (TrackPanelDrawingContext &context, const wxRect &bev, const Channel *pChannel, UIHandle *target) |
AUDACITY_DLL_API void | CloseTitleDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack) |
AUDACITY_DLL_API void | MinimizeSyncLockDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack) |
AUDACITY_DLL_API void | GetCloseBoxHorizontalBounds (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetCloseBoxRect (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetTitleBarHorizontalBounds (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetTitleBarRect (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetSliderHorizontalBounds (const wxPoint &topleft, wxRect &dest) |
AUDACITY_DLL_API void | GetMinimizeHorizontalBounds (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetMinimizeRect (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetSyncLockHorizontalBounds (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API void | GetSyncLockIconRect (const wxRect &rect, wxRect &dest) |
AUDACITY_DLL_API bool | HideTopItem (const wxRect &rect, const wxRect &subRect, int allowance=0) |
AUDACITY_DLL_API const TCPLines & | StaticTCPLines () |
Functions for drawing the track control panel, which is shown to the side of a track It has the menus, pan and gain controls displayed in it. So "Info" is somewhat a misnomer. Should possibly be "TrackControls".
It maintains global slider widget instances that are reparented and repositioned as needed for drawing and interaction with the user, interoperating with the custom panel subdivision implemented in CellularPanel and avoiding wxWidgets sizers
If we'd instead coded it as a wxWindow, we would have an instance of this class for each track displayed.
using CommonTrackInfo::TCPLine = typedef TrackInfo::TCPLine |
Definition at line 22 of file CommonTrackInfo.h.
using CommonTrackInfo::TCPLines = typedef TrackInfo::TCPLines |
Definition at line 23 of file CommonTrackInfo.h.
void CommonTrackInfo::CloseTitleDrawFunction | ( | TrackPanelDrawingContext & | context, |
const wxRect & | rect, | ||
const Track * | pTrack | ||
) |
Definition at line 206 of file CommonTrackInfo.cpp.
References _, AColor::Arrow(), AColor::Bevel2(), ChannelGroup::Channels(), ThemeBase::Colour(), TrackPanelDrawingContext::dc, DrawCloseButton(), GetCloseBoxHorizontalBounds(), Track::GetName(), Track::GetSelected(), GetTitleBarHorizontalBounds(), TrackPanelDrawingContext::lastState, TrackInfo::SetTrackInfoFont(), TrackPanelDrawingContext::target, and theTheme.
Referenced by commonTrackTCPLines().
unsigned CommonTrackInfo::DefaultTrackHeight | ( | const TCPLines & | topLines | ) |
Definition at line 404 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, ChannelView::DefaultHeight, kVerticalPadding, and anonymous_namespace{CommonTrackInfo.cpp}::totalTCPLines().
Referenced by NoteTrackControls::DefaultNoteTrackHeight(), and WaveTrackControls::DefaultWaveTrackHeight().
void CommonTrackInfo::DrawCloseButton | ( | TrackPanelDrawingContext & | context, |
const wxRect & | bev, | ||
const Channel * | pChannel, | ||
UIHandle * | target | ||
) |
Definition at line 174 of file CommonTrackInfo.cpp.
References AColor::Bevel2(), ThemeBase::Colour(), TrackPanelDrawingContext::dc, UIHandle::FindTrack(), Channel::GetChannelGroup(), Track::GetSelected(), UIHandle::IsDragging(), TrackPanelDrawingContext::lastState, AColor::Line(), and theTheme.
Referenced by CloseTitleDrawFunction(), and SubViewCloseHandle::Draw().
void CommonTrackInfo::DrawItems | ( | TrackPanelDrawingContext & | context, |
const wxRect & | rect, | ||
const Track & | track | ||
) |
Definition at line 126 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, DrawItems(), and TrackControls::Get().
Referenced by CommonTrackControls::Draw(), and DrawItems().
void CommonTrackInfo::DrawItems | ( | TrackPanelDrawingContext & | context, |
const wxRect & | rect, | ||
const Track * | pTrack, | ||
const std::vector< TCPLine > & | topLines, | ||
const std::vector< TCPLine > & | bottomLines | ||
) |
Definition at line 137 of file CommonTrackInfo.cpp.
References ThemeBase::Colour(), TrackPanelDrawingContext::dc, HideTopItem(), TrackInfo::SetTrackInfoFont(), and theTheme.
void CommonTrackInfo::GetCloseBoxHorizontalBounds | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 329 of file CommonTrackInfo.cpp.
References kTrackInfoBtnSize.
Referenced by CloseTitleDrawFunction(), GetCloseBoxRect(), and GetTitleBarHorizontalBounds().
void CommonTrackInfo::GetCloseBoxRect | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 335 of file CommonTrackInfo.cpp.
References TrackInfo::CalcItemY(), commonTrackTCPLines(), GetCloseBoxHorizontalBounds(), and TrackInfo::TCPLine::kItemBarButtons.
Referenced by CloseButtonHandle::HitTest().
void CommonTrackInfo::GetMinimizeHorizontalBounds | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 366 of file CommonTrackInfo.cpp.
References GetSyncLockHorizontalBounds(), and kTrackInfoBtnSize.
Referenced by GetMinimizeRect(), and MinimizeSyncLockDrawFunction().
void CommonTrackInfo::GetMinimizeRect | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 380 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::CalcBottomItemY(), anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, GetMinimizeHorizontalBounds(), and TrackInfo::TCPLine::kItemMinimize.
Referenced by MinimizeButtonHandle::HitTest().
void CommonTrackInfo::GetSliderHorizontalBounds | ( | const wxPoint & | topleft, |
wxRect & | dest | ||
) |
Definition at line 360 of file CommonTrackInfo.cpp.
References kTrackInfoSliderWidth.
Referenced by WaveTrackControls::GetGainRect(), NoteTrackControls::GetVelocityRect(), anonymous_namespace{NoteTrackControls.cpp}::SliderDrawFunction(), and anonymous_namespace{WaveTrackControls.cpp}::SliderDrawFunction().
void CommonTrackInfo::GetSyncLockHorizontalBounds | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 389 of file CommonTrackInfo.cpp.
References kTrackInfoBtnSize.
Referenced by GetMinimizeHorizontalBounds(), GetSyncLockIconRect(), and MinimizeSyncLockDrawFunction().
void CommonTrackInfo::GetSyncLockIconRect | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 395 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::CalcBottomItemY(), anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, GetSyncLockHorizontalBounds(), and TrackInfo::TCPLine::kItemSyncLock.
void CommonTrackInfo::GetTitleBarHorizontalBounds | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 343 of file CommonTrackInfo.cpp.
References GetCloseBoxHorizontalBounds(), and TitleSoloBorderOverlap.
Referenced by CloseTitleDrawFunction(), and GetTitleBarRect().
void CommonTrackInfo::GetTitleBarRect | ( | const wxRect & | rect, |
wxRect & | dest | ||
) |
Definition at line 352 of file CommonTrackInfo.cpp.
References TrackInfo::CalcItemY(), commonTrackTCPLines(), GetTitleBarHorizontalBounds(), and TrackInfo::TCPLine::kItemBarButtons.
Referenced by CommonTrackControls::DoContextMenu(), and MenuButtonHandle::HitTest().
bool CommonTrackInfo::HideTopItem | ( | const wxRect & | rect, |
const wxRect & | subRect, | ||
int | allowance = 0 |
||
) |
Definition at line 117 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::CalcBottomItemY(), anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, and TrackInfo::TCPLine::kHighestBottomItem.
Referenced by DrawItems(), EffectsButtonHandle::HitTest(), GainSliderHandle::HitTest(), MuteButtonHandle::HitTest(), NoteTrackButtonHandle::HitTest(), PanSliderHandle::HitTest(), SoloButtonHandle::HitTest(), and VelocitySliderHandle::HitTest().
void CommonTrackInfo::MinimizeSyncLockDrawFunction | ( | TrackPanelDrawingContext & | context, |
const wxRect & | rect, | ||
const Track * | pTrack | ||
) |
Definition at line 278 of file CommonTrackInfo.cpp.
References AColor::Arrow(), AColor::Bevel2(), ThemeBase::Colour(), TrackPanelDrawingContext::dc, ChannelView::Get(), ChannelGroup::GetChannel(), ChannelView::GetMinimized(), GetMinimizeHorizontalBounds(), Track::GetSelected(), GetSyncLockHorizontalBounds(), ThemeBase::Image(), SyncLock::IsSyncLockSelected(), TrackPanelDrawingContext::lastState, TrackPanelDrawingContext::target, and theTheme.
unsigned CommonTrackInfo::MinimumTrackHeight | ( | ) |
Definition at line 105 of file CommonTrackInfo.cpp.
References anonymous_namespace{CommonTrackInfo.cpp}::commonTrackTCPBottomLines, commonTrackTCPLines(), and kVerticalPadding.
Referenced by CommonChannelView::GetMinimizedHeight(), and ProjectWindow::MinimumTrackHeight().
const TCPLines & CommonTrackInfo::StaticTCPLines | ( | ) |
Definition at line 54 of file CommonTrackInfo.cpp.
References commonTrackTCPLines().
Referenced by CommonTrackControls::GetTCPLines(), PlayableTrackControls::StaticNoteTCPLines(), and PlayableTrackControls::StaticWaveTCPLines().