| 1 |
/* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 |
/*!******************************************************************** |
| 3 |
|
| 4 |
Audacity: A Digital Audio Editor |
| 5 |
|
| 6 |
ClipOverflowButtonHandle.h |
| 7 |
|
| 8 |
Matthieu Hodgkinson |
| 9 |
|
| 10 |
**********************************************************************/ |
| 11 |
#pragma once |
| 12 |
|
| 13 |
#include "HighlitClipButtonHandle.h" |
| 14 |
#include <optional> |
| 15 |
|
| 16 |
class ClipOverflowButtonHandle final : public HighlitClipButtonHandle |
| 17 |
{ |
| 18 |
public: |
| 19 |
ClipOverflowButtonHandle( |
| 20 |
const std::shared_ptr<WaveTrack>& track, |
| 21 |
const std::shared_ptr<WaveTrack::Interval>& clip, |
| 22 |
std::weak_ptr<TrackPanelCell> cell); |
| 23 |
|
| 24 |
private: |
| 25 |
Result DoRelease( |
| 26 |
const TrackPanelMouseEvent& event, AudacityProject* pProject, |
| 27 |
wxWindow* pParent) override; |
| 28 |
|
| 29 |
HitTestPreview Preview( |
| 30 |
const TrackPanelMouseState& state, AudacityProject* pProject) override; |
| 31 |
|
| 32 |
void DoDraw(const wxRect& rect, wxDC& dc) override; |
| 33 |
|
| 34 |
std::weak_ptr<TrackPanelCell> mCell; |
| 35 |
}; |