![]() |
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 Track *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 |
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 TrackView::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 61 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 254 of file TrackPanel.cpp.
References AudioIO::Get(), TrackFocus::Get(), UndoManager::Get(), RealtimeEffectManager::Get(), SyncLockState::Get(), ProjectWindow::Get(), GetProject(), mAudioIOSubscription, mFocusChangeSubscription, mRealtimeEffectManagerSubscription, mSyncLockSubscription, mTimeCount, mTimer, mTrackArtist, mTrackListSubscription, mTracks, TrackListEvent::mType, mUndoSubscription, OnAudioIO(), OnIdle(), OnSyncLockChange(), OnTrackFocusChange(), OnUndoReset(), TrackPanel::AudacityTimer::parent, RefreshTrack(), wxPanelWrapper::SetLabel(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), RealtimeEffectManagerMessage::track, UpdatePrefs(), and XO().
|
virtual |
Definition at line 341 of file TrackPanel.cpp.
References mTimer.
|
static |
Definition at line 241 of file TrackPanel.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Assign(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), GetAttachedWindows(), 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 815 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 1663 of file TrackPanel.cpp.
References FindTrackRect(), kBottomMargin, and kTopMargin.
Referenced by ScreenshotCommand::GetTrackRect().
std::vector< wxRect > TrackPanel::FindRulerRects | ( | const Track * | target | ) |
Definition at line 1691 of file TrackPanel.cpp.
References CommonTrackPanelCell::FindTrack(), and CellularPanel::VisitCells().
wxRect TrackPanel::FindTrackRect | ( | const Track * | target | ) |
Definition at line 1649 of file TrackPanel.cpp.
References TrackList::FindLeader(), CellularPanel::FindRect(), and GetTracks().
Referenced by FindFocusedTrackRect().
|
static |
Definition at line 231 of file TrackPanel.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), and anonymous_namespace{TrackPanel.cpp}::sKey.
Referenced by ScreenshotCommand::Apply(), SelectTimeCommand::Apply(), SetTrackVisualsCommand::ApplyInner(), ProjectSelectionManager::AS_ModifySelection(), ProjectSelectionManager::AS_SetSelectionFormat(), BrushHandle::Click(), SelectHandle::Click(), WaveformPrefs::Commit(), MenuButtonHandle::CommitChanges(), LabelTrackView::DialogForLabelName(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), EffectUI::DoEffect(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), 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{EditMenus.cpp}::OnPaste(), 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(), and ProjectSelectionManager::SSBL_ModifySpectralSelection().
|
static |
Definition at line 236 of file TrackPanel.cpp.
References Get().
std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell | ( | ) |
Definition at line 865 of file TrackPanel.cpp.
References mpBackground.
Referenced by GetFocusedCell().
|
overridevirtual |
Implements CellularPanel.
Definition at line 1703 of file TrackPanel.cpp.
References TrackFocus::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), TrackView::Get(), GetBackgroundCell(), and GetProject().
Referenced by OnTrackFocusChange().
|
inline |
Definition at line 171 of file TrackPanel.h.
double TrackPanel::GetMostRecentXPos | ( | ) |
Definition at line 737 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 362 of file TrackPanel.cpp.
Referenced by DrawTracks(), GetFocusedCell(), IsAudioActive(), OnEnsureVisible(), OnIdle(), OnMouseEvent(), OnTimer(), OnTrackListDeletion(), OnUndoReset(), ProcessUIHandleResult(), SetFocusedCell(), TrackPanel(), UpdateStatusMessage(), and UpdateViewIfNoTracks().
|
inline |
Definition at line 172 of file TrackPanel.h.
Referenced by ScreenshotCommand::Apply(), and ScreenshotCommand::GetPanelRect().
size_t TrackPanel::GetSelectedTrackCount | ( | ) | const |
Definition at line 631 of file TrackPanel.cpp.
References GetTracks(), and TrackList::SelectedLeaders().
|
inline |
Definition at line 169 of file TrackPanel.h.
|
inline |
Definition at line 168 of file TrackPanel.h.
Referenced by DrawTracks(), FindTrackRect(), GetSelectedTrackCount(), OnEnsureVisible(), ProcessUIHandleResult(), RefreshTrack(), UpdateVRulers(), UpdateVRulerSize(), and VerticalScroll().
|
inline |
void TrackPanel::HandlePageDownKey | ( | ) |
Definition at line 600 of file TrackPanel.cpp.
References ZoomInfo::GetScreenEndTime(), mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().
Referenced by OnKeyDown().
void TrackPanel::HandlePageUpKey | ( | ) |
Definition at line 595 of file TrackPanel.cpp.
References ZoomInfo::GetScreenEndTime(), ZoomInfo::h, mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().
Referenced by OnKeyDown().
|
protected |
Definition at line 605 of file TrackPanel.cpp.
References ProjectAudioIO::Get(), GetProject(), and ProjectAudioIO::IsAudioActive().
Referenced by OnTimer().
void TrackPanel::MakeParentRedrawScrollbars | ( | ) |
Definition at line 515 of file TrackPanel.cpp.
References mListener, and TrackPanelListener::TP_RedrawScrollbars().
void TrackPanel::OnAudioIO | ( | AudioIOEvent | evt | ) |
Definition at line 802 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 997 of file TrackPanel.cpp.
References TrackList::Channels(), ProjectHistory::Get(), GetProject(), TrackView::GetTrackHeight(), 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 384 of file TrackPanel.cpp.
References GetProject(), GetProjectFrame(), kTimerInterval, mTimer, and OnIdle().
Referenced by OnIdle(), and TrackPanel().
void TrackPanel::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 688 of file TrackPanel.cpp.
References HandlePageDownKey(), and HandlePageUpKey().
void TrackPanel::OnMouseEvent | ( | wxMouseEvent & | event | ) |
Definition at line 708 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 472 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 376 of file TrackPanel.cpp.
References CellularPanel::mViewInfo, ViewInfo::SetHeight(), ZoomInfo::SetWidth(), and size.
void TrackPanel::OnSyncLockChange | ( | struct SyncLockChangeMessage | ) |
Definition at line 457 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 405 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 1717 of file TrackPanel.cpp.
References GetFocusedCell(), and Refresh().
Referenced by TrackPanel().
void TrackPanel::OnTrackListDeletion | ( | ) |
Definition at line 673 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), CellularPanel::Target(), and UpdateVRulerSize().
void TrackPanel::OnTrackListResizing | ( | const TrackListEvent & | event | ) |
Definition at line 660 of file TrackPanel.cpp.
References mListener, TrackListEvent::mpTrack, TrackPanelListener::TP_RedrawScrollbars(), and UpdateVRuler().
void TrackPanel::OnTrackMenu | ( | Track * | t = NULL | ) |
Definition at line 991 of file TrackPanel.cpp.
References CellularPanel::DoContextMenu(), and TrackView::Get().
void TrackPanel::OnUndoReset | ( | struct UndoRedoMessage | message | ) |
Definition at line 462 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), Refresh(), UndoRedoMessage::Reset, and UndoRedoMessage::type.
Referenced by TrackPanel().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 529 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 781 of file TrackPanel.cpp.
References BasicUI::CallAfter(), CellularPanel::HandleCursorForPresentMouseState(), and mRefreshBacking.
Referenced by ProjectSelectionManager::AS_SetSelectionFormat(), OnEnsureVisible(), OnSyncLockChange(), SelectHandle::TimerHandler::OnTimer(), OnTimer(), OnTrackFocusChange(), OnUndoReset(), RefreshTrack(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), UpdatePrefs(), UpdateSelectionDisplay(), UpdateVRulerSize(), and VerticalScroll().
void TrackPanel::RefreshTrack | ( | Track * | trk, |
bool | refreshbacking = true |
||
) |
Definition at line 743 of file TrackPanel.cpp.
References TrackList::Channels(), TrackList::FindLeader(), TrackView::Get(), TrackView::GetTrackHeight(), 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 1637 of file TrackPanel.cpp.
void TrackPanel::SetBackgroundCell | ( | const std::shared_ptr< CommonTrackPanelCell > & | pCell | ) |
Definition at line 859 of file TrackPanel.cpp.
References mpBackground.
|
overridevirtual |
Implements CellularPanel.
Definition at line 1709 of file TrackPanel.cpp.
References KeyboardCapture::Capture(), TrackFocus::Get(), and GetProject().
|
overridevirtual |
Implements PrefsListener.
Definition at line 351 of file TrackPanel.cpp.
References Refresh(), and UpdateVRulers().
Referenced by TrackPanel().
|
protected |
Definition at line 620 of file TrackPanel.cpp.
References AdornedRulerPanel::DrawSelection(), mRuler, and Refresh().
Referenced by OnTimer().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 611 of file TrackPanel.cpp.
References ProjectStatus::Get(), GetProject(), CellularPanel::HasEscape(), TranslatableString::Join(), ProjectStatus::Set(), and XO().
void TrackPanel::UpdateTrackVRuler | ( | Track * | t | ) |
Definition at line 932 of file TrackPanel.cpp.
References TrackList::Channels(), PackedArray::end(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), TrackView::Get(), TrackVRulerControls::Get(), ZoomInfo::GetVRulerOffset(), ZoomInfo::GetVRulerWidth(), CellularPanel::mViewInfo, TrackVRulerControls::UpdateRuler(), and Track::vrulerSize.
Referenced by UpdateVRuler(), and UpdateVRulers().
void TrackPanel::UpdateViewIfNoTracks | ( | ) |
Definition at line 636 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 924 of file TrackPanel.cpp.
References UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by OnTrackListResizing().
void TrackPanel::UpdateVRulers | ( | ) |
Definition at line 916 of file TrackPanel.cpp.
References GetTracks(), UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by UpdatePrefs().
void TrackPanel::UpdateVRulerSize | ( | ) |
Definition at line 973 of file TrackPanel.cpp.
References TrackList::Any(), ZoomInfo::GetLeftOffset(), GetTracks(), ZoomInfo::GetVRulerWidth(), mRuler, CellularPanel::mViewInfo, AdornedRulerPanel::Refresh(), Refresh(), AdornedRulerPanel::SetLeftOffset(), and ZoomInfo::SetVRulerWidth().
Referenced by OnTrackListDeletion(), UpdateVRuler(), and UpdateVRulers().
void TrackPanel::VerticalScroll | ( | float | fracPosition | ) |
Definition at line 1042 of file TrackPanel.cpp.
References TrackView::GetChannelGroupHeight(), GetTracks(), mListener, CellularPanel::mViewInfo, Refresh(), ViewInfo::scrollStep, TrackPanelListener::TP_ScrollUpDown(), and ZoomInfo::vpos.
|
protected |
Definition at line 188 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 190 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 226 of file TrackPanel.h.
|
protected |
Definition at line 195 of file TrackPanel.h.
Referenced by HandlePageDownKey(), HandlePageUpKey(), MakeParentRedrawScrollbars(), OnEnsureVisible(), OnTrackListResizing(), UpdateViewIfNoTracks(), and VerticalScroll().
|
protected |
Definition at line 230 of file TrackPanel.h.
Referenced by GetBackgroundCell(), and SetBackgroundCell().
|
protected |
Definition at line 191 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 221 of file TrackPanel.h.
Referenced by OnPaint(), OnTimer(), Refresh(), and RefreshTrack().
|
protected |
Definition at line 199 of file TrackPanel.h.
Referenced by OnTimer(), ProcessUIHandleResult(), UpdateSelectionDisplay(), and UpdateVRulerSize().
|
protected |
Definition at line 192 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 219 of file TrackPanel.h.
Referenced by OnTimer(), and TrackPanel().
|
protected |
Referenced by OnIdle(), OnMouseEvent(), TrackPanel(), and ~TrackPanel().
|
protected |
Definition at line 201 of file TrackPanel.h.
Referenced by DrawTracks(), and TrackPanel().
|
protected |
Definition at line 187 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 197 of file TrackPanel.h.
Referenced by TrackPanel(), and UpdateViewIfNoTracks().
|
protected |
Definition at line 189 of file TrackPanel.h.
Referenced by TrackPanel().