|
Ipelib
|
#include <ipebase.h>
Public Types | |
| using | DebugHandler = void(*)(const char *) |
Static Public Member Functions | |
| static String | folder (IpeFolder ft, const char *fname=nullptr) |
| static FILE * | fopen (const char *fname, const char *mode) |
| static String | ipeDrive () |
| static int | libVersion () |
| static void | initLib (int version) |
| static void | setDebug (bool debug) |
| static String | latexPath () |
| static bool | fileExists (String fname) |
| static String | readFile (String fname) |
| static String | howToRunLatex (LatexType engine, String docname) noexcept |
| static int | system (String cmd) |
| static String | createTarball (String tex) |
| static double | toDouble (String s) |
| static int | toNumber (String s, int &iValue, double &dValue) |
| static String | spiroVersion () |
| static String | gslVersion () |
| static std::pair< int, std::vector< const char * > > | setupNodeJs () |
| static String | imageFolder (String fname) |
Platform dependent methods.
| using ipe::Platform::DebugHandler = void (*)(const char *) |
References ipe::String::s8().
Referenced by ipe::Document::completeLatexRun(), and ipe::Document::prepareLatexRun().
|
static |
Referenced by ipe::Document::completeLatexRun(), ipe::Reveal::createJson(), ipe::Reveal::createPresentation(), ipe::Document::exportPages(), ipe::Document::exportView(), ipe::Bitmap::formatFromFile(), howToRunLatex(), ipe::Document::load(), ipe::Document::prepareLatexRun(), readFile(), ipe::Bitmap::readJpeg(), ipe::Bitmap::readPNG(), ipe::Bitmap::save(), ipe::Document::save(), ipe::Bitmap::savePixels(), and ipe::Thumbnail::saveRender().
|
static |
Returns drive on which Ipe executable exists.
On Linux and OSX, returns empty string.
Referenced by latexPath().
|
static |
Return the Ipelib version.
This is available as a function so that one can verify what version of Ipelib one has actually linked with (as opposed to the header files used during compilation).
References ipe::IPELIB_VERSION.
|
static |
Initialize Ipelib.
This method must be called before Ipelib is used.
It creates a LC_NUMERIC locale set to 'C', which is necessary for correct loading and saving of Ipe objects. The method also checks that the correct version of Ipelib is loaded, and aborts with an error message if the version is not correct. Also enables ipeDebug messages if environment variable IPEDEBUG is defined. (You can override this using setDebug).
References ipe::IPELIB_VERSION.
|
static |
Enable or disable display of ipeDebug messages.
|
static |
Return path for the directory containing pdflatex and xelatex.
If empty means look on PATH.
References ipeDrive().
|
static |
Determine whether file exists.
References ipe::String::hasPrefix(), ipe::String::s8(), and ipe::String::z().
Read entire file into string.
Returns an empty string if file cannot be found or read. There is no way to distinguish an empty file from this.
References ipe::String::append(), fopen(), and ipe::String::z().
Referenced by ipe::Document::completeLatexRun(), howToRunLatex(), and ipe::Bitmap::readJpeg().
Returns command to run latex on file ipetemp.tex in given directory.
directory of docname is added to TEXINPUTS if its non-empty.
References ipe::String::data(), ipe::String::empty(), ipe::FolderConfig, ipe::FolderLatex, ipe::FolderLua, fopen(), ipe::String::left(), ipe::Luatex, readFile(), ipe::String::s8(), ipe::String::size(), ipe::size(), ipe::String::substr(), ipe::Xetex, and ipe::String::z().
Referenced by ipe::Document::runLatex().
|
static |
References ipe::String::z().
Referenced by ipe::Document::runLatex().
References ipe::Buffer::data(), ipe::StringStream::putChar(), and ipe::String::size().
|
static |
References ipe::String::z().
Referenced by ipe::Lex::getDouble(), and ipe::PdfParser::getObject().
|
static |
References ipe::String::z().
|
static |
|
static |
|
static |
References ipe::String::s8().