Audacity 3.2.0
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AdornedRulerPanel Class Referencefinal

This is an Audacity Specific ruler panel which additionally has border, selection markers, play marker. More...

#include <AdornedRulerPanel.h>

Inheritance diagram for AdornedRulerPanel:
[legend]
Collaboration diagram for AdornedRulerPanel:
[legend]

Classes

class  CommonCell
 
class  CommonRulerHandle
 
struct  MainGroup
 
class  MovePlayRegionHandle
 
class  NewPlayRegionHandle
 
class  PlayRegionAdjustingHandle
 
class  QPCell
 
struct  Resetter
 
class  ResizePlayRegionHandle
 
class  ScrubbingCell
 
class  ScrubbingHandle
 
class  ScrubbingRulerOverlay
 
struct  Subgroup
 
class  TrackPanelGuidelineOverlay
 

Public Member Functions

 AdornedRulerPanel (AudacityProject *project, wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, ViewInfo *viewinfo=NULL)
 
 ~AdornedRulerPanel ()
 
void Refresh (bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
 
bool AcceptsFocus () const override
 
bool AcceptsFocusFromKeyboard () const override
 
void SetFocusFromKbd () override
 
int GetRulerHeight ()
 
wxRect GetInnerRect () const
 
void SetLeftOffset (int offset)
 
void DrawSelection ()
 
void SetPlayRegion (double playRegionStart, double playRegionEnd)
 
void ClearPlayRegion ()
 
void TogglePinnedHead ()
 
void GetMaxSize (wxCoord *width, wxCoord *height)
 
void InvalidateRuler ()
 
void UpdatePrefs () override
 
void ReCreateButtons ()
 
void UpdateQuickPlayPos (wxCoord &mousePosX)
 
bool ShowingScrubRuler () const
 
bool SetPanelSize ()
 
void DrawBothOverlays ()
 
void DoDrawScrubIndicator (wxDC *dc, wxCoord xx, int width, bool scrub, bool seek)
 
void UpdateButtonStates ()
 
void SetNumGuides (size_t nn)
 
AudacityProjectGetProject () const override
 
TimeDisplayMode GetTimeDisplayMode () const
 
void SetTimeDisplayMode (TimeDisplayMode rulerType)
 
- 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 AudacityProjectGetProject () const =0
 
virtual std::shared_ptr< TrackPanelNodeRoot ()=0
 
virtual TrackPanelCellGetFocusedCell ()=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< TrackPanelCellLastCell () 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
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Member Functions

static AdornedRulerPanelGet (AudacityProject &project)
 
static const AdornedRulerPanelGet (const AudacityProject &project)
 
static void Destroy (AudacityProject &project)
 
static int GetRulerHeight (bool showScrubBar)
 
static TempAllowFocus TemporarilyAllowFocus ()
 

Private Types

enum class  MenuChoice { QuickPlay , Scrub }
 
enum  MouseEventState {
  mesNone , mesDraggingPlayRegionStart , mesDraggingPlayRegionEnd , mesSelectingPlayRegionClick ,
  mesSelectingPlayRegionRange
}
 
using TempAllowFocus = std::unique_ptr< bool, Resetter >
 

Private Member Functions

void DoIdle ()
 
void OnIdle (wxIdleEvent &evt)
 
void OnAudioStartStop (AudioIOEvent)
 
void OnPaint (wxPaintEvent &evt)
 
void OnSize (wxSizeEvent &evt)
 
void OnLeave (wxMouseEvent &evt)
 
void OnThemeChange (struct ThemeChangeMessage)
 
void OnSelectionChange (Observer::Message)
 
void DoSelectionChange (const SelectedRegion &selectedRegion)
 
bool UpdateRects ()
 
void HandleQPClick (wxMouseEvent &event, wxCoord mousePosX)
 
void HandleQPDrag (wxMouseEvent &event, wxCoord mousePosX)
 
void HandleQPRelease (wxMouseEvent &event)
 
void StartQPPlay (bool newDefault, bool cutPreview, const double *pStartTime=nullptr)
 
void DoDrawBackground (wxDC *dc)
 
void DoDrawEdge (wxDC *dc)
 
void DoDrawMarks (wxDC *dc, bool)
 
wxRect RegionRectangle (double t0, double t1) const
 
wxRect PlayRegionRectangle () const
 
wxRect SelectedRegionRectangle () const
 
void DoDrawPlayRegion (wxDC *dc, const wxRect &rectP, const wxRect &rectL, const wxRect &rectR)
 
void DoDrawPlayRegionLimits (wxDC *dc, const wxRect &rect)
 
void DoDrawOverlap (wxDC *dc, const wxRect &rect)
 
void DoDrawSelection (wxDC *dc, const wxRect &rectS, const wxRect &rectL, const wxRect &rectR)
 
void ShowContextMenu (MenuChoice choice, const wxPoint *pPosition)
 
double Pos2Time (int p, bool ignoreFisheye=false) const
 
int Time2Pos (double t, bool ignoreFisheye=false) const
 
bool IsWithinMarker (int mousePosX, double markerTime)
 
void ShowMenu (const wxPoint &pos)
 
void ShowScrubMenu (const wxPoint &pos)
 
void HandleSnapping (size_t index)
 
void OnTimelineFormatChange (wxCommandEvent &evt)
 
void OnSyncSelToQuickPlay (wxCommandEvent &evt)
 
void OnAutoScroll (wxCommandEvent &evt)
 
void OnTogglePlayRegion (wxCommandEvent &evt)
 
void OnClearPlayRegion (wxCommandEvent &evt)
 
void OnSetPlayRegionToSelection (wxCommandEvent &evt)
 
void OnPinnedButton (wxCommandEvent &event)
 
void OnTogglePinnedState (wxCommandEvent &event)
 
std::shared_ptr< TrackPanelNodeRoot () override
 
TrackPanelCellGetFocusedCell () override
 
void SetFocusedCell () override
 
void ProcessUIHandleResult (TrackPanelCell *pClickedTrack, TrackPanelCell *pLatestCell, unsigned refreshResult) override
 
void UpdateStatusMessage (const TranslatableString &) override
 
void CreateOverlays ()
 
- Private Member Functions inherited from PrefsListener
 PrefsListener ()
 
virtual ~PrefsListener ()
 
virtual void UpdatePrefs ()=0
 
virtual void UpdateSelectedPrefs (int id)
 

Static Private Member Functions

static void DragSelection (AudacityProject &project)
 
- Static Private Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 

Private Attributes

AudacityProject *const mProject
 
LinearUpdatermUpdater
 
RulermRuler
 
TrackListmTracks
 
wxRect mOuter
 
wxRect mScrubZone
 
wxRect mInner
 
int mLeftOffset
 
double mIndTime
 
double mQuickPlayOffset [MAX_GUIDES] {}
 
double mQuickPlayPosUnsnapped [MAX_GUIDES] {}
 
double mQuickPlayPos [MAX_GUIDES] {}
 
bool mIsSnapped [MAX_GUIDES] {}
 
size_t mNumGuides { 1 }
 
PlayRegion mOldPlayRegion
 
bool mIsRecording
 
bool mPlayRegionDragsSelection
 
bool mTimelineToolTip
 
MouseEventState mMouseEventState
 
double mLeftDownClickUnsnapped
 
double mLeftDownClick
 
bool mIsDragging
 
wxWindow * mButtons [3]
 
bool mNeedButtonUpdate { true }
 
std::shared_ptr< TrackPanelGuidelineOverlaymOverlay
 
std::shared_ptr< QPCellmQPCell
 
std::shared_ptr< ScrubbingCellmScrubbingCell
 
Observer::Subscription mAudioIOSubscription
 
Observer::Subscription mPlayRegionSubscription
 
Observer::Subscription mThemeChangeSubscription
 
Observer::Subscription mRulerInvalidatedSubscription
 
SelectedRegion mLastDrawnSelectedRegion
 
std::pair< double, double > mLastDrawnPlayRegion {}
 
bool mLastPlayRegionActive = false
 
double mLastDrawnH {}
 
double mLastDrawnZoom {}
 
TimeDisplayMode mTimeDisplayMode
 

Static Private Attributes

static bool s_AcceptsFocus { false }
 
static constexpr size_t MAX_GUIDES = 2
 

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) >
 
- Protected Member Functions inherited from CellularPanel
bool HasEscape ()
 
bool CancelDragging (bool escaping)
 
void DoContextMenu (TrackPanelCell *pCell=nullptr)
 
void ClearTargets ()
 
- Protected Attributes inherited from CellularPanel
ViewInfomViewInfo
 
wxMouseState mLastMouseState
 

Detailed Description

This is an Audacity Specific ruler panel which additionally has border, selection markers, play marker.

Once TrackPanel uses wxSizers, we will derive it from some wxWindow and the GetSize and SetSize functions will then be wxWidgets functions instead.

Definition at line 29 of file AdornedRulerPanel.h.

Member Typedef Documentation

◆ TempAllowFocus

using AdornedRulerPanel::TempAllowFocus = std::unique_ptr<bool, Resetter>
private

Definition at line 121 of file AdornedRulerPanel.h.

Member Enumeration Documentation

◆ MenuChoice

enum class AdornedRulerPanel::MenuChoice
strongprivate
Enumerator
QuickPlay 
Scrub 

Definition at line 129 of file AdornedRulerPanel.h.

129{ QuickPlay, Scrub };

◆ MouseEventState

Enumerator
mesNone 
mesDraggingPlayRegionStart 
mesDraggingPlayRegionEnd 
mesSelectingPlayRegionClick 
mesSelectingPlayRegionRange 

Definition at line 186 of file AdornedRulerPanel.h.

Constructor & Destructor Documentation

◆ AdornedRulerPanel()

AdornedRulerPanel::AdornedRulerPanel ( AudacityProject project,
wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
ViewInfo viewinfo = NULL 
)

Definition at line 1283 of file AdornedRulerPanel.cpp.

1289 : CellularPanel(parent, id, pos, size, viewinfo)
1290 , mProject { project }
1291 , mUpdater { ProjectTimeRuler::Get(*project).GetUpdater() }
1292 , mRuler { ProjectTimeRuler::Get(*project).GetRuler() }
1293{
1294 SetLayoutDirection(wxLayout_LeftToRight);
1295
1296 mQPCell = std::make_shared<QPCell>( this );
1297 mScrubbingCell = std::make_shared<ScrubbingCell>( this );
1298
1299 for (auto &button : mButtons)
1300 button = nullptr;
1301
1302 SetLabel( XO("Timeline") );
1303 SetName();
1304 SetBackgroundStyle(wxBG_STYLE_PAINT);
1305
1306 mLeftOffset = 0;
1307 mIndTime = -1;
1308
1309 mLeftDownClick = -1;
1311 mIsDragging = false;
1312
1313 mOuter = GetClientRect();
1314
1316
1318
1319 mRuler.SetLabelEdges( false );
1320
1322
1323 mIsRecording = false;
1324
1325 mTimelineToolTip = !!gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
1326 mPlayRegionDragsSelection = (gPrefs->Read(wxT("/QuickPlay/DragSelection"), 0L) == 1)? true : false;
1327
1328#if wxUSE_TOOLTIPS
1329 wxToolTip::Enable(true);
1330#endif
1331
1334
1335 // Delay until after CommandManager has been populated:
1337
1340
1341 // Bind event that updates the play region
1344
1346 mRuler.Subscribe([this](auto) { Refresh(); });
1347
1348 // And call it once to initialize it
1350}
wxT("CloseDown"))
XO("Cut/Copy/Paste")
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
const auto project
THEME_API Theme theTheme
Definition: Theme.cpp:82
TimeDisplayModeSetting TimeDisplayModePreference
void OnSelectionChange(Observer::Message)
void UpdatePrefs() override
void OnAudioStartStop(AudioIOEvent)
std::shared_ptr< ScrubbingCell > mScrubbingCell
Observer::Subscription mAudioIOSubscription
LinearUpdater & mUpdater
void DoSelectionChange(const SelectedRegion &selectedRegion)
wxWindow * mButtons[3]
AudacityProject *const mProject
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
Observer::Subscription mPlayRegionSubscription
Observer::Subscription mRulerInvalidatedSubscription
TimeDisplayMode mTimeDisplayMode
Observer::Subscription mThemeChangeSubscription
MouseEventState mMouseEventState
std::shared_ptr< QPCell > mQPCell
void OnThemeChange(struct ThemeChangeMessage)
static AudioIO * Get()
Definition: AudioIO.cpp:123
ViewInfo * mViewInfo
CellularPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, ViewInfo *viewInfo, long style=wxTAB_TRAVERSAL|wxNO_BORDER)
Enum ReadEnum() const
Definition: Prefs.h:532
void SetData(const ZoomInfo *pZoomInfo=nullptr, int leftOffset=0)
Definition: LinearUpdater.h:33
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
LinearUpdater & GetUpdater()
static ProjectTimeRuler & Get(AudacityProject &project)
void SetLabelEdges(bool labelEdges)
Definition: Ruler.cpp:179
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:354
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:219
virtual bool Read(const wxString &key, bool *value) const =0
void SetLabel(const TranslatableString &label)
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
Definition: BasicUI.cpp:208

References BasicUI::CallAfter(), DoSelectionChange(), AudioIO::Get(), TrackList::Get(), gPrefs, mAudioIOSubscription, mButtons, mesNone, mIndTime, mIsDragging, mIsRecording, mLeftDownClick, mLeftOffset, mMouseEventState, mOuter, mPlayRegionDragsSelection, mPlayRegionSubscription, mQPCell, mRuler, mRulerInvalidatedSubscription, mScrubbingCell, mThemeChangeSubscription, mTimeDisplayMode, mTimelineToolTip, mTracks, mUpdater, CellularPanel::mViewInfo, OnAudioStartStop(), OnSelectionChange(), OnThemeChange(), project, audacity::BasicSettings::Read(), EnumSetting< Enum >::ReadEnum(), Refresh(), ViewInfo::selectedRegion, LinearUpdater::SetData(), wxPanelWrapper::SetLabel(), Ruler::SetLabelEdges(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), theTheme, TimeDisplayModePreference, UpdatePrefs(), wxT(), and XO().

Here is the call graph for this function:

◆ ~AdornedRulerPanel()

AdornedRulerPanel::~AdornedRulerPanel ( )

Definition at line 1352 of file AdornedRulerPanel.cpp.

1353{
1354}

Member Function Documentation

◆ AcceptsFocus()

bool AdornedRulerPanel::AcceptsFocus ( ) const
inlineoverride

Definition at line 51 of file AdornedRulerPanel.h.

51{ return s_AcceptsFocus; }
static bool s_AcceptsFocus

◆ AcceptsFocusFromKeyboard()

bool AdornedRulerPanel::AcceptsFocusFromKeyboard ( ) const
inlineoverride

Definition at line 52 of file AdornedRulerPanel.h.

52{ return true; }

◆ ClearPlayRegion()

void AdornedRulerPanel::ClearPlayRegion ( )

Definition at line 2740 of file AdornedRulerPanel.cpp.

2741{
2742 ProjectAudioManager::Get( *mProject ).Stop();
2743
2744 auto &viewInfo = ViewInfo::Get( *GetProject() );
2745 auto &playRegion = viewInfo.playRegion;
2746 playRegion.SetTimes( -1, -1 );
2747
2748 Refresh();
2749}
AudacityProject * GetProject() const override
void Stop(bool stopStream=true)
static ProjectAudioManager & Get(AudacityProject &project)
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References ViewInfo::Get(), ProjectAudioManager::Get(), GetProject(), Refresh(), and ProjectAudioManager::Stop().

Here is the call graph for this function:

◆ CreateOverlays()

void AdornedRulerPanel::CreateOverlays ( )
private

Definition at line 2860 of file AdornedRulerPanel.cpp.

2861{
2862 if (!mOverlay) {
2863 mOverlay =
2864 std::make_shared<TrackPanelGuidelineOverlay>( mProject );
2865 auto pCellularPanel =
2866 dynamic_cast<CellularPanel*>( &GetProjectPanel( *GetProject() ) );
2867 if ( !pCellularPanel ) {
2868 wxASSERT( false );
2869 }
2870 else
2871 pCellularPanel->AddOverlay( mOverlay );
2872 this->AddOverlay( mOverlay->mPartner );
2873 }
2874}
AUDACITY_DLL_API wxWindow & GetProjectPanel(AudacityProject &project)
Get the main sub-window of the project frame that displays track data.
std::shared_ptr< TrackPanelGuidelineOverlay > mOverlay
Formerly part of TrackPanel, this abstract base class has no special knowledge of Track objects and i...
Definition: CellularPanel.h:34
void AddOverlay(const std::weak_ptr< Overlay > &pOverlay)

References OverlayPanel::AddOverlay(), GetProject(), GetProjectPanel(), mOverlay, and mProject.

Here is the call graph for this function:

◆ Destroy()

void AdornedRulerPanel::Destroy ( AudacityProject project)
static

Definition at line 1274 of file AdornedRulerPanel.cpp.

1275{
1276 auto *pPanel = GetAttachedWindows(project).Find( sKey );
1277 if (pPanel) {
1278 pPanel->wxWindow::Destroy();
1280 }
1281}
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
Subclass * Find(const RegisteredFactory &key)
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand...
Definition: ClientData.h:333
void Assign(const RegisteredFactory &key, ReplacementPointer &&replacement)
Reassign Site's pointer to ClientData.
Definition: ClientData.h:355
AttachedWindows::RegisteredFactory sKey

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Assign(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), GetAttachedWindows(), project, and anonymous_namespace{AdornedRulerPanel.cpp}::sKey.

Referenced by ProjectManager::OnCloseWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawBackground()

void AdornedRulerPanel::DoDrawBackground ( wxDC *  dc)
private

Definition at line 2485 of file AdornedRulerPanel.cpp.

2486{
2487 // Draw AdornedRulerPanel border
2489 dc->DrawRectangle( mInner );
2490
2491 if (ShowingScrubRuler()) {
2492 // Let's distinguish the scrubbing area by using a themable
2493 // colour and a line to set it off.
2494 AColor::UseThemeColour(dc, clrScrubRuler, TimelineTextColor() );
2495 wxRect ScrubRect = mScrubZone;
2496 ScrubRect.Inflate( 1,0 );
2497 dc->DrawRectangle(ScrubRect);
2498 }
2499}
ColorId TimelineBackgroundColor()
ColorId TimelineTextColor()
static void UseThemeColour(wxDC *dc, int iBrush, int iPen=-1, int alpha=255)
Definition: AColor.cpp:372
bool ShowingScrubRuler() const

References mInner, mScrubZone, ShowingScrubRuler(), TimelineBackgroundColor(), TimelineTextColor(), and AColor::UseThemeColour().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawEdge()

void AdornedRulerPanel::DoDrawEdge ( wxDC *  dc)
private

Definition at line 2501 of file AdornedRulerPanel.cpp.

2502{
2503 wxRect r = mOuter;
2504 r.width -= RightMargin;
2505 r.height -= BottomMargin;
2506 AColor::BevelTrackInfo( *dc, true, r );
2507
2508 // Black stroke at bottom
2509 dc->SetPen( *wxBLACK_PEN );
2510 AColor::Line( *dc, mOuter.x,
2511 mOuter.y + mOuter.height - 1,
2512 mOuter.x + mOuter.width - 1 ,
2513 mOuter.y + mOuter.height - 1 );
2514}
@ RightMargin
@ BottomMargin
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
Definition: AColor.cpp:187
static void BevelTrackInfo(wxDC &dc, bool up, const wxRect &r, bool highlight=false)
Definition: AColor.cpp:340

References AColor::BevelTrackInfo(), BottomMargin, AColor::Line(), mOuter, and RightMargin.

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawMarks()

void AdornedRulerPanel::DoDrawMarks ( wxDC *  dc,
bool   
)
private

Definition at line 2516 of file AdornedRulerPanel.cpp.

2517{
2518 const double min = Pos2Time(0);
2519 const double hiddenMin = Pos2Time(0, true);
2520 const double max = Pos2Time(mInner.width);
2521 const double hiddenMax = Pos2Time(mInner.width, true);
2522
2524 mRuler.SetRange( min, max, hiddenMin, hiddenMax );
2526 {
2527 mRuler.SetTickLengths({ 5, 3, 1 });
2528 }
2530 {
2531 mRuler.SetTickLengths({ 4, 2, 2 });
2532 }
2533 mRuler.Draw( *dc );
2534}
int min(int a, int b)
double Pos2Time(int p, bool ignoreFisheye=false) const
void SetTickColour(const wxColour &colour)
Definition: Ruler.h:135
void Draw(wxDC &dc) const
Definition: Ruler.cpp:441
void SetTickLengths(const TickLengths &tLengths)
Definition: Ruler.cpp:255
void SetRange(double min, double max)
Definition: Ruler.cpp:152
wxColour & Colour(int iIndex)

References BeatsAndMeasures, ThemeBase::Colour(), Ruler::Draw(), min(), mInner, MinutesAndSeconds, mRuler, mTimeDisplayMode, Pos2Time(), Ruler::SetRange(), Ruler::SetTickColour(), Ruler::SetTickLengths(), theTheme, and TimelineTextColor().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawOverlap()

void AdornedRulerPanel::DoDrawOverlap ( wxDC *  dc,
const wxRect &  rect 
)
private

Definition at line 2631 of file AdornedRulerPanel.cpp.

2632{
2633 dc->SetBrush( wxBrush{ AlphaBlend(
2635 SelectionOpacity) } );
2636 dc->SetPen( *wxTRANSPARENT_PEN );
2637 dc->DrawRectangle( rect );
2638}
ColorId TimelineLimitsColor()
ColorId TimelineLoopRegionColor(bool isActive)
static wxColour AlphaBlend(ColorId fg, ColorId bg, double alpha)
constexpr double SelectionOpacity

References AlphaBlend(), mLastPlayRegionActive, SelectionOpacity, TimelineLimitsColor(), and TimelineLoopRegionColor().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawPlayRegion()

void AdornedRulerPanel::DoDrawPlayRegion ( wxDC *  dc,
const wxRect &  rectP,
const wxRect &  rectL,
const wxRect &  rectR 
)
private

Definition at line 2573 of file AdornedRulerPanel.cpp.

2575{
2576 const auto &viewInfo = ViewInfo::Get(*mProject);
2577 const auto &playRegion = viewInfo.playRegion;
2578 if (playRegion.IsLastActiveRegionClear())
2579 return;
2580
2581 const bool isActive = (mLastPlayRegionActive = playRegion.Active());
2582
2583 // Paint the selected region bolder if independently varying, else dim
2584 const auto color = TimelineLoopRegionColor(isActive);
2585 dc->SetBrush( wxBrush( theTheme.Colour( color )) );
2586 dc->SetPen( wxPen( theTheme.Colour( color )) );
2587
2588 dc->DrawRectangle( rectP.Intersect(rectL) );
2589 dc->DrawRectangle( rectP.Intersect(rectR) );
2590}

References ThemeBase::Colour(), ViewInfo::Get(), mLastPlayRegionActive, mProject, theTheme, and TimelineLoopRegionColor().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawPlayRegionLimits()

void AdornedRulerPanel::DoDrawPlayRegionLimits ( wxDC *  dc,
const wxRect &  rect 
)
private

Definition at line 2592 of file AdornedRulerPanel.cpp.

2593{
2594 // Color the edges of the play region like the ticks and numbers
2595 ADCChanger cleanup( dc );
2596 const auto edgeColour = theTheme.Colour(TimelineLimitsColor());
2597 dc->SetPen( { edgeColour } );
2598 dc->SetBrush( { edgeColour } );
2599
2600 constexpr int side = 7;
2601 constexpr int sideLessOne = side - 1;
2602
2603 // Paint two shapes, each a line plus triangle at bottom
2604 const auto left = rect.GetLeft(),
2605 right = rect.GetRight(),
2606 bottom = rect.GetBottom(),
2607 top = rect.GetTop();
2608 {
2609 wxPoint points[]{
2610 {left, bottom - sideLessOne},
2611 {left - sideLessOne, bottom},
2612 {left, bottom},
2613 {left, top},
2614 };
2615 dc->DrawPolygon( 4, points );
2616 }
2617
2618 {
2619 wxPoint points[]{
2620 {right, top},
2621 {right, bottom},
2622 {right + sideLessOne, bottom},
2623 {right, bottom - sideLessOne},
2624 };
2625 dc->DrawPolygon( 4, points );
2626 }
2627}
Makes temporary drawing context changes that you back out of, RAII style.
Definition: OverlayPanel.h:72

References ThemeBase::Colour(), theTheme, and TimelineLimitsColor().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDrawScrubIndicator()

void AdornedRulerPanel::DoDrawScrubIndicator ( wxDC *  dc,
wxCoord  xx,
int  width,
bool  scrub,
bool  seek 
)

Definition at line 2665 of file AdornedRulerPanel.cpp.

2667{
2668 ADCChanger changer(dc); // Undo pen and brush changes at function exit
2669
2670 wxPoint tri[ 3 ];
2671 if (seek) {
2672 auto height = IndicatorHeightForWidth(width);
2673 // Make four triangles
2674 const int TriangleWidth = width * 3 / 8;
2675
2676 // Double-double headed, left-right
2677 auto yy = ShowingScrubRuler()
2678 ? mScrubZone.y
2679 : (mInner.GetBottom() + 1) - 1 /* bevel */ - height;
2680 tri[ 0 ].x = xx - IndicatorOffset;
2681 tri[ 0 ].y = yy;
2682 tri[ 1 ].x = xx - IndicatorOffset;
2683 tri[ 1 ].y = yy + height;
2684 tri[ 2 ].x = xx - TriangleWidth;
2685 tri[ 2 ].y = yy + height / 2;
2686 dc->DrawPolygon( 3, tri );
2687
2688 tri[ 0 ].x -= TriangleWidth;
2689 tri[ 1 ].x -= TriangleWidth;
2690 tri[ 2 ].x -= TriangleWidth;
2691 dc->DrawPolygon( 3, tri );
2692
2693 tri[ 0 ].x = tri[ 1 ].x = xx + IndicatorOffset;
2694 tri[ 2 ].x = xx + TriangleWidth;
2695 dc->DrawPolygon( 3, tri );
2696
2697
2698 tri[ 0 ].x += TriangleWidth;
2699 tri[ 1 ].x += TriangleWidth;
2700 tri[ 2 ].x += TriangleWidth;
2701 dc->DrawPolygon( 3, tri );
2702 }
2703 else if (scrub) {
2704 auto height = IndicatorHeightForWidth(width);
2705 const int IndicatorHalfWidth = width / 2;
2706
2707 // Double headed, left-right
2708 auto yy = ShowingScrubRuler()
2709 ? mScrubZone.y
2710 : (mInner.GetBottom() + 1) - 1 /* bevel */ - height;
2711 tri[ 0 ].x = xx - IndicatorOffset;
2712 tri[ 0 ].y = yy;
2713 tri[ 1 ].x = xx - IndicatorOffset;
2714 tri[ 1 ].y = yy + height;
2715 tri[ 2 ].x = xx - IndicatorHalfWidth;
2716 tri[ 2 ].y = yy + height / 2;
2717 dc->DrawPolygon( 3, tri );
2718 tri[ 0 ].x = tri[ 1 ].x = xx + IndicatorOffset;
2719 tri[ 2 ].x = xx + IndicatorHalfWidth;
2720 dc->DrawPolygon( 3, tri );
2721 }
2722}
@ IndicatorOffset
int IndicatorHeightForWidth(int width)

References IndicatorHeightForWidth(), IndicatorOffset, mInner, mScrubZone, and ShowingScrubRuler().

Here is the call graph for this function:

◆ DoDrawSelection()

void AdornedRulerPanel::DoDrawSelection ( wxDC *  dc,
const wxRect &  rectS,
const wxRect &  rectL,
const wxRect &  rectR 
)
private

Definition at line 2640 of file AdornedRulerPanel.cpp.

2642{
2643 dc->SetBrush( wxBrush{ AlphaBlend(
2645 dc->SetPen( *wxTRANSPARENT_PEN );
2646 dc->DrawRectangle( rectS.Intersect(rectL) );
2647 dc->DrawRectangle( rectS.Intersect(rectR) );
2648}

References AlphaBlend(), SelectionOpacity, TimelineBackgroundColor(), and TimelineLimitsColor().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoIdle()

void AdornedRulerPanel::DoIdle ( )
private

Definition at line 1543 of file AdornedRulerPanel.cpp.

1544{
1545 bool changed = UpdateRects();
1546 changed = SetPanelSize() || changed;
1547
1548 auto &project = *mProject;
1549 auto &viewInfo = ViewInfo::Get( project );
1550 const auto &selectedRegion = viewInfo.selectedRegion;
1551 const auto &playRegion = viewInfo.playRegion;
1552
1553 changed = changed
1554 || mLastDrawnSelectedRegion != selectedRegion
1555 || mLastDrawnPlayRegion != std::pair{
1556 playRegion.GetLastActiveStart(), playRegion.GetLastActiveEnd() }
1557 || mLastDrawnH != viewInfo.h
1558 || mLastDrawnZoom != viewInfo.GetZoom()
1559 || mLastPlayRegionActive != viewInfo.playRegion.Active()
1560 ;
1561 if (changed)
1562 // Cause ruler redraw anyway, because we may be zooming or scrolling,
1563 // showing or hiding the scrub bar, etc.
1564 Refresh();
1565}
std::pair< double, double > mLastDrawnPlayRegion
SelectedRegion mLastDrawnSelectedRegion

References ViewInfo::Get(), mLastDrawnH, mLastDrawnPlayRegion, mLastDrawnSelectedRegion, mLastDrawnZoom, mLastPlayRegionActive, mProject, project, Refresh(), SetPanelSize(), and UpdateRects().

Referenced by OnIdle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoSelectionChange()

void AdornedRulerPanel::DoSelectionChange ( const SelectedRegion selectedRegion)
private

Definition at line 1678 of file AdornedRulerPanel.cpp.

1680{
1681
1682 auto gAudioIO = AudioIOBase::Get();
1683 if ( !ViewInfo::Get( *mProject ).playRegion.Active() ) {
1684 // "Inactivated" play region follows the selection.
1685 SetPlayRegion( selectedRegion.t0(), selectedRegion.t1() );
1686 }
1687}
void SetPlayRegion(double playRegionStart, double playRegionEnd)
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:93
bool Active() const
Definition: ViewInfo.h:124
double t1() const
double t0() const
PlayRegion playRegion
Definition: ViewInfo.h:220

References PlayRegion::Active(), AudioIOBase::Get(), ViewInfo::Get(), ViewInfo::playRegion, SetPlayRegion(), SelectedRegion::t0(), and SelectedRegion::t1().

Referenced by AdornedRulerPanel(), OnAudioStartStop(), and OnSelectionChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DragSelection()

void AdornedRulerPanel::DragSelection ( AudacityProject project)
staticprivate

Definition at line 2336 of file AdornedRulerPanel.cpp.

2337{
2338 auto &viewInfo = ViewInfo::Get( project );
2339 const auto &playRegion = viewInfo.playRegion;
2340 auto &selectedRegion = viewInfo.selectedRegion;
2341 selectedRegion.setT0(playRegion.GetStart(), false);
2342 selectedRegion.setT1(playRegion.GetEnd(), true);
2343}

References ViewInfo::Get(), and project.

Referenced by AdornedRulerPanel::PlayRegionAdjustingHandle::Drag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawBothOverlays()

void AdornedRulerPanel::DrawBothOverlays ( )

Definition at line 2193 of file AdornedRulerPanel.cpp.

2194{
2195 auto pCellularPanel =
2196 dynamic_cast<CellularPanel*>( &GetProjectPanel( *GetProject() ) );
2197 if ( !pCellularPanel ) {
2198 wxASSERT( false );
2199 }
2200 else
2201 pCellularPanel->DrawOverlays( false );
2202 DrawOverlays( false );
2203}
void DrawOverlays(bool repaint_all, wxDC *pDC=nullptr)

References OverlayPanel::DrawOverlays(), GetProject(), and GetProjectPanel().

Referenced by OnLeave(), and ProcessUIHandleResult().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawSelection()

void AdornedRulerPanel::DrawSelection ( )

Definition at line 2536 of file AdornedRulerPanel.cpp.

2537{
2538 Refresh();
2539}

References Refresh().

Referenced by TrackPanel::UpdateSelectionDisplay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [1/2]

AdornedRulerPanel & AdornedRulerPanel::Get ( AudacityProject project)
static

Definition at line 1263 of file AdornedRulerPanel.cpp.

1264{
1266}
This is an Audacity Specific ruler panel which additionally has border, selection markers,...
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
Definition: ClientData.h:309

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), project, and anonymous_namespace{AdornedRulerPanel.cpp}::sKey.

Referenced by ScrubbingToolBar::DoRegenerateTooltips(), AdornedRulerPanel::PlayRegionAdjustingHandle::Drag(), AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), EditCursorOverlay::Draw(), PlayIndicatorOverlayBase::Draw(), ScrubbingToolBar::EnableDisableButtons(), Get(), anonymous_namespace{PlayIndicatorOverlay.cpp}::GetIndicatorBitmap(), AdornedRulerPanel::ScrubbingRulerOverlay::GetRuler(), anonymous_namespace{TimelineMenus.cpp}::GetTimeDisplayMode(), AdornedRulerPanel::PlayRegionAdjustingHandle::HasEscape(), InitProjectWindow(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), anonymous_namespace{EditMenus.cpp}::OnCut(), PlayIndicatorOverlay::OnTimer(), ScrubbingOverlay::OnTimer(), anonymous_namespace{AdornedRulerPanel.cpp}::OnTogglePinnedHead(), ScrubForwarder::ScrubForwarder(), anonymous_namespace{TimelineMenus.cpp}::SetTimeDisplayMode(), AdornedRulerPanel::PlayRegionAdjustingHandle::SnappedTime(), AdornedRulerPanel::PlayRegionAdjustingHandle::SnappedTimes(), AdornedRulerPanel::CommonRulerHandle::StartPlay(), AdornedRulerPanel::PlayRegionAdjustingHandle::Unsnap(), and AdornedRulerPanel::TrackPanelGuidelineOverlay::Update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [2/2]

const AdornedRulerPanel & AdornedRulerPanel::Get ( const AudacityProject project)
static

Definition at line 1268 of file AdornedRulerPanel.cpp.

1270{
1271 return Get( const_cast< AudacityProject & >( project ) );
1272}
static AdornedRulerPanel & Get(AudacityProject &project)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90

References Get(), and project.

Here is the call graph for this function:

◆ GetFocusedCell()

TrackPanelCell * AdornedRulerPanel::GetFocusedCell ( )
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2834 of file AdornedRulerPanel.cpp.

2835{
2836 // No switching of focus yet to the other, scrub zone
2837 return mQPCell.get();
2838}

References mQPCell.

◆ GetInnerRect()

wxRect AdornedRulerPanel::GetInnerRect ( ) const
inline

Definition at line 58 of file AdornedRulerPanel.h.

58{ return mInner; }

Referenced by anonymous_namespace{PlayIndicatorOverlay.cpp}::GetIndicatorBitmap().

Here is the caller graph for this function:

◆ GetMaxSize()

void AdornedRulerPanel::GetMaxSize ( wxCoord *  width,
wxCoord *  height 
)

Definition at line 2751 of file AdornedRulerPanel.cpp.

2752{
2753 mRuler.GetMaxSize(width, height);
2754}
void GetMaxSize(wxCoord *width, wxCoord *height)
Definition: Ruler.cpp:616

References Ruler::GetMaxSize(), and mRuler.

Here is the call graph for this function:

◆ GetProject()

AudacityProject * AdornedRulerPanel::GetProject ( ) const
overridevirtual

Implements CellularPanel.

Definition at line 2828 of file AdornedRulerPanel.cpp.

2829{
2830 return mProject;
2831}

References mProject.

Referenced by ClearPlayRegion(), CreateOverlays(), DrawBothOverlays(), HandleSnapping(), OnPaint(), SetPlayRegion(), ShowingScrubRuler(), ShowMenu(), and UpdateStatusMessage().

Here is the caller graph for this function:

◆ GetRulerHeight() [1/2]

int AdornedRulerPanel::GetRulerHeight ( )
inline

Definition at line 56 of file AdornedRulerPanel.h.

References GetRulerHeight().

Referenced by ScreenshotCommand::GetPanelRect(), GetRulerHeight(), ReCreateButtons(), and SetPanelSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRulerHeight() [2/2]

int AdornedRulerPanel::GetRulerHeight ( bool  showScrubBar)
static

Definition at line 2650 of file AdornedRulerPanel.cpp.

2651{
2652 return ProperRulerHeight + (showScrubBar ? ScrubHeight : 0);
2653}
@ ProperRulerHeight
@ ScrubHeight

References ProperRulerHeight, and ScrubHeight.

◆ GetTimeDisplayMode()

TimeDisplayMode AdornedRulerPanel::GetTimeDisplayMode ( ) const

Definition at line 2891 of file AdornedRulerPanel.cpp.

2892{
2893 return mTimeDisplayMode;
2894}

References mTimeDisplayMode.

◆ HandleQPClick()

void AdornedRulerPanel::HandleQPClick ( wxMouseEvent &  event,
wxCoord  mousePosX 
)
private

◆ HandleQPDrag()

void AdornedRulerPanel::HandleQPDrag ( wxMouseEvent &  event,
wxCoord  mousePosX 
)
private

◆ HandleQPRelease()

void AdornedRulerPanel::HandleQPRelease ( wxMouseEvent &  event)
private

◆ HandleSnapping()

void AdornedRulerPanel::HandleSnapping ( size_t  index)
private

Definition at line 2345 of file AdornedRulerPanel.cpp.

2346{
2347 // Play region dragging can snap to selection boundaries
2348 const auto &selectedRegion = ViewInfo::Get(*GetProject()).selectedRegion;
2349 SnapPointArray candidates;
2351 candidates = {
2352 SnapPoint{ selectedRegion.t0() },
2353 SnapPoint{ selectedRegion.t1() },
2354 };
2355 SnapManager snapManager{ *mProject, *mTracks, *mViewInfo, move(candidates) };
2356 auto results = snapManager.Snap(nullptr, mQuickPlayPos[index], false);
2357 mQuickPlayPos[index] = results.outTime;
2358 mIsSnapped[index] = results.Snapped();
2359}
std::vector< SnapPoint > SnapPointArray
Definition: Snap.h:43
bool mIsSnapped[MAX_GUIDES]
double mQuickPlayPos[MAX_GUIDES]
Definition: Snap.h:31

References ViewInfo::Get(), GetProject(), mIsSnapped, mPlayRegionDragsSelection, mProject, mQuickPlayPos, mTracks, CellularPanel::mViewInfo, and ViewInfo::selectedRegion.

Referenced by UpdateQuickPlayPos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InvalidateRuler()

void AdornedRulerPanel::InvalidateRuler ( )

Definition at line 1466 of file AdornedRulerPanel.cpp.

1467{
1469}
void Invalidate()
Definition: Ruler.cpp:317

References Ruler::Invalidate(), and mRuler.

Here is the call graph for this function:

◆ IsWithinMarker()

bool AdornedRulerPanel::IsWithinMarker ( int  mousePosX,
double  markerTime 
)
private

Definition at line 1756 of file AdornedRulerPanel.cpp.

1757{
1758 if (markerTime < 0)
1759 return false;
1760
1761 int pixelPos = Time2Pos(markerTime);
1762 int boundLeft = pixelPos - SELECT_TOLERANCE_PIXEL;
1763 int boundRight = pixelPos + SELECT_TOLERANCE_PIXEL;
1764
1765 return mousePosX >= boundLeft && mousePosX < boundRight;
1766}
#define SELECT_TOLERANCE_PIXEL
int Time2Pos(double t, bool ignoreFisheye=false) const

References SELECT_TOLERANCE_PIXEL, and Time2Pos().

Here is the call graph for this function:

◆ OnAudioStartStop()

void AdornedRulerPanel::OnAudioStartStop ( AudioIOEvent  evt)
private

Definition at line 1567 of file AdornedRulerPanel.cpp.

1568{
1569 if (evt.type == AudioIOEvent::MONITOR)
1570 return;
1571 if ( evt.type == AudioIOEvent::CAPTURE ) {
1572 if (evt.on)
1573 {
1574 mIsRecording = true;
1575 this->CellularPanel::CancelDragging( false );
1577
1579 }
1580 else {
1581 mIsRecording = false;
1583 }
1584 }
1585
1586 if ( !evt.on )
1587 // So that the play region is updated
1589}
bool CancelDragging(bool escaping)
bool on
Definition: AudioIO.h:66
enum AudioIOEvent::Type type

References CellularPanel::CancelDragging(), AudioIOEvent::CAPTURE, CellularPanel::ClearTargets(), DoSelectionChange(), mIsRecording, AudioIOEvent::MONITOR, CellularPanel::mViewInfo, AudioIOEvent::on, ViewInfo::selectedRegion, AudioIOEvent::type, and UpdateButtonStates().

Referenced by AdornedRulerPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnAutoScroll()

void AdornedRulerPanel::OnAutoScroll ( wxCommandEvent &  evt)
private

Definition at line 2392 of file AdornedRulerPanel.cpp.

2393{
2395 gPrefs->Write(wxT("/GUI/AutoScroll"), false);
2396 else
2397 gPrefs->Write(wxT("/GUI/AutoScroll"), true);
2398
2399 gPrefs->Flush();
2400
2402}
static void Broadcast(int id=0)
Call this static function to notify all PrefsListener objects.
Definition: Prefs.cpp:99
bool bUpdateTrackIndicator
Definition: ViewInfo.h:242
static int UpdateScrollPrefsID()
Definition: ViewInfo.cpp:325
virtual bool Flush() noexcept=0
virtual bool Write(const wxString &key, bool value)=0

References PrefsListener::Broadcast(), ViewInfo::bUpdateTrackIndicator, audacity::BasicSettings::Flush(), gPrefs, CellularPanel::mViewInfo, ViewInfo::UpdateScrollPrefsID(), audacity::BasicSettings::Write(), and wxT().

Here is the call graph for this function:

◆ OnClearPlayRegion()

void AdornedRulerPanel::OnClearPlayRegion ( wxCommandEvent &  evt)
private

Definition at line 2410 of file AdornedRulerPanel.cpp.

2411{
2413}
void ClearPlayRegion(AudacityProject &project)

References SelectUtilities::ClearPlayRegion(), and mProject.

Here is the call graph for this function:

◆ OnIdle()

void AdornedRulerPanel::OnIdle ( wxIdleEvent &  evt)
private

Definition at line 1537 of file AdornedRulerPanel.cpp.

1538{
1539 evt.Skip();
1540 DoIdle();
1541}

References DoIdle().

Here is the call graph for this function:

◆ OnLeave()

void AdornedRulerPanel::OnLeave ( wxMouseEvent &  evt)
private

Definition at line 1657 of file AdornedRulerPanel.cpp.

1658{
1659 evt.Skip();
1660 CallAfter([this]{
1662 });
1663}

References BasicUI::CallAfter(), and DrawBothOverlays().

Here is the call graph for this function:

◆ OnPaint()

void AdornedRulerPanel::OnPaint ( wxPaintEvent &  evt)
private

Definition at line 1591 of file AdornedRulerPanel.cpp.

1592{
1593 const auto &viewInfo = ViewInfo::Get( *GetProject() );
1594 const auto &playRegion = viewInfo.playRegion;
1595 const auto playRegionBounds = std::pair{
1596 playRegion.GetLastActiveStart(), playRegion.GetLastActiveEnd() };
1597 mLastDrawnH = viewInfo.h;
1598 mLastDrawnZoom = viewInfo.GetZoom();
1599 mLastDrawnPlayRegion = playRegionBounds;
1600 mLastDrawnSelectedRegion = viewInfo.selectedRegion;
1601 // To do, note other fisheye state when we have that
1602
1603 wxPaintDC dc(this);
1604
1605 auto &backDC = GetBackingDCForRepaint();
1606
1607 DoDrawBackground(&backDC);
1608
1609 // Find play region rectangle, selected rectangle, and their overlap
1610 const auto rectP = PlayRegionRectangle(),
1611 rectS = SelectedRegionRectangle(),
1612 rectO = rectP.Intersect(rectS);
1613
1614 // What's left and right of the overlap? Assume same tops and bottoms
1615 const auto top = rectP.GetTop(),
1616 bottom = rectP.GetBottom();
1617 wxRect rectL{
1618 wxPoint{ 0, top }, wxPoint{ this->GetSize().GetWidth() - 1, bottom } };
1619 wxRect rectR = {};
1620 if (!rectO.IsEmpty()) {
1621 rectR = { wxPoint{ rectO.GetRight() + 1, top }, rectL.GetBottomRight() };
1622 rectL = { rectL.GetTopLeft(), wxPoint{ rectO.GetLeft() - 1, bottom } };
1623 }
1624
1625 DoDrawPlayRegion(&backDC, rectP, rectL, rectR);
1626 DoDrawOverlap(&backDC, rectO);
1627 DoDrawSelection(&backDC, rectS, rectL, rectR);
1628
1629 DoDrawPlayRegionLimits(&backDC, rectP);
1630
1631 DoDrawMarks(&backDC, true);
1632
1633 DoDrawEdge(&backDC);
1634
1635 DisplayBitmap(dc);
1636
1637 // Stroke extras direct to the client area,
1638 // maybe outside of the damaged area
1639 // As with TrackPanel, do not make a NEW wxClientDC or else Mac flashes badly!
1640 dc.DestroyClippingRegion();
1641 DrawOverlays(true, &dc);
1642}
wxRect PlayRegionRectangle() const
void DoDrawOverlap(wxDC *dc, const wxRect &rect)
wxRect SelectedRegionRectangle() const
void DoDrawMarks(wxDC *dc, bool)
void DoDrawPlayRegion(wxDC *dc, const wxRect &rectP, const wxRect &rectL, const wxRect &rectR)
void DoDrawSelection(wxDC *dc, const wxRect &rectS, const wxRect &rectL, const wxRect &rectR)
void DoDrawBackground(wxDC *dc)
void DoDrawPlayRegionLimits(wxDC *dc, const wxRect &rect)
void DoDrawEdge(wxDC *dc)
wxDC & GetBackingDCForRepaint()
Definition: BackedPanel.cpp:35
void DisplayBitmap(wxDC &dc)
Definition: BackedPanel.cpp:65

References BackedPanel::DisplayBitmap(), DoDrawBackground(), DoDrawEdge(), DoDrawMarks(), DoDrawOverlap(), DoDrawPlayRegion(), DoDrawPlayRegionLimits(), DoDrawSelection(), OverlayPanel::DrawOverlays(), ViewInfo::Get(), BackedPanel::GetBackingDCForRepaint(), GetProject(), mLastDrawnH, mLastDrawnPlayRegion, mLastDrawnSelectedRegion, mLastDrawnZoom, PlayRegionRectangle(), and SelectedRegionRectangle().

Here is the call graph for this function:

◆ OnPinnedButton()

void AdornedRulerPanel::OnPinnedButton ( wxCommandEvent &  event)
private

Definition at line 2235 of file AdornedRulerPanel.cpp.

2236{
2238}
void ShowContextMenu(MenuChoice choice, const wxPoint *pPosition)

References QuickPlay, and ShowContextMenu().

Here is the call graph for this function:

◆ OnSelectionChange()

void AdornedRulerPanel::OnSelectionChange ( Observer::Message  )
private

Definition at line 1672 of file AdornedRulerPanel.cpp.

1673{
1674 auto &selectedRegion = mViewInfo->selectedRegion;
1675 DoSelectionChange( selectedRegion );
1676}

References DoSelectionChange(), CellularPanel::mViewInfo, and ViewInfo::selectedRegion.

Referenced by AdornedRulerPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetPlayRegionToSelection()

void AdornedRulerPanel::OnSetPlayRegionToSelection ( wxCommandEvent &  evt)
private

Definition at line 2415 of file AdornedRulerPanel.cpp.

2416{
2418}
void SetPlayRegionToSelection(AudacityProject &project)

References mProject, and SelectUtilities::SetPlayRegionToSelection().

Here is the call graph for this function:

◆ OnSize()

void AdornedRulerPanel::OnSize ( wxSizeEvent &  evt)
private

Definition at line 1644 of file AdornedRulerPanel.cpp.

1645{
1646 mOuter = GetClientRect();
1647 if (mOuter.GetWidth() == 0 || mOuter.GetHeight() == 0)
1648 {
1649 return;
1650 }
1651
1652 UpdateRects();
1653
1655}
void OnSize(wxSizeEvent &event)
Definition: BackedPanel.cpp:71

References mOuter, BackedPanel::OnSize(), and UpdateRects().

Here is the call graph for this function:

◆ OnSyncSelToQuickPlay()

void AdornedRulerPanel::OnSyncSelToQuickPlay ( wxCommandEvent &  evt)
private

Definition at line 2375 of file AdornedRulerPanel.cpp.

2376{
2378 gPrefs->Write(wxT("/QuickPlay/DragSelection"), mPlayRegionDragsSelection);
2379 gPrefs->Flush();
2380}

References audacity::BasicSettings::Flush(), gPrefs, mPlayRegionDragsSelection, audacity::BasicSettings::Write(), and wxT().

Here is the call graph for this function:

◆ OnThemeChange()

void AdornedRulerPanel::OnThemeChange ( struct ThemeChangeMessage  message)
private

Definition at line 1665 of file AdornedRulerPanel.cpp.

1666{
1667 if (message.appearance)
1668 return;
1670}
std::optional< PreferredSystemAppearance > appearance
Definition: Theme.h:112

References ThemeChangeMessage::appearance, and ReCreateButtons().

Referenced by AdornedRulerPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnTimelineFormatChange()

void AdornedRulerPanel::OnTimelineFormatChange ( wxCommandEvent &  evt)
private

Definition at line 2361 of file AdornedRulerPanel.cpp.

2362{
2363 int id = event.GetId();
2364 TimeDisplayMode changeFlag = mTimeDisplayMode;
2365 wxASSERT(id == OnMinutesAndSecondsID || id == OnBeatsAndMeasuresID);
2368
2370
2371 if (changeFlag != mTimeDisplayMode)
2372 Refresh();
2373}
@ OnBeatsAndMeasuresID
@ OnMinutesAndSecondsID
TimeDisplayMode
bool WriteEnum(TimeDisplayMode value)

References BeatsAndMeasures, MinutesAndSeconds, mTimeDisplayMode, OnBeatsAndMeasuresID, OnMinutesAndSecondsID, Refresh(), TimeDisplayModePreference, and TimeDisplayModeSetting::WriteEnum().

Here is the call graph for this function:

◆ OnTogglePinnedState()

void AdornedRulerPanel::OnTogglePinnedState ( wxCommandEvent &  event)
private

Definition at line 2240 of file AdornedRulerPanel.cpp.

2241{
2244}

References TogglePinnedHead(), and UpdateButtonStates().

Here is the call graph for this function:

◆ OnTogglePlayRegion()

void AdornedRulerPanel::OnTogglePlayRegion ( wxCommandEvent &  evt)
private

Definition at line 2405 of file AdornedRulerPanel.cpp.

2406{
2408}
void TogglePlayRegion(AudacityProject &project)

References mProject, and SelectUtilities::TogglePlayRegion().

Here is the call graph for this function:

◆ PlayRegionRectangle()

wxRect AdornedRulerPanel::PlayRegionRectangle ( ) const
private

Definition at line 2541 of file AdornedRulerPanel.cpp.

2542{
2543 const auto &viewInfo = ViewInfo::Get(*mProject);
2544 const auto &playRegion = viewInfo.playRegion;
2545 const auto t0 = playRegion.GetLastActiveStart(),
2546 t1 = playRegion.GetLastActiveEnd();
2547 return RegionRectangle(t0, t1);
2548}
wxRect RegionRectangle(double t0, double t1) const

References ViewInfo::Get(), mProject, and RegionRectangle().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Pos2Time()

double AdornedRulerPanel::Pos2Time ( int  p,
bool  ignoreFisheye = false 
) const
private

Definition at line 1742 of file AdornedRulerPanel.cpp.

1743{
1745 , ignoreFisheye
1746 );
1747}
double PositionToTime(int64 position, int64 origin=0, bool ignoreFisheye=false) const
Definition: ZoomInfo.cpp:35

References mLeftOffset, CellularPanel::mViewInfo, and ZoomInfo::PositionToTime().

Referenced by DoDrawMarks(), and UpdateQuickPlayPos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessUIHandleResult()

void AdornedRulerPanel::ProcessUIHandleResult ( TrackPanelCell pClickedTrack,
TrackPanelCell pLatestCell,
unsigned  refreshResult 
)
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2846 of file AdornedRulerPanel.cpp.

2848{
2849 if (refreshResult & RefreshCode::RefreshAll)
2850 Refresh(); // Overlays will be repainted too
2851 else if (refreshResult & RefreshCode::DrawOverlays)
2852 DrawBothOverlays(); // cheaper redrawing of guidelines only
2853}

References DrawBothOverlays(), RefreshCode::DrawOverlays, Refresh(), and RefreshCode::RefreshAll.

Here is the call graph for this function:

◆ ReCreateButtons()

void AdornedRulerPanel::ReCreateButtons ( )

Definition at line 1391 of file AdornedRulerPanel.cpp.

1392{
1393 // TODO: Should we do this to destroy the grabber??
1394 // Get rid of any children we may have
1395 // DestroyChildren();
1396
1398 SetBackgroundColour(theTheme.Colour( clrMedium ));
1399
1400 for (auto & button : mButtons) {
1401 if (button)
1402 button->Destroy();
1403 button = nullptr;
1404 }
1405
1406 size_t iButton = 0;
1407 // Make the short row of time ruler push buttons.
1408 // Don't bother with sizers. Their sizes and positions are fixed.
1409 // Add a grabber converted to a spacer.
1410 // This makes it visually clearer that the button is a button.
1411
1412 wxPoint position( 1, 0 );
1413
1414 Grabber * pGrabber = safenew Grabber(this, {});
1415 pGrabber->SetAsSpacer( true );
1416 //pGrabber->SetSize( 10, 27 ); // default is 10,27
1417 pGrabber->SetPosition( position );
1418
1419 position.x = 12;
1420
1421 auto size = theTheme.ImageSize( bmpRecoloredUpSmall );
1422 size.y = std::min(size.y, GetRulerHeight(false));
1423
1424 auto buttonMaker = [&]
1425 (wxWindowID id, teBmps bitmap, bool toggle)
1426 {
1427 const auto button =
1429 this,
1430 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1431 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1432 bitmap, bitmap, bitmap,
1433 id, position, toggle, size
1434 );
1435
1436 position.x += size.GetWidth();
1437 mButtons[iButton++] = button;
1438 return button;
1439 };
1440 auto button = buttonMaker(OnTogglePinnedStateID, bmpPlayPointerPinned, true);
1442 *button, 3,
1443 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1444 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1445 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1446 bmpRecordPointer, bmpRecordPointer, bmpRecordPointer,
1447 size);
1449 *button, 2,
1450 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1451 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1452 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1453 bmpRecordPointerPinned, bmpRecordPointerPinned, bmpRecordPointerPinned,
1454 size);
1456 *button, 1,
1457 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1458 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1459 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1460 bmpPlayPointer, bmpPlayPointer, bmpPlayPointer,
1461 size);
1462
1464}
@ OnTogglePinnedStateID
int teBmps
#define safenew
Definition: MemoryX.h:10
int id
The widget to the left of a ToolBar that allows it to be dragged around to NEW positions.
Definition: Grabber.h:107
void SetAsSpacer(bool bIsSpacer)
Definition: Grabber.cpp:99
wxSize ImageSize(int iIndex)
static void MakeAlternateImages(AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
Definition: ToolBar.cpp:945
static AButton * MakeButton(wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size)
Definition: ToolBar.cpp:875
static void MakeButtonBackgroundsSmall()
Definition: ToolBar.cpp:837

References ThemeBase::Colour(), GetRulerHeight(), id, ThemeBase::ImageSize(), ToolBar::MakeAlternateImages(), ToolBar::MakeButton(), ToolBar::MakeButtonBackgroundsSmall(), mButtons, min(), OnTogglePinnedStateID, safenew, Grabber::SetAsSpacer(), size, theTheme, and UpdateButtonStates().

Referenced by OnThemeChange(), and UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Refresh()

void AdornedRulerPanel::Refresh ( bool  eraseBackground = true,
const wxRect *  rect = (const wxRect *) NULL 
)
override

Definition at line 1356 of file AdornedRulerPanel.cpp.

1357{
1358 CellularPanel::Refresh( eraseBackground, rect );
1360}
void HandleCursorForPresentMouseState(bool doHit=true)

References BasicUI::CallAfter(), and CellularPanel::HandleCursorForPresentMouseState().

Referenced by AdornedRulerPanel(), ClearPlayRegion(), DoIdle(), DrawSelection(), OnTimelineFormatChange(), ProcessUIHandleResult(), SetPlayRegion(), SetTimeDisplayMode(), UpdatePrefs(), and TrackPanel::UpdateVRulerSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegionRectangle()

wxRect AdornedRulerPanel::RegionRectangle ( double  t0,
double  t1 
) const
private

Definition at line 2558 of file AdornedRulerPanel.cpp.

2559{
2560 int p0 = -1, p1 = -1;
2561 if (t0 == t1)
2562 // Make the rectangle off-screen horizontally, but set the height
2563 ;
2564 else {
2565 p0 = max(1, Time2Pos(t0));
2566 p1 = min(mInner.width, Time2Pos(t1));
2567 }
2568
2569 const int left = p0, top = mInner.y, right = p1, bottom = mInner.GetBottom();
2570 return { wxPoint{left, top}, wxPoint{right, bottom} };
2571}

References min(), mInner, and Time2Pos().

Referenced by PlayRegionRectangle(), and SelectedRegionRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Root()

std::shared_ptr< TrackPanelNode > AdornedRulerPanel::Root ( )
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2822 of file AdornedRulerPanel.cpp.

2823{
2824 // Root is a throwaway object
2825 return std::make_shared< MainGroup >( *this );
2826}

◆ SelectedRegionRectangle()

wxRect AdornedRulerPanel::SelectedRegionRectangle ( ) const
private

Definition at line 2550 of file AdornedRulerPanel.cpp.

2551{
2552 const auto &viewInfo = ViewInfo::Get(*mProject);
2553 const auto &selectedRegion = viewInfo.selectedRegion;
2554 const auto t0 = selectedRegion.t0(), t1 = selectedRegion.t1();
2555 return RegionRectangle(t0, t1);
2556}

References ViewInfo::Get(), mProject, and RegionRectangle().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFocusedCell()

void AdornedRulerPanel::SetFocusedCell ( )
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2841 of file AdornedRulerPanel.cpp.

2842{
2843}

◆ SetFocusFromKbd()

void AdornedRulerPanel::SetFocusFromKbd ( )
override

Definition at line 2776 of file AdornedRulerPanel.cpp.

2777{
2778 auto temp = TemporarilyAllowFocus();
2779 SetFocus();
2780}
static TempAllowFocus TemporarilyAllowFocus()
void SetFocus(const WindowPlacement &focus)
Set the window that accepts keyboard input.
Definition: BasicUI.h:352

References BasicUI::SetFocus(), and TemporarilyAllowFocus().

Here is the call graph for this function:

◆ SetLeftOffset()

void AdornedRulerPanel::SetLeftOffset ( int  offset)

Definition at line 2655 of file AdornedRulerPanel.cpp.

2656{
2657 if (mLeftOffset != offset) {
2658 mLeftOffset = offset;
2659 mUpdater.SetData(mViewInfo, offset);
2661 }
2662}

References Ruler::Invalidate(), mLeftOffset, mRuler, mUpdater, CellularPanel::mViewInfo, and LinearUpdater::SetData().

Referenced by TrackPanel::UpdateVRulerSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNumGuides()

void AdornedRulerPanel::SetNumGuides ( size_t  nn)

Definition at line 2763 of file AdornedRulerPanel.cpp.

2764{
2765 nn = std::min(nn, MAX_GUIDES);
2766 // If increasing the number of guides, reinitialize newer ones
2767 for (size_t ii = mNumGuides; ii < nn; ++ii) {
2768 mQuickPlayOffset[ii] = 0;
2769 mQuickPlayPosUnsnapped[ii] = 0;
2770 mQuickPlayPos[ii] = 0;
2771 mIsSnapped[ii] = false;
2772 }
2773 mNumGuides = nn;
2774}
double mQuickPlayOffset[MAX_GUIDES]
static constexpr size_t MAX_GUIDES
double mQuickPlayPosUnsnapped[MAX_GUIDES]

References MAX_GUIDES, min(), mIsSnapped, mNumGuides, mQuickPlayOffset, mQuickPlayPos, and mQuickPlayPosUnsnapped.

Here is the call graph for this function:

◆ SetPanelSize()

bool AdornedRulerPanel::SetPanelSize ( )

Definition at line 2179 of file AdornedRulerPanel.cpp.

2180{
2181 const auto oldSize = GetSize();
2182 wxSize size { oldSize.GetWidth(), GetRulerHeight(ShowingScrubRuler()) };
2183 if ( size != oldSize ) {
2184 SetSize(size);
2185 SetMinSize(size);
2186 PostSizeEventToParent();
2187 return true;
2188 }
2189 else
2190 return false;
2191}

References GetRulerHeight(), ShowingScrubRuler(), and size.

Referenced by DoIdle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPlayRegion()

void AdornedRulerPanel::SetPlayRegion ( double  playRegionStart,
double  playRegionEnd 
)

Definition at line 2724 of file AdornedRulerPanel.cpp.

2726{
2727 // This is called by AudacityProject to make the play region follow
2728 // the current selection. But while the user is selecting a play region
2729 // with the mouse directly in the ruler, changes from outside are blocked.
2731 return;
2732
2733 auto &viewInfo = ViewInfo::Get( *GetProject() );
2734 auto &playRegion = viewInfo.playRegion;
2735 playRegion.SetTimes( playRegionStart, playRegionEnd );
2736
2737 Refresh();
2738}

References ViewInfo::Get(), GetProject(), mesNone, mMouseEventState, and Refresh().

Referenced by DoSelectionChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTimeDisplayMode()

void AdornedRulerPanel::SetTimeDisplayMode ( TimeDisplayMode  rulerType)

Definition at line 2896 of file AdornedRulerPanel.cpp.

2897{
2898 if (mTimeDisplayMode == type)
2899 return;
2900
2901 mTimeDisplayMode = type;
2903 Refresh();
2904}

References mTimeDisplayMode, Refresh(), TimeDisplayModePreference, and TimeDisplayModeSetting::WriteEnum().

Here is the call graph for this function:

◆ ShowContextMenu()

void AdornedRulerPanel::ShowContextMenu ( MenuChoice  choice,
const wxPoint *  pPosition 
)
private

Definition at line 2421 of file AdornedRulerPanel.cpp.

2423{
2424 wxPoint position;
2425 if(pPosition)
2426 position = *pPosition;
2427 else
2428 {
2429 auto rect = GetRect();
2430 //Old code put menu too low down. y position applied twice.
2431 //position = { rect.GetLeft() + 1, rect.GetBottom() + 1 };
2432
2433 // The cell does not pass in the mouse or button position.
2434 // We happen to know this is the pin/unpin button
2435 // so these magic values 'fix a bug' - but really the cell should
2436 // pass more information to work with in.
2437 position = { rect.GetLeft() + 38, rect.GetHeight()/2 + 1 };
2438 }
2439
2440 switch (choice) {
2442 ShowMenu(position);
2444 break;
2445 case MenuChoice::Scrub:
2446 ShowScrubMenu(position); break;
2447 default:
2448 return;
2449 }
2450}
void ShowScrubMenu(const wxPoint &pos)
void ShowMenu(const wxPoint &pos)

References QuickPlay, Scrub, ShowMenu(), ShowScrubMenu(), and UpdateButtonStates().

Referenced by OnPinnedButton().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowingScrubRuler()

bool AdornedRulerPanel::ShowingScrubRuler ( ) const

Definition at line 2815 of file AdornedRulerPanel.cpp.

2816{
2817 auto &scrubber = Scrubber::Get( *GetProject() );
2818 return scrubber.ShowsBar();
2819}
static Scrubber & Get(AudacityProject &project)
Definition: Scrubbing.cpp:187

References Scrubber::Get(), and GetProject().

Referenced by AdornedRulerPanel::Subgroup::Children(), DoDrawBackground(), DoDrawScrubIndicator(), ScrubbingToolBar::DoRegenerateTooltips(), ScrubbingToolBar::EnableDisableButtons(), SetPanelSize(), and UpdateRects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowMenu()

void AdornedRulerPanel::ShowMenu ( const wxPoint &  pos)
private

Definition at line 2268 of file AdornedRulerPanel.cpp.

2269{
2270 const auto &viewInfo = ViewInfo::Get( *GetProject() );
2271 const auto &playRegion = viewInfo.playRegion;
2272 wxMenu rulerMenu;
2273
2274 {
2275 auto item = rulerMenu.AppendRadioItem(OnMinutesAndSecondsID,
2276 _("Minutes and Seconds"));
2278 }
2279
2280 {
2281 auto item = rulerMenu.AppendRadioItem(OnBeatsAndMeasuresID,
2282 _("Beats and Measures"));
2284 }
2285
2286 rulerMenu.AppendSeparator();
2287
2288 auto pDrag = rulerMenu.AppendCheckItem(OnSyncQuickPlaySelID, _("Setting a loop region also makes an audio selection"));
2289 pDrag->Check(mPlayRegionDragsSelection && playRegion.Active());
2290 pDrag->Enable(playRegion.Active());
2291
2292 rulerMenu.AppendCheckItem(OnAutoScrollID, _("Update display while playing"))->
2294
2295 {
2296 auto item = rulerMenu.AppendCheckItem(OnTogglePlayRegionID,
2298 item->Check(playRegion.Active());
2299 }
2300
2301 {
2302 auto item = rulerMenu.Append(OnClearPlayRegionID,
2303 /* i18n-hint Clear is a verb */
2304 _("Clear Loop"));
2305 }
2306
2307 {
2308 auto item = rulerMenu.Append(OnSetPlayRegionToSelectionID,
2309 _("Set Loop To Selection"));
2310 }
2311
2312 rulerMenu.AppendSeparator();
2313 rulerMenu.AppendCheckItem(OnTogglePinnedStateID, _("Pinned Play Head"))->
2315
2316 BasicMenu::Handle{ &rulerMenu }.Popup(
2318 { pos.x, pos.y }
2319 );
2320}
@ OnSetPlayRegionToSelectionID
@ OnClearPlayRegionID
@ OnAutoScrollID
@ OnTogglePlayRegionID
@ OnSyncQuickPlaySelID
#define _(s)
Definition: Internat.h:73
const TranslatableString LoopToggleText
Definition: ViewInfo.cpp:227
void Popup(const BasicUI::WindowPlacement &window, const Point &pos={})
Display the menu at pos, invoke at most one action, then hide it.
Definition: BasicMenu.cpp:209
static bool GetPinnedHeadPreference()
wxString Translation() const
TranslatableString Stripped(unsigned options=MenuCodes) const
non-mutating, constructs another TranslatableString object
Window placement information for wxWidgetsBasicUI can be constructed from a wxWindow pointer.

References _, BeatsAndMeasures, ViewInfo::bUpdateTrackIndicator, ViewInfo::Get(), TracksPrefs::GetPinnedHeadPreference(), GetProject(), LoopToggleText, MinutesAndSeconds, mPlayRegionDragsSelection, mTimeDisplayMode, CellularPanel::mViewInfo, OnAutoScrollID, OnBeatsAndMeasuresID, OnClearPlayRegionID, OnMinutesAndSecondsID, OnSetPlayRegionToSelectionID, OnSyncQuickPlaySelID, OnTogglePinnedStateID, OnTogglePlayRegionID, BasicMenu::Handle::Popup(), TranslatableString::Stripped(), and TranslatableString::Translation().

Referenced by ShowContextMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowScrubMenu()

void AdornedRulerPanel::ShowScrubMenu ( const wxPoint &  pos)
private

Definition at line 2322 of file AdornedRulerPanel.cpp.

2323{
2324 auto &scrubber = Scrubber::Get( *mProject );
2325 PushEventHandler(&scrubber);
2326 auto cleanup = finally([this]{ PopEventHandler(); });
2327
2328 wxMenu rulerMenu;
2329 scrubber.PopulatePopupMenu(rulerMenu);
2330 BasicMenu::Handle{ &rulerMenu }.Popup(
2332 { pos.x, pos.y }
2333 );
2334}

References Scrubber::Get(), mProject, and BasicMenu::Handle::Popup().

Referenced by ShowContextMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartQPPlay()

void AdornedRulerPanel::StartQPPlay ( bool  newDefault,
bool  cutPreview,
const double *  pStartTime = nullptr 
)
private

Definition at line 2097 of file AdornedRulerPanel.cpp.

2099{
2100 const double t0 = mTracks->GetStartTime();
2101 const double t1 = mTracks->GetEndTime();
2102 auto &viewInfo = ViewInfo::Get( *mProject );
2103 const auto &playRegion = viewInfo.playRegion;
2104 const auto &selectedRegion = viewInfo.selectedRegion;
2105 const double sel0 = selectedRegion.t0();
2106 const double sel1 = selectedRegion.t1();
2107
2108 // Start / Restart playback on left click.
2109 bool startPlaying = true; // = (playRegion.GetStart() >= 0);
2110
2111 if (startPlaying) {
2112 bool loopEnabled = true;
2113 auto oldStart = std::max(0.0, playRegion.GetStart());
2114 double start = oldStart, end = 0;
2115
2116 if (playRegion.Empty()) {
2117 // Play either a selection or the project.
2118 if (oldStart > sel0 && oldStart < sel1) {
2119 // we are in a selection, so use the selection
2120 start = sel0;
2121 end = sel1;
2122 } // not in a selection, so use the project
2123 else {
2124 start = t0;
2125 end = t1;
2126 }
2127 }
2128 else
2129 end = std::max(start, playRegion.GetEnd());
2130
2131 // Looping a tiny selection may freeze, so just play it once.
2132 loopEnabled = ((end - start) > 0.001)? true : false;
2133
2134 newDefault = (loopEnabled && newDefault);
2135 if (newDefault)
2136 cutPreview = false;
2137 auto options = ProjectAudioIO::GetDefaultOptions(*mProject, newDefault);
2138
2139 if (!cutPreview) {
2140 if (pStartTime)
2141 options.pStartTime.emplace(*pStartTime);
2142 }
2143 else
2144 options.envelope = nullptr;
2145
2146 auto mode =
2147 cutPreview ? PlayMode::cutPreviewPlay
2148 : newDefault ? PlayMode::loopedPlay
2150
2151 // Stop only after deciding where to start again, because an event
2152 // callback may change the play region back to the selection
2153 auto &projectAudioManager = ProjectAudioManager::Get( *mProject );
2154 projectAudioManager.Stop();
2155
2156 // Don't change play region, assume caller set it as needed
2157 // playRegion.SetTimes( start, end );
2158 // Refresh();
2159
2160 projectAudioManager.PlayPlayRegion((SelectedRegion(start, end)),
2161 options, mode,
2162 false);
2163
2164 }
2165}
@ cutPreviewPlay
static AudioIOStartStreamOptions GetDefaultOptions(AudacityProject &project, bool newDefaults=false)
Invoke the global hook, supplying a default argument.
Defines a selected portion of a project.
double GetEndTime() const
Return the greatest end time of the tracks, or 0 when no tracks.
Definition: Track.cpp:1008
double GetStartTime() const
Return the least start time of the tracks, or 0 when no tracks.
Definition: Track.cpp:1002
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159

References cutPreviewPlay, PackedArray::end(), ViewInfo::Get(), ProjectAudioManager::Get(), ProjectAudioIO::GetDefaultOptions(), TrackList::GetEndTime(), TrackList::GetStartTime(), loopedPlay, mProject, mTracks, and normalPlay.

Here is the call graph for this function:

◆ TemporarilyAllowFocus()

auto AdornedRulerPanel::TemporarilyAllowFocus ( )
static

Definition at line 2758 of file AdornedRulerPanel.cpp.

2758 {
2759 s_AcceptsFocus = true;
2760 return TempAllowFocus{ &s_AcceptsFocus };
2761}
std::unique_ptr< bool, Resetter > TempAllowFocus

Referenced by SetFocusFromKbd().

Here is the caller graph for this function:

◆ Time2Pos()

int AdornedRulerPanel::Time2Pos ( double  t,
bool  ignoreFisheye = false 
) const
private

Definition at line 1749 of file AdornedRulerPanel.cpp.

1750{
1752 , ignoreFisheye
1753 );
1754}
int64 TimeToPosition(double time, int64 origin=0, bool ignoreFisheye=false) const
STM: Converts a project time to screen x position.
Definition: ZoomInfo.cpp:45

References mLeftOffset, CellularPanel::mViewInfo, and ZoomInfo::TimeToPosition().

Referenced by IsWithinMarker(), and RegionRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TogglePinnedHead()

void AdornedRulerPanel::TogglePinnedHead ( )

Definition at line 2876 of file AdornedRulerPanel.cpp.

2877{
2881
2882 auto &project = *mProject;
2883 // Update button image
2885
2886 auto &scrubber = Scrubber::Get( project );
2887 if (scrubber.HasMark())
2888 scrubber.SetScrollScrubbing(value);
2889}
static void ModifyAllProjectToolbarMenus()
static void SetPinnedHeadPreference(bool value, bool flush=false)

References Scrubber::Get(), TracksPrefs::GetPinnedHeadPreference(), ToolManager::ModifyAllProjectToolbarMenus(), mProject, project, TracksPrefs::SetPinnedHeadPreference(), and UpdateButtonStates().

Referenced by anonymous_namespace{AdornedRulerPanel.cpp}::OnTogglePinnedHead(), and OnTogglePinnedState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateButtonStates()

void AdornedRulerPanel::UpdateButtonStates ( )

Definition at line 2205 of file AdornedRulerPanel.cpp.

2206{
2207 auto common = [this](
2208 AButton &button, const CommandID &commandName, const TranslatableString &label) {
2209 ComponentInterfaceSymbol command{ commandName, label };
2210 ToolBar::SetButtonToolTip( *mProject, button, &command, 1u );
2211 button.SetLabel( Verbatim( button.GetToolTipText() ) );
2212
2213 button.UpdateStatus();
2214 };
2215
2216 {
2217 // The button always reflects the pinned head preference, even though
2218 // there is also a Playback preference that may overrule it for scrubbing
2220 auto pinButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
2221 if( !state )
2222 pinButton->PopUp();
2223 else
2224 pinButton->PushDown();
2225 auto gAudioIO = AudioIO::Get();
2226 pinButton->SetAlternateIdx(
2227 (gAudioIO->IsCapturing() ? 2 : 0) + (state ? 0 : 1));
2228 // Bug 1584: Tooltip now shows what clicking will do.
2229 // Bug 2357: Action of button (and hence tooltip wording) updated.
2230 const auto label = XO("Timeline Options");
2231 common(*pinButton, wxT("PinnedHead"), label);
2232 }
2233}
TranslatableString label
Definition: TagsEditor.cpp:165
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
A wxButton with mouse-over behaviour.
Definition: AButton.h:104
void UpdateStatus()
Definition: AButton.cpp:455
void PopUp()
Definition: AButton.cpp:585
void SetLabel(const TranslatableString &label)
Definition: AButton.cpp:189
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static void SetButtonToolTip(AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands)
Definition: ToolBar.cpp:970
Holds a msgid for the translation catalog; may also bind format arguments.

References AudioIO::Get(), TracksPrefs::GetPinnedHeadPreference(), label, mProject, OnTogglePinnedStateID, AButton::PopUp(), ToolBar::SetButtonToolTip(), AButton::SetLabel(), AButton::UpdateStatus(), Verbatim(), wxT(), and XO().

Referenced by OnAudioStartStop(), OnTogglePinnedState(), ReCreateButtons(), ShowContextMenu(), TogglePinnedHead(), and UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePrefs()

void AdornedRulerPanel::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 1362 of file AdornedRulerPanel.cpp.

1363{
1364 if (mNeedButtonUpdate) {
1365 // Visit this block once only in the lifetime of this panel
1366 mNeedButtonUpdate = false;
1367 // Do this first time setting of button status texts
1368 // when we are sure the CommandManager is initialized.
1370 }
1371
1372 // Update button texts for language change
1374
1375 mTimelineToolTip = !!gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
1376
1377#ifdef EXPERIMENTAL_SCROLLING_LIMITS
1378#ifdef EXPERIMENTAL_TWO_TONE_TIME_RULER
1379 {
1380 auto scrollBeyondZero = ScrollingPreference.Read();
1381 mRuler.SetTwoTone(scrollBeyondZero);
1382 }
1383#endif
1384#endif
1385
1387 Refresh();
1388 // Update();
1389}
BoolSetting ScrollingPreference
Definition: ViewInfo.cpp:336
void SetTwoTone(bool twoTone)
Definition: Ruler.cpp:99
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:205

References gPrefs, mNeedButtonUpdate, mRuler, mTimeDisplayMode, mTimelineToolTip, audacity::BasicSettings::Read(), Setting< T >::Read(), EnumSetting< Enum >::ReadEnum(), ReCreateButtons(), Refresh(), ScrollingPreference, Ruler::SetTwoTone(), TimeDisplayModePreference, UpdateButtonStates(), and wxT().

Referenced by AdornedRulerPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateQuickPlayPos()

void AdornedRulerPanel::UpdateQuickPlayPos ( wxCoord &  mousePosX)

Definition at line 2246 of file AdornedRulerPanel.cpp.

2247{
2248 // Invoked for mouse-over preview events, or dragging, or scrub position
2249 // polling updates. Remember x coordinates, converted to times, for
2250 // drawing of guides.
2251
2252 // Keep Quick-Play within usable track area. (Dependent on zoom)
2253 const auto &viewInfo = ViewInfo::Get( *mProject );
2254 auto width = viewInfo.GetTracksUsableWidth();
2255 mousePosX = std::max(mousePosX, viewInfo.GetLeftOffset());
2256 mousePosX = std::min(mousePosX, viewInfo.GetLeftOffset() + width - 1);
2257 const auto time = Pos2Time(mousePosX);
2258
2259 for (size_t ii = 0; ii < mNumGuides; ++ii) {
2261 time + mQuickPlayOffset[ii];
2262 HandleSnapping(ii);
2263 }
2264}
void HandleSnapping(size_t index)

References ViewInfo::Get(), HandleSnapping(), min(), mNumGuides, mProject, mQuickPlayOffset, mQuickPlayPos, mQuickPlayPosUnsnapped, and Pos2Time().

Here is the call graph for this function:

◆ UpdateRects()

bool AdornedRulerPanel::UpdateRects ( )
private

Definition at line 1689 of file AdornedRulerPanel.cpp.

1690{
1691 auto inner = mOuter;
1692 wxRect scrubZone;
1693 inner.x += LeftMargin;
1694 inner.width -= (LeftMargin + RightMargin);
1695
1696 auto top = &inner;
1697 auto bottom = &inner;
1698
1699 if (ShowingScrubRuler()) {
1700 scrubZone = inner;
1701 auto scrubHeight = std::min(scrubZone.height, (int)(ScrubHeight));
1702
1703 int topHeight;
1704#ifdef SCRUB_ABOVE
1705 top = &scrubZone, topHeight = scrubHeight;
1706#else
1707 auto qpHeight = scrubZone.height - scrubHeight;
1708 bottom = &scrubZone, topHeight = qpHeight;
1709 // Increase scrub zone height so that hit testing finds it and
1710 // not QP region, when on bottom 'edge'.
1711 scrubZone.height+=BottomMargin;
1712#endif
1713
1714 top->height = topHeight;
1715 bottom->height -= topHeight;
1716 bottom->y += topHeight;
1717 }
1718
1719 top->y += TopMargin;
1720 top->height -= TopMargin;
1721
1722 bottom->height -= BottomMargin;
1723
1724 if (!ShowingScrubRuler())
1725 scrubZone = inner;
1726
1727 if ( inner == mInner && scrubZone == mScrubZone )
1728 // no changes
1729 return false;
1730
1731 mInner = inner;
1732 mScrubZone = scrubZone;
1733
1734 mRuler.SetBounds(mInner.GetLeft(),
1735 mInner.GetTop(),
1736 mInner.GetRight(),
1737 mInner.GetBottom());
1738
1739 return true;
1740}
@ LeftMargin
@ TopMargin
void SetBounds(int left, int top, int right, int bottom)
Definition: Ruler.cpp:304

References BottomMargin, LeftMargin, min(), mInner, mOuter, mRuler, mScrubZone, RightMargin, ScrubHeight, Ruler::SetBounds(), ShowingScrubRuler(), and TopMargin.

Referenced by DoIdle(), and OnSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateStatusMessage()

void AdornedRulerPanel::UpdateStatusMessage ( const TranslatableString message)
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2855 of file AdornedRulerPanel.cpp.

2856{
2857 ProjectStatus::Get( *GetProject() ).Set(message);
2858}
static ProjectStatus & Get(AudacityProject &project)
void Set(const TranslatableString &msg, StatusBarField field=mainStatusBarField)

References ProjectStatus::Get(), GetProject(), and ProjectStatus::Set().

Here is the call graph for this function:

Member Data Documentation

◆ mAudioIOSubscription

Observer::Subscription AdornedRulerPanel::mAudioIOSubscription
private

Definition at line 247 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ MAX_GUIDES

constexpr size_t AdornedRulerPanel::MAX_GUIDES = 2
staticconstexprprivate

Definition at line 154 of file AdornedRulerPanel.h.

Referenced by SetNumGuides().

◆ mButtons

wxWindow* AdornedRulerPanel::mButtons[3]
private

Definition at line 201 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and ReCreateButtons().

◆ mIndTime

double AdornedRulerPanel::mIndTime
private

Definition at line 152 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mInner

wxRect AdornedRulerPanel::mInner
private

◆ mIsDragging

bool AdornedRulerPanel::mIsDragging
private

Definition at line 197 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mIsRecording

bool AdornedRulerPanel::mIsRecording
private

Definition at line 163 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and OnAudioStartStop().

◆ mIsSnapped

bool AdornedRulerPanel::mIsSnapped[MAX_GUIDES] {}
private

Definition at line 158 of file AdornedRulerPanel.h.

Referenced by HandleSnapping(), and SetNumGuides().

◆ mLastDrawnH

double AdornedRulerPanel::mLastDrawnH {}
private

Definition at line 259 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnPlayRegion

std::pair<double, double> AdornedRulerPanel::mLastDrawnPlayRegion {}
private

Definition at line 257 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnSelectedRegion

SelectedRegion AdornedRulerPanel::mLastDrawnSelectedRegion
private

Definition at line 256 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnZoom

double AdornedRulerPanel::mLastDrawnZoom {}
private

Definition at line 260 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastPlayRegionActive

bool AdornedRulerPanel::mLastPlayRegionActive = false
private

Definition at line 258 of file AdornedRulerPanel.h.

Referenced by DoDrawOverlap(), DoDrawPlayRegion(), and DoIdle().

◆ mLeftDownClick

double AdornedRulerPanel::mLeftDownClick
private

Definition at line 196 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mLeftDownClickUnsnapped

double AdornedRulerPanel::mLeftDownClickUnsnapped
private

Definition at line 195 of file AdornedRulerPanel.h.

◆ mLeftOffset

int AdornedRulerPanel::mLeftOffset
private

Definition at line 149 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), Pos2Time(), SetLeftOffset(), and Time2Pos().

◆ mMouseEventState

MouseEventState AdornedRulerPanel::mMouseEventState
private

Definition at line 194 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and SetPlayRegion().

◆ mNeedButtonUpdate

bool AdornedRulerPanel::mNeedButtonUpdate { true }
private

Definition at line 202 of file AdornedRulerPanel.h.

Referenced by UpdatePrefs().

◆ mNumGuides

size_t AdornedRulerPanel::mNumGuides { 1 }
private

Definition at line 159 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mOldPlayRegion

PlayRegion AdornedRulerPanel::mOldPlayRegion
private

Definition at line 161 of file AdornedRulerPanel.h.

◆ mOuter

wxRect AdornedRulerPanel::mOuter
private

Definition at line 145 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), DoDrawEdge(), OnSize(), and UpdateRects().

◆ mOverlay

std::shared_ptr<TrackPanelGuidelineOverlay> AdornedRulerPanel::mOverlay
private

Definition at line 226 of file AdornedRulerPanel.h.

Referenced by CreateOverlays().

◆ mPlayRegionDragsSelection

bool AdornedRulerPanel::mPlayRegionDragsSelection
private

◆ mPlayRegionSubscription

Observer::Subscription AdornedRulerPanel::mPlayRegionSubscription
private

Definition at line 248 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mProject

AudacityProject* const AdornedRulerPanel::mProject
private

◆ mQPCell

std::shared_ptr<QPCell> AdornedRulerPanel::mQPCell
private

◆ mQuickPlayOffset

double AdornedRulerPanel::mQuickPlayOffset[MAX_GUIDES] {}
private

Definition at line 155 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mQuickPlayPos

double AdornedRulerPanel::mQuickPlayPos[MAX_GUIDES] {}
private

Definition at line 157 of file AdornedRulerPanel.h.

Referenced by HandleSnapping(), SetNumGuides(), and UpdateQuickPlayPos().

◆ mQuickPlayPosUnsnapped

double AdornedRulerPanel::mQuickPlayPosUnsnapped[MAX_GUIDES] {}
private

Definition at line 156 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mRuler

Ruler& AdornedRulerPanel::mRuler
private

◆ mRulerInvalidatedSubscription

Observer::Subscription AdornedRulerPanel::mRulerInvalidatedSubscription
private

Definition at line 250 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mScrubbingCell

std::shared_ptr<ScrubbingCell> AdornedRulerPanel::mScrubbingCell
private

◆ mScrubZone

wxRect AdornedRulerPanel::mScrubZone
private

◆ mThemeChangeSubscription

Observer::Subscription AdornedRulerPanel::mThemeChangeSubscription
private

Definition at line 249 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mTimeDisplayMode

TimeDisplayMode AdornedRulerPanel::mTimeDisplayMode
private

◆ mTimelineToolTip

bool AdornedRulerPanel::mTimelineToolTip
private

Definition at line 184 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and UpdatePrefs().

◆ mTracks

TrackList* AdornedRulerPanel::mTracks
private

Definition at line 143 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), HandleSnapping(), and StartQPPlay().

◆ mUpdater

LinearUpdater& AdornedRulerPanel::mUpdater
private

Definition at line 140 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and SetLeftOffset().

◆ s_AcceptsFocus

bool AdornedRulerPanel::s_AcceptsFocus { false }
staticprivate

Definition at line 119 of file AdornedRulerPanel.h.


The documentation for this class was generated from the following files: