示例#1
0
//---------------------------------------------------------------------------
void tTVPLayerManager::PrimaryTouchUp( tjs_real x, tjs_real y, tjs_real cx, tjs_real cy, tjs_uint32 id )
{
	tjs_int ix = (tjs_int)x, iy = (tjs_int)y;
	tTJSNI_BaseLayer * l = GetTouchCapture(id) ? GetTouchCapture(id) : GetMostFrontChildAt(ix, iy);
	if( l )
	{
		l->FromPrimaryCoordinates(x, y);
		l->FireTouchUp(x, y, cx, cy, id);
		ReleaseTouchCapture(id);
	}
}
示例#2
0
//---------------------------------------------------------------------------
void tTVPLayerManager::PrimaryTouchDown( tjs_real x, tjs_real y, tjs_real cx, tjs_real cy, tjs_uint32 id )
{
	tjs_int ix = (tjs_int)x, iy = (tjs_int)y;
	ReleaseTouchCapture(id);
	tTJSNI_BaseLayer * l = GetMostFrontChildAt(ix, iy);
	if( l )
	{
		l->FromPrimaryCoordinates(x, y);
		ReleaseTouchCaptureIDMark = (tjs_int64)id;
		l->FireTouchDown(x, y, cx, cy, id);
		if( ReleaseTouchCaptureIDMark == (tjs_int64)id ) {
			SetTouchCapture( id, l );
		}
	}
}
示例#3
0
CoreView::~CoreView()
{
#ifndef MOUSELESS
	CoreViewContainer* container = GetContainer();
	while (container)
	{
		if (this == container->m_captured_view)
			container->m_captured_view = NULL;
		if (this == container->m_hover_view)
			container->m_hover_view = NULL;
		if (this == container->m_drag_view)
			container->m_drag_view = NULL;

		container = container->m_parent ? container->m_parent->GetContainer() : NULL;
	}
#endif // !MOUSELESS

#ifdef TOUCH_EVENTS_SUPPORT
	ReleaseTouchCapture(TRUE);
#endif // TOUCH_EVENTS_SUPPORT

#ifdef DRAG_SUPPORT
	if (m_drag_listener && g_drag_manager->GetOriginDragListener())
	{
		if (m_drag_listener == g_drag_manager->GetOriginDragListener())
			g_drag_manager->SetOriginDragListener(NULL);
	}
#endif // DRAG_SUPPORT

	Out();
	OP_ASSERT(m_children.First() == NULL);
	// The view can be destroyed long before the scroll listeners
	m_scroll_listeners.RemoveAll();
	if(this == pending_release_capture)
		pending_release_capture = NULL;
}