12#ifndef __AUDACITY_NOTE_TRACK_DISPLAY_DATA
13#define __AUDACITY_NOTE_TRACK_DISPLAY_DATA
29 std::unique_ptr<NoteTrackAttachment> Clone()
const override;
34 enum { MinPitch = 0, MaxPitch = 127 };
42 void SetBottomNote(
int note);
44 void SetTopNote(
int note);
47 void SetNoteRange(
int note1,
int note2);
49 void ShiftNoteRange(
int offset);
52 void ZoomAllNotes(Alg_seq *pSeq);
64 void VScroll(
int start,
int end);
68 int mBottomNote{ MinPitch };
69 int mTopNote{ MaxPitch };
95 void Zoom(
int y,
float multiplier,
bool center);
std::pair< std::string_view, XMLAttributeValueView > Attribute
Temporary data used to display a note track.
void ZoomOut(int y)
Zooms out a constant factor (subject to zoom limits)
int GetPitchHeight(int factor) const
int GetNotePos(int p) const
void Zoom(int y, float multiplier, bool center)
NoteTrackDisplayData(const NoteTrack &track, const wxRect &r)
int GetOctaveHeight() const
void ZoomIn(int y)
Zooms in a constant factor (subject to zoom limits)
int PitchToY(double p) const
static const float ZoomStep
int GetOctaveBottom(int oct) const
int GetNoteMargin() const
void ZoomTo(int start, int end)
int YToIPitch(int y) const
int GetWhitePos(int i) const
int IPitchToY(int p) const
int GetBlackPos(int i) const
A Track that is used for Midi notes. (Somewhat old code).
Persistent data for display of a note track.
void ZoomMaxExtent()
Zooms so that the entire track is visible.
~NoteTrackRange() override
int GetTopNote() const
Gets the current top note (a pitch)
int GetBottomNote() const
Gets the current bottom note (a pitch)
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
const char * end(const char *str) noexcept
virtual void WriteXML(XMLWriter &xmlFile) const
Default implementation does nothing.
virtual bool HandleAttribute(const Attribute &attribute)
Return whether the attribute was used; default returns false.