Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
BackgroundHandle Class Reference
Inheritance diagram for BackgroundHandle:
[legend]
Collaboration diagram for BackgroundHandle:
[legend]

Public Member Functions

 BackgroundHandle ()
 
 BackgroundHandle (BackgroundHandle &&)=default
 
BackgroundHandleoperator= (BackgroundHandle &&)=default
 
virtual ~BackgroundHandle ()
 
std::shared_ptr< const TrackFindTrack () const override
 
Result Click (const TrackPanelMouseEvent &evt, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &, AudacityProject *) override
 
HitTestPreview Preview (const TrackPanelMouseState &, AudacityProject *) override
 
Result Release (const TrackPanelMouseEvent &, AudacityProject *, wxWindow *) override
 
Result Cancel (AudacityProject *) 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 TrackFindTrack () const =0
 
virtual bool IsDragging () const
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 
- 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)
 

Static Public Member Functions

static HitTestPreview HitPreview ()
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 
static std::shared_ptr< const TrackTrackFromChannel (const std::shared_ptr< const Channel > &pChannel)
 A frequent convenience in the definition of UIHandles. More...
 
- 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)
 

Private Member Functions

 BackgroundHandle (const BackgroundHandle &)=delete
 
BackgroundHandleoperator= (const BackgroundHandle &)=delete
 

Additional Inherited Members

- Public Types inherited from UIHandle
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 32 of file BackgroundCell.cpp.

Constructor & Destructor Documentation

◆ BackgroundHandle() [1/3]

BackgroundHandle::BackgroundHandle ( const BackgroundHandle )
privatedelete

◆ BackgroundHandle() [2/3]

BackgroundHandle::BackgroundHandle ( )
inline

Definition at line 38 of file BackgroundCell.cpp.

38{}

◆ BackgroundHandle() [3/3]

BackgroundHandle::BackgroundHandle ( BackgroundHandle &&  )
default

◆ ~BackgroundHandle()

virtual BackgroundHandle::~BackgroundHandle ( )
inlinevirtual

Definition at line 49 of file BackgroundCell.cpp.

50 {}

Member Function Documentation

◆ Cancel()

Result BackgroundHandle::Cancel ( AudacityProject )
inlineoverridevirtual

Implements UIHandle.

Definition at line 87 of file BackgroundCell.cpp.

88 { return RefreshCode::RefreshNone; }

References RefreshCode::RefreshNone.

◆ Click()

Result BackgroundHandle::Click ( const TrackPanelMouseEvent evt,
AudacityProject pProject 
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 55 of file BackgroundCell.cpp.

57 {
58 using namespace RefreshCode;
59 const wxMouseEvent &event = evt.event;
60 // Do not start a drag
61 Result result = Cancelled;
62
63 // AS: If the user clicked outside all tracks, make nothing
64 // selected.
65 if ((event.ButtonDown() || event.ButtonDClick())) {
67 TrackList::Get( *pProject ) );
68 result |= RefreshAll;
69 }
70
71 return result;
72 }
void SelectNone(TrackList &tracks)
static SelectionState & Get(AudacityProject &project)
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:314
unsigned Result
Definition: UIHandle.h:40
Namespace containing an enum 'what to do on a refresh?'.
Definition: RefreshCode.h:16

References Cancelled, TrackPanelMouseEvent::event, SelectionState::Get(), TrackList::Get(), RefreshCode::RefreshAll, and SelectionState::SelectNone().

Here is the call graph for this function:

◆ Drag()

Result BackgroundHandle::Drag ( const TrackPanelMouseEvent ,
AudacityProject  
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 74 of file BackgroundCell.cpp.

76 { return RefreshCode::RefreshNone; }

References RefreshCode::RefreshNone.

◆ FindTrack()

std::shared_ptr< const Track > BackgroundHandle::FindTrack ( ) const
inlineoverridevirtual
Returns
pointer to associated track, if any

Implements UIHandle.

Definition at line 52 of file BackgroundCell.cpp.

53 { return nullptr; }

◆ HitPreview()

static HitTestPreview BackgroundHandle::HitPreview ( )
inlinestatic

Definition at line 43 of file BackgroundCell.cpp.

44 {
45 static wxCursor arrowCursor{ wxCURSOR_ARROW };
46 return { {}, &arrowCursor };
47 }

Referenced by Preview().

Here is the caller graph for this function:

◆ operator=() [1/2]

BackgroundHandle & BackgroundHandle::operator= ( BackgroundHandle &&  )
default

◆ operator=() [2/2]

BackgroundHandle & BackgroundHandle::operator= ( const BackgroundHandle )
privatedelete

◆ Preview()

HitTestPreview BackgroundHandle::Preview ( const TrackPanelMouseState ,
AudacityProject  
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 78 of file BackgroundCell.cpp.

80 { return HitPreview(); }
static HitTestPreview HitPreview()

References HitPreview().

Here is the call graph for this function:

◆ Release()

Result BackgroundHandle::Release ( const TrackPanelMouseEvent ,
AudacityProject ,
wxWindow *   
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 82 of file BackgroundCell.cpp.

85 { return RefreshCode::RefreshNone; }

References RefreshCode::RefreshNone.


The documentation for this class was generated from the following file: