Audacity 3.2.0
Classes | Public Types | 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 Types

enum  RulerTypeValues : int { stMinutesAndSeconds , stBeatsAndMeasures , stNumRulerTypes }
 
- 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) >
 

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
 
- 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 RefreshTimelineFormat ()
 
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

BeatsFormat mBeatsFormat
 
LinearUpdater mUpdater
 
Ruler mRuler { mUpdater, TimeFormat::Instance() }
 
AudacityProject *const mProject
 
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
 
SelectedRegion mLastDrawnSelectedRegion
 
std::pair< double, double > mLastDrawnPlayRegion {}
 
bool mLastPlayRegionActive = false
 
double mLastDrawnH {}
 
double mLastDrawnZoom {}
 
RulerTypeValues mRulerType
 

Static Private Attributes

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

Additional Inherited Members

- 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 192 of file AdornedRulerPanel.h.

◆ RulerTypeValues

Enumerator
stMinutesAndSeconds 
stBeatsAndMeasures 
stNumRulerTypes 

Definition at line 269 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 1275 of file AdornedRulerPanel.cpp.

1281 : CellularPanel(parent, id, pos, size, viewinfo)
1282 , mProject(project)
1283{
1284 SetLayoutDirection(wxLayout_LeftToRight);
1285
1286 mQPCell = std::make_shared<QPCell>( this );
1287 mScrubbingCell = std::make_shared<ScrubbingCell>( this );
1288
1289 for (auto &button : mButtons)
1290 button = nullptr;
1291
1292 SetLabel( XO("Timeline") );
1293 SetName();
1294 SetBackgroundStyle(wxBG_STYLE_PAINT);
1295
1296 mLeftOffset = 0;
1297 mIndTime = -1;
1298
1299 mLeftDownClick = -1;
1301 mIsDragging = false;
1302
1303 mOuter = GetClientRect();
1304
1306
1308
1309 mRuler.SetLabelEdges( false );
1310
1311 mTracks = &TrackList::Get( *project );
1312
1313 mIsRecording = false;
1314
1315 mTimelineToolTip = !!gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
1316 mPlayRegionDragsSelection = (gPrefs->Read(wxT("/QuickPlay/DragSelection"), 0L) == 1)? true : false;
1317
1318#if wxUSE_TOOLTIPS
1319 wxToolTip::Enable(true);
1320#endif
1321
1324
1325 // Delay until after CommandManager has been populated:
1327
1330
1331 // Bind event that updates the play region
1334
1335 // And call it once to initialize it
1337}
EnumSetting< AdornedRulerPanel::RulerTypeValues > RulerPanelViewPreference
wxT("CloseDown"))
XO("Cut/Copy/Paste")
FileConfig * gPrefs
Definition: Prefs.cpp:70
THEME_API Theme theTheme
Definition: Theme.cpp:82
void OnSelectionChange(Observer::Message)
void UpdatePrefs() override
void OnAudioStartStop(AudioIOEvent)
std::shared_ptr< ScrubbingCell > mScrubbingCell
Observer::Subscription mAudioIOSubscription
void DoSelectionChange(const SelectedRegion &selectedRegion)
wxWindow * mButtons[3]
AudacityProject *const mProject
Observer::Subscription mPlayRegionSubscription
Observer::Subscription mThemeChangeSubscription
RulerTypeValues mRulerType
MouseEventState mMouseEventState
std::shared_ptr< QPCell > mQPCell
void OnThemeChange(struct ThemeChangeMessage)
LinearUpdater mUpdater
static AudioIO * Get()
Definition: AudioIO.cpp:147
ViewInfo * mViewInfo
CellularPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, ViewInfo *viewInfo, long style=wxTAB_TRAVERSAL|wxNO_BORDER)
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
void SetLabelEdges(bool labelEdges)
Definition: Ruler.cpp:178
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:487
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:219
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, mRulerType, mScrubbingCell, mThemeChangeSubscription, mTimelineToolTip, mTracks, mUpdater, CellularPanel::mViewInfo, OnAudioStartStop(), OnSelectionChange(), OnThemeChange(), RulerPanelViewPreference, ViewInfo::selectedRegion, LinearUpdater::SetData(), wxPanelWrapper::SetLabel(), Ruler::SetLabelEdges(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), theTheme, UpdatePrefs(), wxT(), and XO().

Here is the call graph for this function:

◆ ~AdornedRulerPanel()

AdornedRulerPanel::~AdornedRulerPanel ( )

Definition at line 1339 of file AdornedRulerPanel.cpp.

1340{
1341}

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 2747 of file AdornedRulerPanel.cpp.

2748{
2749 ProjectAudioManager::Get( *mProject ).Stop();
2750
2751 auto &viewInfo = ViewInfo::Get( *GetProject() );
2752 auto &playRegion = viewInfo.playRegion;
2753 playRegion.SetTimes( -1, -1 );
2754
2755 Refresh();
2756}
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
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 2867 of file AdornedRulerPanel.cpp.

2868{
2869 if (!mOverlay) {
2870 mOverlay =
2871 std::make_shared<TrackPanelGuidelineOverlay>( mProject );
2872 auto pCellularPanel =
2873 dynamic_cast<CellularPanel*>( &GetProjectPanel( *GetProject() ) );
2874 if ( !pCellularPanel ) {
2875 wxASSERT( false );
2876 }
2877 else
2878 pCellularPanel->AddOverlay( mOverlay );
2879 this->AddOverlay( mOverlay->mPartner );
2880 }
2881}
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 1266 of file AdornedRulerPanel.cpp.

1267{
1268 auto *pPanel = GetAttachedWindows(project).Find( sKey );
1269 if (pPanel) {
1270 pPanel->wxWindow::Destroy();
1271 GetAttachedWindows(project).Assign( sKey, nullptr );
1272 }
1273}
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(), 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 2492 of file AdornedRulerPanel.cpp.

2493{
2494 // Draw AdornedRulerPanel border
2496 dc->DrawRectangle( mInner );
2497
2498 if (ShowingScrubRuler()) {
2499 // Let's distinguish the scrubbing area by using a themable
2500 // colour and a line to set it off.
2501 AColor::UseThemeColour(dc, clrScrubRuler, TimelineTextColor() );
2502 wxRect ScrubRect = mScrubZone;
2503 ScrubRect.Inflate( 1,0 );
2504 dc->DrawRectangle(ScrubRect);
2505 }
2506}
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 2508 of file AdornedRulerPanel.cpp.

2509{
2510 wxRect r = mOuter;
2511 r.width -= RightMargin;
2512 r.height -= BottomMargin;
2513 AColor::BevelTrackInfo( *dc, true, r );
2514
2515 // Black stroke at bottom
2516 dc->SetPen( *wxBLACK_PEN );
2517 AColor::Line( *dc, mOuter.x,
2518 mOuter.y + mOuter.height - 1,
2519 mOuter.x + mOuter.width - 1 ,
2520 mOuter.y + mOuter.height - 1 );
2521}
@ 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 2523 of file AdornedRulerPanel.cpp.

2524{
2525 const double min = Pos2Time(0);
2526 const double hiddenMin = Pos2Time(0, true);
2527 const double max = Pos2Time(mInner.width);
2528 const double hiddenMax = Pos2Time(mInner.width, true);
2529
2531 mRuler.SetRange( min, max, hiddenMin, hiddenMax );
2533 {
2534 mRuler.SetTickLengths({ 5, 3, 1 });
2535 }
2537 {
2538 mRuler.SetTickLengths({ 4, 2, 2 });
2539 }
2540 mRuler.Draw( *dc );
2541}
int min(int a, int b)
double Pos2Time(int p, bool ignoreFisheye=false) const
void SetTickColour(const wxColour &colour)
Definition: Ruler.h:129
void Draw(wxDC &dc) const
Definition: Ruler.cpp:438
void SetTickLengths(const TickLengths &tLengths)
Definition: Ruler.cpp:254
void SetRange(double min, double max)
Definition: Ruler.cpp:151
wxColour & Colour(int iIndex)

References ThemeBase::Colour(), Ruler::Draw(), min(), mInner, mRuler, mRulerType, Pos2Time(), Ruler::SetRange(), Ruler::SetTickColour(), Ruler::SetTickLengths(), stBeatsAndMeasures, stMinutesAndSeconds, 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 2638 of file AdornedRulerPanel.cpp.

2639{
2640 dc->SetBrush( wxBrush{ AlphaBlend(
2642 SelectionOpacity) } );
2643 dc->SetPen( *wxTRANSPARENT_PEN );
2644 dc->DrawRectangle( rect );
2645}
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 2580 of file AdornedRulerPanel.cpp.

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

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 2599 of file AdornedRulerPanel.cpp.

2600{
2601 // Color the edges of the play region like the ticks and numbers
2602 ADCChanger cleanup( dc );
2603 const auto edgeColour = theTheme.Colour(TimelineLimitsColor());
2604 dc->SetPen( { edgeColour } );
2605 dc->SetBrush( { edgeColour } );
2606
2607 constexpr int side = 7;
2608 constexpr int sideLessOne = side - 1;
2609
2610 // Paint two shapes, each a line plus triangle at bottom
2611 const auto left = rect.GetLeft(),
2612 right = rect.GetRight(),
2613 bottom = rect.GetBottom(),
2614 top = rect.GetTop();
2615 {
2616 wxPoint points[]{
2617 {left, bottom - sideLessOne},
2618 {left - sideLessOne, bottom},
2619 {left, bottom},
2620 {left, top},
2621 };
2622 dc->DrawPolygon( 4, points );
2623 }
2624
2625 {
2626 wxPoint points[]{
2627 {right, top},
2628 {right, bottom},
2629 {right + sideLessOne, bottom},
2630 {right, bottom - sideLessOne},
2631 };
2632 dc->DrawPolygon( 4, points );
2633 }
2634}
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 2672 of file AdornedRulerPanel.cpp.

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

2649{
2650 dc->SetBrush( wxBrush{ AlphaBlend(
2652 dc->SetPen( *wxTRANSPARENT_PEN );
2653 dc->DrawRectangle( rectS.Intersect(rectL) );
2654 dc->DrawRectangle( rectS.Intersect(rectR) );
2655}

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 1529 of file AdornedRulerPanel.cpp.

1530{
1531 bool changed = UpdateRects();
1532 changed = SetPanelSize() || changed;
1533
1534 auto &project = *mProject;
1535 auto &viewInfo = ViewInfo::Get( project );
1536 const auto &selectedRegion = viewInfo.selectedRegion;
1537 const auto &playRegion = viewInfo.playRegion;
1538
1539 changed = changed
1540 || mLastDrawnSelectedRegion != selectedRegion
1541 || mLastDrawnPlayRegion != std::pair{
1542 playRegion.GetLastActiveStart(), playRegion.GetLastActiveEnd() }
1543 || mLastDrawnH != viewInfo.h
1544 || mLastDrawnZoom != viewInfo.GetZoom()
1545 || mLastPlayRegionActive != viewInfo.playRegion.Active()
1546 ;
1547 if (changed)
1548 // Cause ruler redraw anyway, because we may be zooming or scrolling,
1549 // showing or hiding the scrub bar, etc.
1550 Refresh();
1551}
std::pair< double, double > mLastDrawnPlayRegion
SelectedRegion mLastDrawnSelectedRegion

References ViewInfo::Get(), mLastDrawnH, mLastDrawnPlayRegion, mLastDrawnSelectedRegion, mLastDrawnZoom, mLastPlayRegionActive, mProject, 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 1664 of file AdornedRulerPanel.cpp.

1666{
1667
1668 auto gAudioIO = AudioIOBase::Get();
1669 if ( !ViewInfo::Get( *mProject ).playRegion.Active() ) {
1670 // "Inactivated" play region follows the selection.
1671 SetPlayRegion( selectedRegion.t0(), selectedRegion.t1() );
1672 }
1673}
void SetPlayRegion(double playRegionStart, double playRegionEnd)
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:91
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 2322 of file AdornedRulerPanel.cpp.

2323{
2324 auto &viewInfo = ViewInfo::Get( project );
2325 const auto &playRegion = viewInfo.playRegion;
2326 auto &selectedRegion = viewInfo.selectedRegion;
2327 selectedRegion.setT0(playRegion.GetStart(), false);
2328 selectedRegion.setT1(playRegion.GetEnd(), true);
2329}

References ViewInfo::Get().

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 2179 of file AdornedRulerPanel.cpp.

2180{
2181 auto pCellularPanel =
2182 dynamic_cast<CellularPanel*>( &GetProjectPanel( *GetProject() ) );
2183 if ( !pCellularPanel ) {
2184 wxASSERT( false );
2185 }
2186 else
2187 pCellularPanel->DrawOverlays( false );
2188 DrawOverlays( false );
2189}
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 2543 of file AdornedRulerPanel.cpp.

2544{
2545 Refresh();
2546}

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 1255 of file AdornedRulerPanel.cpp.

1256{
1257 return GetAttachedWindows(project).Get< AdornedRulerPanel >( sKey );
1258}
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(), 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(), 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(), 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 1260 of file AdornedRulerPanel.cpp.

1262{
1263 return Get( const_cast< AudacityProject & >( project ) );
1264}
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().

Here is the call graph for this function:

◆ GetFocusedCell()

TrackPanelCell * AdornedRulerPanel::GetFocusedCell ( )
overrideprivatevirtual

Implements CellularPanel.

Definition at line 2841 of file AdornedRulerPanel.cpp.

2842{
2843 // No switching of focus yet to the other, scrub zone
2844 return mQPCell.get();
2845}

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 2758 of file AdornedRulerPanel.cpp.

2759{
2760 mRuler.GetMaxSize(width, height);
2761}
void GetMaxSize(wxCoord *width, wxCoord *height)
Definition: Ruler.cpp:613

References Ruler::GetMaxSize(), and mRuler.

Here is the call graph for this function:

◆ GetProject()

AudacityProject * AdornedRulerPanel::GetProject ( ) const
overridevirtual

Implements CellularPanel.

Definition at line 2835 of file AdornedRulerPanel.cpp.

2836{
2837 return mProject;
2838}

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 2657 of file AdornedRulerPanel.cpp.

2658{
2659 return ProperRulerHeight + (showScrubBar ? ScrubHeight : 0);
2660}
@ ProperRulerHeight
@ ScrubHeight

References ProperRulerHeight, and ScrubHeight.

◆ 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 2331 of file AdornedRulerPanel.cpp.

2332{
2333 // Play region dragging can snap to selection boundaries
2334 const auto &selectedRegion = ViewInfo::Get(*GetProject()).selectedRegion;
2335 SnapPointArray candidates;
2337 candidates = {
2338 SnapPoint{ selectedRegion.t0() },
2339 SnapPoint{ selectedRegion.t1() },
2340 };
2341 SnapManager snapManager{ *mProject, *mTracks, *mViewInfo, move(candidates) };
2342 auto results = snapManager.Snap(nullptr, mQuickPlayPos[index], false);
2343 mQuickPlayPos[index] = results.outTime;
2344 mIsSnapped[index] = results.Snapped();
2345}
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 1452 of file AdornedRulerPanel.cpp.

1453{
1455}
void Invalidate()
Definition: Ruler.cpp:316

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 1742 of file AdornedRulerPanel.cpp.

1743{
1744 if (markerTime < 0)
1745 return false;
1746
1747 int pixelPos = Time2Pos(markerTime);
1748 int boundLeft = pixelPos - SELECT_TOLERANCE_PIXEL;
1749 int boundRight = pixelPos + SELECT_TOLERANCE_PIXEL;
1750
1751 return mousePosX >= boundLeft && mousePosX < boundRight;
1752}
#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 1553 of file AdornedRulerPanel.cpp.

1554{
1555 if (evt.type == AudioIOEvent::MONITOR)
1556 return;
1557 if ( evt.type == AudioIOEvent::CAPTURE ) {
1558 if (evt.on)
1559 {
1560 mIsRecording = true;
1561 this->CellularPanel::CancelDragging( false );
1563
1565 }
1566 else {
1567 mIsRecording = false;
1569 }
1570 }
1571
1572 if ( !evt.on )
1573 // So that the play region is updated
1575}
bool CancelDragging(bool escaping)
bool on
Definition: AudioIO.h:77
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 2399 of file AdornedRulerPanel.cpp.

2400{
2402 gPrefs->Write(wxT("/GUI/AutoScroll"), false);
2403 else
2404 gPrefs->Write(wxT("/GUI/AutoScroll"), true);
2405
2406 gPrefs->Flush();
2407
2409}
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
static void Broadcast(int id=0)
Call this static function to notify all PrefsListener objects.
Definition: Prefs.cpp:97
bool bUpdateTrackIndicator
Definition: ViewInfo.h:242
static int UpdateScrollPrefsID()
Definition: ViewInfo.cpp:325

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

Here is the call graph for this function:

◆ OnClearPlayRegion()

void AdornedRulerPanel::OnClearPlayRegion ( wxCommandEvent &  evt)
private

Definition at line 2417 of file AdornedRulerPanel.cpp.

2418{
2420}
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 1523 of file AdornedRulerPanel.cpp.

1524{
1525 evt.Skip();
1526 DoIdle();
1527}

References DoIdle().

Here is the call graph for this function:

◆ OnLeave()

void AdornedRulerPanel::OnLeave ( wxMouseEvent &  evt)
private

Definition at line 1643 of file AdornedRulerPanel.cpp.

1644{
1645 evt.Skip();
1646 CallAfter([this]{
1648 });
1649}

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

Here is the call graph for this function:

◆ OnPaint()

void AdornedRulerPanel::OnPaint ( wxPaintEvent &  evt)
private

Definition at line 1577 of file AdornedRulerPanel.cpp.

1578{
1579 const auto &viewInfo = ViewInfo::Get( *GetProject() );
1580 const auto &playRegion = viewInfo.playRegion;
1581 const auto playRegionBounds = std::pair{
1582 playRegion.GetLastActiveStart(), playRegion.GetLastActiveEnd() };
1583 mLastDrawnH = viewInfo.h;
1584 mLastDrawnZoom = viewInfo.GetZoom();
1585 mLastDrawnPlayRegion = playRegionBounds;
1586 mLastDrawnSelectedRegion = viewInfo.selectedRegion;
1587 // To do, note other fisheye state when we have that
1588
1589 wxPaintDC dc(this);
1590
1591 auto &backDC = GetBackingDCForRepaint();
1592
1593 DoDrawBackground(&backDC);
1594
1595 // Find play region rectangle, selected rectangle, and their overlap
1596 const auto rectP = PlayRegionRectangle(),
1597 rectS = SelectedRegionRectangle(),
1598 rectO = rectP.Intersect(rectS);
1599
1600 // What's left and right of the overlap? Assume same tops and bottoms
1601 const auto top = rectP.GetTop(),
1602 bottom = rectP.GetBottom();
1603 wxRect rectL{
1604 wxPoint{ 0, top }, wxPoint{ this->GetSize().GetWidth() - 1, bottom } };
1605 wxRect rectR = {};
1606 if (!rectO.IsEmpty()) {
1607 rectR = { wxPoint{ rectO.GetRight() + 1, top }, rectL.GetBottomRight() };
1608 rectL = { rectL.GetTopLeft(), wxPoint{ rectO.GetLeft() - 1, bottom } };
1609 }
1610
1611 DoDrawPlayRegion(&backDC, rectP, rectL, rectR);
1612 DoDrawOverlap(&backDC, rectO);
1613 DoDrawSelection(&backDC, rectS, rectL, rectR);
1614
1615 DoDrawPlayRegionLimits(&backDC, rectP);
1616
1617 DoDrawMarks(&backDC, true);
1618
1619 DoDrawEdge(&backDC);
1620
1621 DisplayBitmap(dc);
1622
1623 // Stroke extras direct to the client area,
1624 // maybe outside of the damaged area
1625 // As with TrackPanel, do not make a NEW wxClientDC or else Mac flashes badly!
1626 dc.DestroyClippingRegion();
1627 DrawOverlays(true, &dc);
1628}
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 2221 of file AdornedRulerPanel.cpp.

2222{
2224}
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 1658 of file AdornedRulerPanel.cpp.

1659{
1660 auto &selectedRegion = mViewInfo->selectedRegion;
1661 DoSelectionChange( selectedRegion );
1662}

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 2422 of file AdornedRulerPanel.cpp.

2423{
2425}
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 1630 of file AdornedRulerPanel.cpp.

1631{
1632 mOuter = GetClientRect();
1633 if (mOuter.GetWidth() == 0 || mOuter.GetHeight() == 0)
1634 {
1635 return;
1636 }
1637
1638 UpdateRects();
1639
1641}
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 2382 of file AdornedRulerPanel.cpp.

2383{
2385 gPrefs->Write(wxT("/QuickPlay/DragSelection"), mPlayRegionDragsSelection);
2386 gPrefs->Flush();
2387}

References FileConfig::Flush(), gPrefs, mPlayRegionDragsSelection, and wxT().

Here is the call graph for this function:

◆ OnThemeChange()

void AdornedRulerPanel::OnThemeChange ( struct ThemeChangeMessage  message)
private

Definition at line 1651 of file AdornedRulerPanel.cpp.

1652{
1653 if (message.appearance)
1654 return;
1656}
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 RulerTypeValues changeFlag = mRulerType;
2365 wxASSERT(id == OnMinutesAndSecondsID || id == OnBeatsAndMeasuresID);
2374 }
2377 }
2378 if (changeFlag != mRulerType)
2379 Refresh();
2380}
@ OnBeatsAndMeasuresID
@ OnMinutesAndSecondsID
IntSetting UpperTimeSignature
The upper time signature of the Beats & Measures ruler.
Definition: Beats.cpp:14
IntSetting LowerTimeSignature
The lower time signature of the Beats & Measures ruler.
Definition: Beats.cpp:15
DoubleSetting BeatsPerMinute
The tempo used for drawing the Beats & Measures ruler.
Definition: Beats.cpp:13
BeatsFormat mBeatsFormat
void SetData(double bpm, int timeSigUpper, int timeSigLower)
Definition: BeatsFormat.h:30
void SetFormat(const RulerFormat *pFormat)
Definition: Ruler.cpp:103
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:200
static const TimeFormat & Instance()
Definition: TimeFormat.cpp:15

References BeatsPerMinute, TimeFormat::Instance(), Ruler::Invalidate(), LowerTimeSignature, mBeatsFormat, mRuler, mRulerType, OnBeatsAndMeasuresID, OnMinutesAndSecondsID, Setting< T >::Read(), Refresh(), RulerPanelViewPreference, BeatsFormat::SetData(), Ruler::SetFormat(), stBeatsAndMeasures, stMinutesAndSeconds, and UpperTimeSignature.

Here is the call graph for this function:

◆ OnTogglePinnedState()

void AdornedRulerPanel::OnTogglePinnedState ( wxCommandEvent &  event)
private

Definition at line 2226 of file AdornedRulerPanel.cpp.

2227{
2230}

References TogglePinnedHead(), and UpdateButtonStates().

Here is the call graph for this function:

◆ OnTogglePlayRegion()

void AdornedRulerPanel::OnTogglePlayRegion ( wxCommandEvent &  evt)
private

Definition at line 2412 of file AdornedRulerPanel.cpp.

2413{
2415}
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 2548 of file AdornedRulerPanel.cpp.

2549{
2550 const auto &viewInfo = ViewInfo::Get(*mProject);
2551 const auto &playRegion = viewInfo.playRegion;
2552 const auto t0 = playRegion.GetLastActiveStart(),
2553 t1 = playRegion.GetLastActiveEnd();
2554 return RegionRectangle(t0, t1);
2555}
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 1728 of file AdornedRulerPanel.cpp.

1729{
1731 , ignoreFisheye
1732 );
1733}
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 2853 of file AdornedRulerPanel.cpp.

2855{
2856 if (refreshResult & RefreshCode::RefreshAll)
2857 Refresh(); // Overlays will be repainted too
2858 else if (refreshResult & RefreshCode::DrawOverlays)
2859 DrawBothOverlays(); // cheaper redrawing of guidelines only
2860}

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

Here is the call graph for this function:

◆ ReCreateButtons()

void AdornedRulerPanel::ReCreateButtons ( )

Definition at line 1377 of file AdornedRulerPanel.cpp.

1378{
1379 // TODO: Should we do this to destroy the grabber??
1380 // Get rid of any children we may have
1381 // DestroyChildren();
1382
1384 SetBackgroundColour(theTheme.Colour( clrMedium ));
1385
1386 for (auto & button : mButtons) {
1387 if (button)
1388 button->Destroy();
1389 button = nullptr;
1390 }
1391
1392 size_t iButton = 0;
1393 // Make the short row of time ruler pushbottons.
1394 // Don't bother with sizers. Their sizes and positions are fixed.
1395 // Add a grabber converted to a spacer.
1396 // This makes it visually clearer that the button is a button.
1397
1398 wxPoint position( 1, 0 );
1399
1400 Grabber * pGrabber = safenew Grabber(this, {});
1401 pGrabber->SetAsSpacer( true );
1402 //pGrabber->SetSize( 10, 27 ); // default is 10,27
1403 pGrabber->SetPosition( position );
1404
1405 position.x = 12;
1406
1407 auto size = theTheme.ImageSize( bmpRecoloredUpSmall );
1408 size.y = std::min(size.y, GetRulerHeight(false));
1409
1410 auto buttonMaker = [&]
1411 (wxWindowID id, teBmps bitmap, bool toggle)
1412 {
1413 const auto button =
1415 this,
1416 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1417 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1418 bitmap, bitmap, bitmap,
1419 id, position, toggle, size
1420 );
1421
1422 position.x += size.GetWidth();
1423 mButtons[iButton++] = button;
1424 return button;
1425 };
1426 auto button = buttonMaker(OnTogglePinnedStateID, bmpPlayPointerPinned, true);
1428 *button, 3,
1429 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1430 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1431 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1432 bmpRecordPointer, bmpRecordPointer, bmpRecordPointer,
1433 size);
1435 *button, 2,
1436 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1437 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1438 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1439 bmpRecordPointerPinned, bmpRecordPointerPinned, bmpRecordPointerPinned,
1440 size);
1442 *button, 1,
1443 bmpRecoloredUpSmall, bmpRecoloredDownSmall,
1444 bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall,
1445 //bmpUnpinnedPlayHead, bmpUnpinnedPlayHead, bmpUnpinnedPlayHead,
1446 bmpPlayPointer, bmpPlayPointer, bmpPlayPointer,
1447 size);
1448
1450}
@ 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 1343 of file AdornedRulerPanel.cpp.

1344{
1345 CellularPanel::Refresh( eraseBackground, rect );
1347}
void HandleCursorForPresentMouseState(bool doHit=true)

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

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

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

◆ RefreshTimelineFormat()

void AdornedRulerPanel::RefreshTimelineFormat ( )
private

Definition at line 2347 of file AdornedRulerPanel.cpp.

References BeatsPerMinute, TimeFormat::Instance(), Ruler::Invalidate(), LowerTimeSignature, mBeatsFormat, mRuler, mRulerType, Setting< T >::Read(), Refresh(), BeatsFormat::SetData(), Ruler::SetFormat(), stBeatsAndMeasures, stMinutesAndSeconds, and UpperTimeSignature.

Referenced by UpdatePrefs().

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 2565 of file AdornedRulerPanel.cpp.

2566{
2567 int p0 = -1, p1 = -1;
2568 if (t0 == t1)
2569 // Make the rectangle off-screen horizontally, but set the height
2570 ;
2571 else {
2572 p0 = max(1, Time2Pos(t0));
2573 p1 = min(mInner.width, Time2Pos(t1));
2574 }
2575
2576 const int left = p0, top = mInner.y, right = p1, bottom = mInner.GetBottom();
2577 return { wxPoint{left, top}, wxPoint{right, bottom} };
2578}

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 2829 of file AdornedRulerPanel.cpp.

2830{
2831 // Root is a throwaway object
2832 return std::make_shared< MainGroup >( *this );
2833}

◆ SelectedRegionRectangle()

wxRect AdornedRulerPanel::SelectedRegionRectangle ( ) const
private

Definition at line 2557 of file AdornedRulerPanel.cpp.

2558{
2559 const auto &viewInfo = ViewInfo::Get(*mProject);
2560 const auto &selectedRegion = viewInfo.selectedRegion;
2561 const auto t0 = selectedRegion.t0(), t1 = selectedRegion.t1();
2562 return RegionRectangle(t0, t1);
2563}

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 2848 of file AdornedRulerPanel.cpp.

2849{
2850}

◆ SetFocusFromKbd()

void AdornedRulerPanel::SetFocusFromKbd ( )
override

Definition at line 2783 of file AdornedRulerPanel.cpp.

2784{
2785 auto temp = TemporarilyAllowFocus();
2786 SetFocus();
2787}
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 2662 of file AdornedRulerPanel.cpp.

2663{
2664 if (mLeftOffset != offset) {
2665 mLeftOffset = offset;
2666 mUpdater.SetData(mViewInfo, offset);
2668 }
2669}

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 2770 of file AdornedRulerPanel.cpp.

2771{
2772 nn = std::min(nn, MAX_GUIDES);
2773 // If increasing the number of guides, reinitialize newer ones
2774 for (size_t ii = mNumGuides; ii < nn; ++ii) {
2775 mQuickPlayOffset[ii] = 0;
2776 mQuickPlayPosUnsnapped[ii] = 0;
2777 mQuickPlayPos[ii] = 0;
2778 mIsSnapped[ii] = false;
2779 }
2780 mNumGuides = nn;
2781}
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 2165 of file AdornedRulerPanel.cpp.

2166{
2167 const auto oldSize = GetSize();
2168 wxSize size { oldSize.GetWidth(), GetRulerHeight(ShowingScrubRuler()) };
2169 if ( size != oldSize ) {
2170 SetSize(size);
2171 SetMinSize(size);
2172 PostSizeEventToParent();
2173 return true;
2174 }
2175 else
2176 return false;
2177}

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 2731 of file AdornedRulerPanel.cpp.

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

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:

◆ ShowContextMenu()

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

Definition at line 2428 of file AdornedRulerPanel.cpp.

2430{
2431 wxPoint position;
2432 if(pPosition)
2433 position = *pPosition;
2434 else
2435 {
2436 auto rect = GetRect();
2437 //Old code put menu too low down. y position applied twice.
2438 //position = { rect.GetLeft() + 1, rect.GetBottom() + 1 };
2439
2440 // The cell does not pass in the mouse or button position.
2441 // We happen to know this is the pin/unpin button
2442 // so these magic values 'fix a bug' - but really the cell should
2443 // pass more information to work with in.
2444 position = { rect.GetLeft() + 38, rect.GetHeight()/2 + 1 };
2445 }
2446
2447 switch (choice) {
2449 ShowMenu(position);
2451 break;
2452 case MenuChoice::Scrub:
2453 ShowScrubMenu(position); break;
2454 default:
2455 return;
2456 }
2457}
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 2822 of file AdornedRulerPanel.cpp.

2823{
2824 auto &scrubber = Scrubber::Get( *GetProject() );
2825 return scrubber.ShowsBar();
2826}
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 2254 of file AdornedRulerPanel.cpp.

2255{
2256 const auto &viewInfo = ViewInfo::Get( *GetProject() );
2257 const auto &playRegion = viewInfo.playRegion;
2258 wxMenu rulerMenu;
2259
2260 {
2261 auto item = rulerMenu.AppendRadioItem(OnMinutesAndSecondsID,
2262 _("Minutes and Seconds"));
2264 }
2265
2266 {
2267 auto item = rulerMenu.AppendRadioItem(OnBeatsAndMeasuresID,
2268 _("Beats and Measures"));
2270 }
2271
2272 rulerMenu.AppendSeparator();
2273
2274 auto pDrag = rulerMenu.AppendCheckItem(OnSyncQuickPlaySelID, _("Enable dragging selection"));
2275 pDrag->Check(mPlayRegionDragsSelection && playRegion.Active());
2276 pDrag->Enable(playRegion.Active());
2277
2278 rulerMenu.AppendCheckItem(OnAutoScrollID, _("Update display while playing"))->
2280
2281 {
2282 auto item = rulerMenu.AppendCheckItem(OnTogglePlayRegionID,
2284 item->Check(playRegion.Active());
2285 }
2286
2287 {
2288 auto item = rulerMenu.Append(OnClearPlayRegionID,
2289 /* i18n-hint Clear is a verb */
2290 _("Clear Loop"));
2291 }
2292
2293 {
2294 auto item = rulerMenu.Append(OnSetPlayRegionToSelectionID,
2295 _("Set Loop To Selection"));
2296 }
2297
2298 rulerMenu.AppendSeparator();
2299 rulerMenu.AppendCheckItem(OnTogglePinnedStateID, _("Pinned Play Head"))->
2301
2302 BasicMenu::Handle{ &rulerMenu }.Popup(
2304 { pos.x, pos.y }
2305 );
2306}
@ 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 _, ViewInfo::bUpdateTrackIndicator, ViewInfo::Get(), TracksPrefs::GetPinnedHeadPreference(), GetProject(), LoopToggleText, mPlayRegionDragsSelection, mRulerType, CellularPanel::mViewInfo, OnAutoScrollID, OnBeatsAndMeasuresID, OnClearPlayRegionID, OnMinutesAndSecondsID, OnSetPlayRegionToSelectionID, OnSyncQuickPlaySelID, OnTogglePinnedStateID, OnTogglePlayRegionID, BasicMenu::Handle::Popup(), stBeatsAndMeasures, stMinutesAndSeconds, 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 2308 of file AdornedRulerPanel.cpp.

2309{
2310 auto &scrubber = Scrubber::Get( *mProject );
2311 PushEventHandler(&scrubber);
2312 auto cleanup = finally([this]{ PopEventHandler(); });
2313
2314 wxMenu rulerMenu;
2315 scrubber.PopulatePopupMenu(rulerMenu);
2316 BasicMenu::Handle{ &rulerMenu }.Popup(
2318 { pos.x, pos.y }
2319 );
2320}

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 2083 of file AdornedRulerPanel.cpp.

2085{
2086 const double t0 = mTracks->GetStartTime();
2087 const double t1 = mTracks->GetEndTime();
2088 auto &viewInfo = ViewInfo::Get( *mProject );
2089 const auto &playRegion = viewInfo.playRegion;
2090 const auto &selectedRegion = viewInfo.selectedRegion;
2091 const double sel0 = selectedRegion.t0();
2092 const double sel1 = selectedRegion.t1();
2093
2094 // Start / Restart playback on left click.
2095 bool startPlaying = true; // = (playRegion.GetStart() >= 0);
2096
2097 if (startPlaying) {
2098 bool loopEnabled = true;
2099 auto oldStart = std::max(0.0, playRegion.GetStart());
2100 double start = oldStart, end = 0;
2101
2102 if (playRegion.Empty()) {
2103 // Play either a selection or the project.
2104 if (oldStart > sel0 && oldStart < sel1) {
2105 // we are in a selection, so use the selection
2106 start = sel0;
2107 end = sel1;
2108 } // not in a selection, so use the project
2109 else {
2110 start = t0;
2111 end = t1;
2112 }
2113 }
2114 else
2115 end = std::max(start, playRegion.GetEnd());
2116
2117 // Looping a tiny selection may freeze, so just play it once.
2118 loopEnabled = ((end - start) > 0.001)? true : false;
2119
2120 newDefault = (loopEnabled && newDefault);
2121 if (newDefault)
2122 cutPreview = false;
2123 auto options = ProjectAudioIO::GetDefaultOptions(*mProject, newDefault);
2124
2125 if (!cutPreview) {
2126 if (pStartTime)
2127 options.pStartTime.emplace(*pStartTime);
2128 }
2129 else
2130 options.envelope = nullptr;
2131
2132 auto mode =
2133 cutPreview ? PlayMode::cutPreviewPlay
2134 : newDefault ? PlayMode::loopedPlay
2136
2137 // Stop only after deciding where to start again, because an event
2138 // callback may change the play region back to the selection
2139 auto &projectAudioManager = ProjectAudioManager::Get( *mProject );
2140 projectAudioManager.Stop();
2141
2142 // Don't change play region, assume caller set it as needed
2143 // playRegion.SetTimes( start, end );
2144 // Refresh();
2145
2146 projectAudioManager.PlayPlayRegion((SelectedRegion(start, end)),
2147 options, mode,
2148 false);
2149
2150 }
2151}
@ 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
Definition: Track.cpp:1053
double GetStartTime() const
Definition: Track.cpp:1048
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 2765 of file AdornedRulerPanel.cpp.

2765 {
2766 s_AcceptsFocus = true;
2767 return TempAllowFocus{ &s_AcceptsFocus };
2768}
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 1735 of file AdornedRulerPanel.cpp.

1736{
1738 , ignoreFisheye
1739 );
1740}
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 2883 of file AdornedRulerPanel.cpp.

2884{
2888
2889 auto &project = *mProject;
2890 // Update button image
2892
2893 auto &scrubber = Scrubber::Get( project );
2894 if (scrubber.HasMark())
2895 scrubber.SetScrollScrubbing(value);
2896}
static void ModifyAllProjectToolbarMenus()
static void SetPinnedHeadPreference(bool value, bool flush=false)

References Scrubber::Get(), TracksPrefs::GetPinnedHeadPreference(), ToolManager::ModifyAllProjectToolbarMenus(), mProject, 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 2191 of file AdornedRulerPanel.cpp.

2192{
2193 auto common = [this](
2194 AButton &button, const CommandID &commandName, const TranslatableString &label) {
2195 ComponentInterfaceSymbol command{ commandName, label };
2196 ToolBar::SetButtonToolTip( *mProject, button, &command, 1u );
2197 button.SetLabel( Verbatim( button.GetToolTipText() ) );
2198
2199 button.UpdateStatus();
2200 };
2201
2202 {
2203 // The button always reflects the pinned head preference, even though
2204 // there is also a Playback preference that may overrule it for scrubbing
2206 auto pinButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
2207 if( !state )
2208 pinButton->PopUp();
2209 else
2210 pinButton->PushDown();
2211 auto gAudioIO = AudioIO::Get();
2212 pinButton->SetAlternateIdx(
2213 (gAudioIO->IsCapturing() ? 2 : 0) + (state ? 0 : 1));
2214 // Bug 1584: Tooltip now shows what clicking will do.
2215 // Bug 2357: Action of button (and hence tooltip wording) updated.
2216 const auto label = XO("Timeline Options");
2217 common(*pinButton, wxT("PinnedHead"), label);
2218 }
2219}
TranslatableString label
Definition: TagsEditor.cpp:164
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 1349 of file AdornedRulerPanel.cpp.

1350{
1351 if (mNeedButtonUpdate) {
1352 // Visit this block once only in the lifetime of this panel
1353 mNeedButtonUpdate = false;
1354 // Do this first time setting of button status texts
1355 // when we are sure the CommandManager is initialized.
1357 }
1358
1359 // Update button texts for language change
1361
1362 mTimelineToolTip = !!gPrefs->Read(wxT("/QuickPlay/ToolTips"), 1L);
1363
1364#ifdef EXPERIMENTAL_SCROLLING_LIMITS
1365#ifdef EXPERIMENTAL_TWO_TONE_TIME_RULER
1366 {
1367 auto scrollBeyondZero = ScrollingPreference.Read();
1368 mRuler.SetTwoTone(scrollBeyondZero);
1369 }
1370#endif
1371#endif
1372
1374 // Update();
1375}
BoolSetting ScrollingPreference
Definition: ViewInfo.cpp:336
void SetTwoTone(bool twoTone)
Definition: Ruler.cpp:98

References gPrefs, mNeedButtonUpdate, mRuler, mTimelineToolTip, Setting< T >::Read(), ReCreateButtons(), RefreshTimelineFormat(), ScrollingPreference, Ruler::SetTwoTone(), 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 2232 of file AdornedRulerPanel.cpp.

2233{
2234 // Invoked for mouse-over preview events, or dragging, or scrub position
2235 // polling updates. Remember x coordinates, converted to times, for
2236 // drawing of guides.
2237
2238 // Keep Quick-Play within usable track area. (Dependent on zoom)
2239 const auto &viewInfo = ViewInfo::Get( *mProject );
2240 auto width = viewInfo.GetTracksUsableWidth();
2241 mousePosX = std::max(mousePosX, viewInfo.GetLeftOffset());
2242 mousePosX = std::min(mousePosX, viewInfo.GetLeftOffset() + width - 1);
2243 const auto time = Pos2Time(mousePosX);
2244
2245 for (size_t ii = 0; ii < mNumGuides; ++ii) {
2247 time + mQuickPlayOffset[ii];
2248 HandleSnapping(ii);
2249 }
2250}
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 1675 of file AdornedRulerPanel.cpp.

1676{
1677 auto inner = mOuter;
1678 wxRect scrubZone;
1679 inner.x += LeftMargin;
1680 inner.width -= (LeftMargin + RightMargin);
1681
1682 auto top = &inner;
1683 auto bottom = &inner;
1684
1685 if (ShowingScrubRuler()) {
1686 scrubZone = inner;
1687 auto scrubHeight = std::min(scrubZone.height, (int)(ScrubHeight));
1688
1689 int topHeight;
1690#ifdef SCRUB_ABOVE
1691 top = &scrubZone, topHeight = scrubHeight;
1692#else
1693 auto qpHeight = scrubZone.height - scrubHeight;
1694 bottom = &scrubZone, topHeight = qpHeight;
1695 // Increase scrub zone height so that hit testing finds it and
1696 // not QP region, when on bottom 'edge'.
1697 scrubZone.height+=BottomMargin;
1698#endif
1699
1700 top->height = topHeight;
1701 bottom->height -= topHeight;
1702 bottom->y += topHeight;
1703 }
1704
1705 top->y += TopMargin;
1706 top->height -= TopMargin;
1707
1708 bottom->height -= BottomMargin;
1709
1710 if (!ShowingScrubRuler())
1711 scrubZone = inner;
1712
1713 if ( inner == mInner && scrubZone == mScrubZone )
1714 // no changes
1715 return false;
1716
1717 mInner = inner;
1718 mScrubZone = scrubZone;
1719
1720 mRuler.SetBounds(mInner.GetLeft(),
1721 mInner.GetTop(),
1722 mInner.GetRight(),
1723 mInner.GetBottom());
1724
1725 return true;
1726}
@ LeftMargin
@ TopMargin
void SetBounds(int left, int top, int right, int bottom)
Definition: Ruler.cpp:303

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 2862 of file AdornedRulerPanel.cpp.

2863{
2864 ProjectStatus::Get( *GetProject() ).Set(message);
2865}
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 253 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ MAX_GUIDES

constexpr size_t AdornedRulerPanel::MAX_GUIDES = 2
staticconstexprprivate

Definition at line 159 of file AdornedRulerPanel.h.

Referenced by SetNumGuides().

◆ mBeatsFormat

BeatsFormat AdornedRulerPanel::mBeatsFormat
private

Definition at line 140 of file AdornedRulerPanel.h.

Referenced by OnTimelineFormatChange(), and RefreshTimelineFormat().

◆ mButtons

wxWindow* AdornedRulerPanel::mButtons[3]
private

Definition at line 207 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and ReCreateButtons().

◆ mIndTime

double AdornedRulerPanel::mIndTime
private

Definition at line 157 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mInner

wxRect AdornedRulerPanel::mInner
private

◆ mIsDragging

bool AdornedRulerPanel::mIsDragging
private

Definition at line 203 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mIsRecording

bool AdornedRulerPanel::mIsRecording
private

Definition at line 168 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and OnAudioStartStop().

◆ mIsSnapped

bool AdornedRulerPanel::mIsSnapped[MAX_GUIDES] {}
private

Definition at line 163 of file AdornedRulerPanel.h.

Referenced by HandleSnapping(), and SetNumGuides().

◆ mLastDrawnH

double AdornedRulerPanel::mLastDrawnH {}
private

Definition at line 264 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnPlayRegion

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

Definition at line 262 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnSelectedRegion

SelectedRegion AdornedRulerPanel::mLastDrawnSelectedRegion
private

Definition at line 261 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastDrawnZoom

double AdornedRulerPanel::mLastDrawnZoom {}
private

Definition at line 265 of file AdornedRulerPanel.h.

Referenced by DoIdle(), and OnPaint().

◆ mLastPlayRegionActive

bool AdornedRulerPanel::mLastPlayRegionActive = false
private

Definition at line 263 of file AdornedRulerPanel.h.

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

◆ mLeftDownClick

double AdornedRulerPanel::mLeftDownClick
private

Definition at line 202 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mLeftDownClickUnsnapped

double AdornedRulerPanel::mLeftDownClickUnsnapped
private

Definition at line 201 of file AdornedRulerPanel.h.

◆ mLeftOffset

int AdornedRulerPanel::mLeftOffset
private

Definition at line 154 of file AdornedRulerPanel.h.

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

◆ mMouseEventState

MouseEventState AdornedRulerPanel::mMouseEventState
private

Definition at line 200 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and SetPlayRegion().

◆ mNeedButtonUpdate

bool AdornedRulerPanel::mNeedButtonUpdate { true }
private

Definition at line 208 of file AdornedRulerPanel.h.

Referenced by UpdatePrefs().

◆ mNumGuides

size_t AdornedRulerPanel::mNumGuides { 1 }
private

Definition at line 164 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mOldPlayRegion

PlayRegion AdornedRulerPanel::mOldPlayRegion
private

Definition at line 166 of file AdornedRulerPanel.h.

◆ mOuter

wxRect AdornedRulerPanel::mOuter
private

Definition at line 150 of file AdornedRulerPanel.h.

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

◆ mOverlay

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

Definition at line 232 of file AdornedRulerPanel.h.

Referenced by CreateOverlays().

◆ mPlayRegionDragsSelection

bool AdornedRulerPanel::mPlayRegionDragsSelection
private

◆ mPlayRegionSubscription

Observer::Subscription AdornedRulerPanel::mPlayRegionSubscription
private

Definition at line 254 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 160 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mQuickPlayPos

double AdornedRulerPanel::mQuickPlayPos[MAX_GUIDES] {}
private

Definition at line 162 of file AdornedRulerPanel.h.

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

◆ mQuickPlayPosUnsnapped

double AdornedRulerPanel::mQuickPlayPosUnsnapped[MAX_GUIDES] {}
private

Definition at line 161 of file AdornedRulerPanel.h.

Referenced by SetNumGuides(), and UpdateQuickPlayPos().

◆ mRuler

Ruler AdornedRulerPanel::mRuler { mUpdater, TimeFormat::Instance() }
private

◆ mRulerType

RulerTypeValues AdornedRulerPanel::mRulerType
private

◆ mScrubbingCell

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

◆ mScrubZone

wxRect AdornedRulerPanel::mScrubZone
private

◆ mThemeChangeSubscription

Observer::Subscription AdornedRulerPanel::mThemeChangeSubscription
private

Definition at line 255 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel().

◆ mTimelineToolTip

bool AdornedRulerPanel::mTimelineToolTip
private

Definition at line 190 of file AdornedRulerPanel.h.

Referenced by AdornedRulerPanel(), and UpdatePrefs().

◆ mTracks

TrackList* AdornedRulerPanel::mTracks
private

Definition at line 148 of file AdornedRulerPanel.h.

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

◆ mUpdater

LinearUpdater AdornedRulerPanel::mUpdater
private

Definition at line 142 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: