#include <PlayableTrackButtonHandles.h>
|
| | SoloButtonHandle (const std::shared_ptr< Track > &pTrack, const wxRect &rect) |
| |
| SoloButtonHandle & | operator= (const SoloButtonHandle &)=default |
| |
| virtual | ~SoloButtonHandle () |
| |
Public Member Functions inherited from ButtonHandle |
| std::shared_ptr< Track > | GetTrack () const |
| |
| bool | IsDragging () const override |
| |
Public Member Functions inherited from UIHandle |
| 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) |
| |
| virtual std::shared_ptr< const Track > | FindTrack () const =0 |
| |
| virtual bool | IsDragging () const |
| |
| 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) |
| |
|
| Result | CommitChanges (const wxMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
| |
| TranslatableString | Tip (const wxMouseState &state, AudacityProject &) const override |
| |
| bool | StopsOnKeystroke () override |
| |
Protected Member Functions inherited from ButtonHandle |
| | ButtonHandle (const std::shared_ptr< Track > &pTrack, const wxRect &rect) |
| |
| ButtonHandle & | operator= (const ButtonHandle &)=default |
| |
| virtual | ~ButtonHandle () |
| |
| std::shared_ptr< const Track > | FindTrack () const override |
| |
| 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 |
| |
◆ SoloButtonHandle() [1/2]
◆ SoloButtonHandle() [2/2]
| SoloButtonHandle::SoloButtonHandle |
( |
const std::shared_ptr< Track > & |
pTrack, |
|
|
const wxRect & |
rect |
|
) |
| |
|
explicit |
◆ ~SoloButtonHandle()
| SoloButtonHandle::~SoloButtonHandle |
( |
| ) |
|
|
virtual |
◆ CommitChanges()
◆ HitTest()
Definition at line 114 of file PlayableTrackButtonHandles.cpp.
118{
119 wxRect buttonRect;
120 if ( pTrack )
122 pTrack.get());
123
125 return {};
126
127 if ( pTrack && buttonRect.Contains(state.m_x, state.m_y) ) {
128 auto result = std::make_shared<SoloButtonHandle>( pTrack, buttonRect );
130 return result;
131 }
132 else
133 return {};
134}
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
static void GetMuteSoloRect(const wxRect &rect, wxRect &dest, bool solo, const Track *pTrack)
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
References AssignUIHandlePtr(), PlayableTrackControls::GetMuteSoloRect(), and CommonTrackInfo::HideTopItem().
Referenced by NoteTrackControls::HitTest(), and WaveTrackControls::HitTest().
◆ operator=()
◆ StopsOnKeystroke()
| bool SoloButtonHandle::StopsOnKeystroke |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ Tip()
Implements ButtonHandle.
Definition at line 100 of file PlayableTrackButtonHandles.cpp.
102{
104 auto focused =
106 if (!focused)
108
111 return commandManager.DescribeCommandsAndShortcuts( &command, 1u );
112}
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
static CommandManager & Get(AudacityProject &project)
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
References TrackFocus::Get(), CommandManager::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), ButtonHandle::GetTrack(), name, project, wxT(), and XO().
The documentation for this class was generated from the following files: