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

Public Member Functions

 NoteTrackAffordanceHandle (const std::shared_ptr< Track > &track)
 
UIHandle::Result SelectAt (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
- Public Member Functions inherited from AffordanceHandle
void Enter (bool forward, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &mouseState, AudacityProject *pProject) override
 
 AffordanceHandle (const std::shared_ptr< Track > &track)
 
Result Click (const TrackPanelMouseEvent &evt, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
- Public Member Functions inherited from TimeShiftHandle
 TimeShiftHandle (std::shared_ptr< Track > pTrack, bool gripHit)
 
TimeShiftHandleoperator= (TimeShiftHandle &&)=default
 
bool IsGripHit () const
 
virtual ~TimeShiftHandle ()
 
std::shared_ptr< const TrackFindTrack () const override
 
void Enter (bool forward, AudacityProject *) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
Result Cancel (AudacityProject *pProject) override
 
bool StopsOnKeystroke () override
 
bool Clicked () const
 
std::shared_ptr< TrackGetTrack () const
 
- 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)
 

Static Public Member Functions

static UIHandlePtr HitAnywhere (std::weak_ptr< NoteTrackAffordanceHandle > &holder, const std::shared_ptr< Track > &pTrack)
 
- Static Public Member Functions inherited from TimeShiftHandle
static UIHandlePtr HitAnywhere (std::weak_ptr< TimeShiftHandle > &holder, const std::shared_ptr< Track > &pTrack, bool gripHit)
 
static UIHandlePtr HitTest (std::weak_ptr< TimeShiftHandle > &holder, const wxMouseState &state, const wxRect &rect, const std::shared_ptr< Track > &pTrack)
 
- 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)
 

Additional Inherited Members

- Public Types inherited from UIHandle
using Result = unsigned
 
using Cell = TrackPanelCell
 
virtual Result SelectAt (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
 
- Protected Member Functions inherited from TimeShiftHandle
bool WasMoved () const
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description


Audacity: A Digital Audio Editor

NoteTrackAffordanceControls.cpp

Vitaly Sverchinsky

Definition at line 37 of file NoteTrackAffordanceControls.cpp.

Constructor & Destructor Documentation

◆ NoteTrackAffordanceHandle()

NoteTrackAffordanceHandle::NoteTrackAffordanceHandle ( const std::shared_ptr< Track > &  track)
inline

Definition at line 40 of file NoteTrackAffordanceControls.cpp.

40: AffordanceHandle(track) { }
AffordanceHandle(const std::shared_ptr< Track > &track)

Member Function Documentation

◆ HitAnywhere()

static UIHandlePtr NoteTrackAffordanceHandle::HitAnywhere ( std::weak_ptr< NoteTrackAffordanceHandle > &  holder,
const std::shared_ptr< Track > &  pTrack 
)
inlinestatic

Definition at line 42 of file NoteTrackAffordanceControls.cpp.

43 {
44 return AssignUIHandlePtr(holder, std::make_shared<NoteTrackAffordanceHandle>(pTrack));
45 }
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
Definition: UIHandle.h:164

References AssignUIHandlePtr().

Referenced by NoteTrackAffordanceControls::HitTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectAt()

UIHandle::Result NoteTrackAffordanceHandle::SelectAt ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
inlineoverridevirtual

Implements AffordanceHandle.

Definition at line 47 of file NoteTrackAffordanceControls.cpp.

48 {
49 auto& viewInfo = ViewInfo::Get(*pProject);
50 const auto track = TrackList::Get(*pProject).Lock<Track>(GetTrack());
51
53
54 ProjectHistory::Get(*pProject).ModifyState(false);
55
57 }
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
static void SelectTrackLength(ViewInfo &viewInfo, Track &track, bool syncLocked)
bool IsSyncLocked() const
Definition: SyncLock.cpp:44
static SyncLockState & Get(AudacityProject &project)
Definition: SyncLock.cpp:27
std::shared_ptr< Track > GetTrack() const
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:1079
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:314
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References RefreshCode::Cancelled, ProjectHistory::Get(), ViewInfo::Get(), SyncLockState::Get(), TrackList::Get(), TimeShiftHandle::GetTrack(), SyncLockState::IsSyncLocked(), TrackList::Lock(), ProjectHistory::ModifyState(), RefreshCode::RefreshAll, and SelectionState::SelectTrackLength().

Here is the call graph for this function:

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