Public Member Functions

GuidoScoreMapAdapter Class Reference
[C++ interface]

List of all members.

Public Member Functions

 GuidoScoreMapAdapter ()
virtual ~GuidoScoreMapAdapter ()
GuidoErrCode getMap (CGRHandler gr, int pagenum, float width, float height, GuidoElementSelector sel, MapCollector &f)
 Retrieves the graphic to time mapping.
Time2GraphicMap getPageMap (CGRHandler gr, int pagenum, float w, float h)
 Retrieves a guido page graphic to time mapping.
Time2GraphicMap getStaffMap (CGRHandler gr, int pagenum, float w, float h, int staff)
 Retrieves a guido staff graphic to time mapping.
Time2GraphicMap getVoiceMap (CGRHandler gr, int pagenum, float w, float h, int voice)
 Retrieves a guido voice graphic to time mapping.
Time2GraphicMap getSystemMap (CGRHandler gr, int pagenum, float w, float h)
 Retrieves a guido system graphic to time mapping.
bool getTime (const GuidoDate &date, const Time2GraphicMap map, TimeSegment &t, FloatRect &r)
 Retrieves a time segment and the associated graphic segment in a mapping.
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.
GuidoErrCode getTimeMap (CARHandler gr, TimeMapCollector &f)
 Retrieves the rolled to unrolled time mapping.

Constructor & Destructor Documentation

virtual ~GuidoScoreMapAdapter (  ) [virtual]

Member Function Documentation

GuidoErrCode getMap ( CGRHandler  gr,
int  pagenum,
float  width,
float  height,
GuidoElementSelector  sel,
MapCollector f 
)

Retrieves the graphic to time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
pagenuma page index, starting from 1.
widththe page width.
heightthe page height.
selGuidoeElementSelector to filter undesired objects out.
fa MapCollector object that will be called for each selected element or null if error
Returns:
a Guido error code
Time2GraphicMap getPageMap ( CGRHandler  gr,
int  pagenum,
float  w,
float  h 
)

Retrieves a guido page graphic to time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
pagenuma page index, starting from 1.
wthe page width.
hthe page height.
Returns:
contains the mapping on output or null if error
Time2GraphicMap getStaffMap ( CGRHandler  gr,
int  pagenum,
float  w,
float  h,
int  staff 
)

Retrieves a guido staff graphic to time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
pagenuma page index, starting from 1.
wthe page width.
hthe page height.
staffthe staff index (starting from 1).
Returns:
outmap contains the mapping on output or null if error
Time2GraphicMap getVoiceMap ( CGRHandler  gr,
int  pagenum,
float  w,
float  h,
int  voice 
)

Retrieves a guido voice graphic to time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
pagenuma page index, starting from 1.
wthe page width.
hthe page height.
voicethe voice index (starting from 1).
Returns:
outmap contains the mapping on output or null if error
Time2GraphicMap getSystemMap ( CGRHandler  gr,
int  pagenum,
float  w,
float  h 
)

Retrieves a guido system graphic to time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
pagenuma page index, starting from 1.
wthe page width.
hthe page height.
Returns:
outmap contains the mapping on output or null if error
bool getTime ( const GuidoDate date,
const Time2GraphicMap  map,
TimeSegment t,
FloatRect &  r 
)

Retrieves a time segment and the associated graphic segment in a mapping.

Parameters:
datea date used to select the container time segment
mapa time to graphic map.
ton output, the time segment containing the date (note that segments are right opened)
ron output, the graphic segment associated to the time segment
Returns:
false when there is no segment containing the date.
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.

Parameters:
xa point x coordinate
ya point y coordinate
mapa time to graphic map.
ron output, the graphic segment containing the point (note that segments are right and bottom opened)
ton output, the time segment associated to the graphic segment
Returns:
false when there is no segment containing the point.
GuidoErrCode getTimeMap ( CARHandler  gr,
TimeMapCollector f 
)

Retrieves the rolled to unrolled time mapping.

Parameters:
gra Guido opaque handle to a GR structure.
fa TimeMapCollector object that will be called for each time segment or null if error.
Returns:
a Guido error code