2
by cecilios
Initial import |
1 |
//--------------------------------------------------------------------------------------
|
2 |
// LenMus Phonascus: The teacher of music
|
|
191
by cecilios
|
3 |
// Copyright (c) 2002-2007 Cecilio Salmeron
|
2
by cecilios
Initial import |
4 |
//
|
5 |
// This program is free software; you can redistribute it and/or modify it under the
|
|
6 |
// terms of the GNU General Public License as published by the Free Software Foundation;
|
|
7 |
// either version 2 of the License, or (at your option) any later version.
|
|
8 |
//
|
|
9 |
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
10 |
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
11 |
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
12 |
//
|
|
13 |
// You should have received a copy of the GNU General Public License along with this
|
|
14 |
// program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
|
|
15 |
// Fifth Floor, Boston, MA 02110-1301, USA.
|
|
16 |
//
|
|
17 |
// For any comment, suggestion or feature request, please contact the manager of
|
|
18 |
// the project at cecilios@users.sourceforge.net
|
|
19 |
//
|
|
20 |
//-------------------------------------------------------------------------------------
|
|
191
by cecilios
|
21 |
|
2
by cecilios
Initial import |
22 |
#ifdef __GNUG__
|
23 |
// #pragma interface
|
|
24 |
#endif
|
|
25 |
||
26 |
#ifndef __COLSTAFFOBJS_H__ //to avoid nested includes |
|
27 |
#define __COLSTAFFOBJS_H__
|
|
28 |
||
29 |
#include "Score.h" |
|
30 |
||
31 |
// to manage bars let's define an array to contain pointers to the StaffObjsList nodes
|
|
32 |
// where each measure start
|
|
33 |
#include "wx/dynarray.h" |
|
34 |
WX_DEFINE_ARRAY(wxStaffObjsListNode*, wxArrayNodes); |
|
35 |
||
36 |
||
37 |
||
38 |
class lmColStaffObjs |
|
39 |
{
|
|
40 |
public: |
|
41 |
lmColStaffObjs(); |
|
42 |
~lmColStaffObjs(); |
|
43 |
||
44 |
void Store(lmStaffObj *pSO); |
|
69
by cecilios
|
45 |
int GetNumMeasures(); |
2
by cecilios
Initial import |
46 |
void ShiftTime(float rTimeShift); |
47 |
||
48 |
//iterator related methods
|
|
49 |
lmStaffObjIterator* CreateIterator(ETraversingOrder nOrder); |
|
50 |
int GetNumStaffObjs(); |
|
51 |
wxStaffObjsListNode* GetFirstInMeasure(int nBar); |
|
52 |
wxStaffObjsListNode* GetFirst(); |
|
53 |
wxStaffObjsListNode* GetLast(); |
|
54 |
//lmStaffObj* GetNext();
|
|
55 |
//StaffObjsList::Node *m_pNode; //last returned node
|
|
56 |
||
57 |
private: |
|
58 |
||
59 |
StaffObjsList m_cStaffobjs; //list of StaffObjs that belongs to this collection |
|
60 |
wxArrayNodes m_aStartMeasure; //Node (lmStaffObj list) in which each measure starts |
|
61 |
bool m_fStartMeasure; //start a new measure. To manage the creation of measures |
|
62 |
||
63 |
//time from start of the measure
|
|
64 |
//Time is measured in semigarrapateas: 1-semigarrapatea, ..., 256-redonda, 512-cuadrada
|
|
65 |
//Float for grater precision (triplets problem, see comment at CPONota.ExactDuration)
|
|
66 |
float m_rTimePos; |
|
67 |
||
68 |
//aqui se guarda el máximo tiempo alcanzado en el compas en curso. Sirve para evitar que una
|
|
69 |
//orden <avanzar> sobrepase este valor. Además, este será el tiempo que corresponde a la barra
|
|
70 |
//de fin de compas.
|
|
71 |
float m_rMaxTimePos; |
|
72 |
||
73 |
};
|
|
74 |
||
75 |
#endif // __COLSTAFFOBJS_H__ |