Previous: How to Avoid Plugin Problems, Up: GUI Plugin Interface

10.4.3 An Example of a GUI Plugin

An example of a GUI plugin can be found in the file plugin/heaven.c. This plugin uses both the kernel and the GUI interface and demonstrates the most useful features. It is heavily commented and quite self-descriptive.

It includes registering commands via the convenient plugin interface and manually created commands as well; it also shows how to create GO Factory states and use them. It demonstrates some additional GUI features, such as property recycling (see Property Recycler) and context changes (see The Context). Moreover, it shows a complex kernel transaction which creates graphic objects dependent on one another.