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);
356 std::string
RenderData(
const std::string &data,
const std::string &jsonOptions);
365 std::string
RenderToSVG(
int pageNo = 1,
bool xmlDeclaration =
false);
516 std::string
GetMEI(
const std::string &jsonOptions =
"");
527 bool SaveFile(
const std::string &filename,
const std::string &jsonOptions =
"");
736 FileFormat GetOutputTo() {
return m_options->GetOutputTo(); }
754 double GetRuntimeInSeconds()
const;
755 void LogRuntime()
const;
790 bool LoadData(
const std::string &data,
bool resetLogBuffer);
798 bool SetFont(
const std::string &fontName);
799 bool IsUTF16(
const std::string &filename);
800 bool LoadUTF16File(
const std::string &filename);
801 bool IsZip(
const std::string &filename);
802 bool LoadZipFile(
const std::string &filename);
803 bool LoadZipData(
const std::vector<unsigned char> &bytes);
804 void GetClassIds(
const std::vector<std::string> &classStrings, std::vector<ClassId> &classIds);
812 std::string
GetOptions(
bool defaultValues)
const;
817 void SetViewAndEditor();
837 std::optional<std::locale> m_previousLocale;
848 std::stringstream m_cerrCaptured;
854 std::streambuf *m_cerrOriginalBuf;
867 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:103
This class contains the document styling parameters.
Definition: options.h:580
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:109
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:676
void SetCString(const std::string &data)
Copy the data to the cstring internal buffer.
void SetLocale()
Setting the global locale.
FileFormat GetInputFrom()
Get the input format.
Definition: toolkit.h:731
void GetHumdrum(std::ostream &output)
Write the Humdrum buffer to the outputstream.
bool RenderToDeviceContext(int pageNo, DeviceContext *deviceContext)
Render the page to the deviceContext.
void ClearHumdrumBuffer()
Clear the Humdrum buffer of any contents.