Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ClipOverflowButtonHandle Class Referencefinal

#include <ClipOverflowButtonHandle.h>

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

Public Member Functions

 ClipOverflowButtonHandle (const std::shared_ptr< WaveTrack > &track, const std::shared_ptr< WaveTrack::Interval > &clip, std::weak_ptr< TrackPanelCell > cell)
 
- Public Member Functions inherited from HighlitClipButtonHandle
 HighlitClipButtonHandle (ClipButtonId id, std::shared_ptr< WaveTrack > track, std::shared_ptr< WaveTrack::Interval > clip)
 
void Enter (bool forward, AudacityProject *pProject) override
 
void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Cancel (AudacityProject *pProject) override
 
std::shared_ptr< const TrackFindTrack () const override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
virtual void DoDraw (const wxRect &args, wxDC &dc)=0
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
virtual void Enter (bool forward, AudacityProject *pProject)
 
virtual bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape (AudacityProject *pProject) const
 
virtual bool Escape (AudacityProject *pProject)
 
virtual bool HandlesRightClick ()
 Whether the handle has any special right-button handling. More...
 
virtual Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
 
virtual Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
 
virtual HitTestPreview Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0
 
virtual Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
 
virtual Result Cancel (AudacityProject *pProject)=0
 
virtual bool StopsOnKeystroke ()
 
virtual void OnProjectChange (AudacityProject *pProject)
 
virtual std::shared_ptr< const TrackFindTrack () const =0
 
virtual bool IsDragging () const
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 
- 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 Member Functions

Result DoRelease (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override
 
void DoDraw (const wxRect &rect, wxDC &dc) override
 

Private Attributes

std::weak_ptr< TrackPanelCellmCell
 

Additional Inherited Members

- Public Types inherited from UIHandle
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 
static std::shared_ptr< const TrackTrackFromChannel (const std::shared_ptr< const Channel > &pChannel)
 A frequent convenience in the definition of UIHandles. More...
 
- 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 Member Functions inherited from HighlitClipButtonHandle
virtual Result DoRelease (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
 
UIHandle::Result UpdateTrackSelection (const TrackPanelMouseEvent &event, AudacityProject *pProject)
 
UIHandle::Result SelectAt (const TrackPanelMouseEvent &event, AudacityProject *project)
 
- Protected Attributes inherited from HighlitClipButtonHandle
ClipButtonId mButtonId
 
std::shared_ptr< WaveTrackmTrack
 
std::shared_ptr< WaveTrack::IntervalmClip
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description


Audacity: A Digital Audio Editor

ClipOverflowButtonHandle.h

Matthieu Hodgkinson

Definition at line 16 of file ClipOverflowButtonHandle.h.

Constructor & Destructor Documentation

◆ ClipOverflowButtonHandle()

ClipOverflowButtonHandle::ClipOverflowButtonHandle ( const std::shared_ptr< WaveTrack > &  track,
const std::shared_ptr< WaveTrack::Interval > &  clip,
std::weak_ptr< TrackPanelCell cell 
)

Definition at line 39 of file ClipOverflowButtonHandle.cpp.

44 , mCell { std::move(cell) }
45{
46}
std::weak_ptr< TrackPanelCell > mCell

References Overflow.

Member Function Documentation

◆ DoDraw()

void ClipOverflowButtonHandle::DoDraw ( const wxRect &  rect,
wxDC &  dc 
)
overrideprivatevirtual

Implements HighlitClipButtonHandle.

Definition at line 48 of file ClipOverflowButtonHandle.cpp.

49{
50 const ClipInterface& clip = *mClip;
51 ClipButtonDrawingArgs args { rect, clip, dc };
53}
std::shared_ptr< WaveTrack::Interval > mClip
static void DrawOnClip(ClipButtonDrawingArgs &)

References ClipButtonSpecializations< id >::DrawOnClip(), and HighlitClipButtonHandle::mClip.

Here is the call graph for this function:

◆ DoRelease()

UIHandle::Result ClipOverflowButtonHandle::DoRelease ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overrideprivatevirtual

Implements HighlitClipButtonHandle.

Definition at line 55 of file ClipOverflowButtonHandle.cpp.

58{
59 if (const auto cell = mCell.lock())
60 {
61 SelectInterval(*pProject, *mClip);
62 const wxPoint point { event.event.GetPosition() };
63 return cell->DoContextMenu(event.rect, pParent, &point, pProject);
64 }
66}
void SelectInterval(AudacityProject &project, const WaveTrack::Interval &interval)

References mCell, HighlitClipButtonHandle::mClip, TrackPanelMouseEvent::rect, RefreshCode::RefreshNone, and anonymous_namespace{ClipOverflowButtonHandle.cpp}::SelectInterval().

Here is the call graph for this function:

◆ Preview()

HitTestPreview ClipOverflowButtonHandle::Preview ( const TrackPanelMouseState state,
AudacityProject pProject 
)
overrideprivatevirtual

Implements UIHandle.

Definition at line 68 of file ClipOverflowButtonHandle.cpp.

70{
71 return { XO("Click to open clip context menu."), nullptr };
72}
XO("Cut/Copy/Paste")

References XO().

Here is the call graph for this function:

Member Data Documentation

◆ mCell

std::weak_ptr<TrackPanelCell> ClipOverflowButtonHandle::mCell
private

Definition at line 34 of file ClipOverflowButtonHandle.h.

Referenced by DoRelease().


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