Audacity 3.2.0
TrackInfo.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5TrackInfo.h
6
7Paul Licameli split from TrackPanel.cpp
8
9**********************************************************************/
10
11#ifndef __AUDACITY_TRACK_INFO__
12#define __AUDACITY_TRACK_INFO__
13
14
15
16
17#include <vector>
18
19class wxDC;
20class wxRect;
21class wxWindow;
22class Track;
24class UIHandle;
25
26namespace TrackInfo
27{
28 struct TCPLine {
29 enum : unsigned {
30 // The sequence is not significant, just keep bits distinct
33 kItemMute = 1 << 2,
34 kItemSolo = 1 << 3,
35 kItemGain = 1 << 4,
36 kItemPan = 1 << 5,
37 kItemVelocity = 1 << 6,
39 kItemSyncLock = 1 << 9,
41 kItemEffects = 1 << 11,
42
44 };
45
46 using DrawFunction = void (*)(
48 const wxRect &rect,
49 const Track *maybeNULL
50 );
51
52 unsigned items; // a bitwise OR of values of the enum above
53 int height;
56 };
57
58 using TCPLines = std::vector< TCPLine >;
59
60 // return y value and height
61 AUDACITY_DLL_API
62 std::pair< int, int > CalcItemY( const TCPLines &lines, unsigned iItem );
63
64 AUDACITY_DLL_API
65 void SetTrackInfoFont(wxDC *dc);
66};
67
68#endif
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110
Short-lived drawing and event-handling object associated with a TrackPanelCell.
Definition: UIHandle.h:37
AUDACITY_DLL_API void SetTrackInfoFont(wxDC *dc)
Definition: TrackInfo.cpp:77
std::vector< TCPLine > TCPLines
Definition: TrackInfo.h:58
AUDACITY_DLL_API std::pair< int, int > CalcItemY(const TCPLines &lines, unsigned iItem)
Definition: TrackInfo.cpp:61
void(*)(TrackPanelDrawingContext &context, const wxRect &rect, const Track *maybeNULL) DrawFunction
Definition: TrackInfo.h:50
DrawFunction drawFunction
Definition: TrackInfo.h:55
unsigned items
Definition: TrackInfo.h:52