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

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

References mHolder.

◆ ContextMenuDelegate()

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

Reimplemented from TrackPanelCell.

Definition at line 1217 of file AdornedRulerPanel.cpp.

1218 { 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 1220 of file AdornedRulerPanel.cpp.

1220{ return !mHolder.expired(); }

References mHolder.

◆ HitTest()

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

Implements TrackPanelCell.

Definition at line 1231 of file AdornedRulerPanel.cpp.

1233{
1234 // Creation of overlays on demand here -- constructor of AdornedRulerPanel
1235 // is too early to do it
1237
1238 std::vector<UIHandlePtr> results;
1239
1240 // Disable mouse actions on Timeline while recording.
1241 if (!mParent->mIsRecording) {
1242 auto xx = state.state.m_x;
1244 auto result = std::make_shared<ScrubbingHandle>( mParent, xx );
1245 result = AssignUIHandlePtr( mHolder, result );
1246 results.push_back( result );
1247 }
1248
1249 return results;
1250}
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
Definition: UIHandle.h:159
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 1228 of file AdornedRulerPanel.cpp.

Referenced by Clicked(), and Hit().


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