GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRNote.h
1 #ifndef GRNote_H
2 #define GRNote_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 "GREvent.h"
19 
20 class ARNote;
21 class ARNoteFormat;
22 class ARDotFormat;
23 class GRStaff;
24 class GRTie;
25 class GRTrill;
26 class GRCluster;
27 
31 class GRNote : public GREvent
32 {
33  public:
34  GRNote (GRStaff * inStaff, const ARNote * note, const TYPE_TIMEPOSITION & date, const TYPE_DURATION & duration );
35  GRNote (GRStaff * inStaff, const TYPE_DURATION & duration );
36  GRNote (GRStaff * inStaff, const ARNote * note );
37  virtual ~GRNote ();
38 
39  virtual void setNoteFormat( const ARNoteFormat * frmt );
40 
41 
42 // ARNote * getARNote();
43  const ARNote * getARNote() const;
44 
45  virtual void OnDraw( VGDevice & hdc ) const = 0;
46  virtual void recalcVerticalPosition() = 0;
47  virtual void drawStemOnly( int flag ) = 0;
48  virtual void setStemDirection( GDirection dir ) = 0;
49  virtual float setStemLength( float inLen, bool userLength ) = 0;
50 
51  virtual void getPitchAndOctave( int * outPitch, int * outOctave, int * outAccidentals ) const;
52 
53  virtual GDirection getDefaultThroatDirection() const;
54  virtual GDirection getThroatDirection() const;
55 
56  GRCluster *getGRCluster() const {return fCluster;}
57  void setGRCluster(GRCluster *inCluster, bool inSignificativeNote = true);
58  bool getClusterNoteBoolean() const {return fClusterNote;}
59  bool isGraceNote() const {return fIsGraceNote;}
60  void setGraceNote(bool isGrace) {fIsGraceNote = isGrace;}
61 
62  GRCluster *createCluster(const ARNoteFormat *inCurnoteformat);
63 
64  // Tell me: is a note splitted over several systems?
65  // should only occur for CompositeNotes.
66  virtual bool isSplit(); // const;
67  void hideAccidentals();
68 
69  /**** Function to avoid dynamic_cast ****/
70  const GRNote * isGRNote() const { return this; }
71  /*****************************************/
72 
73 protected :
80 };
81 
82 
83 #endif
84 
85 
GRNote::setNoteFormat
virtual void setNoteFormat(const ARNoteFormat *frmt)
GRNote::fOrnament
GRTrill * fOrnament
Definition: GRNote.h:74
GRNote::getThroatDirection
virtual GDirection getThroatDirection() const
GRNote::isGRNote
const GRNote * isGRNote() const
Definition: GRNote.h:70
GRNote::getDefaultThroatDirection
virtual GDirection getDefaultThroatDirection() const
GRNote::recalcVerticalPosition
virtual void recalcVerticalPosition()=0
GRNote::setStemLength
virtual float setStemLength(float inLen, bool userLength)=0
duration
GuidoDate duration(CGRHandler inHandleGR)
Returns the music duration of a score.
Fraction
Numerator and denominator.
Definition: Fraction.h:23
GRNote::isGraceNote
bool isGraceNote() const
Definition: GRNote.h:59
GREvent
Graphical representation for an event (= has duration).
Definition: GREvent.h:61
GRNote::fIsGraceNote
bool fIsGraceNote
Definition: GRNote.h:79
GRNote
Graphical representation of a note.
Definition: GRNote.h:31
GRNote::~GRNote
virtual ~GRNote()
GRNote::fClusterHaveToBeDrawn
bool fClusterHaveToBeDrawn
Definition: GRNote.h:78
GRNote::GRNote
GRNote(GRStaff *inStaff, const ARNote *note, const TYPE_TIMEPOSITION &date, const TYPE_DURATION &duration)
GRNote::hideAccidentals
void hideAccidentals()
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
ARDotFormat
not yet documented
Definition: ARDotFormat.h:40
GRNote::getPitchAndOctave
virtual void getPitchAndOctave(int *outPitch, int *outOctave, int *outAccidentals) const
GRNote::setStemDirection
virtual void setStemDirection(GDirection dir)=0
ARNoteFormat
not yet documented
Definition: ARNoteFormat.h:51
GRNote::getClusterNoteBoolean
bool getClusterNoteBoolean() const
Definition: GRNote.h:58
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRNote::isSplit
virtual bool isSplit()
GRNote::OnDraw
virtual void OnDraw(VGDevice &hdc) const =0
GRTie
Graphical representation of a tie.
Definition: GRTie.h:26
GRNote::drawStemOnly
virtual void drawStemOnly(int flag)=0
GRNote::fOwnCluster
bool fOwnCluster
Definition: GRNote.h:76
ARNote
Representation of a GUIDO note.
Definition: ARNote.h:30
GRNote::getARNote
const ARNote * getARNote() const
GRNote::fCluster
GRCluster * fCluster
Definition: GRNote.h:75
GRCluster
Graphical representation of a cluster.
Definition: GRCluster.h:29
GRNote::setGRCluster
void setGRCluster(GRCluster *inCluster, bool inSignificativeNote=true)
GRNote::fClusterNote
bool fClusterNote
Definition: GRNote.h:77
GRNote::getGRCluster
GRCluster * getGRCluster() const
Definition: GRNote.h:56
GRNote::createCluster
GRCluster * createCluster(const ARNoteFormat *inCurnoteformat)
GRTrill
GRTrill tag.
Definition: GRTrill.h:32
GRNote::setGraceNote
void setGraceNote(bool isGrace)
Definition: GRNote.h:60

Guido Project Copyright © 2019 Grame-CNCM