# HG changeset patch # User phoku@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1238154775 0 # Node ID 92c7ce181881f223c4975854c9d5d35ffa160123 # Parent 6527d53c7133f74b08d538ee3e18753191e1abc3 Documentation cross reference fixes. diff -r 6527d53c7133 -r 92c7ce181881 engine/extensions/pychan/__init__.py --- a/engine/extensions/pychan/__init__.py Thu Mar 26 17:13:03 2009 +0000 +++ b/engine/extensions/pychan/__init__.py Fri Mar 27 11:52:55 2009 +0000 @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -# coding: utf-8 """\ Pythonic Guichan Wrapper - PyChan @@ -100,7 +99,7 @@ Other important places to look for information: - L{widgets.Widget} - Attributes explained. - L{loadXML} - Explain the XML format. - - L{LayoutBase} - Working of the layout engine. + - L{widgets.layout.LayoutBase} - Working of the layout engine. Initialization, data distribution and collection ================================================ @@ -239,13 +238,18 @@ 'manager' ] + +# For epydoc +import widgets +import widgets.ext + +# This *import should really be removed! from widgets import * + from exceptions import * from fonts import loadFonts -# Text munging befor adding it to TextBoxes - ### Initialisation ### manager = None @@ -422,15 +426,17 @@ def setUnicodePolicy(*policy): """ + Set the unicode error handling policy. + Possible options are: - - 'strict' meaning that encoding errors raise a UnicodeEncodeError. - - 'ignore' all encoding errors will be silently ignored. - - 'replace' all errors are replaced by the next argument. + - 'strict' meaning that encoding errors raise a UnicodeEncodeError. + - 'ignore' all encoding errors will be silently ignored. + - 'replace' all errors are replaced by the next argument. For further information look at the python documentation, especially L{codecs.register_error}. - Example: + Example:: pychan.setUnicodePolicy('replace','?') """ if not manager: diff -r 6527d53c7133 -r 92c7ce181881 engine/extensions/pychan/events.py --- a/engine/extensions/pychan/events.py Thu Mar 26 17:13:03 2009 +0000 +++ b/engine/extensions/pychan/events.py Fri Mar 27 11:52:55 2009 +0000 @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -#coding: utf-8 -""" -PyChan event handling -===================== +"""\ +PyChan event handling (internal). +================================= Users shouldn't need to use this module directly. L{widgets.Widget.capture} and L{widgets.Widget.mapEvents} provide a convenient API to capture events. Nevertheless to understand how its supposed to work -take a look at L{EventMapper} and L{EventListener} +take a look at L{EventMapper} and L{EventListenerBase} Event callbacks --------------- @@ -40,6 +39,7 @@ """ from compat import guichan +import widgets import exceptions from internal import get_manager @@ -188,8 +188,8 @@ as attribute B{event_mapper}. This instance handles all necessary house-keeping. - Such an event mapper can be either *attached* or - *detached*. In its attached state an L{EventListener} + Such an event mapper can be either C{attached} or + C{detached}. In its attached state an L{EventListenerBase} is added to the Guichan widget and will redirect the events to the callbacks.