GUIDOLib  1.7.7
A Music Score Rendering Engine
Classes | Macros | Typedefs | Enumerations | Functions
GUIDOEngine.h File Reference

Go to the source code of this file.

Classes

struct  GuidoInitDesc
 A data structure containing all information required by GuidoInit() More...
 
struct  GPaintStruct
 A structure to keep information about clipping and redrawing regions. More...
 
struct  GuidoDate
 Representation of a date as a rational value. More...
 
struct  GuidoMeter
 A meter representation. More...
 
struct  GuidoTempo
 Representation of tempo information at a given date. More...
 
struct  GuidoOnDrawDesc
 Contains all graphic-related information required by GuidoOnDraw() More...
 
struct  GuidoLayoutSettings
 Engine settings for the graphic score layout. More...
 
struct  GuidoPageFormat
 The page format parameters. More...
 
struct  GuidoGrParameters
 A structure embedding a layout settings and a page format. More...
 

Macros

#define GUIDOAPI_deprecated   __attribute__((deprecated))
 
#define kMaxGuidoMeterCounts   15
 

Typedefs

typedef struct NodeAR * ARHandler
 
typedef struct NodeGR * GRHandler
 
typedef const struct NodeAR * CARHandler
 
typedef const struct NodeGR * CGRHandler
 
typedef GuidoMeterGuidoMeters
 
typedef GuidoTempoGuidoTempoList
 
typedef struct GuidoLayoutSettings GuidoLayoutSettings
 Engine settings for the graphic score layout. More...
 

Enumerations

enum  TempoType { kTextualTempo, kUnitValueTempo, kUnitUnitTempo }
 tempo specification types. More...
 
enum  {
  kNoBB, kPageBB, kSystemsBB = 2, kSystemsSliceBB = 4,
  kStavesBB = 8, kMeasureBB = 0x10, kEventsBB = 0x20
}
 Bounding boxes drawing control constants. More...
 
enum  GuidoInternalDevice { guido_svg_with_font_spec = 0, guido_abstract = 1, guido_binary = 2 }
 
enum  GuidoErrCode {
  guidoNoErr = 0, guidoErrParse = -1, guidoErrMemory = -2, guidoErrFileAccess = -3,
  guidoErrUserCancel = -4, guidoErrNoMusicFont = -5, guidoErrNoTextFont = -6, guidoErrBadParameter = -7,
  guidoErrInvalidHandle = -8, guidoErrNotInitialized = -9, guidoErrActionFailed = -10
}
 The guido error codes list. More...
 
enum  GuidoMapping { kNoMapping = 0, kVoiceMapping = 1, kStaffMapping = 1<<1, kSystemMapping = 1<<2 }
 Mapping mode for SVG export. More...
 
enum  { kAutoDistrib = 1, kAlwaysDistrib = 2, kNeverDistrib = 3 }
 
enum  GRElement {
  kGRSlur =1, kGRDynamics, kGRArticulations, kGRText,
  kGRLyrics
}
 

Functions

GuidoErrCode GuidoInit (GuidoInitDesc *desc)
 
GuidoErrCode GuidoInitWithIndependentSVG ()
 
void GuidoShutdown ()
 
GuidoErrCode GuidoParseFile (const char *filename, ARHandler *ar) GUIDOAPI_deprecated
 
GuidoErrCode GuidoParseString (const char *str, ARHandler *ar) GUIDOAPI_deprecated
 
GuidoErrCode GuidoAR2GR (ARHandler ar, const GuidoLayoutSettings *settings, GRHandler *gr)
 
GRHandler GuidoAR2GRParameterized (ARHandler ar, const GuidoGrParameters *gp)
 GuidoAR2GRParameterized. Transforms a Guido abstract representation into a Guido graphic representation. It use given GuidoGrParameters with a layout settings and a page format. If a page format is used in gmn code, it has priority over the GuidoGrParameters's page format. More...
 
GuidoErrCode GuidoUpdateGR (GRHandler gr, const GuidoLayoutSettings *settings)
 
GuidoErrCode GuidoShowElement (GRHandler gr, GRElement elt, bool status)
 
float GuidoGetNotesDensity (GRHandler gr)
 
GuidoErrCode GuidoUpdateGRParameterized (GRHandler gr, const GuidoGrParameters *settings)
 
void GuidoFreeAR (ARHandler ar)
 
void GuidoFreeGR (GRHandler gr)
 
const char * GuidoGetErrorString (GuidoErrCode errCode)
 
int GuidoGetParseErrorLine () GUIDOAPI_deprecated
 
void GuidoGetDefaultLayoutSettings (GuidoLayoutSettings *settings)
 
int GuidoCountVoices (CARHandler inHandleAR)
 Gives the number of score pages of the graphic representation. More...
 
int GuidoGetPageCount (CGRHandler inHandleGR)
 Gives the number of score pages of the graphic representation. More...
 
int GuidoGetSystemCount (CGRHandler inHandleGR, int page)
 Gives the number of systems on a given page. More...
 
GuidoErrCode GuidoDuration (CGRHandler inHandleGR, GuidoDate *date)
 Returns the music duration of a score. More...
 
int GuidoFindEventPage (CGRHandler inHandleGR, const GuidoDate &date)
 Finds the page which has an event (note or rest) at a given date. More...
 
int GuidoFindPageAt (CGRHandler inHandleGR, const GuidoDate &date)
 Finds the page which contain a given date. More...
 
GuidoErrCode GuidoGetPageDate (CGRHandler inHandleGR, int pageNum, GuidoDate *date)
 Gives the time location of a Page. More...
 
GuidoErrCode GuidoGetMeterAt (CARHandler inHandleAR, int voicenum, const GuidoDate &date, GuidoMeter &meter)
 Gives the current meter on a given date and voice. More...
 
GuidoErrCode GuidoGetMetersAt (CARHandler inHandleAR, int voicenum, const GuidoDate &date, GuidoMeters &meters)
 Gives the current meters on a given date and voice. More...
 
GuidoErrCode GuidoFreeMeters (GuidoMeters meters)
 Releases a meters array.. More...
 
int GuidoGetTempoList (CARHandler inHandleAR, GuidoTempoList &tempi)
 Gives the tempo list. More...
 
GuidoErrCode GuidoFreeTempoList (GuidoTempoList tempi)
 Releases a tempo array.. More...
 
GuidoErrCode GuidoOnDraw (GuidoOnDrawDesc *desc)
 Draws one page of score into a graphic device. More...
 
GuidoErrCode GuidoGR2SVG (const GRHandler handle, int page, std::ostream &out, bool embedFont, const char *font, const int mappingMode=0)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoGR2SVG1 (const GRHandler handle, int page, std::ostream &out, int width, int height, bool embedFont)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoGR2SVGColored (const GRHandler handle, int page, std::ostream &out, const VGColor &color, bool embedFont)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoSVGExport (const GRHandler handle, int page, std::ostream &out, const char *fontfile, const int mappingMode=0) GUIDOAPI_deprecated
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoSVGExportWithFontSpec (const GRHandler handle, int page, std::ostream &out, const char *fontfile, const char *fontspec, const int mappingMode=0) GUIDOAPI_deprecated
 Exports one page of score to SVG. If fontfile or fontspec are set, the font is added to svg. The fontfile has priority over the fontspec. More...
 
GuidoErrCode GuidoAbstractExport (const GRHandler handle, int page, std::ostream &out)
 Exports an abstract representation of GUIDO draw commands. More...
 
GuidoErrCode GuidoBinaryExport (const GRHandler handle, int page, std::ostream &out)
 Exports an representation of GUIDO draw commands in a data-reduced dsl. More...
 
void GuidoDrawBoundingBoxes (int bbMap)
 Control bounding boxes drawing. More...
 
int GuidoGetDrawBoundingBoxes ()
 Gives bounding boxes drawing state. More...
 
void GuidoGetPageFormat (CGRHandler inHandleGR, int pageNum, GuidoPageFormat *format)
 Gives a score page format. More...
 
void GuidoSetDefaultPageFormat (const GuidoPageFormat *format)
 Sets the default score page format. More...
 
void GuidoGetDefaultPageFormat (GuidoPageFormat *format)
 Gives the default score page format. More...
 
void GuidoSetStaffSize (CGRHandler inHandleGR, int staffNum, float size)
 Gives the staves size (one staff at a time). Staff will have given size until a \staffFormat tag with "size" param is defined. Size should be given in internal units. To convert from cm or inches you should use GuidoCM2Unit or GuidoInches2Unit. More...
 
float GuidoGetStaffSize (CGRHandler inHandleGR, int staffNum)
 Get the staff size of given staff number. More...
 
float GuidoUnit2CM (float val)
 Converts internal Guido units into centimeters. More...
 
float GuidoCM2Unit (float val)
 Converts centimeters into internal Guido units. More...
 
float GuidoUnit2Inches (float val)
 Converts internal Guido units into inches. More...
 
float GuidoInches2Unit (float val)
 Converts inches into internal Guido units. More...
 
GuidoErrCode GuidoResizePageToMusic (GRHandler inHandleGR)
 Resize the page sizes to the music size. More...
 
void GuidoGetVersionNums (int *major, int *minor, int *sub)
 Gives the library version number as three integers. More...
 
const char * GuidoGetVersionStr ()
 Gives the library version number as a string. More...
 
GuidoErrCode GuidoCheckVersionNums (int major, int minor, int sub)
 Checks a required library version number. More...
 
float GuidoGetLineSpace ()
 Gives the distance between two staff lines. More...
 
GuidoErrCode GuidoMarkVoice (ARHandler inHandleAR, int voicenum, const GuidoDate &date, const GuidoDate &duration, unsigned char red, unsigned char green, unsigned char blue)
 Gives a color to all notes of a voice between a given time interval. More...
 
GuidoErrCode GuidoSetSymbolPath (ARHandler inHandleAR, const std::vector< std::string > &inPaths)
 Makes the correspondance between an ARMusic and a path. More...
 
GuidoErrCode GuidoGetSymbolPath (const ARHandler inHandleAR, std::vector< std::string > &inPathVector)
 Returns the path corresponding to an AR. More...
 
long GuidoGetParsingTime (const ARHandler ar)
 Gets parsing time. More...
 
long GuidoGetAR2GRTime (const GRHandler gr)
 Gets AR to GR procedure time. More...
 
long GuidoGetOnDrawTime (const GRHandler gr)
 Gets GR drawing procedure time. More...
 

Macro Definition Documentation

◆ GUIDOAPI_deprecated

#define GUIDOAPI_deprecated   __attribute__((deprecated))

Typedef Documentation

◆ ARHandler

typedef struct NodeAR* ARHandler

◆ CARHandler

typedef const struct NodeAR* CARHandler

◆ CGRHandler

typedef const struct NodeGR* CGRHandler

◆ GRHandler

typedef struct NodeGR* GRHandler

Guido Project Copyright © 2019 Grame-CNCM