#include <pawssheetline.h>
|
Chord * | Advance (uint divisions) |
| This function pushes a new empty chord at the end of the line and it returns. More...
|
|
SheetLine * | AttachNewLine (Measure *firstMeasure) |
| If this is the last measure, this method creates a new empty line and attaches it after this one. More...
|
|
bool | Contains (Measure *measure) |
| Check if this line contains the given measure. More...
|
|
void | DeleteMeasure (Measure *measure) |
| Delete the given measure if it belongs to this line. More...
|
|
void | Draw (pawsSheetLine *pawsLine, Chord *selectedChord, int startPosition, int height) |
| Draws this line. More...
|
|
Measure * | GetFirstMeasure () |
| Returns the first measure of the line. More...
|
|
Measure * | GetLastMeasure () |
| Returns the last measure of the line. More...
|
|
bool | HasFirstMeasure () |
| Returns true if this line contains the first measure. More...
|
|
bool | HasLastMeasure () |
| Returns true if this line contains the last measure. More...
|
|
bool | Hit (int x, Chord *&chord, Measure *&measure, bool &before) |
| Check if a chord in this line is hit and return the chord and its measure. More...
|
|
Measure * | InsertNewMeasure (Measure *measureAfter) |
| Inserts a new measure before the given one. More...
|
|
SheetLine * | Next () |
| Returns the next SheetLine. More...
|
|
SheetLine * | Prev () |
| Returns the previous SheetLine. More...
|
|
void | PushMeasure (Measure *measure) |
| Push a measure at the end of the line. More...
|
|
bool | Resize () |
| Fixes the measures of this line and their size. More...
|
|
void | ResizeAll (bool forceAll=false) |
| Fixes the measures and their size of this line and all the following. More...
|
|
void | SetCallback (void *object, void(*function)(void *, SheetLine *)) |
| Sets the callback function that will be called when a new sheet line is added or deleted. More...
|
|
bool | SetSize (uint size, pawsSheetLine *pawsLine) |
| Set the size and drawing parameters for this line. More...
|
|
| SheetLine (Measure *firstMeasure) |
| Constructor. More...
|
|
| ~SheetLine () |
| Destructor. More...
|
|
Definition at line 473 of file pawssheetline.h.
SheetLine::SheetLine |
( |
Measure * |
firstMeasure | ) |
|
Constructor.
- Parameters
-
firstMeasure | the first measure of the SheetLine. |
SheetLine::~SheetLine |
( |
| ) |
|
Destructor.
It does not delete its measures.
Chord* SheetLine::Advance |
( |
uint |
divisions | ) |
|
This function pushes a new empty chord at the end of the line and it returns.
It should be called only to move the final cursor forward. If the line is completed, it creates a new line.
- Parameters
-
divisions | the number of sixteenths per measure. |
- Returns
- the new chord.
If this is the last measure, this method creates a new empty line and attaches it after this one.
The new line has the same size and the same callback as this one.
- Parameters
-
firstMeasure | the first measure of the new line. |
- Returns
- the attached SheetLine, a null pointer if this is not the last line.
bool SheetLine::Contains |
( |
Measure * |
measure | ) |
|
Check if this line contains the given measure.
- Parameters
-
measure | the measure to look for. |
- Returns
- true if this line contains the given measure, false otherwise.
void SheetLine::DeleteMeasure |
( |
Measure * |
measure | ) |
|
Delete the given measure if it belongs to this line.
If it is the last measure, the method just empties it.
- Parameters
-
measure | the measure to delete. |
Draws this line.
- Parameters
-
pawsLine | the pawsSheetLine that store the font-dependent parameters. |
selectedChord | the current selected chord. |
startPosition | the horizontal position where the first measure must be drawn. |
height | the height of the staff. |
Measure* SheetLine::GetFirstMeasure |
( |
| ) |
|
|
inline |
Returns the first measure of the line.
- Returns
- the first measure of the line.
Definition at line 522 of file pawssheetline.h.
Measure* SheetLine::GetLastMeasure |
( |
| ) |
|
|
inline |
Returns the last measure of the line.
- Returns
- the last measure of the line.
Definition at line 528 of file pawssheetline.h.
bool SheetLine::HasFirstMeasure |
( |
| ) |
|
|
inline |
Returns true if this line contains the first measure.
- Returns
- true if this is the first line, false otherwise.
Definition at line 503 of file pawssheetline.h.
bool SheetLine::HasLastMeasure |
( |
| ) |
|
|
inline |
Returns true if this line contains the last measure.
- Returns
- true if this is the last line, false otherwise.
Definition at line 509 of file pawssheetline.h.
bool SheetLine::Hit |
( |
int |
x, |
|
|
Chord *& |
chord, |
|
|
Measure *& |
measure, |
|
|
bool & |
before |
|
) |
| |
Check if a chord in this line is hit and return the chord and its measure.
- Parameters
-
x | the horizontal position of the input from the beginning of the line. |
chord | at the end this pointer will contain the hit chord or null if any chord has been hit. |
measure | at the end this pointer will contain the measure containing the hit chord or a null pointer if nothing is hit. |
before | at the end this boolean will be true if the click has happened before the selected chord, false if after. |
- Returns
- true if a note has been hit, false otherwise.
Inserts a new measure before the given one.
- Parameters
-
measureAfter | the measure after the new one. |
- Returns
- the new measure.
void SheetLine::PushMeasure |
( |
Measure * |
measure | ) |
|
Push a measure at the end of the line.
After this method a resize should be done.
- Parameters
-
measure | the measure to push. |
bool SheetLine::Resize |
( |
| ) |
|
Fixes the measures of this line and their size.
- Returns
- true if the following lines should be updated too, false otherwise.
void SheetLine::ResizeAll |
( |
bool |
forceAll = false | ) |
|
Fixes the measures and their size of this line and all the following.
- Parameters
-
forceAll | if true all the sheet lines are resized, otherwise it continues only until the last measure is the same as before the resize. |
void SheetLine::SetCallback |
( |
void * |
object, |
|
|
void(*)(void *, SheetLine *) |
function |
|
) |
| |
Sets the callback function that will be called when a new sheet line is added or deleted.
- Parameters
-
object | the callback object. |
function | the callback function. |
Set the size and drawing parameters for this line.
- Parameters
-
size | the new size. |
pawsLine | the pawsSheetLine with the drawing parameters. |
- Returns
- true if the line's size is changed.
The documentation for this class was generated from the following file: