#include <NoteTrackButtonHandle.h>
|
| NoteTrackButtonHandle (const std::shared_ptr< NoteTrack > &pTrack, int channel, const wxRect &rect) |
|
NoteTrackButtonHandle & | operator= (const NoteTrackButtonHandle &)=default |
|
virtual | ~NoteTrackButtonHandle () |
|
std::shared_ptr< NoteTrack > | GetTrack () const |
|
std::shared_ptr< const Track > | FindTrack () const override |
|
int | GetChannel () 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 Track > | FindTrack () const =0 |
|
virtual bool | IsDragging () const |
|
Result | GetChangeHighlight () const |
|
void | SetChangeHighlight (Result val) |
|
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) |
|
Definition at line 21 of file NoteTrackButtonHandle.h.
◆ NoteTrackButtonHandle() [1/3]
◆ NoteTrackButtonHandle() [2/3]
NoteTrackButtonHandle::NoteTrackButtonHandle |
( |
| ) |
|
|
private |
◆ NoteTrackButtonHandle() [3/3]
NoteTrackButtonHandle::NoteTrackButtonHandle |
( |
const std::shared_ptr< NoteTrack > & |
pTrack, |
|
|
int |
channel, |
|
|
const wxRect & |
rect |
|
) |
| |
|
explicit |
◆ ~NoteTrackButtonHandle()
NoteTrackButtonHandle::~NoteTrackButtonHandle |
( |
| ) |
|
|
virtual |
◆ Cancel()
◆ Click()
◆ Drag()
◆ Enter()
◆ FindTrack()
std::shared_ptr< const Track > NoteTrackButtonHandle::FindTrack |
( |
| ) |
const |
|
overridevirtual |
◆ GetChannel()
int NoteTrackButtonHandle::GetChannel |
( |
| ) |
const |
|
inline |
◆ GetTrack()
std::shared_ptr< NoteTrack > NoteTrackButtonHandle::GetTrack |
( |
| ) |
const |
|
inline |
◆ HitTest()
Definition at line 89 of file NoteTrackButtonHandle.cpp.
93{
94 wxRect midiRect;
97 return {};
98 if (midiRect.Contains(state.m_x, state.m_y)) {
100 auto result = std::make_shared<NoteTrackButtonHandle>(
101 pTrack, channel, midiRect );
103 return result;
104 }
105 else
106 return {};
107}
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
static void GetMidiControlsRect(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
References AssignUIHandlePtr(), FindChannelNumber(), NoteTrackControls::GetMidiControlsRect(), and CommonTrackInfo::HideTopItem().
Referenced by NoteTrackControls::HitTest().
◆ Instance()
◆ NeedChangeHighlight()
◆ operator=()
◆ Preview()
◆ Release()
Implements UIHandle.
Definition at line 132 of file NoteTrackButtonHandle.cpp.
134{
136
138 if (!pTrack)
140
141 const wxMouseEvent &event = evt.event;
143 event.Button(wxMOUSE_BTN_RIGHT))) {
144
147 }
149}
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
static TrackList & Get(AudacityProject &project)
Namespace containing an enum 'what to do on a refresh?'.
References Cancelled, TrackPanelMouseEvent::event, ProjectHistory::Get(), TrackList::Get(), LabelClick(), TrackList::Lock(), ProjectHistory::ModifyState(), mpTrack, mRect, RefreshCode::RefreshAll, and RefreshCode::RefreshNone.
◆ mChannel
int NoteTrackButtonHandle::mChannel { -1 } |
|
protected |
◆ mpTrack
std::weak_ptr<NoteTrack> NoteTrackButtonHandle::mpTrack |
|
protected |
◆ mRect
wxRect NoteTrackButtonHandle::mRect {} |
|
protected |
The documentation for this class was generated from the following files: