docs/widget.rst
author Radek Brich <radek.brich@devl.cz>
Tue, 15 Mar 2011 17:27:09 +0100
changeset 2 684cdc352562
child 5 ae128c885d0f
permissions -rw-r--r--
Menu, Window and other improvements.

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.