26 #include "NCtoY2Event.h"
29 #define YUILogComponent "ncurses"
30 #include <yui/YUILog.h>
42 if ( ncev.isInternalEvent() )
43 NCursesEvent::operator=( none );
45 NCursesEvent::operator=( ncev );
61 if ( widget && widget->isValid() )
62 return new YWidgetEvent( dynamic_cast<YWidget *>( widget ), reason );
67 if ( widget && widget->isValid() ) {
69 return new YMenuEvent( selection );
71 return new YMenuEvent( result );
77 return new YCancelEvent();
80 return new YTimeoutEvent();
83 if ( widget && widget->isValid() )
84 return new YKeyEvent( keySymbol, dynamic_cast<YWidget *>( widget ) );
98 yuiMilestone() <<
"Can't propagate through (EventType*)0" << std::endl;
100 yuiDebug() << *
this << std::endl;
107 operator<< ( std::ostream & stream,
const NCtoY2Event & event )
109 stream << static_cast<const NCursesEvent &>( event );
111 if ( ! event.selection )
118 stream <<
"(" <<
event.selection->label() <<
")";
121 return stream <<
" for " <<
event.widget;
NCtoY2Event & operator=(const NCursesEvent &ncev)
Assignment operator.
Helper class for translating an NCurses event to a YEvent.
NCtoY2Event()
Default constructor.
YEvent * propagate()
The reason of existence of this class: Translate the NCursesEvent to a YEvent.