GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRKey.h
1 #ifndef GRKey_H
2 #define GRKey_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2017 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include "GRARCompositeNotationElement.h"
19 #include "GRTag.h"
20 //#include "GRVisitor.h"
21 #include "GuidoDefs.h" // for NUMNOTES
22 
23 class ARKey;
24 class GRStaff;
25 
26 
30 {
31  public:
32 
33  virtual bool operator==(const GRKey & key) const;
34  virtual bool operator==(const GRTag & tag) const;
35 
36  GRKey( GRStaff * staff, const ARKey * arkey, int p_natural, bool ownsAR );
37  virtual ~GRKey();
38 
39  virtual void accept (GRVisitor& visitor);
40  virtual void setGRStaff(GRStaff * stf);
41  int getKeyArray(float * KeyArray);
42  static int getNonFreeKeyArray(int pnumkeys, float * KeyArray);
43  void getOctArray(int * ctArray);
44 
45  virtual void updateBoundingBox();
46  virtual void setHPosition( GCoord nx);
47  virtual void setPosition(const NVPoint & point);
48 
49  virtual void OnDraw(VGDevice & dev ) const;
50  virtual void recalcVerticalPosition();
51 
52  protected:
53  int mNatural;
54  int mNumKeys;
55  float mkarray[NUMNOTES];
56  int mOctarray[NUMNOTES]; // octave of accidentlas
57 
58  // GRStaff *grstaff;
59  virtual void createAccidentals();
60  float mCurLSPACE; // this parameter remembers the LSPACE that is
61  // valid at the time of creation. We can later recalc
62  // positions better (when a clef-change occurs for example)
63  // if this parameter is known.
64 };
65 
66 #endif
67 
68 
GRVisitor
Definition: GRVisitor.h:39
GRKey
Key notation tag.
Definition: GRKey.h:29
GRKey::mOctarray
int mOctarray[NUMNOTES]
Definition: GRKey.h:56
ARKey
Key signature.
Definition: ARKey.h:54
GRKey::getOctArray
void getOctArray(int *ctArray)
NVPoint
Definition: NVPoint.h:20
GRKey::mNumKeys
int mNumKeys
Definition: GRKey.h:54
GRKey::updateBoundingBox
virtual void updateBoundingBox()
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRKey::mCurLSPACE
float mCurLSPACE
Definition: GRKey.h:60
GRKey::mkarray
float mkarray[NUMNOTES]
Definition: GRKey.h:55
GRKey::createAccidentals
virtual void createAccidentals()
GRKey::setPosition
virtual void setPosition(const NVPoint &point)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRKey::setHPosition
virtual void setHPosition(GCoord nx)
GRKey::~GRKey
virtual ~GRKey()
GRKey::getNonFreeKeyArray
static int getNonFreeKeyArray(int pnumkeys, float *KeyArray)
GRKey::recalcVerticalPosition
virtual void recalcVerticalPosition()
GRTag
The GRTag class is the base class for all GUIDO tags.
Definition: GRTag.h:37
GRKey::mNatural
int mNatural
Definition: GRKey.h:53
GRKey::GRKey
GRKey(GRStaff *staff, const ARKey *arkey, int p_natural, bool ownsAR)
GRKey::accept
virtual void accept(GRVisitor &visitor)
GRKey::operator==
virtual bool operator==(const GRKey &key) const
GRKey::OnDraw
virtual void OnDraw(VGDevice &dev) const
GRKey::setGRStaff
virtual void setGRStaff(GRStaff *stf)
GRKey::getKeyArray
int getKeyArray(float *KeyArray)
GRARCompositeNotationElement
not yet documented
Definition: GRARCompositeNotationElement.h:25

Guido Project Copyright © 2019 Grame-CNCM