8 #ifndef __VRV_TOOLKIT_H__
9 #define __VRV_TOOLKIT_H__
16 #include "docselection.h"
17 #include "toolkitdef.h"
68 std::string
GetID() {
return m_doc.GetID(); }
272 int GetScale() {
return m_options->m_scale.GetValue(); }
304 bool Select(
const std::string &selection);
321 bool Edit(
const std::string &editorAction);
349 std::string
RenderData(
const std::string &data,
const std::string &jsonOptions);
358 std::string
RenderToSVG(
int pageNo = 1,
bool xmlDeclaration =
false);
509 std::string
GetMEI(
const std::string &jsonOptions =
"");
520 bool SaveFile(
const std::string &filename,
const std::string &jsonOptions =
"");
729 int GetOutputTo() {
return m_outputTo; }
747 double GetRuntimeInSeconds()
const;
748 void LogRuntime()
const;
783 bool LoadData(
const std::string &data,
bool resetLogBuffer);
786 bool SetFont(
const std::string &fontName);
787 bool IsUTF16(
const std::string &filename);
788 bool LoadUTF16File(
const std::string &filename);
789 bool IsZip(
const std::string &filename);
790 bool LoadZipFile(
const std::string &filename);
791 bool LoadZipData(
const std::vector<unsigned char> &bytes);
792 void GetClassIds(
const std::vector<std::string> &classStrings, std::vector<ClassId> &classIds);
800 std::string
GetOptions(
bool defaultValues)
const;
805 void SetViewAndEditor();
813 FileFormat m_inputFrom;
814 FileFormat m_outputTo;
818 std::optional<std::locale> m_previousLocale;
829 std::stringstream m_cerrCaptured;
835 std::streambuf *m_cerrOriginalBuf;
848 static char *m_humdrumBuffer;
This class is an abstract device context.
Definition: devicecontext.h:57
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This class stores a document selection.
Definition: docselection.h:24
This class is a base class of each styling parameter.
Definition: options.h:100
This class contains the document styling parameters.
Definition: options.h:576
This class represents a clock to measure runtime.
Definition: runtimeclock.h:26
This class is a drawing context and corresponds to the view of a MVC design pattern.
Definition: view.h:106
const char * GetHumdrumBuffer()
Return the content of the humdrum internal buffer.
void InitClock()
Measuring runtime.
const char * GetCString()
Return the content of the cstring internal buffer.
void SetHumdrumBuffer(const char *contents)
Copy the data to the humdrum internal buffer.
Options * GetOptionsObj()
Return the Options object of the Toolkit instance.
Definition: toolkit.h:669
void SetCString(const std::string &data)
Copy the data to the cstring internal buffer.
void SetLocale()
Setting the global locale.
void GetHumdrum(std::ostream &output)
Write the Humdrum buffer to the outputstream.
bool RenderToDeviceContext(int pageNo, DeviceContext *deviceContext)
Render the page to the deviceContext.
int GetInputFrom()
Get the input format.
Definition: toolkit.h:724
void ClearHumdrumBuffer()
Clear the Humdrum buffer of any contents.