Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TEvent Struct Reference

Information about events. More...

#include <system.h>

List of all members.

Public Attributes

ushort what
MouseEventType mouse
KeyDownEvent keyDown
MessageEvent message


Detailed Description

TEvent holds a union of objects of type:

KeyDownEvent MessageEvent MouseEventType

keyed by the what field. The TView::handleEvent() member functions and its derived classes take a TEvent object as argument and respond with the appropriate action.

Definition at line 349 of file system.h.


Member Data Documentation

KeyDownEvent TEvent::keyDown
 

Undocumented.

Definition at line 401 of file system.h.

MessageEvent TEvent::message
 

Undocumented.

Definition at line 405 of file system.h.

MouseEventType TEvent::mouse
 

Undocumented.

Definition at line 397 of file system.h.

ushort TEvent::what
 

This field reports the event's type. Some mnemonics are defined to indicate types of events to TVision event handlers. The following evXXXX constants are used in several places: in the what data member of an TEvent structure, in the TView::eventMask data member of a view object, and in the positionalEvents and focusedEvents variables.

The following event values designate standard event types:

 Constant    Value  Meaning

 evMouseDown 0x0001 Mouse button pressed
 evMouseUp   0x0002 Mouse button released
 evMouseMove 0x0004 Mouse changed location
 evMouseAuto 0x0008 Periodic event while mouse button held down
 evKeyDown   0x0010 Key pressed
 evCommand   0x0100 Command event
 evBroadcast 0x0200 Broadcast event
 

The following constants can be used to mask types of events:

 Constant   Value  Meaning

 evNothing  0x0000 Event already handled
 evMouse    0x000F Mouse event
 evKeyboard 0x0010 Keyboard event
 evMessage  0xFF00 Message (command, broadcast, or user-defined) event
 

The above standard event masks can be used to determine whether an event belongs to a particular "family" of events. For example:

 if ((event.what & evMouse) != 0) doMouseEvent();
 

Definition at line 391 of file system.h.


The documentation for this struct was generated from the following file:
Generated at Sat Sep 22 20:19:24 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001