当前位置: 首页>>代码示例>>C++>>正文


C++ IsInside函数代码示例

本文整理汇总了C++中IsInside函数的典型用法代码示例。如果您正苦于以下问题:C++ IsInside函数的具体用法?C++ IsInside怎么用?C++ IsInside使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsInside函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: assert

void
Thread::Join()
{
  assert(IsDefined());
  assert(!IsInside());

#ifdef HAVE_POSIX
  pthread_join(handle, nullptr);
  defined = false;
#else
  ::WaitForSingleObject(handle, INFINITE);
  ::CloseHandle(handle);
  handle = nullptr;
#endif

#ifndef NDEBUG
  all_threads_mutex.lock();
  all_threads.erase(all_threads.iterator_to(*this));
  all_threads_mutex.unlock();
#endif
}
开发者ID:Advi42,项目名称:XCSoar,代码行数:21,代码来源:Thread.cpp

示例2: Process

unsigned CClanMemberItem::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam )
{
	if( !IsInside( LOWORD(lParam), HIWORD( lParam )) ) return 0;
	switch( uiMsg )
	{
	case WM_LBUTTONDOWN:
		{
			CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_CLAN );
			if( pDlg )
			{
				CClanDlg* pClanDlg = (CClanDlg*)pDlg;
				pClanDlg->SetSelectedMember( m_iClanPoint );
			}
			SetSelected();
		}
		return GetControlID();
	default:
		break;
	}
	return 0;
}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:21,代码来源:ClanMemberItem.cpp

示例3: Input

void UIBase::Input(){

    int key = InputManager::GetInstance().GetMouseMousePressKey();

    Point mpos = InputManager::GetInstance().GetMouse();
    if (IsInside(mpos.x,mpos.y)){

        if (key != 0 && OnMousePress){
            OnMousePress(this,key,mpos);
        }
        key = InputManager::GetInstance().GetMouseMouseReleaseKey();
        if (key != 0 && OnMouseRelease){
            OnMouseRelease(this,key,mpos);
        }
        if (!MouseInside){
            if (OnMouseEnter){
                OnMouseEnter(this,mpos);
            }
            MouseInside = true;
        }
    }else{
        if (MouseInside){
            if (OnMouseLeave){
                OnMouseLeave(this,mpos);
            }
            MouseInside = false;
        }
    }

    key = InputManager::GetInstance().IsAnyKeyPressed();
    if (key != -1 && OnKeyPress){
        OnKeyPress(this,key);
    }

    /*for (unsigned i = 0; i < Components.size(); ++i) {
        if (!Components[i]->IsDead()){
            Components[i]->Input();
        }
    }*/
}
开发者ID:mockthebear,项目名称:bear-engine,代码行数:40,代码来源:base.cpp

示例4: Close

WMSG_RESULT CUIPortal::OnLButtonDown( UINT16 x, UINT16 y )
{
	if (m_bHide)
		return WMSG_FAIL;

	if (IsInside(x, y) == FALSE)
	{
		Close();
		return WMSG_FAIL;
	}

 	if( m_pmoveArea && m_pmoveArea->IsInside(x, y))
 	{
 		m_bDrag = true;
 		m_nOriX = x;
 		m_nOriY = y;
 	}

	CUIManager::getSingleton()->RearrangeOrder( UI_PORTAL, TRUE );

	return WMSG_FAIL;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:22,代码来源:UIPortalNew.cpp

示例5: Remove

void
IOThread::LockRemove(int fd)
{
  mutex.Lock();
  const bool old_modified = modified;
  Remove(fd);
  const bool new_modified = modified;

  if (new_modified && running && !IsInside()) {
    /* this method is synchronous: after returning, all handlers must
       be finished */

    do {
      cond.Wait(mutex);
    } while (running);
  }

  mutex.Unlock();

  if (!old_modified && new_modified)
    pipe.Signal();
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:22,代码来源:IOThread.cpp

示例6: OnLButtonDBLClick

WMSG_RESULT CUITrade::OnLButtonDBLClick( UINT16 x, UINT16 y )
{
	if (m_bHide)
		return WMSG_FAIL;

	if (IsInside(x, y) == FALSE)
		return WMSG_FAIL;

	if (m_pList[eLIST_AMEND_ITEM]->IsInside(x, y) == TRUE)
	{
		if (m_pList[eLIST_AMEND_ITEM]->HitTest(x, y) < 0)
		{
			UpdateAmendItem(-1);
			UpdateAmendCondition(-1);

			if (m_pBtnOk != NULL)
				m_pBtnOk->SetEnable(FALSE);
		}
	}

	return WMSG_SUCCESS;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:22,代码来源:UITrade.cpp

示例7: OnLButtonDown

WMSG_RESULT CUIQuestBook::OnLButtonDown( UINT16 x, UINT16 y )
{
	if (m_bHide)
		return WMSG_FAIL;

	if (m_bLockQuestList == TRUE)
		return WMSG_FAIL;

	if (IsInside(x, y) == FALSE)
		return WMSG_FAIL;

	if( m_pmoveArea && m_pmoveArea->IsInside(x, y))
	{
		m_bDrag = true;
		m_nOriX = x;
		m_nOriY = y;
	}

	CUIManager::getSingleton()->RearrangeOrder( UI_QUESTBOOK_LIST, TRUE );

	return WMSG_FAIL;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:22,代码来源:UIQuestBookNew.cpp

示例8: IsSphereInside

    bool Frustum::IsVisible(const Node& node, Mesh& mesh) const
    {
        if (mesh.IsReady())
        {
            Vertex3 center = node.GetGlobalPosition();
            float radius = mesh.GetBoundingSphereRadius();
            Vector3 scale = node.GetGlobalScale();
            float maxScale = std::max(std::max(scale.x, scale.y), scale.z);
            radius *= maxScale;

            Intersection sphereFrustumIntersec = IsSphereInside(center, radius);
            if (sphereFrustumIntersec == Intersection::INTERSECTS)
            {
                BoundingBox bb = mesh.GetBB();
                bb.Transform(node);
                return IsInside(bb) != Intersection::OUTSIDE;
            }
            else
                return sphereFrustumIntersec !=  Intersection::OUTSIDE;
        }
        return false;
    }
开发者ID:dreamsxin,项目名称:nsg-library,代码行数:22,代码来源:Frustum.cpp

示例9: MouseWheel

WMSG_RESULT CUIBase::MouseWheel(UINT16 x, UINT16 y, int wheel)
{
    if (m_bHide)
        return WMSG_FAIL;

    if (IsInside(x, y) == FALSE)
        return WMSG_FAIL;

    WMSG_RESULT ret = WMSG_FAIL;

    if (wheel > 0)
        OnMouseWheelUp();
    else if (wheel < 0)
        OnMouseWheelDown();

    ret = OnMouseWheel(x, y, wheel);

    if (ret == WMSG_FAIL)
        ret = MouseWheelChild(x, y, wheel);

    return ret;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:22,代码来源:UIBase.cpp

示例10: if

//=================================================================================================
void ListBox::Update(float dt)
{
	if(extended)
	{
		if(menu->visible)
		{
			// powinno byæ aktualizowane tu ale niestety wed³ug kolejnoœci musi byæ na samym pocz¹tku
			//menu->Update(dt);
			if(!menu->focus)
				menu->visible = false;
		}
		else if(mouse_focus && Key.Focus() && PointInRect(GUI.cursor_pos, global_pos, size) && Key.PressedRelease(VK_LBUTTON))
		{
			menu->global_pos = global_pos + INT2(0,size.y);
			if(menu->global_pos.y+menu->size.y >= GUI.wnd_size.y)
				menu->global_pos.y = GUI.wnd_size.y-menu->size.y;
			menu->visible = true;
			menu->focus = true;
		}
	}
	else
	{
		if(mouse_focus && Key.Focus() && PointInRect(GUI.cursor_pos, global_pos, real_size) && Key.PressedRelease(VK_LBUTTON))
		{
			int n = (GUI.cursor_pos.y-global_pos.y+int(scrollbar.offset))/20;
			if(n >= 0 && n < (int)items.size() && n != selected)
			{
				selected = n;
				if(e_change_index)
					e_change_index(n);
			}
		}

		if(IsInside(GUI.cursor_pos))
			scrollbar.ApplyMouseWheel();
		scrollbar.Update(dt);
	}
}
开发者ID:edeksumo,项目名称:carpg,代码行数:39,代码来源:ListBox.cpp

示例11: Update

void CClanMemberItem::Update( POINT ptMouse )
{
	CTDialog* pDlg = CTDialog::GetProcessMouseOverDialog();
	if( pDlg && pDlg->GetDialogType() != DLG_TYPE_CLAN )
		return;

	if( IsInside( ptMouse.x, ptMouse.y) && m_iChannelNo != 0xFF)
	{
		m_Info.Clear();
		
		POINT ptDraw = m_sPosition;
		ptDraw.y	-= 50;
		ptDraw.x	+= 25;

		m_Info.SetPosition( ptDraw );
		m_Info.AddString( CStr::Printf("%s: %d", CStringManager::GetSingleton().GetAbility( AT_LEVEL ), m_nLevel ) );
		m_Info.AddString( CStr::Printf("%s: %s", CStringManager::GetSingleton().GetAbility( AT_CLASS ), m_strJob.c_str() ) );
		m_Info.AddString( CStr::Printf("%s: %d","Channel", m_iChannelNo ) );

		CToolTipMgr::GetInstance().RegistInfo( m_Info );
	}

}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:23,代码来源:ClanMemberItem.cpp

示例12: LOWORD

unsigned int CSlotBuyPrivateStore::Process( UINT uiMsg,WPARAM wParam,LPARAM lParam )
{
	POINT pt = { LOWORD( lParam ), HIWORD( lParam ) };
	if( !IsInside( pt.x, pt.y )) return 0;	

	CIcon* pIcon = GetIcon();
	if( pIcon && uiMsg == WM_LBUTTONDOWN && GetAsyncKeyState( VK_SHIFT ) < 0 )
	{
		CIconItem* pItemIcon = (CIconItem*)pIcon;
		if( m_bExhibition )
		{
			CPrivateStore::GetInstance().RemoveItemBuyList( pItemIcon->GetIndex() );
		}
		else
		{
			CTDialog* pDlg = g_itMGR.FindDlg( DLG_TYPE_GOODS );
			if( pDlg )
			{
				CGoodsDlg* pGoodsDlg = (CGoodsDlg*)pDlg;
				pGoodsDlg->SetIcon( pItemIcon );
				pGoodsDlg->SetType( CGoodsDlg::ADD_BUYLIST );
				g_itMGR.OpenDialog( DLG_TYPE_GOODS );
			}
		}
		return uiMsg;
	}

	if( m_bExhibition )
	{
		if( uiMsg == WM_LBUTTONDOWN )
			return uiMsg;
		return 0;
	}
		
	return CSlot::Process( uiMsg, wParam, lParam );

}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:37,代码来源:CSlot.cpp

示例13: IsInside

int EditBox::HandleEvent(MouseEvent* evt){
	if(!Visible()) return 0;
	if(evt->button != LBUTTON) return 0;

	bool inside = IsInside(evt->pos);
	if(evt->type == BUTTON_DOWN && inside){
		mClicked = true;
		mClickPos = evt->pos;
		UiState::mFocus = this;
	}else if(evt->type == BUTTON_UP){
		mClicked = false;
		if(!inside) return 0;
		int cStart = GetCaretFromX(mClickPos.x - mPosition.x);
		int cEnd = GetCaretFromX(evt->pos.x - mPosition.x);
		mCaret = cEnd;

		if(cStart == cEnd){
			mSelectStart = mCaret;
			mSelectEnd = mCaret;
		}
	}

	return mID;
}
开发者ID:exjam,项目名称:r3e,代码行数:24,代码来源:EditBox.cpp

示例14: Move

WMSG_RESULT CUITrade::OnMouseMove( UINT16 x, UINT16 y, MSG* pMsg )
{
	if (m_bHide)
		return WMSG_FAIL;

	if( m_bDrag && ( pMsg->wParam & MK_LBUTTON ) )
	{
		int ndX = x - m_nOriX;
		int ndY = y - m_nOriY;

		m_nOriX = x;
		m_nOriY = y;

		Move( ndX, ndY );
		return WMSG_SUCCESS;
	}

	if (IsInside(x, y) == FALSE)
		return WMSG_FAIL;

	UIMGR()->SetMouseCursorInsideUIs();

	return CUIBase::OnMouseMove(x, y, pMsg);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:24,代码来源:UITrade.cpp

示例15: Move

WMSG_RESULT CUIPortal::OnMouseMove( UINT16 x, UINT16 y, MSG* pMsg )
{
	if (m_bHide)
		return WMSG_FAIL;

	if( m_bDrag && ( pMsg->wParam & MK_LBUTTON ) )
	{
		int ndX = x - m_nOriX;
		int ndY = y - m_nOriY;

		m_nOriX = x;
		m_nOriY = y;

		Move( ndX, ndY );
		return WMSG_SUCCESS;
	}

	if (IsInside(x, y) == FALSE)
		return WMSG_FAIL;

	CUIManager::getSingleton()->SetMouseCursorInsideUIs();

	return WMSG_FAIL;
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:24,代码来源:UIPortalNew.cpp


注:本文中的IsInside函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。