GUIDOLib  1.7.7
A Music Score Rendering Engine
Classes | Functions | Variables
GUIDOEngineAdapter.h File Reference

Go to the source code of this file.

Classes

struct  ParserError
 A structure for parser error. More...
 
struct  GuidoVersion
 A structure for guido version, composed of 3 digit. More...
 

Functions

virtual ~GuidoEngineAdapter ()
 ~GuidoEngineAdapter More...
 
GuidoErrCode init (GuidoInitDesc *desc)
 Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory. More...
 
GuidoErrCode init ()
 Initialise the Guido Engine with a internal SVGSystem and SVGDevice. This system and device have embind font metrics. They are used to calculate score in environnement without font metrics like javascript. More...
 
void shutdown ()
 Guido Engine shutdown. More...
 
GuidoErrCode ar2gmn (ARHandler ar, std::ostream &to)
 Print a Guido abstract representation to a stream formatted as gmn code. More...
 
GRHandler ar2gr (ARHandler ar)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. Default settings are applied. More...
 
GRHandler ar2gr (ARHandler ar, const GuidoLayoutSettings &settings)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. More...
 
GuidoErrCode updateGR (GRHandler gr)
 Applies new layout settings to an existing Guido graphic representation. Default settings are applied. More...
 
GuidoErrCode updateGR (GRHandler gr, const GuidoLayoutSettings &settings)
 Applies new layout settings to an existing Guido graphic representation. More...
 
void freeAR (ARHandler ar)
 Releases a Guido abstract representation. This method must be called after freeGR. More...
 
void freeGR (GRHandler gr)
 Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler before release the GR. More...
 
std::string getErrorString (GuidoErrCode errCode)
 Gives a textual description of a Guido error code. More...
 
GuidoLayoutSettings getDefaultLayoutSettings ()
 Gives the default values of the layout settings. More...
 
GuidoErrCode showElement (GRHandler gr, int elt, bool status)
 
GuidoVersion getVersion ()
 Gives the library version number as three integers. More...
 
std::string getVersionStr ()
 
GuidoErrCode checkVersionNums (int major, int minor, int sub)
 Checks a required library version number. More...
 
float getLineSpace ()
 Gives the distance between two staff lines. More...
 
GuidoErrCode markVoice (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 setSymbolPath (ARHandler inHandleAR, const std::vector< std::string > &inPaths)
 Makes the correspondance between an ARMusic and a path. More...
 
std::vector< std::string > getSymbolPath (const ARHandler inHandleAR)
 Returns the path corresponding to an AR. More...
 
long getParsingTime (const ARHandler ar)
 Gets parsing time. More...
 
long getAR2GRTime (const GRHandler gr)
 Gets AR to GR procedure time. More...
 
long getOnDrawTime (const GRHandler gr)
 Gets GR drawing procedure time. More...
 
GuidoParser * openParser ()
 Creates a new parser. More...
 
GuidoErrCode closeParser (GuidoParser *p)
 Close a guido parser and releases all the associated ressources. More...
 
ARHandler file2AR (GuidoParser *parser, const std::string &file)
 Parse a file and create the corresponding AR. More...
 
ARHandler string2AR (GuidoParser *parser, const std::string &gmnCode)
 Parse a string and create the corresponding AR. More...
 
std::string getStream (const GuidoStream *gStream) const
 returns the string of the stream More...
 
ARHandler stream2AR (GuidoParser *p, GuidoStream *stream)
 Parse a stream and create the corresponding AR. More...
 
ParserError parserGetErrorCode (GuidoParser *p)
 Get the error syntax line/column/message. More...
 
GuidoStream * openStream ()
 Open a guido stream. More...
 
GuidoErrCode closeStream (GuidoStream *s)
 Close a guido stream. More...
 
GuidoErrCode writeStream (GuidoStream *s, const std::string &str)
 Write data to the stream. More...
 
GuidoErrCode resetStream (GuidoStream *s)
 Erase all stream content in order to reuse it. More...
 
int countVoices (CARHandler inHandleAR)
 Gives the number of score pages of the graphic representation. More...
 
int getPageCount (CGRHandler inHandleGR)
 Gives the number of score pages of the graphic representation. More...
 
int getSystemCount (CGRHandler inHandleGR, int page)
 Gives the number of systems on a given page. More...
 
GuidoDate duration (CGRHandler inHandleGR)
 Returns the music duration of a score. More...
 
int findEventPage (CGRHandler inHandleGR, const GuidoDate &date)
 Finds the page which has an event (note or rest) at a given date. More...
 
int findPageAt (CGRHandler inHandleGR, const GuidoDate &date)
 Finds the page which contain a given date. More...
 
GuidoDate getPageDate (CGRHandler inHandleGR, int pageNum)
 Gives the time location of a Page. More...
 
GuidoErrCode onDraw (GuidoOnDrawDesc *desc)
 Draws one page of score into a graphic device. More...
 
std::string gr2SVG (const GRHandler handle, int page, std::ostream &out, int w, int h, bool embedFont=true)
 Exports one page of score to SVG. More...
 
GuidoErrCode gr2SVG (const GRHandler handle, int page, std::ostream &out, bool embedFont=true, const char *font=0, const int mappingMode=0)
 Exports one page of score to SVG. More...
 
std::string gr2SVG (const GRHandler handle, int page, bool embedfont=true, const int mappingMode=0)
 Exports one page of score to SVG. More...
 
std::string gr2SVGColored (const GRHandler handle, int page, int r, int g, int b, bool embedfont=true)
 Exports one page of score to SVG. More...
 
GuidoErrCode abstractExport (const GRHandler handle, int page, std::ostream &out)
 Exports an abstract representation of GUIDO draw commands. More...
 
std::string abstractExport (const GRHandler handle, int page)
 Exports an abstract representation of GUIDO draw commands. More...
 
GuidoErrCode binaryExport (const GRHandler handle, int page, std::ostream &out)
 Exports an representation of GUIDO draw commands in a data-reduced dsl. More...
 
std::string binaryExport (const GRHandler handle, int page)
 Exports an representation of GUIDO draw commands in a data-reduced dsl. More...
 
void setDrawBoundingBoxes (int bbMap)
 Control bounding boxes drawing. More...
 
int getDrawBoundingBoxes ()
 Gives bounding boxes drawing state. More...
 
GuidoPageFormat getPageFormat (CGRHandler inHandleGR, int pageNum)
 Gives a score page format. More...
 
void setDefaultPageFormat (const GuidoPageFormat &format)
 Sets the default score page format. More...
 
GuidoPageFormat getDefaultPageFormat ()
 Gives the default score page format. More...
 
float unit2CM (float val)
 Converts internal Guido units into centimeters. More...
 
float cm2Unit (float val)
 Converts centimeters into internal Guido units. More...
 
float unit2Inches (float val)
 Converts internal Guido units into inches. More...
 
float inches2Unit (float val)
 Converts inches into internal Guido units. More...
 
GuidoErrCode resizePageToMusic (GRHandler inHandleGR)
 Resize the page sizes to the music size. More...
 

Variables

class_export GuidoEngineAdapter
 

Guido Project Copyright © 2019 Grame-CNCM