GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRGlobalStem.h
1 #ifndef GRGlobalStem_H
2 #define GRGlobalStem_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 
19 #include "GRPTagARNotationElement.h"
20 #include "GRSystemTagInterface.h"
21 
22 class ARShareStem;
23 class ARTStem;
24 class ARDisplayDuration;
25 class ARNoteFormat;
26 class GRStaff;
27 class GRFlag;
28 class GREvent;
29 class GRSingleNote;
30 class GRSystem;
31 class GRStdNoteHead;
32 class GRStem;
33 
37 {
38  void ComputeStemDirection ( GRStaff * staff, const NEPointerList * associated);
39  void GetUserStemDirection (const NEPointerList * associated);
40  void updateGlobalStem (const GRStaff * inStaff);
41 
42  public:
43  GRGlobalStem (GRStaff * inStaff, const ARShareStem * pshare, const ARTStem * stem, const ARDisplayDuration * dur, const ARNoteFormat * format );
44  virtual ~GRGlobalStem();
45 
46  int getHighestAndLowestNoteHead( GRStdNoteHead ** highest, GRStdNoteHead ** lowest) const;
47 
48  virtual void setSize(float newsize) { mTagSize = newsize; }
49  virtual void setMultiplicatedSize(float newMultiplicatedSize) { mTagSize *= newMultiplicatedSize; }
50  virtual void setOffsetXY(float inOffsetX, float inOffsetY);
51  virtual void setNoteStemLength( GREvent * ev, float inLen );
52  virtual void addAssociation(GRNotationElement * grnot);
53  virtual void removeAssociation(GRNotationElement * grnot);
54 
55  virtual void checkPosition(const GRSystem * grsys);
56  virtual float changeStemLength( float inLen, bool force = false );
57  virtual void setHPosition( GCoord nx);
58  virtual void setFlagOnOff(bool i);
59  virtual void setStemDirection(GDirection dir);
60 
61  virtual void RangeEnd(GRStaff * inStaff);
62 
63  virtual void OnDraw(VGDevice & hdc ) const;
64  virtual void tellPosition(GObject *, const NVPoint &);
65 
66  virtual GDirection getStemDirection() const { return fStemdir; }
67  virtual GRFlag* getGRFlag() const { return fFlag; }
68  virtual GRStem* getGRStem() const { return fStem; }
69  virtual bool getStemDirSet() const { return fStemdirSet; }
70  virtual bool getStemLengthSet() const { return fStemlengthSet; }
71  virtual const unsigned char * getColRef() const { return mColRef; }
72  virtual GRNotationElement * getFirstEl() const { return fFirstEl; }
73 
74  virtual GDirection getStemDir() const;
75  virtual NVPoint getStemStartPos() const;
76  virtual NVPoint getStemEndPos() const;
77  virtual float getStemLength() const;
78  virtual int getNumFaehnchen() const;
79 
80  void setBeam( GRBeam* beam) { fBeam = beam; }
81 
82  protected:
83  bool fFlagOnOff;
86  GDirection fStemdir;
87 
88  GRStem * fStem = 0;
89  GRFlag * fFlag = 0;
92 
93  // fFirstEl is the first element in the \shareStem-Range.
94  // Only the first event in the range gets a spring on its own ....
96 
97  float fLowestY;
98  float fHighestY;
99 
100  // - Lower note on the staff (to adjust stem length if it's a cross headnote)
103 
104  float fStaffSize;
105 
106  private:
107  GRBeam * fBeam = 0;
108 };
109 
110 #endif
GRGlobalStem::getStemLengthSet
virtual bool getStemLengthSet() const
Definition: GRGlobalStem.h:70
GRGlobalStem::fHighestY
float fHighestY
Definition: GRGlobalStem.h:98
GRSingleNote
Graphical representation of a note event.
Definition: GRSingleNote.h:38
ARShareStem
not yet documented
Definition: ARShareStem.h:23
GRGlobalStem::getGRFlag
virtual GRFlag * getGRFlag() const
Definition: GRGlobalStem.h:67
GRGlobalStem::checkPosition
virtual void checkPosition(const GRSystem *grsys)
GRGlobalStem::getStemEndPos
virtual NVPoint getStemEndPos() const
GRGlobalStem::tellPosition
virtual void tellPosition(GObject *, const NVPoint &)
GRNotationElement::associated
const NEPointerList * associated() const
Definition: GRNotationElement.h:134
GRGlobalStem::fStemdir
GDirection fStemdir
Definition: GRGlobalStem.h:86
GObject
The base class for all graphic objects.
Definition: GObject.h:54
GRGlobalStem::getGRStem
virtual GRStem * getGRStem() const
Definition: GRGlobalStem.h:68
GRGlobalStem::getStemDir
virtual GDirection getStemDir() const
GRFlag
Flags attached to a note stem.
Definition: GRFlag.h:27
Fraction
Numerator and denominator.
Definition: Fraction.h:23
GRGlobalStem::~GRGlobalStem
virtual ~GRGlobalStem()
GRGlobalStem::setMultiplicatedSize
virtual void setMultiplicatedSize(float newMultiplicatedSize)
Definition: GRGlobalStem.h:49
GRGlobalStem::getHighestAndLowestNoteHead
int getHighestAndLowestNoteHead(GRStdNoteHead **highest, GRStdNoteHead **lowest) const
GRGlobalStem::fFlagOnOff
bool fFlagOnOff
Definition: GRGlobalStem.h:83
GRGlobalStem::fStemlengthSet
bool fStemlengthSet
Definition: GRGlobalStem.h:85
GRNotationElement
parent class for all notation elements.
Definition: GRNotationElement.h:54
GREvent
Graphical representation for an event (= has duration).
Definition: GREvent.h:61
GRGlobalStem::fLowerNote
GRSingleNote * fLowerNote
Definition: GRGlobalStem.h:101
NVPoint
Definition: NVPoint.h:20
GRGlobalStem::getStemDirection
virtual GDirection getStemDirection() const
Definition: GRGlobalStem.h:66
GRGlobalStem::fStem
GRStem * fStem
Definition: GRGlobalStem.h:88
GRGlobalStem::getFirstEl
virtual GRNotationElement * getFirstEl() const
Definition: GRGlobalStem.h:72
GRGlobalStem::getNumFaehnchen
virtual int getNumFaehnchen() const
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
ARTStem
not yet documented
Definition: ARTStem.h:80
GRGlobalStem::changeStemLength
virtual float changeStemLength(float inLen, bool force=false)
GRGlobalStem::removeAssociation
virtual void removeAssociation(GRNotationElement *grnot)
GRGlobalStem::fLowestY
float fLowestY
Definition: GRGlobalStem.h:97
GRStdNoteHead
Graphical representation of a note head.
Definition: GRStdNoteHead.h:25
GRPTagARNotationElement
not yet documented
Definition: GRPTagARNotationElement.h:25
GRGlobalStem::setOffsetXY
virtual void setOffsetXY(float inOffsetX, float inOffsetY)
ARNoteFormat
not yet documented
Definition: ARNoteFormat.h:51
GRGlobalStem::setFlagOnOff
virtual void setFlagOnOff(bool i)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRGlobalStem::fDispdur
TYPE_DURATION fDispdur
Definition: GRGlobalStem.h:91
GRGlobalStem::getColRef
virtual const unsigned char * getColRef() const
Definition: GRGlobalStem.h:71
GRGlobalStem::getStemDirSet
virtual bool getStemDirSet() const
Definition: GRGlobalStem.h:69
GRGlobalStem::fStaffSize
float fStaffSize
Definition: GRGlobalStem.h:104
GRGlobalStem::getStemLength
virtual float getStemLength() const
GRGlobalStem::getStemStartPos
virtual NVPoint getStemStartPos() const
GRGlobalStem::fHigherNote
GRSingleNote * fHigherNote
Definition: GRGlobalStem.h:102
GRBeam
The Beam notation element.
Definition: GRBeam.h:79
GRGlobalStem::setSize
virtual void setSize(float newsize)
Definition: GRGlobalStem.h:48
GRGlobalStem::fFirstEl
GRNotationElement * fFirstEl
Definition: GRGlobalStem.h:95
GRSystemTagInterface
not yet documented
Definition: GRSystemTagInterface.h:23
GRGlobalStem
Shared stem.
Definition: GRGlobalStem.h:36
GRGlobalStem::RangeEnd
virtual void RangeEnd(GRStaff *inStaff)
GRStem
Graphical representation of a stem.
Definition: GRStem.h:28
GRGlobalStem::GRGlobalStem
GRGlobalStem(GRStaff *inStaff, const ARShareStem *pshare, const ARTStem *stem, const ARDisplayDuration *dur, const ARNoteFormat *format)
GRSystem
Manages a number of staffs and has a given start and end timeposition. GRSystem is the grafical repre...
Definition: GRSystem.h:52
GRTag::mTagSize
float mTagSize
Definition: GRTag.h:83
GRTag::mColRef
unsigned char * mColRef
Definition: GRTag.h:77
GRGlobalStem::fStemState
const ARTStem * fStemState
Definition: GRGlobalStem.h:90
GRGlobalStem::setStemDirection
virtual void setStemDirection(GDirection dir)
GRGlobalStem::fStemdirSet
bool fStemdirSet
Definition: GRGlobalStem.h:84
GRGlobalStem::fFlag
GRFlag * fFlag
Definition: GRGlobalStem.h:89
ARDisplayDuration
not yet documented
Definition: ARDisplayDuration.h:47
NEPointerList
Definition: NEPointerList.h:34
GRGlobalStem::addAssociation
virtual void addAssociation(GRNotationElement *grnot)
GRGlobalStem::setBeam
void setBeam(GRBeam *beam)
Definition: GRGlobalStem.h:80
GRGlobalStem::setNoteStemLength
virtual void setNoteStemLength(GREvent *ev, float inLen)
GRGlobalStem::OnDraw
virtual void OnDraw(VGDevice &hdc) const
GRGlobalStem::setHPosition
virtual void setHPosition(GCoord nx)

Guido Project Copyright © 2019 Grame-CNCM