1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 03:32:09 +01:00
Files
audacity/src/TrackPanelMouseEvent.h
Paul Licameli d9a91c1431 TrackPanel simplifications; improved cursor handling...
... in cases such as:  dragging an envelope point, then hitting space to play,
which forces the drag to finish early.  If you move the mouse, cursor will
remain "ban", even while the mouse button remains down but no drag is really
happening.
2017-06-16 18:05:08 -04:00

42 lines
935 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
TrackPanelMouseEvent.h
Paul Licameli
**********************************************************************/
#ifndef __AUDACITY_TRACK_PANEL_MOUSE_EVENT__
#define __AUDACITY_TRACK_PANEL_MOUSE_EVENT__
class wxMouseEvent;
class wxRect;
class wxSize;
class TrackPanelCell;
// Augment a mouse event with information about which track panel cell and
// sub-rectangle was hit.
struct TrackPanelMouseEvent
{
TrackPanelMouseEvent
( wxMouseEvent &event_, const wxRect &rect_, const wxSize &whole_,
TrackPanelCell *pCell_ )
: event{ event_ }
, rect{ rect_ }
, whole{ whole_ }
, pCell{ pCell_ }
, steps{ 0 }
{
}
wxMouseEvent &event;
const wxRect ▭
const wxSize &whole;
TrackPanelCell *pCell; // may be NULL
double steps; // for mouse wheel rotation
};
#endif