Audacity 3.2.0
|
Class representing the background of a Track. It provides the hit test function that tells us what was hit. More...
#include <BackgroundCell.h>
Public Member Functions | |
BackgroundCell (AudacityProject *pProject) | |
virtual | ~BackgroundCell () |
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 ClientData::Base | |
virtual | ~Base () |
Static Public Member Functions | |
static BackgroundCell & | Get (AudacityProject &project) |
static const BackgroundCell & | Get (const AudacityProject &project) |
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) |
Public Attributes | |
std::weak_ptr< ZoomHandle > | mZoomHandle |
Protected Member Functions | |
std::vector< UIHandlePtr > | HitTest (const TrackPanelMouseState &state, const AudacityProject *) override |
std::shared_ptr< Track > | DoFindTrack () override |
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 |
Private Member Functions | |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override |
std::vector< MenuItem > | GetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject) override |
Return a list of items for DoContextMenu() (empties for separators) More... | |
Private Attributes | |
AudacityProject * | mpProject |
std::weak_ptr< BackgroundHandle > | mHandle |
Class representing the background of a Track. It provides the hit test function that tells us what was hit.
Definition at line 25 of file BackgroundCell.h.
|
inlineexplicit |
Definition at line 34 of file BackgroundCell.h.
|
virtual |
Definition at line 109 of file BackgroundCell.cpp.
|
overrideprotectedvirtual |
Implements CommonTrackPanelCell.
Definition at line 121 of file BackgroundCell.cpp.
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 126 of file BackgroundCell.cpp.
References TrackPanelDrawingContext::dc, TrackArtist::PassBackground, and AColor::TrackPanelBackground().
|
overrideprivatevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 138 of file BackgroundCell.cpp.
References kTopMargin, and TrackArtist::PassBackground.
|
static |
Definition at line 99 of file BackgroundCell.cpp.
Referenced by Get(), and CommonChannelView::HitTest().
|
static |
Definition at line 104 of file BackgroundCell.cpp.
References Get(), and project.
|
overrideprivatevirtual |
Return a list of items for DoContextMenu() (empties for separators)
If the vector is empty (as in the default), there is no context menu.
Commands are invoked with temporary selection fields of CommandContext set to a point selected region at the mouse pick, and the cell's track.
A function may be given, but if it is null, then the command can be found by name in the CommandManager.
An item in the list with no command name marks a menu separator.
The menu item is enabled only if it contains a true flag, but if looked up in the command manager, it must also satisfy the command manager's conditions.
Reimplemented from CommonTrackPanelCell.
Definition at line 155 of file BackgroundCell.cpp.
References XO().
|
overrideprotectedvirtual |
Implements TrackPanelCell.
Definition at line 113 of file BackgroundCell.cpp.
References AssignUIHandlePtr(), and mHandle.
|
private |
Definition at line 63 of file BackgroundCell.h.
Referenced by HitTest().
|
private |
Definition at line 61 of file BackgroundCell.h.
|
mutable |
Definition at line 67 of file BackgroundCell.h.
Referenced by CommonChannelView::HitTest().