![]() |
Audacity 3.2.0
|
A UIHandle for a TrackPanel button, such as the Mute and Solo buttons. More...
#include <ButtonHandle.h>
Public Member Functions | |
std::shared_ptr< Track > | GetTrack () const |
bool | IsClicked () const |
![]() | |
virtual | ~UIHandle ()=0 |
virtual void | Enter (bool forward, AudacityProject *pProject) |
virtual bool | HasRotation () const |
virtual bool | Rotate (bool forward) |
virtual bool | HasEscape (AudacityProject *pProject) const |
virtual bool | Escape (AudacityProject *pProject) |
virtual bool | HandlesRightClick () |
Whether the handle has any special right-button handling. More... | |
virtual Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0 |
virtual Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual Result | Cancel (AudacityProject *pProject)=0 |
virtual bool | StopsOnKeystroke () |
virtual void | OnProjectChange (AudacityProject *pProject) |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
![]() | |
virtual | ~TrackPanelDrawable ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
Protected Member Functions | |
ButtonHandle (const std::shared_ptr< Track > &pTrack, const wxRect &rect) | |
ButtonHandle & | operator= (const ButtonHandle &)=default |
virtual | ~ButtonHandle () |
virtual Result | CommitChanges (const wxMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual TranslatableString | Tip (const wxMouseState &state, AudacityProject &project) const =0 |
void | Enter (bool forward, AudacityProject *) final override |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) final override |
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) final override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) final override |
Result | Cancel (AudacityProject *pProject) final override |
Protected Attributes | |
std::weak_ptr< Track > | mpTrack |
wxRect | mRect |
bool | mWasIn { true } |
bool | mIsClicked {} |
![]() | |
Result | mChangeHighlight { 0 } |
Private Member Functions | |
ButtonHandle (const ButtonHandle &)=delete | |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
A UIHandle for a TrackPanel button, such as the Mute and Solo buttons.
Definition at line 25 of file ButtonHandle.h.
|
privatedelete |
|
explicitprotected |
Definition at line 21 of file ButtonHandle.cpp.
|
protectedvirtual |
Definition at line 28 of file ButtonHandle.cpp.
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 101 of file ButtonHandle.cpp.
References RefreshCode::RefreshCell.
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 37 of file ButtonHandle.cpp.
References Cancelled, TrackPanelMouseEvent::event, TrackList::Get(), TrackList::Lock(), mIsClicked, mpTrack, mRect, mWasIn, and RefreshCode::RefreshCell.
|
protectedpure virtual |
Implemented in MuteButtonHandle, SoloButtonHandle, EffectsButtonHandle, SubViewCloseHandle, MinimizeButtonHandle, SelectButtonHandle, CloseButtonHandle, and MenuButtonHandle.
Referenced by Release().
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 60 of file ButtonHandle.cpp.
References Cancelled, TrackPanelMouseEvent::event, TrackList::Get(), TrackList::Lock(), mpTrack, mRect, mWasIn, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.
|
finaloverrideprotectedvirtual |
Reimplemented from UIHandle.
Definition at line 32 of file ButtonHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
inline |
Definition at line 30 of file ButtonHandle.h.
Referenced by TrackInfo::CloseTitleDrawFunction(), SubViewCloseHandle::Draw(), TrackInfo::DrawCloseButton(), anonymous_namespace{PlayableTrackControls.cpp}::EffectsDrawFunction(), TrackInfo::MinimizeSyncLockDrawFunction(), anonymous_namespace{PlayableTrackControls.cpp}::MuteAndSoloDrawFunction(), MuteButtonHandle::Tip(), SoloButtonHandle::Tip(), EffectsButtonHandle::Tip(), MinimizeButtonHandle::Tip(), SelectButtonHandle::Tip(), MenuButtonHandle::Tip(), CloseButtonHandle::Tip(), anonymous_namespace{PlayableTrackControls.cpp}::WideMuteDrawFunction(), and anonymous_namespace{PlayableTrackControls.cpp}::WideSoloDrawFunction().
|
inline |
Definition at line 31 of file ButtonHandle.h.
Referenced by TrackInfo::DrawCloseButton().
|
protecteddefault |
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 75 of file ButtonHandle.cpp.
References project, TrackPanelMouseState::state, and Tip().
|
finaloverrideprotectedvirtual |
Implements UIHandle.
Definition at line 85 of file ButtonHandle.cpp.
References Cancelled, CommitChanges(), TrackPanelMouseEvent::event, TrackList::Get(), TrackList::Lock(), mpTrack, mRect, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.
|
protectedpure virtual |
Implemented in MuteButtonHandle, SoloButtonHandle, EffectsButtonHandle, MinimizeButtonHandle, SelectButtonHandle, MenuButtonHandle, SubViewCloseHandle, and CloseButtonHandle.
Referenced by Preview().
|
protected |
Definition at line 75 of file ButtonHandle.h.
Referenced by Click().
|
protected |
Definition at line 72 of file ButtonHandle.h.
Referenced by Click(), MuteButtonHandle::CommitChanges(), SoloButtonHandle::CommitChanges(), EffectsButtonHandle::CommitChanges(), MinimizeButtonHandle::CommitChanges(), SelectButtonHandle::CommitChanges(), CloseButtonHandle::CommitChanges(), Drag(), and Release().
|
protected |
Definition at line 73 of file ButtonHandle.h.
|
protected |
Definition at line 74 of file ButtonHandle.h.