20 #ifndef PAWS_SHEET_LINE_H 21 #define PAWS_SHEET_LINE_H 72 Note(
short int position,
short int alter);
130 bool IsEmpty() {
return notes.GetSize() == 0; }
144 void SetDuration(
int duration);
165 void AddNote(csRef<iDocumentNode> pitch);
177 void AttachChord(
Chord* chord);
210 wchar_t GetNoteChar(
bool isNoteDown);
218 wchar_t GetChordNoteChar(
bool isNoteDown);
224 wchar_t GetCircleNoteChar();
243 Measure(csRef<iDocumentNode> measure,
int quarterDivisions);
273 uint GetSize(uint noteLength);
280 uint GetMimimumSize(uint noteLength);
289 bool SetSize(uint size, uint noteLength);
325 void SetEnding(
bool isEnding);
332 void AppendMeasure(
Measure* measure);
339 void AttachMeasure(
Measure* measure);
357 void PushChord(
Chord* chord);
366 Chord* InsertChord(
Chord* nearChord,
bool before);
372 void DeleteChord(
Chord* chord);
385 bool Cut(uint divisions);
393 void Fill(uint divisions);
413 bool Hit(
int x,
Chord* &chord,
bool &before);
422 csString
ToXML(uint number, csString attributes =
"");
444 void InsertChord(
Chord* prevChord,
Chord* chord);
451 void DeleteOwnChord(
Chord* chord);
459 void DrawRepeatDots(
pawsSheetLine* pawsLine,
int x,
bool start);
468 int GetBiggerDivision(uint divisions);
516 bool Contains(
Measure* measure);
558 void PushMeasure(
Measure* measure);
566 void DeleteMeasure(
Measure* measure);
579 void ResizeAll(
bool forceAll =
false);
590 void Draw(
pawsSheetLine* pawsLine,
Chord* selectedChord,
int startPosition,
int height);
604 bool Hit(
int x,
Chord* &chord,
Measure* &measure,
bool &before);
614 Chord* Advance(uint divisions);
623 void SetCallback(
void*
object,
void (*
function)(
void*,
SheetLine*));
635 void* callbackObject;
636 void (*callbackFunction)(
void*,
SheetLine*);
675 void SetLine(
SheetLine* sheetLine,
bool resize =
true);
687 void SetDoubleStaff(
bool doubleStaff);
696 void DrawDoubleLine(
int x,
int y,
int height);
702 virtual bool OnMouseDown(
int button,
int modifiers,
int x,
int y);
703 virtual bool PostSetup();
715 int staffMarginLateral;
719 int metricCharLength;
725 float staffRowHeight;
733 static wchar_t GetSymbolChar(
char symbol);
741 static wchar_t GetSmallNumber(
char number);
747 void SetDrawParameters();
754 #endif // PAWS_SHEET_LINE_H bool GetStartRepeat()
Gets the start repeat state.
A measure containing measure elements.
bool IsRest()
Return true if this chord is a rest, false otherwise.
Note()
Default constructor.
bool GetDoubleStaff()
Gets the staff status (double or single).
bool HasFirstMeasure()
Returns true if this line contains the first measure.
Measure * Next()
Returns the next Measure.
Measure * GetLastMeasure()
Returns the last measure of the line.
A single note in a musical score.
void SetEndRepeat(uint repeat)
Sets the number of times this part must be repeat.
Chord * GetLastChord()
Returns the last chord of this measure.
bool IsEmpty()
Returns true if there are not notes in this chord.
uint GetNChords()
Returns the number of chords in this measure.
SheetLine * GetLine()
Gets the sheet line drawn by this widget.
Duration
The number associated to each duration is the number of sixteenths in that note.
Chord * Next()
Returns the next Chord.
SheetLine * Next()
Returns the next SheetLine.
bool HasLastMeasure()
Returns true if this line contains the last measure.
Chord * Prev()
Returns the previous Chord.
csString ToXML()
Writes this note as a <pitch> XML node.
Measure * Prev()
Returns the previous Measure.
uint GetEndRepeat()
Gets the number of times this part must be repeat.
Chord * GetFirstChord()
Returns the first chord of this measure.
uint GetEnding()
Gets the number of this ending.
short int position
The note's position (0 is C4, 1 is D4 etc).
void SetStartRepeat(bool repeat)
Sets the start repeat of this measure.
Measure * GetFirstMeasure()
Returns the first measure of the line.
short int alter
The note's alteration (-1 flat, 0 normal, 1 sharp).
SheetLine * Prev()
Returns the previous SheetLine.
int GetDuration()
Gets the duration of this chord.
This class draws a musical staff on the widget and creates notes and chords that it can represent on ...
CREATE_PAWS_FACTORY(pawsSheetLine)