Audacity  2.2.2
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
BackgroundHandle Class Reference
Inheritance diagram for BackgroundHandle:
UIHandle

Public Member Functions

 BackgroundHandle ()
 
virtual ~BackgroundHandle ()
 
Result Click (const TrackPanelMouseEvent &evt, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &, AudacityProject *) override
 
HitTestPreview Preview (const TrackPanelMouseState &, const 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)
 
virtual bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool Escape ()
 
virtual void DrawExtras (DrawingPass pass, wxDC *dc, const wxRegion &updateRegion, const wxRect &panelRect)
 
virtual bool StopsOnKeystroke ()
 
virtual void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

Static Public Member Functions

static HitTestPreview HitPreview ()
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 25 of file BackgroundCell.cpp.

Constructor & Destructor Documentation

BackgroundHandle::BackgroundHandle ( const BackgroundHandle )
privatedelete
BackgroundHandle::BackgroundHandle ( )
inline

Definition at line 31 of file BackgroundCell.cpp.

31 {}
virtual BackgroundHandle::~BackgroundHandle ( )
inlinevirtual

Definition at line 39 of file BackgroundCell.cpp.

40  {}

Member Function Documentation

Result BackgroundHandle::Cancel ( AudacityProject )
inlineoverridevirtual

Implements UIHandle.

Definition at line 74 of file BackgroundCell.cpp.

References RefreshCode::RefreshNone.

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

Implements UIHandle.

Definition at line 43 of file BackgroundCell.cpp.

References Cancelled, TrackPanelMouseEvent::event, AudacityProject::GetMixerBoard(), AudacityProject::GetSelectionState(), AudacityProject::GetTracks(), RefreshCode::RefreshAll, and SelectionState::SelectNone().

44  {
45  using namespace RefreshCode;
46  const wxMouseEvent &event = evt.event;
47  // Do not start a drag
48  Result result = Cancelled;
49 
50  // AS: If the user clicked outside all tracks, make nothing
51  // selected.
52  if ((event.ButtonDown() || event.ButtonDClick())) {
53  pProject->GetSelectionState().SelectNone
54  ( *pProject->GetTracks(), pProject->GetMixerBoard() );
55  result |= RefreshAll;
56  }
57 
58  return result;
59  }
void SelectNone(TrackList &tracks, MixerBoard *pMixerBoard)
MixerBoard * GetMixerBoard()
Definition: Project.h:516
unsigned Result
Definition: UIHandle.h:37
SelectionState & GetSelectionState()
Definition: Project.h:309
TrackList * GetTracks()
Definition: Project.h:192
Result BackgroundHandle::Drag ( const TrackPanelMouseEvent ,
AudacityProject  
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 62 of file BackgroundCell.cpp.

References RefreshCode::RefreshNone.

static HitTestPreview BackgroundHandle::HitPreview ( )
inlinestatic

Definition at line 33 of file BackgroundCell.cpp.

Referenced by Preview().

34  {
35  static wxCursor arrowCursor{ wxCURSOR_ARROW };
36  return { {}, &arrowCursor };
37  }
BackgroundHandle& BackgroundHandle::operator= ( const BackgroundHandle )
privatedelete
HitTestPreview BackgroundHandle::Preview ( const TrackPanelMouseState ,
const AudacityProject  
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 66 of file BackgroundCell.cpp.

References HitPreview().

67  { return HitPreview(); }
static HitTestPreview HitPreview()
Result BackgroundHandle::Release ( const TrackPanelMouseEvent ,
AudacityProject ,
wxWindow *   
)
inlineoverridevirtual

Implements UIHandle.

Definition at line 70 of file BackgroundCell.cpp.

References RefreshCode::RefreshNone.


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