Package wx :: Class Event

[frames | no frames]

## Type Event

    object --+
             |
        Object --+
                 |
                Event

Known Subclasses:
  `ActivateEvent`, `AuiManagerEvent`, `CalculateLayoutEvent`, `CloseEvent`, `CommandEvent`, `DisplayChangedEvent`, `DropFilesEvent`, `EraseEvent`, `FocusEvent`, `IconizeEvent`, `IdleEvent`, `InitDialogEvent`, `JoystickEvent`, `KeyEvent`, `MaximizeEvent`, `MenuEvent`, `MouseCaptureChangedEvent`, `MouseCaptureLostEvent`, `MouseEvent`, `MoveEvent`, `NavigationKeyEvent`, `NcPaintEvent`, `PaintEvent`, `PaletteChangedEvent`, `PowerEvent`, `ProcessEvent`, `PyEvent`, `QueryLayoutInfoEvent`, `QueryNewPaletteEvent`, `ScrollWinEvent`, `SetCursorEvent`, `ShowEvent`, `SizeEvent`, `SysColourChangedEvent`, `TaskBarIconEvent`, `TimerEvent`

An event is a structure holding information about an event passed to a callback or member function. wx.Event is an abstract base class for other event classes

Method Summary
| `__init__(self)`
| `__del__(self)`
Event | `Clone(self)`
Object | ``GetEventObject`(self)` Returns the object (usually a window) associated with the event, if any.
EventType | ``GetEventType`(self)` Returns the identifier of the given event type, such as `wxEVT_COMMAND_BUTTON_CLICKED`.
int | ``GetId`(self)` Returns the identifier associated with this event, such as a button command id.
bool | ``GetSkipped`(self)` Returns true if the event handler should be skipped, false otherwise.
long | `GetTimestamp(self)`
bool | ``IsCommandEvent`(self)` Returns true if the event is or is derived from `wx.CommandEvent` else it returns false.
| ``ResumePropagation`(self, propagationLevel)` Resume the event propagation by restoring the propagation level.
| ``SetEventObject`(self, obj)` Sets the originating object, or in other words, obj is normally the object that is sending the event.
| ``SetEventType`(self, typ)` Sets the specific type of the event.
| ``SetId`(self, Id)` Set's the ID for the event.
| `SetTimestamp(self, ts)`
bool | ``ShouldPropagate`(self)` Test if this event should be propagated to the parent window or not, i.e.
| ``Skip`(self, skip)` This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns.
int | ``StopPropagation`(self)` Stop the event from propagating to its parent window.

Property Summary
| `EventObject`: See `GetEventObject` and `SetEventObject`
| `EventType`: See `GetEventType` and `SetEventType`
| `Id`: See `GetId` and `SetId`
| `Skipped`: See `GetSkipped`
| `thisown`: The membership flag
| `Timestamp`: See `GetTimestamp` and `SetTimestamp`

Method Details

### GetEventObject(self)

Returns the object (usually a window) associated with the event, if any.

  Returns:
    Object

### GetEventType(self)

Returns the identifier of the given event type, such as `wxEVT_COMMAND_BUTTON_CLICKED`.

  Returns:
    EventType

### GetId(self)

Returns the identifier associated with this event, such as a button command id.

  Returns:
    int

### GetSkipped(self)

Returns true if the event handler should be skipped, false otherwise. :see: `Skip`

  Returns:
    bool

### IsCommandEvent(self)

Returns true if the event is or is derived from `wx.CommandEvent` else it returns false. Note: Exists only for optimization purposes.

  Returns:
    bool

### ResumePropagation(self, propagationLevel)

Resume the event propagation by restoring the propagation level. (For example, you can use the value returned by an earlier call to `StopPropagation`.)

  Parameters:
    `propagationLevel`
    (type=int)

### SetEventObject(self, obj)

Sets the originating object, or in other words, obj is normally the object that is sending the event.

  Parameters:
    `obj`
    (type=Object)

### SetEventType(self, typ)

Sets the specific type of the event.

  Parameters:
    `typ`
    (type=EventType)

### SetId(self, Id)

Set's the ID for the event. This is usually the ID of the window that is sending the event, but it can also be a command id from a menu item, etc.

  Parameters:
    `Id`
    (type=int)

### ShouldPropagate(self)

Test if this event should be propagated to the parent window or not, i.e. if the propagation level is currently greater than 0.

  Returns:
    bool

### Skip(self, skip=True)

This method can be used inside an event handler to control whether further event handlers bound to this event will be called after the current one returns. Without Skip() (or equivalently if Skip(False) is used), the event will not be processed any more. If Skip(True) is called, the event processing system continues searching for a further handler function for this event, even though it has been processed already in the current handler.

  Parameters:
    `skip`
    (type=bool)

### StopPropagation(self)

Stop the event from propagating to its parent window. Returns the old propagation level value which may be later passed to `ResumePropagation` to allow propagating the event again.

  Returns:
    int

Property Details

### EventObject

See `GetEventObject` and `SetEventObject`

  Get Method:
    `GetEventObject`(self)
  Set Method:
    `SetEventObject`(self, obj)

### EventType

See `GetEventType` and `SetEventType`

  Get Method:
    `GetEventType`(self)
  Set Method:
    `SetEventType`(self, typ)

### Id

See `GetId` and `SetId`

  Get Method:
    `GetId`(self)
  Set Method:
    `SetId`(self, Id)

### Skipped

See `GetSkipped`

  Get Method:
    `GetSkipped`(self)

### thisown

The membership flag

### Timestamp

See `GetTimestamp` and `SetTimestamp`

  Get Method:
    `GetTimestamp`(self)
  Set Method:
    `SetTimestamp`(self, ts)

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:13:38 2007 | http://epydoc.sf.net