Audacity 3.2.0
CommonTrackInfo.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5CommonTrackInfo.h
6
7Paul Licameli split from TrackInfo.h
8
9**********************************************************************/
10#ifndef __AUDACITY_COMMON_TRACK_INFO__
11#define __AUDACITY_COMMON_TRACK_INFO__
12
13#include "TrackInfo.h"
14
15class Channel;
16class wxPoint;
17
18namespace CommonTrackInfo
19{
22
23 constexpr static auto Margin = 4;
24 constexpr static auto ToolButtonSize = 16;
25
26 AUDACITY_DLL_API
27 unsigned MinimumTrackHeight();
28
29 AUDACITY_DLL_API
30 unsigned DefaultTrackHeight( const TCPLines &topLines );
31
32 AUDACITY_DLL_API
33 void DrawItems
34 ( TrackPanelDrawingContext &context,
35 const wxRect &rect, const Track &track );
36
37 AUDACITY_DLL_API
38 void DrawItems
39 ( TrackPanelDrawingContext &context,
40 const wxRect &rect, const Track *pTrack,
41 const std::vector<TCPLine> &topLines,
42 const std::vector<TCPLine> &bottomLines );
43
44 AUDACITY_DLL_API
45 void DrawCloseButton(TrackPanelDrawingContext &context, const wxRect &bev,
46 const Channel *pChannel, UIHandle *target);
47
48 AUDACITY_DLL_API
50 ( TrackPanelDrawingContext &context,
51 const wxRect &rect, const Track *pTrack );
52
53 AUDACITY_DLL_API
55 ( TrackPanelDrawingContext &context,
56 const wxRect &rect, const Track *pTrack );
57
58
59 AUDACITY_DLL_API
60 void GetCloseBoxHorizontalBounds( const wxRect & rect, wxRect &dest );
61 AUDACITY_DLL_API
62 void GetCloseBoxRect(const wxRect & rect, wxRect &dest);
63
64 AUDACITY_DLL_API
65 void GetTrackTitleHorizontalBounds( const wxRect & rect, wxRect &dest );
66 AUDACITY_DLL_API
67 void GetTrackTitleRect(const wxRect & rect, wxRect &dest);
68
69 AUDACITY_DLL_API
70 void GetSliderHorizontalBounds( const wxRect &rect, wxRect &dest );
71
72 AUDACITY_DLL_API
73 void GetTrackMenuButtonBounds(const wxRect &rect, wxRect &dest);
74 AUDACITY_DLL_API
75 void GetTrackMenuButtonRect(const wxRect &rect, wxRect &dest);
76
77 AUDACITY_DLL_API
78 void GetMinimizeHorizontalBounds( const wxRect &rect, wxRect &dest );
79 AUDACITY_DLL_API
80 void GetMinimizeRect(const wxRect & rect, wxRect &dest);
81
82 AUDACITY_DLL_API
83 void GetSyncLockHorizontalBounds( const wxRect &rect, wxRect &dest );
84 AUDACITY_DLL_API
85 void GetSyncLockIconRect(const wxRect & rect, wxRect &dest);
86
87 AUDACITY_DLL_API
88 bool HideTopItem( const wxRect &rect, const wxRect &subRect,
89 int allowance = 0 );
90
91 // To help subclasses define GetTCPLines
92 AUDACITY_DLL_API
93 const TCPLines& StaticTCPLines();
94};
95
96#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
Functions for drawing the track control panel, which is shown to the side of a track It has the menus...
AUDACITY_DLL_API void GetSliderHorizontalBounds(const wxRect &rect, wxRect &dest)
static constexpr auto ToolButtonSize
AUDACITY_DLL_API void GetSyncLockIconRect(const wxRect &rect, wxRect &dest)
static constexpr auto Margin
AUDACITY_DLL_API void GetCloseBoxHorizontalBounds(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void CloseTitleDrawFunction(TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
AUDACITY_DLL_API void GetTrackTitleRect(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void GetSyncLockHorizontalBounds(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void SyncLockDrawFunction(TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
AUDACITY_DLL_API void DrawItems(TrackPanelDrawingContext &context, const wxRect &rect, const Track &track)
AUDACITY_DLL_API void GetTrackMenuButtonBounds(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void GetCloseBoxRect(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void GetTrackTitleHorizontalBounds(const wxRect &rect, wxRect &dest)
TrackInfo::TCPLines TCPLines
AUDACITY_DLL_API unsigned DefaultTrackHeight(const TCPLines &topLines)
AUDACITY_DLL_API void DrawCloseButton(TrackPanelDrawingContext &context, const wxRect &bev, const Channel *pChannel, UIHandle *target)
AUDACITY_DLL_API void GetTrackMenuButtonRect(const wxRect &rect, wxRect &dest)
TrackInfo::TCPLine TCPLine
AUDACITY_DLL_API void GetMinimizeRect(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API void GetMinimizeHorizontalBounds(const wxRect &rect, wxRect &dest)
AUDACITY_DLL_API const TCPLines & StaticTCPLines()
AUDACITY_DLL_API unsigned MinimumTrackHeight()
AUDACITY_DLL_API bool HideTopItem(const wxRect &rect, const wxRect &subRect, int allowance=0)
std::vector< TCPLine > TCPLines
Definition: TrackInfo.h:58