docs/widget.rst
changeset 12 bb7d41be0c44
parent 5 ae128c885d0f
child 13 19ebde2fd594
equal deleted inserted replaced
11:762513aacc87 12:bb7d41be0c44
     4 .. toctree::
     4 .. toctree::
     5    :maxdepth: 2
     5    :maxdepth: 2
     6 
     6 
     7    container
     7    container
     8    button
     8    button
       
     9 
       
    10 .. py:module:: tuikit.widget
       
    11 
     9 
    12 
    10 Class attributes
    13 Class attributes
    11 ----------------
    14 ----------------
    12 
    15 
    13 .. attribute:: Widget.parent
    16 .. attribute:: Widget.parent
    63 .. attribute:: Widget.layouthints
    66 .. attribute:: Widget.layouthints
    64 
    67 
    65    Dictionary containing optional parameters for layout managers.
    68    Dictionary containing optional parameters for layout managers.
    66 
    69 
    67 
    70 
    68 Event management
       
    69 ----------------
       
    70 
       
    71 .. classmethod:: Widget.newevent(event)
       
    72 
       
    73    Create new event with empty handler list.
       
    74 
       
    75 
       
    76 .. classmethod:: Widget.connect(event, handler)
       
    77 
       
    78    Add handler to handler list of the event.
       
    79 
       
    80 
       
    81 .. classmethod:: Widget.disconnect(event, handler=None)
       
    82 
       
    83    Remove handler from event's handler list. If no handler is given, remove all handlers.
       
    84 
       
    85 
       
    86 .. classmethod:: Widget.handle(event, ...)
       
    87 
       
    88    Call all handlers from event's handler list.
       
    89    This is used when user defined handlers are to be called.
       
    90 
       
    91 
       
    92 .. classmethod:: Widget.emit(event, ...)
       
    93 
       
    94    Emit event.
       
    95    This is used by original event source when the event is detected.