![]() |
Audacity 3.2.0
|
The TrackPanel class coordinates updates and operations on the main part of the screen which contains multiple tracks. More...
#include <TrackPanel.h>
Classes | |
class | AudacityTimer |
Timer class dedicated to informing the TrackPanel that it is time to refresh some aspect of the screen. More... | |
Public Member Functions | |
TrackPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const std::shared_ptr< TrackList > &tracks, ViewInfo *viewInfo, AudacityProject *project, AdornedRulerPanel *ruler) | |
virtual | ~TrackPanel () |
void | UpdatePrefs () override |
void | OnAudioIO (AudioIOEvent) |
void | OnPaint (wxPaintEvent &event) |
void | OnMouseEvent (wxMouseEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
void | OnTrackListResizing (const TrackListEvent &event) |
void | OnTrackListDeletion () |
void | OnEnsureVisible (const TrackListEvent &event) |
void | UpdateViewIfNoTracks () |
double | GetMostRecentXPos () |
void | OnSize (wxSizeEvent &) |
void | OnIdle (wxIdleEvent &event) |
void | OnTimer (wxTimerEvent &event) |
AS: This gets called on our wx timer events. More... | |
void | OnSyncLockChange (struct SyncLockChangeMessage) |
void | OnTrackFocusChange (struct TrackFocusChangeMessage) |
void | OnUndoReset (struct UndoRedoMessage) |
void | Refresh (bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override |
void | RefreshTrack (Track *trk, bool refreshbacking=true) |
void | HandlePageUpKey () |
void | HandlePageDownKey () |
AudacityProject * | GetProject () const override |
void | OnTrackMenu (Track *t=NULL) |
void | VerticalScroll (float fracPosition) |
TrackPanelCell * | GetFocusedCell () override |
void | SetFocusedCell () override |
void | UpdateVRulers () |
void | UpdateVRuler (Track *t) |
void | UpdateTrackVRuler (Track &t) |
void | UpdateVRulerSize () |
size_t | GetSelectedTrackCount () const |
void | MakeParentRedrawScrollbars () |
wxRect | FindTrackRect (const Track *target) |
wxRect | FindFocusedTrackRect (const Track *target) |
std::vector< wxRect > | FindRulerRects (const Channel &target) |
const TrackList * | GetTracks () const |
TrackList * | GetTracks () |
ViewInfo * | GetViewInfo () |
TrackPanelListener * | GetListener () |
AdornedRulerPanel * | GetRuler () |
void | SetBackgroundCell (const std::shared_ptr< CommonTrackPanelCell > &pCell) |
std::shared_ptr< CommonTrackPanelCell > | GetBackgroundCell () |
![]() | |
CellularPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, ViewInfo *viewInfo, long style=wxTAB_TRAVERSAL|wxNO_BORDER) | |
~CellularPanel () override | |
virtual AudacityProject * | GetProject () const =0 |
virtual std::shared_ptr< TrackPanelNode > | Root ()=0 |
virtual TrackPanelCell * | GetFocusedCell ()=0 |
virtual void | SetFocusedCell ()=0 |
virtual void | ProcessUIHandleResult (TrackPanelCell *pClickedCell, TrackPanelCell *pLatestCell, unsigned refreshResult)=0 |
virtual void | UpdateStatusMessage (const TranslatableString &)=0 |
void | Visit (Visitor &visitor) |
void | VisitCells (const SimpleCellVisitor &visitor) |
void | VisitPreorder (const SimpleNodeVisitor &visitor) |
void | VisitPostorder (const SimpleNodeVisitor &visitor) |
FoundCell | FindCell (int mouseX, int mouseY) |
wxRect | FindRect (const TrackPanelCell &cell) |
wxRect | FindRect (const std::function< bool(TrackPanelNode &) > &pred) |
UIHandlePtr | Target () |
std::shared_ptr< TrackPanelCell > | LastCell () const |
bool | IsMouseCaptured () |
Determines if a modal tool is active. More... | |
wxCoord | MostRecentXCoord () const |
void | HandleCursorForPresentMouseState (bool doHit=true) |
void | Draw (TrackPanelDrawingContext &context, unsigned nPasses) |
![]() | |
OverlayPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style=wxTAB_TRAVERSAL|wxNO_BORDER) | |
void | AddOverlay (const std::weak_ptr< Overlay > &pOverlay) |
void | ClearOverlays () |
void | DrawOverlays (bool repaint_all, wxDC *pDC=nullptr) |
![]() | |
BackedPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style) | |
~BackedPanel () | |
wxDC & | GetBackingDC () |
wxDC & | GetBackingDCForRepaint () |
void | ResizeBacking () |
void | RepairBitmap (wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
void | DisplayBitmap (wxDC &dc) |
void | OnSize (wxSizeEvent &event) |
![]() | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
![]() | |
virtual | ~NonKeystrokeInterceptingWindow () |
Static Public Member Functions | |
static TrackPanel & | Get (AudacityProject &project) |
static const TrackPanel & | Get (const AudacityProject &project) |
static void | Destroy (AudacityProject &project) |
Protected Member Functions | |
bool | IsAudioActive () |
void | UpdateSelectionDisplay () |
std::shared_ptr< TrackPanelNode > | Root () override |
void | DrawTracks (wxDC *dc) |
void | ProcessUIHandleResult (TrackPanelCell *pClickedTrack, TrackPanelCell *pLatestCell, unsigned refreshResult) override |
void | UpdateStatusMessage (const TranslatableString &status) override |
![]() | |
bool | HasEscape () |
bool | CancelDragging (bool escaping) |
void | DoContextMenu (TrackPanelCell *pCell=nullptr) |
void | ClearTargets () |
Protected Attributes | |
Observer::Subscription | mTrackListSubscription |
Observer::Subscription | mAudioIOSubscription |
Observer::Subscription | mUndoSubscription |
Observer::Subscription | mFocusChangeSubscription |
Observer::Subscription | mRealtimeEffectManagerSubscription |
Observer::Subscription | mSyncLockSubscription |
Observer::Subscription | mProjectRulerInvalidatedSubscription |
TrackPanelListener * | mListener |
std::shared_ptr< TrackList > | mTracks |
AdornedRulerPanel * | mRuler |
std::unique_ptr< TrackArtist > | mTrackArtist |
TrackPanel::AudacityTimer | mTimer |
int | mTimeCount |
bool | mRefreshBacking |
SelectedRegion | mLastDrawnSelectedRegion {} |
std::shared_ptr< CommonTrackPanelCell > | mpBackground |
![]() | |
ViewInfo * | mViewInfo |
wxMouseState | mLastMouseState |
Additional Inherited Members | |
![]() | |
using | SimpleCellVisitor = std::function< void(const wxRect &rect, TrackPanelCell &cell) > |
using | SimpleNodeVisitor = std::function< void(const wxRect &rect, TrackPanelNode &node) > |
![]() | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
virtual void | UpdateSelectedPrefs (int id) |
![]() | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
The TrackPanel class coordinates updates and operations on the main part of the screen which contains multiple tracks.
It uses many other classes, but in particular it uses the TrackInfo class to draw the controls area on the left of a track, and the TrackArtist class to draw the actual waveforms.
Note that in some of the older code here, "Label" means the TrackInfo plus the vertical ruler. Confusing relative to LabelTrack labels.
The TrackPanel manages multiple tracks and their TrackInfos.
Note that with stereo tracks there will be one TrackInfo being used by two wavetracks.
This is a diagram of TrackPanel's division of one (non-stereo) track rectangle. Total height equals ChannelView::GetHeight()'s value. Total width is the wxWindow's width. Each character that is not . represents one pixel.
Inset space of this track, and top inset of the next track, are used to draw the focus highlight.
Top inset of the right channel of a stereo track, and bottom shadow line of the left channel, are used for the channel separator.
"Margin" is a term used for inset plus border (top and left) or inset plus shadow plus border (right and bottom).
GetVRulerOffset() counts columns from the left edge up to and including controls, and is a constant.
GetVRulerWidth() is variable – all tracks have the same ruler width at any time, but that width may be adjusted when tracks change their vertical scales.
GetLeftOffset() counts columns up to and including the VRuler and one more, the "one pixel" column.
Cell for label has a rectangle that OMITS left, top, and bottom margins
Cell for vruler has a rectangle right of the label, up to and including the One Pixel column, and OMITS top and bottom margins
Cell() for track returns a rectangle with x == GetLeftOffset(), and OMITS right, top, and bottom margins
+------------— ... ---— ... ------------------— ... ... ----------—+
Top Inset |
---|
+---------— ... ---— ... ------------------— ... ... -------—+ |
| L|+-Border-— ... ---— ... ------------------— ... ... -Border-+ |R | | e||+-------— ... -++— ... -+++--------------— ... ... ----—+| |i | | f|B| || ||| |BS|g | | t|o| Controls || V |O| The good stuff |oh|h | | |r| || R |n| |ra|t | | I|d| || u |e| |dd| | | n|e| || l | | |eo|I | | s|r| || e |P| |rw|n | | e||| || r |i| ||||s | | t||| || |x| ||||e | | ||| || |e| ||||t | | ||| || |l| |||| | | ||| || ||| |||| |
. ... .. ... .... . . ... .. ... .... . . ... .. ... .... .
| ||| || ||| |||| | | ||+-------— -++– ... -+++--------------— ... ... ----—+||| | | |+-Border-— ... --— ... ------------------— ... ... -Border-+|| | | | Shadow-— ... --— ... ------------------— ... ... –Shadow-+| |
Definition at line 62 of file TrackPanel.h.
TrackPanel::TrackPanel | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxPoint & | pos, | ||
const wxSize & | size, | ||
const std::shared_ptr< TrackList > & | tracks, | ||
ViewInfo * | viewInfo, | ||
AudacityProject * | project, | ||
AdornedRulerPanel * | ruler | ||
) |
Definition at line 255 of file TrackPanel.cpp.
References AudioIO::Get(), TrackFocus::Get(), UndoManager::Get(), RealtimeEffectManager::Get(), SyncLockState::Get(), ProjectTimeRuler::Get(), ProjectWindow::Get(), GetProject(), ProjectTimeRuler::GetRuler(), RealtimeEffectManagerMessage::group, mAudioIOSubscription, mFocusChangeSubscription, mProjectRulerInvalidatedSubscription, mRealtimeEffectManagerSubscription, mSyncLockSubscription, mTimeCount, mTimer, mTrackArtist, mTrackListSubscription, mTracks, TrackListEvent::mType, mUndoSubscription, OnAudioIO(), OnIdle(), OnSyncLockChange(), OnTrackFocusChange(), OnUndoReset(), TrackPanel::AudacityTimer::parent, project, Refresh(), RefreshTrack(), wxPanelWrapper::SetLabel(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), UpdatePrefs(), and XO().
|
virtual |
Definition at line 345 of file TrackPanel.cpp.
References mTimer.
|
static |
Definition at line 242 of file TrackPanel.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Assign(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), GetAttachedWindows(), project, and anonymous_namespace{TrackPanel.cpp}::sKey.
Referenced by ProjectManager::OnCloseWindow().
|
protected |
Draw the actual track areas. We only draw the borders and the little buttons and menues and whatnot here, the actual contents of each track are drawn by the TrackArtist.
Definition at line 820 of file TrackPanel.cpp.
References TrackList::Any(), CellularPanel::Draw(), ToolCodes::drawTool, ToolCodes::envelopeTool, ProjectSettings::Get(), GetProject(), PlayableTrack::GetSolo(), GetTracks(), CellularPanel::mLastMouseState, mTrackArtist, ToolCodes::multiTool, CellularPanel::mViewInfo, TrackArtist::NPasses, ViewInfo::selectedRegion, settings(), Track::SubstitutePendingChangedTrack(), and CellularPanel::Target().
Referenced by OnPaint().
wxRect TrackPanel::FindFocusedTrackRect | ( | const Track * | target | ) |
FindTrackRect(target)
and the focus ring area around it. If target is nullptr, returns empty rectangle. Definition at line 1694 of file TrackPanel.cpp.
References FindTrackRect(), kBottomMargin, and kTopMargin.
Referenced by ScreenshotCommand::GetTrackRect().
std::vector< wxRect > TrackPanel::FindRulerRects | ( | const Channel & | target | ) |
Definition at line 1722 of file TrackPanel.cpp.
References CellularPanel::VisitCells().
wxRect TrackPanel::FindTrackRect | ( | const Track * | target | ) |
Definition at line 1680 of file TrackPanel.cpp.
References TrackList::Find(), CellularPanel::FindRect(), and GetTracks().
Referenced by FindFocusedTrackRect().
|
static |
Definition at line 232 of file TrackPanel.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), project, and anonymous_namespace{TrackPanel.cpp}::sKey.
Referenced by ScreenshotCommand::Apply(), SelectTimeCommand::Apply(), SetTrackVisualsCommand::ApplyInner(), ProjectSelectionManager::AS_ModifySelection(), BrushHandle::Click(), SelectHandle::Click(), WaveformPrefs::Commit(), MenuButtonHandle::CommitChanges(), LabelTrackView::DialogForLabelName(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), EffectUI::DoEffect(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteText(), TrackUtilities::DoRemoveTracks(), BrushHandle::Drag(), EditCursorOverlay::Draw(), DeviceToolBar::EnableDisableButtons(), GetInfoCommand::ExploreTrackPanel(), Get(), MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), GainSliderHandle::HitTest(), PanSliderHandle::HitTest(), InitProjectWindow(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), anonymous_namespace{NavigationMenus.cpp}::NextOrPrevFrame(), MixerTrackCluster::OnButton_Mute(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), anonymous_namespace{ToolsToolBar.cpp}::OnNextTool(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{TransportMenus.cpp}::OnPlayOneSecond(), anonymous_namespace{TransportMenus.cpp}::OnPlayToSelection(), anonymous_namespace{ToolsToolBar.cpp}::OnPrevTool(), anonymous_namespace{Printing.cpp}::OnPrint(), anonymous_namespace{EditMenus.cpp}::OnRedo(), SelectActions::Handler::OnSelectAll(), ViewActions::Handler::OnShowClipping(), ViewActions::Handler::OnShowNameOverlay(), anonymous_namespace{TrackMenus.cpp}::OnSyncLock(), SelectHandle::TimerHandler::OnTimer(), anonymous_namespace{TrackMenus.cpp}::OnTrackClose(), anonymous_namespace{TrackMenus.cpp}::OnTrackGain(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainDec(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainInc(), anonymous_namespace{TrackMenus.cpp}::OnTrackMenu(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveBottom(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveDown(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveTop(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveUp(), anonymous_namespace{TrackMenus.cpp}::OnTrackPan(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanLeft(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanRight(), anonymous_namespace{EditMenus.cpp}::OnUndo(), ViewActions::Handler::OnZoomIn(), ViewActions::Handler::OnZoomNormal(), ViewActions::Handler::OnZoomToggle(), ProjectFileManager::OpenProjectFile(), SpectrumPrefs::Preview(), SpectrumPrefs::Rollback(), SelectUtilities::SelectNone(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), ProjectSelectionManager::SnapSelection(), and ProjectSelectionManager::SSBL_ModifySpectralSelection().
|
static |
Definition at line 237 of file TrackPanel.cpp.
References Get(), and project.
std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell | ( | ) |
Definition at line 870 of file TrackPanel.cpp.
References mpBackground.
Referenced by GetFocusedCell().
|
overridevirtual |
Implements CellularPanel.
Definition at line 1734 of file TrackPanel.cpp.
References TrackFocus::Get(), ChannelView::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetBackgroundCell(), and GetProject().
Referenced by OnTrackFocusChange().
|
inline |
Definition at line 175 of file TrackPanel.h.
double TrackPanel::GetMostRecentXPos | ( | ) |
Definition at line 741 of file TrackPanel.cpp.
References ZoomInfo::GetLeftOffset(), CellularPanel::MostRecentXCoord(), CellularPanel::mViewInfo, and ZoomInfo::PositionToTime().
|
overridevirtual |
Gets the pointer to the AudacityProject that goes with this track panel.
Implements CellularPanel.
Definition at line 366 of file TrackPanel.cpp.
Referenced by DrawTracks(), GetFocusedCell(), IsAudioActive(), OnEnsureVisible(), OnIdle(), OnMouseEvent(), OnTimer(), OnTrackListDeletion(), OnUndoReset(), ProcessUIHandleResult(), Refresh(), SetFocusedCell(), TrackPanel(), UpdateStatusMessage(), and UpdateViewIfNoTracks().
|
inline |
Definition at line 176 of file TrackPanel.h.
Referenced by ScreenshotCommand::Apply(), and ScreenshotCommand::GetPanelRect().
size_t TrackPanel::GetSelectedTrackCount | ( | ) | const |
Definition at line 635 of file TrackPanel.cpp.
References GetTracks(), and TrackList::Selected().
|
inline |
Definition at line 173 of file TrackPanel.h.
|
inline |
Definition at line 172 of file TrackPanel.h.
Referenced by DrawTracks(), FindTrackRect(), GetSelectedTrackCount(), OnEnsureVisible(), ProcessUIHandleResult(), RefreshTrack(), UpdateVRulers(), UpdateVRulerSize(), and VerticalScroll().
|
inline |
void TrackPanel::HandlePageDownKey | ( | ) |
Definition at line 604 of file TrackPanel.cpp.
References ZoomInfo::GetScreenEndTime(), mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().
Referenced by OnKeyDown().
void TrackPanel::HandlePageUpKey | ( | ) |
Definition at line 599 of file TrackPanel.cpp.
References ZoomInfo::GetScreenEndTime(), ZoomInfo::h, mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().
Referenced by OnKeyDown().
|
protected |
Definition at line 609 of file TrackPanel.cpp.
References ProjectAudioIO::Get(), GetProject(), and ProjectAudioIO::IsAudioActive().
Referenced by OnTimer().
void TrackPanel::MakeParentRedrawScrollbars | ( | ) |
Definition at line 519 of file TrackPanel.cpp.
References mListener, and TrackPanelListener::TP_RedrawScrollbars().
void TrackPanel::OnAudioIO | ( | AudioIOEvent | evt | ) |
Definition at line 807 of file TrackPanel.cpp.
References BasicUI::CallAfter(), CellularPanel::HandleCursorForPresentMouseState(), AudioIOEvent::MONITOR, and AudioIOEvent::type.
Referenced by TrackPanel().
void TrackPanel::OnEnsureVisible | ( | const TrackListEvent & | event | ) |
Definition at line 1010 of file TrackPanel.cpp.
References ProjectHistory::Get(), ChannelView::GetChannelGroupHeight(), GetProject(), GetTracks(), TrackListEvent::mExtra, mListener, ProjectHistory::ModifyState(), TrackListEvent::mpTrack, CellularPanel::mViewInfo, Refresh(), ViewInfo::scrollStep, TrackPanelListener::TP_ScrollUpDown(), and ZoomInfo::vpos.
void TrackPanel::OnIdle | ( | wxIdleEvent & | event | ) |
Definition at line 388 of file TrackPanel.cpp.
References GetProject(), GetProjectFrame(), kTimerInterval, mTimer, and OnIdle().
Referenced by OnIdle(), and TrackPanel().
void TrackPanel::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 692 of file TrackPanel.cpp.
References HandlePageDownKey(), and HandlePageUpKey().
void TrackPanel::OnMouseEvent | ( | wxMouseEvent & | event | ) |
Definition at line 712 of file TrackPanel.cpp.
References BasicUI::CallAfter(), Track::EnsureVisible(), CellularPanel::FindCell(), anonymous_namespace{TrackPanel.cpp}::FindTrack(), TrackFocus::Get(), GetProject(), kTimerInterval, and mTimer.
void TrackPanel::OnPaint | ( | wxPaintEvent & | event | ) |
AS: OnPaint( ) is called during the normal course of completing a repaint operation.
Definition at line 476 of file TrackPanel.cpp.
References FrameStatistics::CreateStopwatch(), BackedPanel::DisplayBitmap(), OverlayPanel::DrawOverlays(), DrawTracks(), BackedPanel::GetBackingDCForRepaint(), mLastDrawnSelectedRegion, mRefreshBacking, CellularPanel::mViewInfo, BackedPanel::RepairBitmap(), ViewInfo::selectedRegion, and FrameStatistics::TrackPanel.
void TrackPanel::OnSize | ( | wxSizeEvent & | evt | ) |
Definition at line 380 of file TrackPanel.cpp.
References CellularPanel::mViewInfo, ViewInfo::SetHeight(), ZoomInfo::SetWidth(), and size.
void TrackPanel::OnSyncLockChange | ( | struct SyncLockChangeMessage | ) |
Definition at line 461 of file TrackPanel.cpp.
References Refresh().
Referenced by TrackPanel().
void TrackPanel::OnTimer | ( | wxTimerEvent & | event | ) |
AS: This gets called on our wx timer events.
Definition at line 409 of file TrackPanel.cpp.
References OverlayPanel::DrawOverlays(), AudioIO::Get(), ProjectAudioIO::Get(), ProjectAudioManager::Get(), ProjectWindow::Get(), GetProject(), IsAudioActive(), mLastDrawnSelectedRegion, mRefreshBacking, mRuler, mTimeCount, CellularPanel::mViewInfo, Refresh(), ViewInfo::selectedRegion, and UpdateSelectionDisplay().
void TrackPanel::OnTrackFocusChange | ( | struct TrackFocusChangeMessage | ) |
Definition at line 1751 of file TrackPanel.cpp.
References GetFocusedCell(), and Refresh().
Referenced by TrackPanel().
void TrackPanel::OnTrackListDeletion | ( | ) |
Definition at line 677 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), CellularPanel::Target(), and UpdateVRulerSize().
void TrackPanel::OnTrackListResizing | ( | const TrackListEvent & | event | ) |
Definition at line 664 of file TrackPanel.cpp.
References mListener, TrackListEvent::mpTrack, TrackPanelListener::TP_RedrawScrollbars(), and UpdateVRuler().
void TrackPanel::OnTrackMenu | ( | Track * | t = NULL | ) |
Definition at line 1003 of file TrackPanel.cpp.
References CellularPanel::DoContextMenu(), ChannelView::Get(), and ChannelGroup::GetChannel().
void TrackPanel::OnUndoReset | ( | struct UndoRedoMessage | message | ) |
Definition at line 466 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), Refresh(), UndoRedoMessage::Reset, and UndoRedoMessage::type.
Referenced by TrackPanel().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 533 of file TrackPanel.cpp.
References RefreshCode::DestroyedCell, RefreshCode::DrawOverlays, OverlayPanel::DrawOverlays(), Track::EnsureVisible(), RefreshCode::EnsureVisible, anonymous_namespace{TrackPanel.cpp}::FindTrack(), RefreshCode::FixScrollbars, TrackFocus::Get(), TrackList::Get(), GetProject(), GetTracks(), TrackList::Lock(), mRuler, RefreshCode::RefreshAll, RefreshCode::RefreshCell, RefreshCode::RefreshLatestCell, RefreshCode::Resize, TrackList::UpdatePendingTracks(), and RefreshCode::UpdateVRuler.
|
override |
This method overrides Refresh() of wxWindow so that the boolean play indicator can be set to false, so that an old play indicator that is no longer there won't get XORed (to erase it), thus redrawing it on the TrackPanel
Definition at line 784 of file TrackPanel.cpp.
References BasicUI::CallAfter(), GetProject(), CellularPanel::HandleCursorForPresentMouseState(), and mRefreshBacking.
Referenced by OnEnsureVisible(), OnSyncLockChange(), SelectHandle::TimerHandler::OnTimer(), OnTimer(), OnTrackFocusChange(), OnUndoReset(), RefreshTrack(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), ProjectSelectionManager::SnapSelection(), TrackPanel(), UpdatePrefs(), UpdateSelectionDisplay(), UpdateVRulerSize(), and VerticalScroll().
void TrackPanel::RefreshTrack | ( | Track * | trk, |
bool | refreshbacking = true |
||
) |
Definition at line 747 of file TrackPanel.cpp.
References TrackList::Find(), ChannelView::Get(), ChannelGroup::GetChannel(), ChannelView::GetChannelGroupHeight(), GetTracks(), kLeftInset, kRightInset, kShadowThickness, kTopInset, mRefreshBacking, CellularPanel::mViewInfo, Refresh(), and ZoomInfo::vpos.
Referenced by MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), MixerTrackCluster::OnButton_Mute(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), and TrackPanel().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 1668 of file TrackPanel.cpp.
void TrackPanel::SetBackgroundCell | ( | const std::shared_ptr< CommonTrackPanelCell > & | pCell | ) |
Definition at line 864 of file TrackPanel.cpp.
References mpBackground.
|
overridevirtual |
Implements CellularPanel.
Definition at line 1743 of file TrackPanel.cpp.
References KeyboardCapture::Capture(), TrackFocus::Get(), and GetProject().
|
overridevirtual |
Implements PrefsListener.
Definition at line 355 of file TrackPanel.cpp.
References Refresh(), and UpdateVRulers().
Referenced by TrackPanel().
|
protected |
Definition at line 624 of file TrackPanel.cpp.
References AdornedRulerPanel::DrawSelection(), mRuler, and Refresh().
Referenced by OnTimer().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 615 of file TrackPanel.cpp.
References ProjectStatus::Get(), GetProject(), CellularPanel::HasEscape(), TranslatableString::Join(), ProjectStatus::Set(), and XO().
void TrackPanel::UpdateTrackVRuler | ( | Track & | t | ) |
t.IsLeader()
Definition at line 941 of file TrackPanel.cpp.
References ChannelGroup::Channels(), PackedArray::end(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), ChannelView::Get(), ChannelVRulerControls::Get(), ZoomInfo::GetVRulerOffset(), ZoomInfo::GetVRulerWidth(), Track::IsLeader(), CellularPanel::mViewInfo, size, and ChannelVRulerControls::UpdateRuler().
Referenced by UpdateVRuler(), and UpdateVRulers().
void TrackPanel::UpdateViewIfNoTracks | ( | ) |
Definition at line 640 of file TrackPanel.cpp.
References ProjectStatus::Get(), ZoomInfo::GetDefaultZoom(), GetProject(), ZoomInfo::h, mListener, mTracks, CellularPanel::mViewInfo, ViewInfo::selectedRegion, ProjectStatus::Set(), ZoomInfo::SetZoom(), and TrackPanelListener::TP_HandleResize().
void TrackPanel::UpdateVRuler | ( | Track * | t | ) |
Definition at line 933 of file TrackPanel.cpp.
References PackedArray::begin(), TrackList::Channels(), UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by OnTrackListResizing().
void TrackPanel::UpdateVRulers | ( | ) |
Definition at line 925 of file TrackPanel.cpp.
References GetTracks(), UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by UpdatePrefs().
void TrackPanel::UpdateVRulerSize | ( | ) |
Definition at line 981 of file TrackPanel.cpp.
References TrackList::Any(), ChannelView::Get(), ZoomInfo::GetLeftOffset(), GetTracks(), ZoomInfo::GetVRulerWidth(), mRuler, CellularPanel::mViewInfo, AdornedRulerPanel::Refresh(), Refresh(), AdornedRulerPanel::SetLeftOffset(), ZoomInfo::SetVRulerWidth(), size, and ChannelView::vrulerSize.
Referenced by OnTrackListDeletion(), UpdateVRuler(), and UpdateVRulers().
void TrackPanel::VerticalScroll | ( | float | fracPosition | ) |
Definition at line 1052 of file TrackPanel.cpp.
References ChannelView::GetChannelGroupHeight(), GetTracks(), mListener, CellularPanel::mViewInfo, Refresh(), ViewInfo::scrollStep, TrackPanelListener::TP_ScrollUpDown(), tracks, and ZoomInfo::vpos.
|
protected |
Definition at line 192 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 194 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 231 of file TrackPanel.h.
|
protected |
Definition at line 200 of file TrackPanel.h.
Referenced by HandlePageDownKey(), HandlePageUpKey(), MakeParentRedrawScrollbars(), OnEnsureVisible(), OnTrackListResizing(), UpdateViewIfNoTracks(), and VerticalScroll().
|
protected |
Definition at line 235 of file TrackPanel.h.
Referenced by GetBackgroundCell(), and SetBackgroundCell().
|
protected |
Definition at line 197 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 195 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 226 of file TrackPanel.h.
Referenced by OnPaint(), OnTimer(), Refresh(), and RefreshTrack().
|
protected |
Definition at line 204 of file TrackPanel.h.
Referenced by OnTimer(), ProcessUIHandleResult(), UpdateSelectionDisplay(), and UpdateVRulerSize().
|
protected |
Definition at line 196 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 224 of file TrackPanel.h.
Referenced by OnTimer(), and TrackPanel().
|
protected |
Referenced by OnIdle(), OnMouseEvent(), TrackPanel(), and ~TrackPanel().
|
protected |
Definition at line 206 of file TrackPanel.h.
Referenced by DrawTracks(), and TrackPanel().
|
protected |
Definition at line 191 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 202 of file TrackPanel.h.
Referenced by TrackPanel(), and UpdateViewIfNoTracks().
|
protected |
Definition at line 193 of file TrackPanel.h.
Referenced by TrackPanel().