16#include "../../../../HitTestResult.h"
18#include "../../../../TrackPanelMouseEvent.h"
21#include "../../../../RefreshCode.h"
22#include "../../../ui/CommonTrackInfo.h"
27(
const std::shared_ptr<NoteTrack> &pTrack,
28 int channel,
const wxRect &rect )
60 wxASSERT_MSG(rect.width % 4 == 0,
"Midi channel control rect width must be divisible by 4");
61 wxASSERT_MSG(rect.height % 4 == 0,
"Midi channel control rect height must be divisible by 4");
63 auto cellWidth = rect.width / 4;
64 auto cellHeight = rect.height / 4;
66 int col = (mx - rect.x) / cellWidth;
67 int row = (my - rect.y) / cellHeight;
78 NoteTrack &track,
const wxRect &rect,
int mx,
int my,
bool right)
90 (std::weak_ptr<NoteTrackButtonHandle> &holder,
91 const wxMouseState &state,
const wxRect &rect,
92 const std::shared_ptr<NoteTrack> &pTrack)
98 if (midiRect.Contains(state.m_x, state.m_y)) {
100 auto result = std::make_shared<NoteTrackButtonHandle>(
101 pTrack, channel, midiRect );
141 const wxMouseEvent &
event = evt.
event;
143 event.Button(wxMOUSE_BTN_RIGHT))) {
std::shared_ptr< UIHandle > UIHandlePtr
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
static void GetMidiControlsRect(const wxRect &rect, wxRect &dest)
A Track that is used for Midi notes. (Somewhat old code).
void ToggleVisibleChan(int c)
void SoloVisibleChan(int c)
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)
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
Namespace containing an enum 'what to do on a refresh?'.