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 Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
- Public Member Functions inherited from TimeShiftHandle
 TimeShiftHandle (const std::shared_ptr< Track > &pTrack, bool gripHit)
 
TimeShiftHandleoperator= (TimeShiftHandle &&)=default
 
bool IsGripHit () const
 
virtual ~TimeShiftHandle ()
 
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
 
- 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)
 
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 bool DoSlideVertical (ViewInfo &viewInfo, wxCoord xx, ClipMoveState &state, TrackList &trackList, Track &dstTrack, double &desiredSlideAmount)
 
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 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
std::shared_ptr< TrackGetTrack () const
 
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 36 of file NoteTrackAffordanceControls.cpp.

Constructor & Destructor Documentation

◆ NoteTrackAffordanceHandle()

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

Definition at line 39 of file NoteTrackAffordanceControls.cpp.

39: 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 41 of file NoteTrackAffordanceControls.cpp.

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

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 46 of file NoteTrackAffordanceControls.cpp.

47 {
48 auto& viewInfo = ViewInfo::Get(*pProject);
49 const auto& settings = ProjectSettings::Get(*pProject);
50 const auto track = TrackList::Get(*pProject).Lock<Track>(GetTrack());
51
52 SelectionState::SelectTrackLength(viewInfo, *track, settings.IsSyncLocked());
53
54 ProjectHistory::Get(*pProject).ModifyState(false);
55
57 }
static Settings & settings()
Definition: TrackInfo.cpp:87
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
static ProjectSettings & Get(AudacityProject &project)
static void SelectTrackLength(ViewInfo &viewInfo, Track &track, bool syncLocked)
std::shared_ptr< Track > GetTrack() const
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:1603
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:486
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:234

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

Here is the call graph for this function:

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