Ipelib
|
The Ipe library ("Ipelib") provides the geometric primitives and implements all the geometric objects that appear in Ipe. Many tasks related to modifying an Ipe document are actually performed by Ipelib. For instance, the ipetoipe program consists of only a few calls to Ipelib.
Ipelib can easily be used by C++ programs to read, write, and modify Ipe documents. Compiling Ipelib is easy, it requires only the standard C++ library (including the STL), and the zlib compression library. Nearly all symbols in Ipelib are in the ipe namespace, those that aren't start with the letters "Ipe".
Before using Ipelib in your own program, make sure to initialize the library by calling ipe::Platform::initLib().
Many of the Ipelib classes are also made available as Lua objects. Programming in Lua describes the Lua bindings to Ipelib, to ipeui, and to the Ipe program itself. The Ipe program itself is mostly written in Lua and uses these Lua bindings.
On Unix, all filenames passed to Ipelib are assumed to be in the local system's encoding. On Windows, all filenames passed to Ipelib are assumed to be UTF-8. All Lua strings are assumed to be UTF-8 (filenames are converted by the ipelua bindings).
Ipelets explains how to write ipelets, that is, extensions to Ipe. Ipelets are either written in Lua or in C++ (using a small Lua wrapper to describe the ipelet). C++ ipelets have to be linked with Ipelib to access and modify Ipe objects.
The classes documented here are implemented in five different libraries:
require
. It is also used by ipescript. Here is an annotated list of the modules:
Finally, here is list of the pages describing Lua bindings: