docs/widget.rst
author Radek Brich <radek.brich@devl.cz>
Wed, 16 Mar 2011 15:19:05 +0100
changeset 3 33ec838dc021
parent 2 684cdc352562
child 5 ae128c885d0f
permissions -rw-r--r--
Fixed escape sequence handling.

Widget
======

.. toctree::
   :maxdepth: 2

   container
   button

Class attributes
----------------

.. attribute:: Widget.parent

.. attribute:: Widget.top

.. attribute:: Widget.x

.. attribute:: Widget.y

.. attribute:: Widget.width

.. attribute:: Widget.height

.. attribute:: Widget.hidden

.. attribute:: Widget.allowlayout


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.