libyui  3.1.5
 All Classes Files Functions Variables Typedefs Enumerations Friends Pages
YMenuEvent Class Reference

Event to be returned upon menu selection. More...

#include <YEvent.h>

Inheritance diagram for YMenuEvent:
Collaboration diagram for YMenuEvent:

Public Member Functions

 YMenuEvent (YItem *item)
 
 YMenuEvent (const char *id)
 
 YMenuEvent (const std::string &id)
 
virtual YItem * item () const
 Return the YItem that corresponds to this event or 0 if the event was constructed with a string ID. More...
 
std::string id () const
 Return the string ID of this event. More...
 
- Public Member Functions inherited from YEvent
 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...
 
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...
 

Protected Member Functions

virtual ~YMenuEvent ()
 Protected destructor - events can only be deleted via YDialog::deleteEvent(). More...
 
- Protected Member Functions inherited from YEvent
void setDialog (YDialog *dia)
 Set the dialog this event belongs to.
 
virtual ~YEvent ()
 Protected destructor - events can only be deleted via YDialog::deleteEvent(). More...
 
void invalidate ()
 Mark this event as invalid. More...
 

Protected Attributes

YItem * _item
 
std::string _id
 

Additional Inherited Members

- Public Types inherited from YEvent
enum  EventType {
  NoEvent = 0, UnknownEvent, WidgetEvent, MenuEvent,
  KeyEvent, CancelEvent, TimeoutEvent, DebugEvent,
  InvalidEvent = 0x4242
}
 
enum  EventReason {
  UnknownReason = 0, Activated, SelectionChanged, ValueChanged,
  ContextMenuActivated
}
 
- Static Public Member Functions inherited from YEvent
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.
 

Detailed Description

Event to be returned upon menu selection.

Definition at line 256 of file YEvent.h.

Constructor & Destructor Documentation

virtual YMenuEvent::~YMenuEvent ( )
inlineprotectedvirtual

Protected destructor - events can only be deleted via YDialog::deleteEvent().

The associated dialog will take care of this event and delete it when appropriate.

Definition at line 289 of file YEvent.h.

Member Function Documentation

std::string YMenuEvent::id ( ) const
inline

Return the string ID of this event.

This will be an empty string if the event was constructed with a YItem.

Definition at line 280 of file YEvent.h.

virtual YItem* YMenuEvent::item ( ) const
inlinevirtual

Return the YItem that corresponds to this event or 0 if the event was constructed with a string ID.

Reimplemented from YEvent.

Reimplemented from YEvent.

Definition at line 274 of file YEvent.h.


The documentation for this class was generated from the following file: