Audacity  2.2.0
ButtonHandle Class Referenceabstract

#include <ButtonHandle.h>

Inheritance diagram for ButtonHandle:
UIHandle CloseButtonHandle MenuButtonHandle MinimizeButtonHandle MuteButtonHandle SoloButtonHandle

Public Member Functions

std::shared_ptr< TrackGetTrack () const
 
bool IsClicked () const
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
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)
 

Protected Member Functions

 ButtonHandle (const std::shared_ptr< Track > &pTrack, const wxRect &rect)
 
ButtonHandleoperator= (const ButtonHandle &)=default
 
virtual ~ButtonHandle ()
 
virtual Result CommitChanges (const wxMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
 
virtual wxString Tip (const wxMouseState &state) const =0
 
void Enter (bool forward) finaloverride
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) finaloverride
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) finaloverride
 
HitTestPreview Preview (const TrackPanelMouseState &state, const AudacityProject *pProject) finaloverride
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) finaloverride
 
Result Cancel (AudacityProject *pProject) finaloverride
 

Protected Attributes

std::weak_ptr< TrackmpTrack
 
wxRect mRect
 
bool mWasIn { true }
 
bool mIsClicked {}
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Private Member Functions

 ButtonHandle (const ButtonHandle &)=delete
 

Additional Inherited Members

- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Constructor & Destructor Documentation

ButtonHandle::ButtonHandle ( const ButtonHandle )
privatedelete
ButtonHandle::ButtonHandle ( const std::shared_ptr< Track > &  pTrack,
const wxRect &  rect 
)
explicitprotected
ButtonHandle::~ButtonHandle ( )
protectedvirtual

Member Function Documentation

UIHandle::Result ButtonHandle::Cancel ( AudacityProject pProject)
finaloverrideprotectedvirtual

Implements UIHandle.

References RefreshCode::RefreshCell.

UIHandle::Result ButtonHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
finaloverrideprotectedvirtual
virtual Result ButtonHandle::CommitChanges ( const wxMouseEvent &  event,
AudacityProject pProject,
wxWindow *  pParent 
)
protectedpure virtual
void ButtonHandle::Enter ( bool  forward)
finaloverrideprotectedvirtual

Reimplemented from UIHandle.

References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.

bool ButtonHandle::IsClicked ( ) const
inline

References mIsClicked.

ButtonHandle& ButtonHandle::operator= ( const ButtonHandle )
protecteddefault
HitTestPreview ButtonHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
finaloverrideprotectedvirtual

Implements UIHandle.

References TrackPanelMouseState::state.

UIHandle::Result ButtonHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
finaloverrideprotectedvirtual
virtual wxString ButtonHandle::Tip ( const wxMouseState &  state) const
protectedpure virtual

Member Data Documentation

bool ButtonHandle::mIsClicked {}
protected

Referenced by IsClicked().

std::weak_ptr<Track> ButtonHandle::mpTrack
protected

Referenced by GetTrack().

wxRect ButtonHandle::mRect
protected
bool ButtonHandle::mWasIn { true }
protected

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