Update EventSource documentation.
authorRadek Brich <radek.brich@devl.cz>
Thu, 08 Sep 2011 10:13:55 +0200
changeset 12 bb7d41be0c44
parent 11 762513aacc87
child 13 19ebde2fd594
Update EventSource documentation.
docs/conf.py
docs/eventsource.rst
docs/index.rst
docs/widget.rst
tuikit/__init__.py
tuikit/eventsource.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 -----------------------------------------------------
 
--- /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:
+
--- 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
--- 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.
--- 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
+
--- 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)
+