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 kItemMinimize = 1 << 8,
40 kItemSyncLock = 1 << 9,
42 kItemEffects = 1 << 11,
43
45 };
46
47 using DrawFunction = void (*)(
49 const wxRect &rect,
50 const Track *maybeNULL
51 );
52
53 unsigned items; // a bitwise OR of values of the enum above
54 int height;
57 };
58
59 using TCPLines = std::vector< TCPLine >;
60
61 // return y value and height
62 AUDACITY_DLL_API
63 std::pair< int, int > CalcItemY( const TCPLines &lines, unsigned iItem );
64
65 AUDACITY_DLL_API
66 void SetTrackInfoFont(wxDC *dc);
67};
68
69#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:73
std::vector< TCPLine > TCPLines
Definition: TrackInfo.h:59
AUDACITY_DLL_API std::pair< int, int > CalcItemY(const TCPLines &lines, unsigned iItem)
Definition: TrackInfo.cpp:57
void(*)(TrackPanelDrawingContext &context, const wxRect &rect, const Track *maybeNULL) DrawFunction
Definition: TrackInfo.h:51
DrawFunction drawFunction
Definition: TrackInfo.h:56
unsigned items
Definition: TrackInfo.h:53