|
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. Lua bindings for Ipelib describes these bindings. The Ipe program itself is mostly written in Lua and uses these Lua bindings.
Ipe uses UTF-8 for all text strings, including filenames passed to Ipelib and all Lua strings.
The manual explains how to write Ipe scripts and ipelets (extensions to Ipe) in Lua. Ipelets can also be written 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:
For quick access, the Lua bindings for Ipelib:
The Lua bindings for ipeui (dialogs, menus, etc.), and for Ipe itself (available in ipelets, but not in Ipe scripts):