Fantom

 

class

fwt::Event

sys::Obj
  fwt::Event

@Js

Event models a user input event for callbacks.

Slots

buttonSource

Int? button

Mouse button number pressed

consumeSource

Void consume()

Convenience for setting consumed to true.

consumedSource

Bool consumed := false

Has this event been "consumed"? Once an event is consumed it ceases to propagate or be processed. Also see consume.

countSource

Int? count

Number of mouse clicks.

dataSource

Obj? data

Event specific user data.

idSource

EventId id := EventId.unknown

Type identifier of the event. This field is always available.

indexSource

Int? index

Index for list based events. For table events this is the row index.

keySource

Key? key

Key code and modifiers.

keyCharSource

Int? keyChar

Unicode character represented by a key event.

offsetSource

Int? offset

Used as the zero based text offset for text and rich text widget events.

Menu? popup

If this a popup event, then this field should be set to the menu item to open. Setting this field to a nonnull value implicitly consumes the event.

posSource

Point? pos

Coordinate of event. For mouse events this is the mouse coordinate relative to the widget.

sizeSource

Int? size

Number of characters for text and rich text widget events.

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Doc inherited from sys::Obj.toStr

Return a string representation of this object.

widgetSource

Widget? widget

Widget which generated the event. This will be null for model events.

windowSource

Window? window()

Convenience for widget?.window.