GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRTuplet.h
1 #ifndef GRTuplet_H
2 #define GRTuplet_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 "NVPoint.h"
19 #include "GRPTagARNotationElement.h"
20 
21 class ARTuplet;
22 
23 class GRStaff;
24 class GRSystem;
25 class GREvent;
26 
27 
32 {
33 public:
34  // enum bracestate { BRACENONE = 0, BRACELEFT = 1, BRACERIGHT = 2 };
35 
37  {
38  public:
40  virtual ~GRTupletSaveStruct() {}
41 
45  };
46 
47  GRTuplet(GRStaff * inStaff, const ARTuplet * artuplet);
48  virtual ~GRTuplet();
49 
50  virtual void OnDraw( VGDevice & hdc ) const;
51  virtual void tellPosition( GObject * caller, const NVPoint & inPos );
52 
53 protected:
54  const ARTuplet * getARTuplet() const;
56 
58  GDirection mDirection;
59 
60 private:
61  // computes the automatic tuplet position, returns true when done
62  bool automaticPosition( GREvent * caller, const NVPoint & inPos, const GRStaff * staff, GRSystemStartEndStruct * sse );
63  void manualPosition( GREvent * caller, const NVPoint & inPos, const GRStaff * staff, GRSystemStartEndStruct * sse);
64  // gives the bounding box of the notes,
65  // returns the preferred position (true for above) according to stems directions
66  bool getElementsBoundingBox (NVRect& outRect) const;
67 
68  // bracestate mBraceState;
69  bool mShowLeftBrace;
70  bool mShowRightBrace;
71 };
72 
73 #endif
GRTuplet
Graphical representation of a tuplet.
Definition: GRTuplet.h:31
GRSystemStartEndStruct
This class is used to determine when a position tag ends.
Definition: GRPositionTag.h:32
GRTuplet::GRTupletSaveStruct::textpos
NVPoint textpos
Definition: GRTuplet.h:44
GObject
The base class for all graphic objects.
Definition: GObject.h:54
GRTuplet::~GRTuplet
virtual ~GRTuplet()
GRTuplet::getARTuplet
const ARTuplet * getARTuplet() const
GRTuplet::tellPosition
virtual void tellPosition(GObject *caller, const NVPoint &inPos)
GRTuplet::GRTupletSaveStruct::p2
NVPoint p2
Definition: GRTuplet.h:43
GRTuplet::GRTupletSaveStruct::p1
NVPoint p1
Definition: GRTuplet.h:42
GREvent
Graphical representation for an event (= has duration).
Definition: GREvent.h:61
NVPoint
Definition: NVPoint.h:20
ARTuplet
Abstract representation of a tuplet.
Definition: ARTuplet.h:61
GRTuplet::getNewGRSaveStruct
virtual GRPositionTag::GRSaveStruct * getNewGRSaveStruct()
Definition: GRTuplet.h:55
GRPositionTag::GRSaveStruct
Definition: GRPositionTag.h:68
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRPTagARNotationElement
not yet documented
Definition: GRPTagARNotationElement.h:25
GRTuplet::GRTuplet
GRTuplet(GRStaff *inStaff, const ARTuplet *artuplet)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRTuplet::OnDraw
virtual void OnDraw(VGDevice &hdc) const
GRTuplet::GRTupletSaveStruct::~GRTupletSaveStruct
virtual ~GRTupletSaveStruct()
Definition: GRTuplet.h:40
GRTuplet::GRTupletSaveStruct::GRTupletSaveStruct
GRTupletSaveStruct()
Definition: GRTuplet.h:39
GRTuplet::GRTupletSaveStruct
Definition: GRTuplet.h:36
GRTuplet::mDirection
GDirection mDirection
Definition: GRTuplet.h:58
NVstring
Definition: nvstring.h:21
NVRect
Definition: NVRect.h:22
GRSystem
Manages a number of staffs and has a given start and end timeposition. GRSystem is the grafical repre...
Definition: GRSystem.h:52
GRTuplet::fText
NVstring fText
Definition: GRTuplet.h:57

Guido Project Copyright © 2019 Grame-CNCM