11#ifndef __AUDACITY_TRACK_VIEW__
12#define __AUDACITY_TRACK_VIEW__
24 ,
public std::enable_shared_from_this<TrackView>
30 enum :
unsigned { DefaultHeight = 150 };
33 TrackView(
const std::shared_ptr<Track> &pTrack );
38 static int GetTrackHeight(
const Track *pTrack );
39 static int GetChannelGroupHeight(
const Track *pTrack );
41 static int GetCumulativeHeight(
const Track *pTrack );
42 static int GetTotalHeight(
const TrackList &list );
53 void SetMinimized(
bool minimized );
75 int GetHeight()
const;
84 void SetExpandedHeight(
int height);
88 std::shared_ptr<TrackVRulerControls> GetVRulerControls();
89 std::shared_ptr<const TrackVRulerControls> GetVRulerControls()
const;
93 virtual std::shared_ptr<CommonTrackCell> GetAffordanceControls();
103 wxCoord, std::shared_ptr< TrackView >
105 virtual Refinement GetSubViews(
const wxRect &rect );
108 virtual bool IsSpectral()
const;
110 virtual void DoSetMinimized(
bool isMinimized );
117 void DoSetHeight(
int h);
128 bool mMinimized{
false };
130 int mHeight{ DefaultHeight };
140 std::shared_ptr< TrackView >,
145struct GetDefaultTrackHeightTag;
149 GetDefaultTrackHeightTag,
Utility for non-intrusive definition of a new method on a base class.
DECLARE_EXPORTED_ATTACHED_VIRTUAL(AUDACITY_DLL_API, DoGetView)
Class template generates single-dispatch, open method registry tables.
virtual bool HandleXMLAttribute(const std::string_view &attr, const XMLAttributeValueView &valueView)
Deserialize an attribute, returning true if recognized.
virtual void CopyTo(Track &track) const
Copy state, for undo/redo purposes.
virtual void WriteXMLAttributes(XMLWriter &) const
Serialize persistent attributes.
Abstract base class for an object holding data associated with points on a time axis.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
void SetCumulativeHeightBefore(int y)
Set cached value dependent on position within the track list.
std::shared_ptr< TrackVRulerControls > mpVRulerControls
bool GetMinimized() const
int GetCumulativeHeightBefore() const
int GetExpandedHeight() const
TrackView(const TrackView &)=delete
virtual std::shared_ptr< TrackVRulerControls > DoGetVRulerControls()=0
virtual int GetMinimizedHeight() const =0
std::vector< std::pair< wxCoord, std::shared_ptr< TrackView > > > Refinement
TrackView & operator=(const TrackView &)=delete
A view into an attribute value. The class does not take the ownership of the data.
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
wxString Find(const FilePath &path)
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.