Audacity  3.0.3
LabelTrackVRulerControls.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 LabelTrackVRulerControls.cpp
6 
7 Paul Licameli split from TrackPanel.cpp
8 
9 **********************************************************************/
10 
11 
13 
14 #include "../../../HitTestResult.h"
15 
16 #include "AColor.h"
17 #include "../../../TrackArtist.h"
18 #include "../../../TrackPanelDrawingContext.h"
19 
21 {
22 }
23 
25  TrackPanelDrawingContext &context,
26  const wxRect &rect_, unsigned iPass )
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 }
45 
46 void LabelTrackVRulerControls::UpdateRuler( const wxRect &rect )
47 {
48  // Label tracks do not have a vruler
49  // do nothing
50 }
TrackPanelDrawingContext
Definition: TrackPanelDrawingContext.h:22
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
LabelTrackVRulerControls::~LabelTrackVRulerControls
~LabelTrackVRulerControls()
Definition: LabelTrackVRulerControls.cpp:20
LabelTrackVRulerControls::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: LabelTrackVRulerControls.cpp:24
TrackArtist::PassControls
@ PassControls
Definition: TrackArtist.h:84
TrackVRulerControls::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: TrackVRulerControls.cpp:97
AColor.h
LabelTrackVRulerControls.h
LabelTrackVRulerControls::UpdateRuler
void UpdateRuler(const wxRect &rect) override
Definition: LabelTrackVRulerControls.cpp:46