comparison clients/editor/fifedit.py @ 0:4a0efb7baf70

* Datasets becomes the new trunk and retires after that :-)
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 29 Jun 2008 18:44:17 +0000
parents
children 28532ae6f9f6
comparison
equal deleted inserted replaced
-1:000000000000 0:4a0efb7baf70
1 # coding: utf-8
2
3 import fife
4 import pychan
5 import pychan.widgets as widgets
6
7 class Fifedit():
8 """
9 Fifedit is the editor tool. It is designed to be embedded in clients, most notably the editor.
10 Fifedit is a plugin system for editing tools. See L{registerPlugin}.
11 """
12 def __init__(self, engine):
13 pychan.init(engine,debug=False)
14 self.gui = pychan.loadXML('content/gui/rootpanel.xml')
15 eventMap = {
16 'quitButton' : self.quit
17 }
18 self.gui.mapEvents(eventMap)
19 self.gui.show()
20
21 self.active = True
22
23 # To create a plugin, just define menu_items with string keys and function values.
24 # The key will be displayed on the Editor menu, and the value will be called when the key is clicked.
25 def registerPlugin(self, plugin):
26 plugin.install(self.gui)
27
28 def quit(self):
29 self.gui.hide()
30 self.active = False