11#ifndef __AUDACITY_TRACK_VIEW__
12#define __AUDACITY_TRACK_VIEW__
25 ,
public std::enable_shared_from_this<ChannelView>
31 enum :
unsigned { DefaultHeight = 150 };
57 static int GetChannelGroupHeight(
const Track *pTrack);
59 static int GetCumulativeHeight(
const Channel *pChannel);
62 static int GetCumulativeHeight(
const Track *pTrack);
63 static int GetTotalHeight(
const TrackList &list);
69 void SetMinimized(
bool minimized );
91 int GetHeight()
const;
100 void SetExpandedHeight(
int height);
104 std::shared_ptr<ChannelVRulerControls> GetVRulerControls();
105 std::shared_ptr<const ChannelVRulerControls> GetVRulerControls()
const;
109 virtual std::shared_ptr<CommonTrackCell> GetAffordanceControls();
119 std::pair<wxCoord, std::shared_ptr<ChannelView>>
121 virtual Refinement GetSubViews(
const wxRect &rect );
124 virtual bool IsSpectral()
const;
126 virtual void DoSetMinimized(
bool isMinimized );
135 void DoSetHeight(
int h);
162 bool mMinimized{
false };
164 int mHeight{ DefaultHeight };
178 std::shared_ptr<ChannelView>,
184struct GetDefaultTrackHeightTag;
188 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 std::shared_ptr< ChannelVRulerControls > DoGetVRulerControls()=0
std::shared_ptr< ChannelVRulerControls > mpVRulerControls
virtual int GetMinimizedHeight() const =0
bool GetMinimized() const
void SetCumulativeHeightBefore(int y)
Set cached value dependent on position within the track list.
int GetCumulativeHeightBefore() const
std::vector< std::pair< wxCoord, std::shared_ptr< ChannelView > > > Refinement
int GetExpandedHeight() const
std::pair< int, int > vrulerSize
ChannelView(const ChannelView &)=delete
ChannelView & operator=(const ChannelView &)=delete
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...
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...
PROJECT_FILE_IO_API wxString Find(const FilePath &path)
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.