# Class k.u.t.r.Event(object):

Part of kiwi.ui.test.recorder View In Hierarchy

Known subclasses: kiwi.ui.test.recorder.SignalEvent, kiwi.ui.test.recorder.WindowDeleteEvent

Event is a base class for all events. An event represent a user change of an interactive widget.

Class Variables | object_type | subclass for type, `Recorder` uses this to automatically attach events to objects when they appear

Method | __init__ | Create a new Event object.
Method | get_toplevel | This fetches the toplevel widget for a specific object,
Method | serialize | Serialize the widget, write the code here which is

def __init__(self, object, name=None):
overridden in kiwi.ui.test.recorder.SignalEvent
Create a new Event object.

Parameters | object | a gobject subclass
| name | name of the object, if None, the method get_name() will be called

def get_toplevel(self, widget):
overridden in kiwi.ui.test.recorder.ImageMenuItemButtonReleaseEvent, kiwi.ui.test.recorder.ObjectListSelectionChanged

This fetches the toplevel widget for a specific object, by default it assumes it's a wiget subclass and calls get_toplevel() for the widget

Override this in a subclass.

def serialize(self):
overridden in kiwi.ui.test.recorder.ButtonClickedEvent, kiwi.ui.test.recorder.EntryActivateEvent, kiwi.ui.test.recorder.EntrySetTextEvent, kiwi.ui.test.recorder.ImageMenuItemButtonReleaseEvent, kiwi.ui.test.recorder.MenuItemActivateEvent, kiwi.ui.test.recorder.ObjectListDoubleClick, kiwi.ui.test.recorder.ObjectListSelectionChanged, kiwi.ui.test.recorder.ToolButtonReleaseEvent
Serialize the widget, write the code here which is used to reproduce the event, for a button which is clicked the implementation looks like this:

    >>> def serialize(self):
    >>> ... return '%s.clicked' % self.name

Returns | string to reproduce event Override this in a subclass.