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 ( selection && widget && widget->isValid() )
68 return new YMenuEvent( selection );
73 return new YCancelEvent();
76 return new YTimeoutEvent();
79 if ( widget && widget->isValid() )
80 return new YKeyEvent( keySymbol, dynamic_cast<YWidget *>( widget ) );
94 yuiMilestone() <<
"Can't propagate through (EventType*)0" << std::endl;
96 yuiDebug() << *
this << std::endl;
103 operator<< ( std::ostream & stream,
const NCtoY2Event & event )
105 stream << static_cast<const NCursesEvent &>( event );
107 if ( ! event.selection )
114 stream <<
"(" <<
event.selection->label() <<
")";
117 return stream <<
" for " <<
event.widget;
NCtoY2Event & operator=(const NCursesEvent &ncev)