Пример #1
0
	LRESULT OnHtmlNotify(UINT uMsg, WPARAM wParam, LPARAM lParam)
	{
		ASSERT(uMsg == WM_NOTIFY);

		// Crack and call appropriate method
		switch(((NMHDR*)lParam)->code) 
		{
		case HLN_CREATE_CONTROL:    return reinterpret_cast<LRESULT>(OnCreateControl(reinterpret_cast<LPNMHL_CREATE_CONTROL>(lParam)));
		case HLN_CONTROL_CREATED:   return 0;
		case HLN_DESTROY_CONTROL:   return OnDestroyControl(reinterpret_cast<LPNMHL_DESTROY_CONTROL>(lParam));
		case HLN_LOAD_DATA:         return 0;
		case HLN_DATA_LOADED:       return 0;
		case HLN_DOCUMENT_COMPLETE: return 0;
		case HLN_ATTACH_BEHAVIOR:   return OnAttachBehavior((LPNMHL_ATTACH_BEHAVIOR)lParam);
		}

		return OnHtmlGenericNotifications(uMsg,wParam,lParam);
	}
Пример #2
0
		Air::U1 Section::Create()
		{

			m_pPipeline	=	EngineSystem::GetSingleton()->CreateProduct<Engine::DefaultPipeline>(m_strProductName+"_Pipeline");
			if(m_pPipeline==NULL)
				return false;
			m_pScene	=	EngineSystem::GetSingleton()->CreateProduct<Engine::Scene>(m_strProductName+"_Scene");
			if(m_pScene==NULL)
				return false;
			m_pPipeline->SetCurrentScene(m_pScene);
			m_pControl	=	OnCreateControl();
			if(m_pControl!=NULL)
			{
				OIS::KeyListener*	pKey	=	m_pControl;
				OIS::MouseListener*	pMouse	=	m_pControl;
				Engine::GetGlobalSetting().m_pInputSystem->Add(pKey);
				Engine::GetGlobalSetting().m_pInputSystem->Add(pMouse);

				m_pControl->SetCallback(this);

			}
			return true;
		}