API documentation of the zim plugin framework.
This file contains the base classes used to write plugins for zim. Each plugin is defined as a sub-module in the "zim.plugins" namespace.
To be recognized as a plugin, a submodule of "zim.plugins" needs to define one (and only one) sub-class of PluginClass
. This class will define the main plugin object and contains meta data about the plugin and e.g. plugin preferences.
The plugin object itself doesn't directly interact with the rest of the zim application. To actually add functionality to zim, the plugin module will also need to define one or more "extension" classes. These classes act as decorators for specific objects that appear in the application. They will be instantiated automatically whenever the target object is created. The extension object then has direct access to the API of the object that is being extended.
Each extension object that is instantiated is linked to the plugin object that it belongs to. So it can access functions of the plugin object and it can use the plugin object to find other extension objects if it needs to cooperate.
Also defined here is the PluginManager
class. This class is the interface towards the rest of the application to load/unload plugins and to let plugins extend specific application objects.
Package | attachmentbrowser |
Zim plugin to display files in attachments folder. |
Package | base |
No package docstring; 1/1 module documented |
Package | pageindex |
No package docstring; 0/1 variable, 0/9 constant, 2/6 classes, 0/1 module documented |
Package | tasklist |
No package docstring; 0/3 class, 1/3 module documented |
Package | versioncontrol |
No package docstring; 0/1 variable, 0/1 constant, 0/1 function, 2/11 classes, 0/4 module documented |
Module | arithmetic |
Undocumented |
Module | backlinkpane |
Undocumented |
Module | bookmarksbar |
No module docstring; 0/1 variable, 0/2 constant, 1/4 class documented |
Module | commandpalette |
No module docstring; 0/1 variable, 3/4 classes documented |
Module | diagrameditor |
Undocumented |
Module | distractionfree |
Undocumented |
Module | ditaaeditor |
Undocumented |
Module | equationeditor |
Undocumented |
Module | gnu_r_ploteditor |
Undocumented |
Module | gnuplot_ploteditor |
Undocumented |
Module | inlinecalculator |
No module docstring; 0/2 variable, 0/1 constant, 15/18 functions, 0/3 class documented |
Module | insertsymbol |
Undocumented |
Module | journal |
No module docstring; 0/5 variable, 0/2 constant, 2/2 functions, 3/6 classes documented |
Module | linesorter |
Undocumented |
Module | linkmap |
Plugin showing a map of links between pages based on GraphViz |
Module | osx_menubar |
Undocumented |
Module | pathbar |
No module docstring; 0/4 variable, 0/10 constant, 3/13 classes documented |
Module | printtobrowser |
Plugin to serve as work-around for the lack of printing support |
Module | quicknote |
No module docstring; 0/2 variable, 1/4 class documented |
Module | scoreeditor |
Undocumented |
Module | screenshot |
Undocumented |
Module | sequencediagrameditor |
Undocumented |
Module | sourceview |
Undocumented |
Module | spell |
Spell check plugin based on gtkspell |
Module | tableeditor |
No module docstring; 0/1 variable, 0/5 constant, 1/1 function, 4/6 classes documented |
Module | tableofcontents |
No module docstring; 0/1 variable, 0/2 constant, 2/4 functions, 0/8 class documented |
Module | tags |
No module docstring; 0/1 variable, 6/9 classes documented |
Module | toolbar |
Undocumented |
Module | trayicon |
No module docstring; 0/2 variable, 0/2 constant, 0/1 function, 4/6 classes documented |
Module | zeitgeist-logger |
Push events to the Zeitgeist daemon |
From __init__.py
:
Class | DialogExtensionBase |
Base class for extending Gtk dialogs based on Gtk.Dialog @ivar dialog: the Gtk.Dialog object |
Class | ExtensionBase |
Base class for all extensions classes @ivar plugin: the plugin object to which this extension belongs @ivar obj: the extendable object |
Class | InsertedObjectTypeExtension |
Undocumented |
Class | InsertedObjectTypeMap |
No summary |
Class | PluginClass |
Base class for plugins objects. |
Class | PluginManagerClass |
Manager that maintains a set of active plugins |
Function | extendable |
No summary |
Function | find_action |
No summary |
Function | find_extension |
No summary |
Function | list_actions |
List actions Returns list of actions of obj followed by all actions of all of it's extensions. Each action is a 2-tuple of the action and it's name. |
Function | resetPluginManager |
Undocumented |
Constant | PLUGIN_FOLDER |
Undocumented |
Variable | logger |
Undocumented |
Class | _BootstrapPluginManager |
Undocumented |
Class | _MyMeta |
Undocumented |
Variable | _bootstrappluginmanager |
Undocumented |
Parameters | |
*extension_bases | base classes for extensions |
register_after_init | if True the class is registered with the PluginManager directly after it's __init__() method has run. If False the class can call PluginManager.register_new_extendable(self) explicitly whenever ready. |
Parameters | |
obj | the extended object |
klass | the class of the extention object |
Returns | |
a single extension object, if multiple extensions match, the first is returned | |
Raises | |
ValueError | if no extension was found |
Parameters | |
obj | the extended object |
actionname | the name of the action |
Returns | |
an action method | |
Raises | |
ValueError | if no action was found |