Abstract base class for events to be returned upon UI::UserInput() and related functions.
More...
#include <YEvent.h>
|
enum | EventType {
NoEvent = 0,
UnknownEvent,
WidgetEvent,
MenuEvent,
KeyEvent,
CancelEvent,
TimeoutEvent,
DebugEvent,
InvalidEvent = 0x4242
} |
|
enum | EventReason {
UnknownReason = 0,
Activated,
SelectionChanged,
ValueChanged,
ContextMenuActivated
} |
|
|
| YEvent (EventType eventType=UnknownEvent) |
| Constructor.
|
|
EventType | eventType () const |
| Returns the event type.
|
|
unsigned long | serial () const |
| Returns the unique serial no. More...
|
|
virtual YWidget * | widget () const |
| Returns the widget that caused this event or 0 if there is none. More...
|
|
virtual YItem * | item () const |
| Return the YItem that corresponds to this event or 0 if there is none. More...
|
|
YDialog * | dialog () const |
| Return the dialog this event belongs to or 0 if no dialog was set yet.
|
|
bool | isValid () const |
| Check if this event is valid. More...
|
|
|
static const char * | toString (EventType eventType) |
| Returns the character representation of an event type.
|
|
static const char * | toString (EventReason reason) |
| Returns the character representation of an event reason.
|
|
|
void | YDialog::deleteEvent (YEvent *event) |
|
void | YSimpleEventHandler::deleteEvent (YEvent *event) |
|
Abstract base class for events to be returned upon UI::UserInput() and related functions.
Definition at line 43 of file YEvent.h.
◆ ~YEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
The associated dialog will take care of this event and delete it when appropriate.
This desctructor is virtual to force a polymorph object so dynamic_cast<> can be used.
Definition at line 46 of file YEvent.cc.
◆ invalidate()
void YEvent::invalidate |
( |
| ) |
|
|
protected |
Mark this event as invalid.
This cannot be undone.
Definition at line 60 of file YEvent.cc.
◆ isValid()
bool YEvent::isValid |
( |
| ) |
const |
Check if this event is valid.
Events become invalid in the destructor.
Definition at line 53 of file YEvent.cc.
◆ item()
virtual YItem* YEvent::item |
( |
| ) |
const |
|
inlinevirtual |
Return the YItem that corresponds to this event or 0 if there is none.
This default implementation always returns 0. Subclasses that actually return items should overwrite this method.
Reimplemented in YMenuEvent.
Definition at line 101 of file YEvent.h.
◆ serial()
unsigned long YEvent::serial |
( |
| ) |
const |
|
inline |
Returns the unique serial no.
of this event. This is mainly useful for debugging.
Definition at line 85 of file YEvent.h.
◆ widget()
virtual YWidget* YEvent::widget |
( |
| ) |
const |
|
inlinevirtual |
Returns the widget that caused this event or 0 if there is none.
This default implementation always returns 0. Subclasses that actually return widgets should overwrite this method.
Reimplemented in YWidgetEvent.
Definition at line 93 of file YEvent.h.
The documentation for this class was generated from the following files:
- /usr/src/RPM/BUILD/libyui-3.4.2/src/YEvent.h
- /usr/src/RPM/BUILD/libyui-3.4.2/src/YEvent.cc