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 TrackFindTrack () 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 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 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 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 Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 89 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 95 of file WaveTrackAffordanceControls.cpp.

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

◆ ~WaveClipTitleEditHandle()

WaveClipTitleEditHandle::~WaveClipTitleEditHandle ( )
inline

Definition at line 101 of file WaveTrackAffordanceControls.cpp.

102 {
103 }

Member Function Documentation

◆ Cancel()

Result WaveClipTitleEditHandle::Cancel ( AudacityProject project)
inlineoverridevirtual

Implements UIHandle.

Definition at line 141 of file WaveTrackAffordanceControls.cpp.

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

References mHelper, project, and RefreshCode::RefreshAll.

◆ Click()

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

Implements UIHandle.

Definition at line 110 of file WaveTrackAffordanceControls.cpp.

111 {
112 if (mHelper->OnClick(event.event, project))
115 }

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 117 of file WaveTrackAffordanceControls.cpp.

118 {
119 if (mHelper->OnDrag(event.event, project))
122 }

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

◆ FindTrack()

std::shared_ptr< const Track > WaveClipTitleEditHandle::FindTrack ( ) const
inlineoverridevirtual
Returns
pointer to associated track, if any

Implements UIHandle.

Definition at line 105 of file WaveTrackAffordanceControls.cpp.

106 {
107 return mpTrack;
108 }

References mpTrack.

◆ Preview()

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

Implements UIHandle.

Definition at line 124 of file WaveTrackAffordanceControls.cpp.

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

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 134 of file WaveTrackAffordanceControls.cpp.

135 {
136 if (mHelper->OnRelease(event.event, project))
139 }

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

Member Data Documentation

◆ mHelper

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

Definition at line 91 of file WaveTrackAffordanceControls.cpp.

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

◆ mpTrack

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

Definition at line 92 of file WaveTrackAffordanceControls.cpp.

Referenced by FindTrack().


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