YEvent Class Reference

Abstract base class for events to be returned upon UI::UserInput() and related. More...

#include <YEvent.h>

Inheritance diagram for YEvent:

YKeyEvent YSimpleEvent YWidgetEvent YCancelEvent YDebugEvent YMenuEvent YTimeoutEvent List of all members.

Public Types

enum  EventType {
  NoEvent = 0, UnknownEvent, WidgetEvent, MenuEvent,
  KeyEvent, CancelEvent, TimeoutEvent, DebugEvent
}
enum  EventReason { UnknownReason = 0, Activated, SelectionChanged, ValueChanged }

Public Member Functions

 YEvent (EventType eventType=UnknownEvent)
virtual ~YEvent ()
EventType eventType () const
unsigned long serial () const
virtual YCPMap ycpEvent ()
virtual YCPValue userInput ()

Static Public Member Functions

static const char * toString (EventType eventType)
static const char * toString (EventReason reason)

Protected Attributes

EventType _eventType
unsigned long _serial

Static Protected Attributes

static unsigned long _nextSerial = 0
static int _activeEvents = 0

Detailed Description

Abstract base class for events to be returned upon UI::UserInput() and related.


Member Enumeration Documentation

enum YEvent::EventReason
 

Enumerator:
UnknownReason 
Activated 
SelectionChanged 
ValueChanged 

enum YEvent::EventType
 

Enumerator:
NoEvent 
UnknownEvent 
WidgetEvent 
MenuEvent 
KeyEvent 
CancelEvent 
TimeoutEvent 
DebugEvent 


Constructor & Destructor Documentation

YEvent::YEvent EventType  eventType = UnknownEvent  ) 
 

Constructor.

YEvent::~YEvent  )  [virtual]
 

Virtual desctructor to force a polymorph object so dynamic_cast can be used


Member Function Documentation

EventType YEvent::eventType  )  const [inline]
 

Returns the event type.

unsigned long YEvent::serial  )  const [inline]
 

Returns the unique serial no. of this event. This is mainly useful for debugging.

const char * YEvent::toString EventReason  reason  )  [static]
 

Returns the character representation of an event reason.

const char * YEvent::toString EventType  eventType  )  [static]
 

Returns the character representation of an event type.

YCPValue YEvent::userInput  )  [virtual]
 

Returns the ID to be returned upon UI::UserInput().

This is the same as the "id" field of the ycpEvent() map (if this type of event has any such field in its map). It may also be YCPVoid() (nil).

Reimplemented in YWidgetEvent, YKeyEvent, and YSimpleEvent.

YCPMap YEvent::ycpEvent  )  [virtual]
 

Constructs a YCP map to be returned upon UI::WaitForEvent().

Reimplemented in YWidgetEvent, YKeyEvent, and YSimpleEvent.


Member Data Documentation

int YEvent::_activeEvents = 0 [static, protected]
 

EventType YEvent::_eventType [protected]
 

unsigned long YEvent::_nextSerial = 0 [static, protected]
 

unsigned long YEvent::_serial [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6