32 #include "YSimpleEventHandler.h" 85 unsigned long serial()
const {
return _serial; }
121 static const char *
toString( EventReason reason );
156 EventType _eventType;
157 unsigned long _serial;
160 static unsigned long _nextSerial;
173 EventReason reason = Activated,
185 EventReason
reason()
const {
return _reason; }
217 YKeyEvent(
const std::string & keySymbol,
248 std::string _keySymbol;
266 YMenuEvent(
const std::string &
id ) :
YEvent( MenuEvent ), _item(0), _id(
id ) {}
280 std::string
id()
const {
return _id; }
362 std::ostream & operator<<( std::ostream & stream,
const YEvent * event );
virtual ~YKeyEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
void deleteEvent(YEvent *event)
Delete an event.
std::string keySymbol() const
Returns the key symbol - a text describing the key, such as "CursorLeft", "F1", "a", "A", etc.
bool isValid() const
Check if this event is valid.
void setDialog(YDialog *dia)
Set the dialog this event belongs to.
virtual ~YEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
Abstract base class for events to be returned upon UI::UserInput() and related functions.
virtual ~YTimeoutEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
EventType eventType() const
Returns the event type.
YWidget * focusWidget() const
Returns the widget that currently has the keyboard focus.
void invalidate()
Mark this event as invalid.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.
virtual ~YDebugEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
void deleteEvent(YEvent *event)
Delete an event.
unsigned long serial() const
Returns the unique serial no.
virtual YItem * item() const
Return the YItem that corresponds to this event or 0 if there is none.
YDialog * dialog() const
Return the dialog this event belongs to or 0 if no dialog was set yet.
YEvent(EventType eventType=UnknownEvent)
Constructor.
Event to be returned upon timeout (i.e.
A window in the desktop environment.
virtual YWidget * widget() const
Returns the widget that caused this event or 0 if there is none.
static const char * toString(EventType eventType)
Returns the character representation of an event type.
virtual ~YCancelEvent()
Protected destructor - events can only be deleted via YDialog::deleteEvent().
Event to be returned upon closing a dialog with the window manager close button (or Alt-F4) ...
Event to be returned upon closing a dialog with the window manager close button (or Alt-F4) ...