Audacity  2.2.0
TrackPanelMouseEvent.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 TrackPanelMouseEvent.h
6 
7 Paul Licameli
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_TRACK_PANEL_MOUSE_EVENT__
12 #define __AUDACITY_TRACK_PANEL_MOUSE_EVENT__
13 
14 class wxMouseEvent;
15 class wxMouseState;
16 class wxRect;
17 class wxSize;
18 class TrackPanelCell;
19 #include "MemoryX.h"
20 
21 // Augment a mouse state with information about which track panel cell and
22 // sub-rectangle was hit.
24 {
26  ( wxMouseState &state_, const wxRect &rect_,
27  const std::shared_ptr<TrackPanelCell> &pCell_ )
28  : state{ state_ }
29  , rect{ rect_ }
30  , pCell{ pCell_ }
31  {
32  }
33 
34  wxMouseState &state;
35  const wxRect &rect;
36  std::shared_ptr<TrackPanelCell> pCell; // may be NULL
37 };
38 
39 // Augment a mouse event with information about which track panel cell and
40 // sub-rectangle was hit.
42 {
44  ( wxMouseEvent &event_, const wxRect &rect_, const wxSize &whole_,
45  const std::shared_ptr<TrackPanelCell> &pCell_ )
46  : event{ event_ }
47  , rect{ rect_ }
48  , whole{ whole_ }
49  , pCell{ pCell_ }
50  , steps{ 0 }
51  {
52  }
53 
54  wxMouseEvent &event;
55  const wxRect &rect;
56  const wxSize &whole;
57  std::shared_ptr<TrackPanelCell> pCell; // may be NULL
58  double steps; // for mouse wheel rotation
59 };
60 
61 #endif
const wxSize & whole
Definition: TrackPanelMouseEvent.h:56
wxMouseEvent & event
Definition: TrackPanelMouseEvent.h:54
const wxRect & rect
Definition: TrackPanelMouseEvent.h:55
Definition: TrackPanelMouseEvent.h:23
wxMouseState & state
Definition: TrackPanelMouseEvent.h:34
TrackPanelMouseEvent(wxMouseEvent &event_, const wxRect &rect_, const wxSize &whole_, const std::shared_ptr< TrackPanelCell > &pCell_)
Definition: TrackPanelMouseEvent.h:44
const wxRect & rect
Definition: TrackPanelMouseEvent.h:35
Definition: TrackPanelCell.h:32
std::shared_ptr< TrackPanelCell > pCell
Definition: TrackPanelMouseEvent.h:57
std::shared_ptr< TrackPanelCell > pCell
Definition: TrackPanelMouseEvent.h:36
double steps
Definition: TrackPanelMouseEvent.h:58
TrackPanelMouseState(wxMouseState &state_, const wxRect &rect_, const std::shared_ptr< TrackPanelCell > &pCell_)
Definition: TrackPanelMouseEvent.h:26
Definition: TrackPanelMouseEvent.h:41