Audacity 3.2.0
|
#include <NoteTrackAffordanceControls.h>
Public Member Functions | |
NoteTrackAffordanceControls (const std::shared_ptr< Track > &pTrack) | |
std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *pProject) override |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
bool | IsSelected () const |
Public Member Functions inherited from CommonTrackCell | |
CommonTrackCell (const std::shared_ptr< Track > &pTrack) | |
Construct from a track. More... | |
~CommonTrackCell () | |
std::shared_ptr< Track > | DoFindTrack () override |
void | Reparent (const std::shared_ptr< Track > &parent) override |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
Public Member Functions inherited from CommonTrackPanelCell | |
CommonTrackPanelCell () | |
virtual | ~CommonTrackPanelCell ()=0 |
HitTestPreview | DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override |
std::shared_ptr< Track > | FindTrack () |
std::shared_ptr< const Track > | FindTrack () const |
virtual std::vector< MenuItem > | GetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject) |
Return a list of items for DoContextMenu() (empties for separators) More... | |
Public Member Functions inherited from TrackPanelCell | |
TrackPanelCell ()=default | |
TrackPanelCell (const TrackPanelCell &)=delete | |
TrackPanelCell & | operator= (const TrackPanelCell &)=delete |
virtual | ~TrackPanelCell ()=0 |
virtual HitTestPreview | DefaultPreview (const TrackPanelMouseState &state, const AudacityProject *pProject) |
virtual std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *pProject)=0 |
virtual unsigned | HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) |
virtual std::shared_ptr< TrackPanelCell > | ContextMenuDelegate () |
virtual unsigned | DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) |
virtual unsigned | CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | KeyUp (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project) |
virtual unsigned | LoseFocus (AudacityProject *project) |
Public Member Functions inherited from TrackPanelNode | |
TrackPanelNode () | |
virtual | ~TrackPanelNode ()=0 |
Public Member Functions inherited from TrackPanelDrawable | |
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) |
Public Member Functions inherited from TrackAttachment | |
virtual | ~TrackAttachment () |
virtual void | CopyTo (Track &track) const |
Copy state, for undo/redo purposes. More... | |
virtual void | Reparent (const std::shared_ptr< Track > &parent) |
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it. More... | |
virtual void | WriteXMLAttributes (XMLWriter &) const |
Serialize persistent attributes. More... | |
virtual bool | HandleXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
Deserialize an attribute, returning true if recognized. More... | |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Private Attributes | |
std::weak_ptr< NoteTrackAffordanceHandle > | mAffordanceHandle |
std::weak_ptr< SelectHandle > | mSelectHandle |
Additional Inherited Members | |
Static Public Member Functions inherited from TrackPanelDrawable | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Protected Member Functions inherited from CommonTrackPanelCell | |
virtual std::shared_ptr< Track > | DoFindTrack ()=0 |
unsigned | DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) override |
unsigned | HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Definition at line 19 of file NoteTrackAffordanceControls.h.
NoteTrackAffordanceControls::NoteTrackAffordanceControls | ( | const std::shared_ptr< Track > & | pTrack | ) |
Definition at line 60 of file NoteTrackAffordanceControls.cpp.
|
overridevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 108 of file NoteTrackAffordanceControls.cpp.
References ThemeBase::Colour(), TrackPanelDrawingContext::dc, TrackArt::DrawBackgroundWithSelection(), TrackArt::DrawClipAffordance(), TrackArt::DrawClipTitle(), CommonTrackPanelCell::FindTrack(), TrackArtist::Get(), IsSelected(), AColor::labelSelectedBrush, AColor::labelUnselectedBrush, TrackPanelDrawingContext::lastState, TrackArtist::PassBackground, and theTheme.
|
overridevirtual |
Implements TrackPanelCell.
Definition at line 66 of file NoteTrackAffordanceControls.cpp.
References CommonTrackPanelCell::FindTrack(), ViewInfo::Get(), PendingTracks::Get(), ProjectSettings::Get(), ChannelView::Get(), NoteTrackAffordanceHandle::HitAnywhere(), SelectHandle::HitTest(), mAffordanceHandle, mSelectHandle, ToolCodes::multiTool, TrackPanelMouseState::rect, ToolCodes::selectTool, settings(), TrackPanelMouseState::state, and PendingTracks::SubstitutePendingChangedTrack().
bool NoteTrackAffordanceControls::IsSelected | ( | ) | const |
Definition at line 149 of file NoteTrackAffordanceControls.cpp.
References mAffordanceHandle.
Referenced by Draw().
|
private |
Definition at line 21 of file NoteTrackAffordanceControls.h.
Referenced by HitTest(), and IsSelected().
|
private |
Definition at line 22 of file NoteTrackAffordanceControls.h.
Referenced by HitTest().