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 | 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) |
std::shared_ptr< 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 () |
AdornedRulerPanel * | GetRuler () |
void | SetBackgroundCell (const std::shared_ptr< CommonTrackPanelCell > &pCell) |
std::shared_ptr< CommonTrackPanelCell > | GetBackgroundCell () |
Public Member Functions inherited from CellularPanel | |
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 std::shared_ptr< 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) |
Public Member Functions inherited from OverlayPanel | |
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) |
Public Member Functions inherited from BackedPanel | |
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) |
Public Member Functions inherited from wxPanelWrapper | |
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 () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Public Member Functions inherited from NonKeystrokeInterceptingWindow | |
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 |
Protected Member Functions inherited from CellularPanel | |
bool | HasEscape () |
bool | CancelDragging (bool escaping) |
void | DoContextMenu (std::shared_ptr< TrackPanelCell > pCell) |
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 |
Observer::Subscription | mSelectionSubscription |
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 |
Protected Attributes inherited from CellularPanel | |
ViewInfo * | mViewInfo |
wxMouseState | mLastMouseState |
Additional Inherited Members | |
Public Types inherited from CellularPanel | |
using | SimpleCellVisitor = std::function< void(const wxRect &rect, TrackPanelCell &cell) > |
using | SimpleNodeVisitor = std::function< void(const wxRect &rect, TrackPanelNode &node) > |
Private Member Functions inherited from PrefsListener | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
virtual void | UpdateSelectedPrefs (int id) |
Static Private Member Functions inherited from PrefsListener | |
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 59 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 257 of file TrackPanel.cpp.
References anonymous_namespace{Scrubbing.cpp}::finder, AudioIO::Get(), TrackFocus::Get(), UndoManager::Get(), RealtimeEffectManager::Get(), SyncLockState::Get(), PendingTracks::Get(), Viewport::Get(), ProjectTimeRuler::Get(), ProjectWindow::Get(), GetProject(), ProjectTimeRuler::GetRuler(), RealtimeEffectManagerMessage::group, mAudioIOSubscription, mFocusChangeSubscription, mProjectRulerInvalidatedSubscription, mRealtimeEffectManagerSubscription, mSelectionSubscription, mSyncLockSubscription, mTimeCount, mTimer, mTrackArtist, mTrackListSubscription, TrackListEvent::mType, mUndoSubscription, OnAudioIO(), OnIdle(), OnSyncLockChange(), OnTrackFocusChange(), OnUndoReset(), TrackPanel::AudacityTimer::parent, Refresh(), RefreshTrack(), safenew, ViewInfo::selectedRegion, wxPanelWrapper::SetLabel(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), UpdatePrefs(), and XO().
|
virtual |
Definition at line 351 of file TrackPanel.cpp.
References mTimer.
|
static |
Definition at line 244 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 838 of file TrackPanel.cpp.
References TrackList::Any(), CellularPanel::Draw(), ToolCodes::drawTool, ToolCodes::envelopeTool, PendingTracks::Get(), ProjectSettings::Get(), GetProject(), PlayableTrack::GetSolo(), GetTracks(), CellularPanel::mLastMouseState, mTrackArtist, ToolCodes::multiTool, CellularPanel::mViewInfo, TrackArtist::NPasses, ViewInfo::selectedRegion, settings(), 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 1508 of file TrackPanel.cpp.
References FindTrackRect(), kBottomMargin, and kTopMargin.
std::vector< wxRect > TrackPanel::FindRulerRects | ( | const Channel & | target | ) |
Definition at line 1536 of file TrackPanel.cpp.
References CellularPanel::VisitCells().
wxRect TrackPanel::FindTrackRect | ( | const Track * | target | ) |
Definition at line 1499 of file TrackPanel.cpp.
References CellularPanel::FindRect().
Referenced by FindFocusedTrackRect().
|
static |
Definition at line 234 of file TrackPanel.cpp.
References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), project, and anonymous_namespace{TrackPanel.cpp}::sKey.
Referenced by SelectTimeCommand::Apply(), SetTrackVisualsCommand::ApplyInner(), BrushHandle::Click(), SelectHandle::Click(), WaveformPrefs::Commit(), MenuButtonHandle::CommitChanges(), LabelTrackView::DialogForLabelName(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteText(), TrackUtilities::DoRemoveTracks(), BrushHandle::Drag(), EditCursorOverlay::Draw(), DeviceToolBar::EnableDisableButtons(), GetInfoCommand::ExploreTrackPanel(), Get(), anonymous_namespace{PitchAndSpeedDialog.cpp}::GetHitClip(), MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), MixerTrackCluster::HandleSliderVelocity(), PanSliderHandle::HitTest(), VelocitySliderHandle::HitTest(), VolumeSliderHandle::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{EditMenus.cpp}::OnRedo(), SelectActions::Handler::OnSelectAll(), anonymous_namespace{ViewMenus.cpp}::OnShowClipping(), anonymous_namespace{ViewMenus.cpp}::OnShowRMS(), 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(), anonymous_namespace{ViewMenus.cpp}::OnZoomIn(), anonymous_namespace{ViewMenus.cpp}::OnZoomNormal(), anonymous_namespace{ViewMenus.cpp}::OnZoomToggle(), ProjectFileManager::OpenProjectFile(), SpectrumPrefs::Preview(), SpectrumPrefs::Rollback(), SelectUtilities::SelectNone(), PitchAndSpeedDialog::SetSemitoneShift(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), and ProjectWindow::ViewportSize().
|
static |
Definition at line 239 of file TrackPanel.cpp.
References Get(), and project.
std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell | ( | ) |
Definition at line 890 of file TrackPanel.cpp.
References mpBackground.
Referenced by GetFocusedCell().
|
overridevirtual |
Implements CellularPanel.
Definition at line 1548 of file TrackPanel.cpp.
References TrackFocus::Get(), ChannelView::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetBackgroundCell(), and GetProject().
Referenced by OnTrackFocusChange().
double TrackPanel::GetMostRecentXPos | ( | ) |
Definition at line 762 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 372 of file TrackPanel.cpp.
Referenced by DrawTracks(), GetFocusedCell(), HandlePageDownKey(), HandlePageUpKey(), IsAudioActive(), MakeParentRedrawScrollbars(), OnIdle(), OnMouseEvent(), OnTimer(), OnTrackListDeletion(), OnUndoReset(), ProcessUIHandleResult(), Refresh(), SetFocusedCell(), TrackPanel(), UpdateStatusMessage(), and UpdateViewIfNoTracks().
|
inline |
Definition at line 166 of file TrackPanel.h.
size_t TrackPanel::GetSelectedTrackCount | ( | ) | const |
Definition at line 655 of file TrackPanel.cpp.
References GetTracks(), and TrackList::Selected().
|
inline |
Definition at line 164 of file TrackPanel.h.
|
inline |
Definition at line 163 of file TrackPanel.h.
Referenced by DrawTracks(), GetSelectedTrackCount(), ProcessUIHandleResult(), UpdateVRulers(), and UpdateVRulerSize().
|
inline |
void TrackPanel::HandlePageDownKey | ( | ) |
Definition at line 623 of file TrackPanel.cpp.
References Viewport::Get(), GetProject(), ZoomInfo::GetScreenEndTime(), CellularPanel::mViewInfo, and Viewport::SetHorizontalThumb().
Referenced by OnKeyDown().
void TrackPanel::HandlePageUpKey | ( | ) |
Definition at line 617 of file TrackPanel.cpp.
References Viewport::Get(), GetProject(), ZoomInfo::GetScreenEndTime(), ZoomInfo::hpos, CellularPanel::mViewInfo, and Viewport::SetHorizontalThumb().
Referenced by OnKeyDown().
|
protected |
Definition at line 629 of file TrackPanel.cpp.
References ProjectAudioIO::Get(), GetProject(), and ProjectAudioIO::IsAudioActive().
Referenced by OnTimer().
void TrackPanel::MakeParentRedrawScrollbars | ( | ) |
Definition at line 532 of file TrackPanel.cpp.
References Viewport::Get(), GetProject(), and Viewport::UpdateScrollbarsForTracks().
Referenced by OnTrackListResizing().
void TrackPanel::OnAudioIO | ( | AudioIOEvent | evt | ) |
Definition at line 825 of file TrackPanel.cpp.
References BasicUI::CallAfter(), CellularPanel::HandleCursorForPresentMouseState(), AudioIOEvent::MONITOR, AudioIOEvent::PAUSE, and AudioIOEvent::type.
Referenced by TrackPanel().
void TrackPanel::OnIdle | ( | wxIdleEvent & | event | ) |
Definition at line 394 of file TrackPanel.cpp.
References GetProject(), GetProjectFrame(), kTimerInterval, mTimer, and OnIdle().
Referenced by OnIdle(), and TrackPanel().
void TrackPanel::OnKeyDown | ( | wxKeyEvent & | event | ) |
Definition at line 712 of file TrackPanel.cpp.
References HandlePageDownKey(), and HandlePageUpKey().
void TrackPanel::OnMouseEvent | ( | wxMouseEvent & | event | ) |
Definition at line 732 of file TrackPanel.cpp.
References BasicUI::CallAfter(), CellularPanel::FindCell(), anonymous_namespace{TrackPanel.cpp}::FindTrack(), TrackFocus::Get(), Viewport::Get(), GetProject(), kTimerInterval, mTimer, and Viewport::ShowTrack().
void TrackPanel::OnPaint | ( | wxPaintEvent & | event | ) |
AS: OnPaint( ) is called during the normal course of completing a repaint operation.
Definition at line 483 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 386 of file TrackPanel.cpp.
References CellularPanel::mViewInfo, ViewInfo::SetHeight(), ZoomInfo::SetWidth(), and size.
void TrackPanel::OnSyncLockChange | ( | struct SyncLockChangeMessage | ) |
Definition at line 468 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 415 of file TrackPanel.cpp.
References OverlayPanel::DrawOverlays(), AudioIO::Get(), ProjectAudioIO::Get(), Viewport::Get(), ProjectAudioManager::Get(), ProjectWindow::Get(), GetProject(), IsAudioActive(), mLastDrawnSelectedRegion, mRefreshBacking, mRuler, mTimeCount, CellularPanel::mViewInfo, Refresh(), ViewInfo::selectedRegion, and UpdateSelectionDisplay().
void TrackPanel::OnTrackFocusChange | ( | struct TrackFocusChangeMessage | message | ) |
Definition at line 1564 of file TrackPanel.cpp.
References TrackFocusChangeMessage::focusPanel, GetFocusedCell(), Refresh(), and BasicUI::SetFocus().
Referenced by TrackPanel().
void TrackPanel::OnTrackListDeletion | ( | ) |
Definition at line 697 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), CellularPanel::Target(), and UpdateVRulerSize().
void TrackPanel::OnTrackListResizing | ( | const TrackListEvent & | event | ) |
Definition at line 684 of file TrackPanel.cpp.
References MakeParentRedrawScrollbars(), TrackListEvent::mpTrack, and UpdateVRuler().
void TrackPanel::OnTrackMenu | ( | Track * | t = NULL | ) |
Definition at line 1017 of file TrackPanel.cpp.
References CellularPanel::DoContextMenu(), ChannelView::Get(), and ChannelGroup::GetChannel().
void TrackPanel::OnUndoReset | ( | struct UndoRedoMessage | message | ) |
Definition at line 473 of file TrackPanel.cpp.
References TrackFocus::Get(), GetProject(), Refresh(), UndoRedoMessage::Reset, and UndoRedoMessage::type.
Referenced by TrackPanel().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 549 of file TrackPanel.cpp.
References RefreshCode::DestroyedCell, RefreshCode::DrawOverlays, OverlayPanel::DrawOverlays(), RefreshCode::EnsureVisible, anonymous_namespace{TrackPanel.cpp}::FindTrack(), RefreshCode::FixScrollbars, TrackFocus::Get(), PendingTracks::Get(), Viewport::Get(), GetProject(), GetTracks(), Viewport::HandleResize(), TrackList::Lock(), mRuler, RefreshCode::RefreshAll, RefreshCode::RefreshCell, RefreshCode::RefreshLatestCell, RefreshCode::Resize, Viewport::ShowTrack(), PendingTracks::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 802 of file TrackPanel.cpp.
References BasicUI::CallAfter(), GetProject(), CellularPanel::HandleCursorForPresentMouseState(), and mRefreshBacking.
Referenced by OnSyncLockChange(), SelectHandle::TimerHandler::OnTimer(), OnTimer(), OnTrackFocusChange(), OnUndoReset(), RefreshTrack(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), TrackPanel(), UpdatePrefs(), UpdateSelectionDisplay(), and UpdateVRulerSize().
void TrackPanel::RefreshTrack | ( | Track * | trk, |
bool | refreshbacking = true |
||
) |
Definition at line 768 of file TrackPanel.cpp.
References ChannelView::Get(), ChannelGroup::GetChannel(), ChannelView::GetChannelGroupHeight(), kLeftInset, kRightInset, kShadowThickness, kTopInset, mRefreshBacking, CellularPanel::mViewInfo, Refresh(), and ViewInfo::vpos.
Referenced by MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), MixerTrackCluster::HandleSliderVelocity(), MixerTrackCluster::OnButton_Mute(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), PitchAndSpeedDialog::SetSemitoneShift(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), and TrackPanel().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 1487 of file TrackPanel.cpp.
void TrackPanel::SetBackgroundCell | ( | const std::shared_ptr< CommonTrackPanelCell > & | pCell | ) |
Definition at line 884 of file TrackPanel.cpp.
References mpBackground.
|
overridevirtual |
Implements CellularPanel.
Definition at line 1556 of file TrackPanel.cpp.
References KeyboardCapture::Capture(), TrackFocus::Get(), and GetProject().
|
overridevirtual |
Implements PrefsListener.
Definition at line 361 of file TrackPanel.cpp.
References Refresh(), and UpdateVRulers().
Referenced by TrackPanel().
|
protected |
Definition at line 644 of file TrackPanel.cpp.
References AdornedRulerPanel::DrawSelection(), mRuler, and Refresh().
Referenced by OnTimer().
|
overrideprotectedvirtual |
Implements CellularPanel.
Definition at line 635 of file TrackPanel.cpp.
References ProjectStatus::Get(), GetProject(), CellularPanel::HasEscape(), TranslatableString::Join(), ProjectStatus::Set(), and XO().
void TrackPanel::UpdateTrackVRuler | ( | Track & | t | ) |
Definition at line 957 of file TrackPanel.cpp.
References ChannelGroup::Channels(), details::end(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), ChannelView::Get(), ChannelVRulerControls::Get(), ZoomInfo::GetVRulerOffset(), ZoomInfo::GetVRulerWidth(), CellularPanel::mViewInfo, size, and ChannelVRulerControls::UpdateRuler().
Referenced by UpdateVRuler(), and UpdateVRulers().
void TrackPanel::UpdateViewIfNoTracks | ( | ) |
Definition at line 660 of file TrackPanel.cpp.
References ProjectStatus::Get(), Viewport::Get(), ZoomInfo::GetDefaultZoom(), GetProject(), Viewport::HandleResize(), ZoomInfo::hpos, mTracks, CellularPanel::mViewInfo, ViewInfo::selectedRegion, ProjectStatus::Set(), and ZoomInfo::SetZoom().
void TrackPanel::UpdateVRuler | ( | Track * | t | ) |
Definition at line 949 of file TrackPanel.cpp.
References UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by OnTrackListResizing().
void TrackPanel::UpdateVRulers | ( | ) |
Definition at line 941 of file TrackPanel.cpp.
References GetTracks(), UpdateTrackVRuler(), and UpdateVRulerSize().
Referenced by UpdatePrefs().
void TrackPanel::UpdateVRulerSize | ( | ) |
Definition at line 995 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().
|
protected |
Definition at line 182 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 184 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 220 of file TrackPanel.h.
|
protected |
Definition at line 224 of file TrackPanel.h.
Referenced by GetBackgroundCell(), and SetBackgroundCell().
|
protected |
Definition at line 187 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 185 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 215 of file TrackPanel.h.
Referenced by OnPaint(), OnTimer(), Refresh(), and RefreshTrack().
|
protected |
Definition at line 193 of file TrackPanel.h.
Referenced by OnTimer(), ProcessUIHandleResult(), UpdateSelectionDisplay(), and UpdateVRulerSize().
|
protected |
Definition at line 188 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 186 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 213 of file TrackPanel.h.
Referenced by OnTimer(), and TrackPanel().
|
protected |
Referenced by OnIdle(), OnMouseEvent(), TrackPanel(), and ~TrackPanel().
|
protected |
Definition at line 195 of file TrackPanel.h.
Referenced by DrawTracks(), and TrackPanel().
|
protected |
Definition at line 181 of file TrackPanel.h.
Referenced by TrackPanel().
|
protected |
Definition at line 191 of file TrackPanel.h.
Referenced by UpdateViewIfNoTracks().
|
protected |
Definition at line 183 of file TrackPanel.h.
Referenced by TrackPanel().