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

Public Member Functions

 WaveClipTitleEditHandle (const std::shared_ptr< TextEditHelper > &helper, const std::shared_ptr< WaveTrack > pTrack)
 
 ~WaveClipTitleEditHandle ()
 
std::shared_ptr< const ChannelFindChannel () const override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *project) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *project) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *project, wxWindow *) override
 
Result Cancel (AudacityProject *project) override
 
- 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 ChannelFindChannel () 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 Attributes

std::shared_ptr< TextEditHelpermHelper
 
std::shared_ptr< WaveTrackmpTrack
 

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 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 UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 88 of file WaveTrackAffordanceControls.cpp.

Constructor & Destructor Documentation

◆ WaveClipTitleEditHandle()

WaveClipTitleEditHandle::WaveClipTitleEditHandle ( const std::shared_ptr< TextEditHelper > &  helper,
const std::shared_ptr< WaveTrack pTrack 
)
inline

Definition at line 94 of file WaveTrackAffordanceControls.cpp.

96 : mHelper(helper)
97 , mpTrack{ move(pTrack) }
98 { }
std::shared_ptr< TextEditHelper > mHelper
std::shared_ptr< WaveTrack > mpTrack

◆ ~WaveClipTitleEditHandle()

WaveClipTitleEditHandle::~WaveClipTitleEditHandle ( )
inline

Definition at line 100 of file WaveTrackAffordanceControls.cpp.

101 {
102 }

Member Function Documentation

◆ Cancel()

Result WaveClipTitleEditHandle::Cancel ( AudacityProject project)
inlineoverridevirtual

Implements UIHandle.

Definition at line 140 of file WaveTrackAffordanceControls.cpp.

141 {
142 if (mHelper)
143 {
144 mHelper->Cancel(project);
145 mHelper.reset();
146 }
148 }
const auto project

References mHelper, project, and RefreshCode::RefreshAll.

◆ Click()

Result WaveClipTitleEditHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject project 
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 109 of file WaveTrackAffordanceControls.cpp.

110 {
111 if (mHelper->OnClick(event.event, project))
114 }

References TrackPanelMouseEvent::event, mHelper, project, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.

◆ Drag()

Result WaveClipTitleEditHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject project 
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 116 of file WaveTrackAffordanceControls.cpp.

117 {
118 if (mHelper->OnDrag(event.event, project))
121 }

References TrackPanelMouseEvent::event, mHelper, project, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.

◆ FindChannel()

std::shared_ptr< const Channel > WaveClipTitleEditHandle::FindChannel ( ) const
inlineoverridevirtual
Returns
pointer to associated channel, if any

Implements UIHandle.

Definition at line 104 of file WaveTrackAffordanceControls.cpp.

105 {
106 return mpTrack;
107 }

References mpTrack.

◆ Preview()

HitTestPreview WaveClipTitleEditHandle::Preview ( const TrackPanelMouseState state,
AudacityProject pProject 
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 123 of file WaveTrackAffordanceControls.cpp.

124 {
125 static auto ibeamCursor =
126 ::MakeCursor(wxCURSOR_IBEAM, IBeamCursorXpm, 17, 16);
127 return {
128 XO("Click and drag to select text"),
129 ibeamCursor.get()
130 };
131 }
XO("Cut/Copy/Paste")
std::unique_ptr< wxCursor > MakeCursor(int WXUNUSED(CursorId), const char *const pXpm[36], int HotX, int HotY)
Definition: TrackPanel.cpp:188

References MakeCursor(), and XO().

Here is the call graph for this function:

◆ Release()

Result WaveClipTitleEditHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject project,
wxWindow *   
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 133 of file WaveTrackAffordanceControls.cpp.

134 {
135 if (mHelper->OnRelease(event.event, project))
138 }

References TrackPanelMouseEvent::event, mHelper, project, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.

Member Data Documentation

◆ mHelper

std::shared_ptr<TextEditHelper> WaveClipTitleEditHandle::mHelper
private

Definition at line 90 of file WaveTrackAffordanceControls.cpp.

Referenced by Cancel(), Click(), Drag(), and Release().

◆ mpTrack

std::shared_ptr<WaveTrack> WaveClipTitleEditHandle::mpTrack
private

Definition at line 91 of file WaveTrackAffordanceControls.cpp.

Referenced by FindChannel().


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