# HG changeset patch # User Radek Brich # Date 1315469635 -7200 # Node ID bb7d41be0c4406795f9b4dd656dcad9b9f86e02f # Parent 762513aacc87aa4c78b3ad13c54d1e4c104e6210 Update EventSource documentation. diff -r 762513aacc87 -r bb7d41be0c44 docs/conf.py --- a/docs/conf.py Wed Aug 17 23:43:52 2011 +0200 +++ b/docs/conf.py Thu Sep 08 10:13:55 2011 +0200 @@ -16,7 +16,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.append(os.path.abspath('.')) +sys.path.append(os.path.abspath('..')) # -- General configuration ----------------------------------------------------- diff -r 762513aacc87 -r bb7d41be0c44 docs/eventsource.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/eventsource.rst Thu Sep 08 10:13:55 2011 +0200 @@ -0,0 +1,12 @@ +EventSource +=========== + +.. toctree:: + :maxdepth: 2 + + widget + +.. automodule:: tuikit.eventsource + :members: + :show-inheritance: + diff -r 762513aacc87 -r bb7d41be0c44 docs/index.rst --- a/docs/index.rst Wed Aug 17 23:43:52 2011 +0200 +++ b/docs/index.rst Thu Sep 08 10:13:55 2011 +0200 @@ -6,7 +6,8 @@ .. toctree:: :maxdepth: 3 - widget + eventsource + events focus redraw colors diff -r 762513aacc87 -r bb7d41be0c44 docs/widget.rst --- a/docs/widget.rst Wed Aug 17 23:43:52 2011 +0200 +++ b/docs/widget.rst Thu Sep 08 10:13:55 2011 +0200 @@ -7,6 +7,9 @@ container button +.. py:module:: tuikit.widget + + Class attributes ---------------- @@ -65,31 +68,3 @@ Dictionary containing optional parameters for layout managers. -Event management ----------------- - -.. classmethod:: Widget.newevent(event) - - Create new event with empty handler list. - - -.. classmethod:: Widget.connect(event, handler) - - Add handler to handler list of the event. - - -.. classmethod:: Widget.disconnect(event, handler=None) - - Remove handler from event's handler list. If no handler is given, remove all handlers. - - -.. classmethod:: Widget.handle(event, ...) - - Call all handlers from event's handler list. - This is used when user defined handlers are to be called. - - -.. classmethod:: Widget.emit(event, ...) - - Emit event. - This is used by original event source when the event is detected. diff -r 762513aacc87 -r bb7d41be0c44 tuikit/__init__.py --- a/tuikit/__init__.py Wed Aug 17 23:43:52 2011 +0200 +++ b/tuikit/__init__.py Thu Sep 08 10:13:55 2011 +0200 @@ -16,3 +16,4 @@ from tuikit.treeview import TreeNode, TreeModel, TreeView from tuikit.widget import Widget from tuikit.window import Window + diff -r 762513aacc87 -r bb7d41be0c44 tuikit/eventsource.py --- a/tuikit/eventsource.py Wed Aug 17 23:43:52 2011 +0200 +++ b/tuikit/eventsource.py Thu Sep 08 10:13:55 2011 +0200 @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- - class EventSource: + '''Event source mixin.''' def __init__(self): self.event = dict() @@ -55,3 +55,4 @@ getattr(self, event)(*args, **kwargs) except AttributeError: self.handle(event, *args, **kwargs) +