Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
AdornedRulerPanel::ScrubbingCell Class Referencefinal
Inheritance diagram for AdornedRulerPanel::ScrubbingCell:
[legend]
Collaboration diagram for AdornedRulerPanel::ScrubbingCell:
[legend]

Public Member Functions

 ScrubbingCell (AdornedRulerPanel *parent)
 
std::vector< UIHandlePtrHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject) override
 
std::shared_ptr< TrackPanelCellContextMenuDelegate () override
 
bool Hit () const
 
bool Clicked () const
 
- Public Member Functions inherited from AdornedRulerPanel::CommonCell
 CommonCell (AdornedRulerPanel *parent, MenuChoice menuChoice)
 
HitTestPreview DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override
 
unsigned DoContextMenu (const wxRect &, wxWindow *, const wxPoint *pPosition, AudacityProject *) final
 
- Public Member Functions inherited from TrackPanelCell
 TrackPanelCell ()=default
 
 TrackPanelCell (const TrackPanelCell &)=delete
 
TrackPanelCelloperator= (const TrackPanelCell &)=delete
 
virtual ~TrackPanelCell ()=0
 
virtual HitTestPreview DefaultPreview (const TrackPanelMouseState &state, const AudacityProject *pProject)
 
virtual std::vector< UIHandlePtrHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject)=0
 
virtual unsigned HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject)
 
virtual std::shared_ptr< TrackPanelCellContextMenuDelegate ()
 
virtual unsigned DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject)
 
virtual unsigned CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned KeyUp (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned LoseFocus (AudacityProject *project)
 
- Public Member Functions inherited from TrackPanelNode
 TrackPanelNode ()
 
virtual ~TrackPanelNode ()=0
 
- Public Member Functions inherited from TrackPanelDrawable
virtual ~TrackPanelDrawable ()=0
 
virtual void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass)
 
virtual wxRect DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)
 

Private Attributes

std::weak_ptr< ScrubbingHandlemHolder
 

Additional Inherited Members

- Static Public Member Functions inherited from TrackPanelDrawable
static wxRect MaximizeWidth (const wxRect &rect, const wxRect &panelRect)
 
static wxRect MaximizeHeight (const wxRect &rect, const wxRect &panelRect)
 
- Protected Attributes inherited from AdornedRulerPanel::CommonCell
AdornedRulerPanelmParent
 
const MenuChoice mMenuChoice
 

Detailed Description

Definition at line 1202 of file AdornedRulerPanel.cpp.

Constructor & Destructor Documentation

◆ ScrubbingCell()

AdornedRulerPanel::ScrubbingCell::ScrubbingCell ( AdornedRulerPanel parent)
inlineexplicit

Member Function Documentation

◆ Clicked()

bool AdornedRulerPanel::ScrubbingCell::Clicked ( ) const
inline

Definition at line 1219 of file AdornedRulerPanel.cpp.

1219 {
1220 if (auto ptr = mHolder.lock())
1221 return ptr->Clicked();
1222 return false;
1223 }
std::weak_ptr< ScrubbingHandle > mHolder

References mHolder.

◆ ContextMenuDelegate()

std::shared_ptr< TrackPanelCell > AdornedRulerPanel::ScrubbingCell::ContextMenuDelegate ( )
inlineoverridevirtual

Reimplemented from TrackPanelCell.

Definition at line 1215 of file AdornedRulerPanel.cpp.

1216 { return mParent->mScrubbingCell; }
std::shared_ptr< ScrubbingCell > mScrubbingCell

References AdornedRulerPanel::CommonCell::mParent, and AdornedRulerPanel::mScrubbingCell.

◆ Hit()

bool AdornedRulerPanel::ScrubbingCell::Hit ( ) const
inline

Definition at line 1218 of file AdornedRulerPanel.cpp.

1218{ return !mHolder.expired(); }

References mHolder.

◆ HitTest()

std::vector< UIHandlePtr > AdornedRulerPanel::ScrubbingCell::HitTest ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual

Implements TrackPanelCell.

Definition at line 1229 of file AdornedRulerPanel.cpp.

1231{
1232 // Creation of overlays on demand here -- constructor of AdornedRulerPanel
1233 // is too early to do it
1235
1236 std::vector<UIHandlePtr> results;
1237
1238 // Disable mouse actions on Timeline while recording.
1239 if (!mParent->mIsRecording) {
1240 auto xx = state.state.m_x;
1242 auto result = std::make_shared<ScrubbingHandle>( mParent, xx );
1243 result = AssignUIHandlePtr( mHolder, result );
1244 results.push_back( result );
1245 }
1246
1247 return results;
1248}
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
Definition: UIHandle.h:164
void UpdateQuickPlayPos(wxCoord &mousePosX)

References AssignUIHandlePtr(), and TrackPanelMouseState::state.

Here is the call graph for this function:

Member Data Documentation

◆ mHolder

std::weak_ptr<ScrubbingHandle> AdornedRulerPanel::ScrubbingCell::mHolder
private

Definition at line 1226 of file AdornedRulerPanel.cpp.

Referenced by Clicked(), and Hit().


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