GUIDOLib  1.7.7
A Music Score Rendering Engine
GUIDOScoreMapAdapter.h
Go to the documentation of this file.
1 #ifndef GUIDOSCOREMAPADAPTER_H
2 #define GUIDOSCOREMAPADAPTER_H
3 /*
4  GUIDO Library
5  Copyright (C) 2014 Grame
6 
7  This Source Code Form is subject to the terms of the Mozilla Public
8  License, v. 2.0. If a copy of the MPL was not distributed with this
9  file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
12  research@grame.fr
13 
14 */
15 
16 #include "GUIDOScoreMap.h"
17 
18 
19 //----------------------------------------------------------------------
21 {
22  private:
23  TTime2TimeMap fMap;
24 
25  public:
28 
30  virtual void Time2TimeMap( const TimeSegment& from, const TimeSegment& to );
31 };
32 
43 {
44  public:
46 
47  virtual ~GuidoScoreMapAdapter();
48 
59  GuidoErrCode getMap(CGRHandler gr, int pagenum, float width, float height, GuidoElementSelector sel, MapCollector& f);
60 
69  Time2GraphicMap getPageMap( CGRHandler gr, int pagenum, float w, float h);
70 
80  Time2GraphicMap getStaffMap( CGRHandler gr, int pagenum, float w, float h, int staff);
81 
91  Time2GraphicMap getVoiceMap(CGRHandler gr, int pagenum, float w, float h, int voice);
92 
101  Time2GraphicMap getSystemMap(CGRHandler gr, int pagenum, float w, float h);
102 
111  bool getTime(const GuidoDate& date, const Time2GraphicMap map, TimeSegment& t, FloatRect& r);
112 
122  bool getPoint(float x, float y, const Time2GraphicMap map, TimeSegment& t, FloatRect& r);
123 
132 
134 
135 };
139 #endif // GUIDOSCOREMAPADAPTER_H
GuidoScoreMapAdapter
class_export GuidoScoreMapAdapter
Definition: GUIDOScoreMapAdapter.h:43
MapCollector
an abstract class to be provided by clients to collect mappings
Definition: GUIDOScoreMap.h:109
getTimeMap
GuidoErrCode getTimeMap(CARHandler gr, TimeMapCollector &f)
Retrieves the rolled to unrolled time mapping.
~GuidoScoreMapAdapter
virtual ~GuidoScoreMapAdapter()
getTime
bool getTime(const GuidoDate &date, const Time2GraphicMap map, TimeSegment &t, FloatRect &r)
Retrieves a time segment and the associated graphic segment in a mapping.
TimeSegment
class_export TimeSegment
a time segment definition and operations
Definition: GUIDOScoreMap.h:67
RolledUnrolledCollector::~RolledUnrolledCollector
virtual ~RolledUnrolledCollector()
Definition: GUIDOScoreMapAdapter.h:27
RolledUnrolledCollector::process
TTime2TimeMap process(CARHandler ar)
GUIDOScoreMap.h
CGRHandler
const struct NodeGR * CGRHandler
Definition: GUIDOEngine.h:39
getMap
GuidoErrCode getMap(CGRHandler gr, int pagenum, float width, float height, GuidoElementSelector sel, MapCollector &f)
Retrieves the graphic to time mapping.
RolledUnrolledCollector
Definition: GUIDOScoreMapAdapter.h:20
Time2GraphicMap
std::vector< TMapSegments > Time2GraphicMap
Definition: GUIDOScoreMap.h:89
GuidoErrCode
GuidoErrCode
The guido error codes list.
Definition: GUIDOEngine.h:211
getTime2TimeMap
TTime2TimeMap getTime2TimeMap(CARHandler ar)
getStaffMap
Time2GraphicMap getStaffMap(CGRHandler gr, int pagenum, float w, float h, int staff)
Retrieves a guido staff graphic to time mapping.
RolledUnrolledCollector::RolledUnrolledCollector
RolledUnrolledCollector()
Definition: GUIDOScoreMapAdapter.h:26
GuidoDate
Representation of a date as a rational value.
Definition: GUIDOEngine.h:83
getPoint
bool getPoint(float x, float y, const Time2GraphicMap map, TimeSegment &t, FloatRect &r)
Retrieves a time segment and the associated graphic segment in a mapping.
getPageMap
Time2GraphicMap getPageMap(CGRHandler gr, int pagenum, float w, float h)
Retrieves a guido page graphic to time mapping.
getVoiceMap
Time2GraphicMap getVoiceMap(CGRHandler gr, int pagenum, float w, float h, int voice)
Retrieves a guido voice graphic to time mapping.
RolledUnrolledCollector::Time2TimeMap
virtual void Time2TimeMap(const TimeSegment &from, const TimeSegment &to)
a method called by the GuidoGetTimeMap function
GuidoElementSelector
GuidoElementSelector
Definition: GUIDOScoreMap.h:40
class_export
#define class_export
Definition: GUIDOExport.h:38
TTime2TimeMap
std::vector< TTimeMapSegments > TTime2TimeMap
Definition: GUIDOScoreMap.h:90
getSystemMap
Time2GraphicMap getSystemMap(CGRHandler gr, int pagenum, float w, float h)
Retrieves a guido system graphic to time mapping.
CARHandler
const struct NodeAR * CARHandler
Definition: GUIDOEngine.h:38
TimeMapCollector
an abstract class to be provided by clients to collect time mappings
Definition: GUIDOScoreMap.h:147

Guido Project Copyright © 2019 Grame-CNCM