Audacity  3.0.3
Public Member Functions | Private Member Functions | List of all members
LabelTrackVRulerControls Class Referencefinal

#include <LabelTrackVRulerControls.h>

Inheritance diagram for LabelTrackVRulerControls:
[legend]
Collaboration diagram for LabelTrackVRulerControls:
[legend]

Public Member Functions

 LabelTrackVRulerControls (const std::shared_ptr< TrackView > &pTrackView)
 
 ~LabelTrackVRulerControls ()
 
- Public Member Functions inherited from TrackVRulerControls
 TrackVRulerControls (const std::shared_ptr< TrackView > &pTrackView)
 
virtual ~TrackVRulerControls ()=0
 
std::vector< UIHandlePtrHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject) override
 
- Public Member Functions inherited from CommonTrackPanelCell
 CommonTrackPanelCell ()
 
virtual ~CommonTrackPanelCell ()=0
 
HitTestPreview DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override
 
std::shared_ptr< TrackFindTrack ()
 
std::shared_ptr< const TrackFindTrack () const
 
virtual std::vector< MenuItemGetMenuItems (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 &) PROHIBITED
 
TrackPanelCelloperator= (const TrackPanelCell &) PROHIBITED
 
virtual ~TrackPanelCell ()=0
 
virtual std::shared_ptr< TrackPanelCellContextMenuDelegate ()
 
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
 

Private Member Functions

 LabelTrackVRulerControls (const LabelTrackVRulerControls &)=delete
 
LabelTrackVRulerControlsoperator= (const LabelTrackVRulerControls &)=delete
 
void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
 
void UpdateRuler (const wxRect &rect) override
 

Additional Inherited Members

- Public Types inherited from CommonTrackPanelCell
using Hook = std::function< unsigned(const TrackPanelMouseEvent &evt, AudacityProject *pProject) >
 
- Static Public Member Functions inherited from TrackVRulerControls
static TrackVRulerControlsGet (TrackView &)
 
static const TrackVRulerControlsGet (const TrackView &)
 
static void DrawZooming (TrackPanelDrawingContext &context, const wxRect &rect, int zoomStart, int zoomEnd)
 
static wxRect ZoomingArea (const wxRect &rect, const wxRect &panelRect)
 
- Static Public Member Functions inherited from CommonTrackPanelCell
static Hook InstallMouseWheelHook (const Hook &hook)
 
- 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 TrackVRulerControls
std::shared_ptr< TrackDoFindTrack () override
 
void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
 
wxRect DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) override
 
TrackGetTrack () const
 
- Protected Member Functions inherited from CommonTrackPanelCell
unsigned DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) override
 
unsigned HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
- Protected Attributes inherited from TrackVRulerControls
std::weak_ptr< TrackViewmwTrackView
 

Detailed Description

Definition at line 18 of file LabelTrackVRulerControls.h.

Constructor & Destructor Documentation

◆ LabelTrackVRulerControls() [1/2]

LabelTrackVRulerControls::LabelTrackVRulerControls ( const LabelTrackVRulerControls )
privatedelete

◆ LabelTrackVRulerControls() [2/2]

LabelTrackVRulerControls::LabelTrackVRulerControls ( const std::shared_ptr< TrackView > &  pTrackView)
inlineexplicit

Definition at line 26 of file LabelTrackVRulerControls.h.

27  : TrackVRulerControls( pTrackView ) {}

◆ ~LabelTrackVRulerControls()

LabelTrackVRulerControls::~LabelTrackVRulerControls ( )

Definition at line 20 of file LabelTrackVRulerControls.cpp.

21 {
22 }

Member Function Documentation

◆ Draw()

void LabelTrackVRulerControls::Draw ( TrackPanelDrawingContext context,
const wxRect &  rect,
unsigned  iPass 
)
overrideprivatevirtual

Reimplemented from TrackPanelDrawable.

Definition at line 24 of file LabelTrackVRulerControls.cpp.

27 {
28  TrackVRulerControls::Draw( context, rect_, iPass );
29 
30  // Draw on a later pass because the bevel overpaints one pixel
31  // out of bounds on the bottom
32 
33  if ( iPass == TrackArtist::PassControls ) {
34  auto rect = rect_;
35  --rect.width;
36  --rect.height;
37 
38  auto dc = &context.dc;
39  wxRect bev = rect;
40  bev.Inflate(-1, 0);
41  bev.width += 1;
42  AColor::BevelTrackInfo(*dc, true, bev);
43  }
44 }

References AColor::BevelTrackInfo(), TrackPanelDrawingContext::dc, TrackVRulerControls::Draw(), and TrackArtist::PassControls.

Here is the call graph for this function:

◆ operator=()

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

◆ UpdateRuler()

void LabelTrackVRulerControls::UpdateRuler ( const wxRect &  rect)
overrideprivatevirtual

Implements TrackVRulerControls.

Definition at line 46 of file LabelTrackVRulerControls.cpp.

47 {
48  // Label tracks do not have a vruler
49  // do nothing
50 }

The documentation for this class was generated from the following files:
TrackVRulerControls::TrackVRulerControls
TrackVRulerControls(const std::shared_ptr< TrackView > &pTrackView)
Definition: TrackVRulerControls.cpp:26
TrackPanelDrawingContext::dc
wxDC & dc
Definition: TrackPanelDrawingContext.h:23
AColor::BevelTrackInfo
static void BevelTrackInfo(wxDC &dc, bool up, const wxRect &r, bool highlight=false)
Definition: AColor.cpp:248
TrackArtist::PassControls
@ PassControls
Definition: TrackArtist.h:84
TrackVRulerControls::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: TrackVRulerControls.cpp:97