11#ifndef __AUDACITY_TRACK_VIEW__
12#define __AUDACITY_TRACK_VIEW__
24 ,
public std::enable_shared_from_this<ChannelView>
30 enum :
unsigned { DefaultHeight = 150 };
50 explicit ChannelView(
const std::shared_ptr<Channel> &pChannel);
58 static int GetChannelGroupHeight(
const Track *pTrack);
60 static int GetCumulativeHeight(
const Channel *pChannel);
63 static int GetCumulativeHeight(
const Track *pTrack);
64 static int GetTotalHeight(
const TrackList &list);
70 void SetMinimized(
bool minimized );
92 int GetHeight()
const;
101 void SetExpandedHeight(
int height);
105 std::shared_ptr<ChannelVRulerControls> GetVRulerControls();
106 std::shared_ptr<const ChannelVRulerControls> GetVRulerControls()
const;
110 virtual std::shared_ptr<CommonTrackCell> GetAffordanceControls();
120 std::pair<wxCoord, std::shared_ptr<ChannelView>>
122 virtual Refinement GetSubViews(
const wxRect &rect );
125 virtual bool IsSpectral()
const;
127 virtual void DoSetMinimized(
bool isMinimized );
132 void AdjustPositions();
137 void DoSetHeight(
int h);
158 bool mMinimized{
false };
160 int mHeight{ DefaultHeight };
174 std::shared_ptr<ChannelView>,
180struct GetDefaultTrackHeightTag;
184 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 void WriteXMLAttributes(XMLWriter &writer, size_t iChannel) const
Serialize persistent attributes.
virtual bool HandleXMLAttribute(const std::string_view &attr, const XMLAttributeValueView &valueView, size_t iChannel)
Deserialize an attribute, returning true if recognized.
virtual void CopyTo(Track &track, size_t iChannel) const
Copy state, for undo/redo purposes.
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
void Reparent(const std::shared_ptr< Track > &parent, size_t iChannel) override
Object may be shared among tracks but hold a special back-pointer to one of them; reassign it.
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.