1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00
audacity/src/TrackPanelResizerCell.h
Panagiotis Vasilopoulos 44968d3ac3
Rebranding: Replace 'Audacity: A Digital Audio Editor' in source files (#248)
List of commands that were executed in the `src directory`:
* sed -i 's/Audacity: A Digital Audio Editor/Tenacity/g' *.h
* sed -i 's/Audacity: A Digital Audio Editor/Tenacity/g' *.cpp

Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
2021-07-13 09:30:42 +00:00

54 lines
1.4 KiB
C++

/**********************************************************************
Tenacity
TrackPanelResizerCell.h
Paul Licameli split from TrackPanel.cpp
**********************************************************************/
#ifndef __AUDACITY_TRACK_PANEL_RESIZER_CELL__
#define __AUDACITY_TRACK_PANEL_RESIZER_CELL__
#include "ClientData.h" // to inherit
#include "tracks/ui/CommonTrackPanelCell.h" // to inherit
class Track;
class TrackPanelResizeHandle;
class TrackPanelResizerCell
: public CommonTrackPanelCell
, public std::enable_shared_from_this< TrackPanelResizerCell >
, public ClientData::Base
{
TrackPanelResizerCell(const TrackPanelResizerCell&) = delete;
TrackPanelResizerCell &operator= (const TrackPanelResizerCell&) = delete;
public:
static TrackPanelResizerCell &Get( Track &track );
static const TrackPanelResizerCell &Get( const Track &track );
explicit
TrackPanelResizerCell( const std::shared_ptr<Track> &pTrack );
std::vector<UIHandlePtr> HitTest
(const TrackPanelMouseState &, const AudacityProject *) override;
protected:
std::shared_ptr<Track> DoFindTrack() override;
private:
// back-pointer is weak to break a cycle
std::weak_ptr<Track> mwTrack;
// TrackPanelDrawable implementation
void Draw(
TrackPanelDrawingContext &context,
const wxRect &rect, unsigned iPass ) override;
std::weak_ptr<TrackPanelResizeHandle> mResizeHandle;
};
#endif