|
|
|
@ -2096,7 +2096,30 @@ namespace NLGUI
|
|
|
|
|
if( activeAnims[i]->isDisableButtons() )
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
bool handled = false;
|
|
|
|
|
|
|
|
|
|
CViewPointer *_Pointer = static_cast< CViewPointer* >( getPointer() );
|
|
|
|
|
|
|
|
|
|
if( evnt.getType() == CEventDescriptor::system )
|
|
|
|
|
{
|
|
|
|
|
handleSystemEvent( evnt );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if (evnt.getType() == CEventDescriptor::key)
|
|
|
|
|
{
|
|
|
|
|
handled = handleKeyboardEvent( evnt );
|
|
|
|
|
}
|
|
|
|
|
else if (evnt.getType() == CEventDescriptor::mouse )
|
|
|
|
|
{
|
|
|
|
|
handled = handleMouseEvent( evnt );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDBManager::getInstance()->flushObserverCalls();
|
|
|
|
|
|
|
|
|
|
return handled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CWidgetManager::handleSystemEvent( const CEventDescriptor &evnt )
|
|
|
|
|
{
|
|
|
|
|
const CEventDescriptorSystem &systemEvent = reinterpret_cast< const CEventDescriptorSystem& >( evnt );
|
|
|
|
|
if( systemEvent.getEventTypeExtended() == CEventDescriptorSystem::setfocus )
|
|
|
|
@ -2119,22 +2142,23 @@ namespace NLGUI
|
|
|
|
|
_CapturedView = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CWidgetManager::handleKeyboardEvent( const CEventDescriptor &evnt )
|
|
|
|
|
{
|
|
|
|
|
bool handled = false;
|
|
|
|
|
|
|
|
|
|
CViewPointer *_Pointer = static_cast< CViewPointer* >( getPointer() );
|
|
|
|
|
|
|
|
|
|
if (evnt.getType() == CEventDescriptor::key)
|
|
|
|
|
{
|
|
|
|
|
CEventDescriptorKey &eventDesc = (CEventDescriptorKey&)evnt;
|
|
|
|
|
|
|
|
|
|
//_LastEventKeyDesc = eventDesc;
|
|
|
|
|
|
|
|
|
|
// Any Key event disable the ContextHelp
|
|
|
|
|
disableContextHelp();
|
|
|
|
|
|
|
|
|
|
// Hide menu if the key is pushed
|
|
|
|
|
// if ((eventDesc.getKeyEventType() == CEventDescriptorKey::keydown) && !_ModalStack.empty() && !eventDesc.getKeyAlt() && !eventDesc.getKeyCtrl() && !eventDesc.getKeyShift())
|
|
|
|
|
// if ((eventDesc.getKeyEventType() == CEventDescriptorKey::keydown) && !_ModalStack.empty() && !eventDesc.getKeyAlt() && !eventDesc.getKeyCtrl() && !eventDesc.getKeyShift())
|
|
|
|
|
// Hide menu (or popup menu) is ESCAPE pressed
|
|
|
|
|
if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == NLMISC::KeyESCAPE )
|
|
|
|
|
{
|
|
|
|
@ -2246,12 +2270,14 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lastKeyEvent = eventDesc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////// Keyboard handling ends here ////////////////////////////////////
|
|
|
|
|
return handled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (evnt.getType() == CEventDescriptor::mouse )
|
|
|
|
|
bool CWidgetManager::handleMouseEvent( const CEventDescriptor &evnt )
|
|
|
|
|
{
|
|
|
|
|
bool handled = false;
|
|
|
|
|
|
|
|
|
|
CEventDescriptorMouse &eventDesc = (CEventDescriptorMouse&)evnt;
|
|
|
|
|
|
|
|
|
|
if( eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown )
|
|
|
|
@ -2538,14 +2564,10 @@ namespace NLGUI
|
|
|
|
|
// If the mouse is over a window, always consider the event is taken (avoid click behind)
|
|
|
|
|
handled|= isMouseOverWindow();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDBManager::getInstance()->flushObserverCalls();
|
|
|
|
|
|
|
|
|
|
return handled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CWidgetManager::handleMouseMoveEvent( const CEventDescriptor &eventDesc )
|
|
|
|
|
{
|
|
|
|
|
if( getPointer() == NULL )
|
|
|
|
|