Audacity 3.2.0
TrackPanelResizerCell.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 TrackPanelResizerCell.h
6
7 Paul Licameli split from TrackPanel.cpp
8
9 **********************************************************************/
10
11#ifndef __AUDACITY_TRACK_PANEL_RESIZER_CELL__
12#define __AUDACITY_TRACK_PANEL_RESIZER_CELL__
13
14#include "ClientData.h" // to inherit
15#include "tracks/ui/CommonTrackPanelCell.h" // to inherit
16
17class Channel;
19
21 : public CommonChannelCell
22 , public std::enable_shared_from_this< TrackPanelResizerCell >
23{
26public:
27
31 static TrackPanelResizerCell &Get(Channel &channel);
32 static const TrackPanelResizerCell &Get(const Channel &channel);
33
34 std::vector<UIHandlePtr> HitTest
35 (const TrackPanelMouseState &, const AudacityProject *) override;
36
37 explicit TrackPanelResizerCell(const std::shared_ptr<Channel> &channel);
38
39private:
44 ChannelGroup &group, size_t iChannel);
45
46 // TrackPanelDrawable implementation
47 void Draw(
49 const wxRect &rect, unsigned iPass ) override;
50
51 std::weak_ptr<TrackPanelResizeHandle> mResizeHandle;
52};
53
54#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Constructed from one channel, but changes height of all channels in a track.
std::weak_ptr< TrackPanelResizeHandle > mResizeHandle
TrackPanelResizerCell(const TrackPanelResizerCell &)=delete
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
static TrackPanelResizerCell & Get(Channel &channel)
TrackPanelResizerCell & operator=(const TrackPanelResizerCell &)=delete
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &, const AudacityProject *) override
static TrackPanelResizerCell & GetFromChannelGroup(ChannelGroup &group, size_t iChannel)