• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CallEvent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: while

  void MapEventManager::CallEvents (const Time& dt)
  {
    while (!leaveEvents_.IsEmpty ())
    {
      MapEventContext* event = leaveEvents_.Dequeue (event);
      CallEvent (MapEventActionType::Leave, dt, *event);

      if (abortEvents_)
        return;
    }

    while (!enterEvents_.IsEmpty ())
    {
      MapEventContext* event = enterEvents_.Dequeue (event);
      CallEvent (MapEventActionType::Enter, dt, *event);

      if (abortEvents_)
        return;
    }

    for (auto& objectEvents : events_)
    {
      for (auto& eventTriggering : objectEvents.second)
      {
        for (MapEventContext* event : eventTriggering.second)
        {
          CallEvent (MapEventActionType::In, dt, *event);

          if (abortEvents_)
            return;
        }
      }
    }
  }
开发者ID:Noxalus,项目名称:YAPOG,代码行数:34,代码来源:MapEventManager.cpp


示例2: CallEvent

void ItemHandleEvents::onMcfProgress(MCFCore::Misc::ProgressInfo& info)
{
	if (info.percent != m_LastProg.percent || info.flag != m_LastProg.flag)
	{
		m_LastProg = info;
		CallEvent(m_EventHistory, m_vHelperList, &Helper::ItemHandleHelperI::onMcfProgress, info);
	}
	else
	{
		CallEvent(m_vHelperList, &Helper::ItemHandleHelperI::onMcfProgress, info);
	}
}
开发者ID:aszlig,项目名称:Desurium,代码行数:12,代码来源:ItemHandleEvents.cpp


示例3: CallEvent

void CClientWebBrowser::Events_OnNavigate ( const SString& strURL, bool bIsBlocked )
{
    CLuaArguments Arguments;
    Arguments.PushString ( strURL );
    Arguments.PushBoolean ( bIsBlocked );
    CallEvent ( "onClientBrowserNavigate", Arguments, false );
}
开发者ID:F420,项目名称:mtasa-blue,代码行数:7,代码来源:CClientWebBrowser.cpp


示例4: CallEvent

void CClientWebBrowser::Events_OnLoadingStart ( const SString& strURL, bool bMainFrame )
{
    CLuaArguments Arguments;
    Arguments.PushString ( strURL );
    Arguments.PushBoolean ( bMainFrame );
    CallEvent ( "onClientBrowserLoadingStart", Arguments, false );
}
开发者ID:CyberSys,项目名称:mtasa-blue,代码行数:7,代码来源:CClientWebBrowser.cpp


示例5: assert

void CElement::SetCustomData ( const char* szName, const CLuaArgument& Variable, CLuaMain* pLuaMain, bool bSynchronized, CPlayer* pClient, bool bTriggerEvent )
{
    assert ( szName );
    if ( strlen ( szName ) > MAX_CUSTOMDATA_NAME_LENGTH )
    {
        // Don't allow it to be set if the name is too long
        CLogger::ErrorPrintf ( "Custom data name too long (%s)\n", *SStringX ( szName ).Left ( MAX_CUSTOMDATA_NAME_LENGTH + 1 ) );
        return;
    }

    // Grab the old variable
    CLuaArgument oldVariable;
    const SCustomData * pData = m_pCustomData->Get ( szName );
    if ( pData )
    {
        oldVariable = pData->Variable;
    }

    // Set the new data
    m_pCustomData->Set ( szName, Variable, pLuaMain, bSynchronized );

    if ( bTriggerEvent )
    {
        // Trigger the onElementDataChange event on us
        CLuaArguments Arguments;
        Arguments.PushString ( szName );
        Arguments.PushArgument ( oldVariable );
        Arguments.PushArgument ( Variable );
        CallEvent ( "onElementDataChange", Arguments, pClient );
    }
}
开发者ID:Bargas,项目名称:mtasa-blue,代码行数:31,代码来源:CElement.cpp


示例6: CallEvent

void CBaseListBox::OnMouse(float wx, float wy, bool lBtn, bool rBtn)
{
	if (!lBtn || !InControl(wx, wy) || GetFont() == 0)return;
	size_t k = (size_t)((bounds.GetClientTop() - wy)/GetFont()->Height()) + itemScroll;
	itemIndex = (k >= items.size())?items.size() - 1:k;
	CallEvent(UI_CHANGE);
}
开发者ID:8441918,项目名称:evg-parser,代码行数:7,代码来源:uiListBox.cpp


示例7: msgCommon

bool TestCase::OnBtnReturnClicked(IMsgBase* pMsg)
{
	// return to menu
	MsgCommon msgCommon(MI_USER_RETURN);
	CallEvent(msgCommon);
	return true;
}
开发者ID:mshandle,项目名称:spank,代码行数:7,代码来源:TestCase.cpp


示例8: CallEvent

void kGUIMenuObj::OpenMenu(kGUIMenuColObj *menu,int x,int y)
{
	kGUIMenuEntryObj *me;

	/* this callback can be trapped to enable / disable menu entries */
	if(!m_depth)
		CallEvent(EVENT_ENTER);

	m_activeentry.SetEntry(m_depth++,menu);
	menu->SetEventHandler(0,0);
	menu->SetEventHandler(this,CALLBACKNAME(MenuEvent));
	menu->SetDrawPopRow(false);
	menu->Activate(x,y);
	Dirty();

	/* check to see if the first entry has a sub-menu */
	me=menu->GetCurrentEntry();
	if(me->GetSubMenu())
	{
		kGUICorners c;

		/* activate sub-menu */
		me->GetCorners(&c);
		OpenMenu(me->GetSubMenu(),c.rx-6,c.ty+2);
	}
}
开发者ID:CarlHuff,项目名称:kgui,代码行数:26,代码来源:kguimenu2.cpp


示例9: l

void CBoxHttpHost::OnStart(void)
{
	if(m_bIsStart)return;
	m_bIsStart = TRUE;

	CSingleLock l(&m_cs, TRUE);

	CallEvent(L"OnApplicationStart", NULL, NULL, TRUE);

	CBoxObject<CBoxHttpHost> pHost;
	CComVariant var;
	int i;
	int count = m_pContents->get_Count();

	for(i = 0; i < count; i ++)
	{
		var.Clear();
		m_pContents->GetValue(i, var);
		if(var.vt == VT_DISPATCH)
		{
			pHost = var.pdispVal;
			if(pHost != NULL)
				pHost->OnStart();
		}
	}
}
开发者ID:2Quico,项目名称:netbox,代码行数:26,代码来源:BoxHttpHost.cpp


示例10: ComPort1_Handler

//yea this is a mess with commented out commands
void ComPort1_Handler(){ //This is the interrupt handler
	unsigned char which,tmp;
	unsigned char tmpy[2];
	which=inportb(COM1_INTERRUPT_ID);
	tmp=which&0x06; //isolate the type of interrupt
	switch(tmp){
		case ID_MODEM_STATUS: //ignored
		//do nothing
		break;
		case  ID_TRANSMITTER_EMPTY: //ready to write
			ReadyWrite=TRUE; //sets the status to ready for writing
		break;
		case ID_RECEIVED_DATA: //theirs data in the port so go get it!
		Com1Count++;
		if(Com1Count==32){Com1Count=0;}
		ReadyRead=TRUE;
		Com1Buffer[Com1Count]=inportb(COM1_TRANSMIT_RECEIVE_BUFFER);
          CallEvent(COM1_READ,0,0);
		if(IgnoreReads || Com1ReadLength<=Com1ReadCounter){
			//ReadyRead=TRUE;
		}
		break;
		case ID_RECEIVER_STATUS: //ERROR!!
		which=inportb(COM1_LINE_STATUS);
		which=which&30; //isolates bits 1-4
		switch(which){
			case OVERRUN_ERROR: //buffer overrun
			Com1IgnoredReadBuffer=inportb(COM1_TRANSMIT_RECEIVE_BUFFER);
			Com1Error=Com1Error|OVERRUN_ERROR;
			break;
			case PARITY_ERROR:
			Com1Error=Com1Error|PARITY_ERROR;
			//do nothing I guess
			break;
			case FRAMING_ERROR:
			Com1Error=Com1Error|FRAMING_ERROR;
			//do nothing again
			break;
			case CONNECT_LOST:
			Com1Error=Com1Error|CONNECT_LOST;
			break;
		}
		CallEvent(COM1_ERROR,Com1Error,0);
		break;
	}

}
开发者ID:Earlz,项目名称:ancientstuff,代码行数:48,代码来源:Comports.c


示例11: CallEvent

void CClientMarker::Callback_OnLeave ( CClientColShape& Shape, CClientEntity& Entity )
{
    if ( IS_PLAYER ( &Entity ) )
    {
        // Call the marker hit event
        CLuaArguments Arguments;
        Arguments.PushElement ( &Entity );            // player that hit it
        Arguments.PushBoolean ( ( Shape.GetDimension () == Entity.GetDimension () ) ); // matching dimension?
        CallEvent ( "onClientMarkerLeave", Arguments, true );
    }
}
开发者ID:EagleShen,项目名称:MTA,代码行数:11,代码来源:CClientMarker.cpp


示例12: Destroy

////////////////////////////////////////////////////////////
//
// CClientSound::DistanceStreamOut
//
// Sound is now far enough away to not be heard, so can be deactivated
//
////////////////////////////////////////////////////////////
void CClientSound::DistanceStreamOut ( void )
{
    if ( m_pAudio )
    {
        m_pSoundManager->OnDistanceStreamOut ( this );
        Destroy ();

        // Call Stream Out event
        CLuaArguments Arguments;
        CallEvent ( "onClientElementStreamOut", Arguments, true );
    }
}
开发者ID:ntauthority,项目名称:openvice,代码行数:19,代码来源:CClientSound.cpp


示例13: Create

////////////////////////////////////////////////////////////
//
// CClientSound::DistanceStreamIn
//
// Sound is now close enough to be heard, so must be activated
//
////////////////////////////////////////////////////////////
void CClientSound::DistanceStreamIn ( void )
{
    if ( !m_pAudio )
    {
        Create ();
        m_pSoundManager->OnDistanceStreamIn ( this );

        // Call Stream In event
        CLuaArguments Arguments;
        CallEvent ( "onClientElementStreamIn", Arguments, true );
    }
}
开发者ID:ntauthority,项目名称:openvice,代码行数:19,代码来源:CClientSound.cpp


示例14: assert

void Entity::addComponent(ComponentPtr component)
{
    std::type_index id = std::type_index(typeid(*component.get()));
    assert(componentMap.count(id) == 0);

    EntityPtr ptr = this->shared_from_this();

    component->attachEntity = ptr;
    this->components.push_back(component);

    this->componentMap[id] = component;

    CacheComponents();

    component->registerEvents();

    if (this->state >= EntityState::Awaked) {
        CallEvent(component.get(), Events::Awake);
        if (this->node.get() != nullptr && this->node->hasParent()) {
            CallEvent(component.get(), Events::Enter);
        }
    }
}
开发者ID:mink365,项目名称:RacingEngine,代码行数:23,代码来源:Entity.cpp


示例15: switch

void CBaseListBox::OnKeyDown(char key)
{
	switch(key)
	{
	case VK_UP:
		Prev();
		break;
	case VK_DOWN:
		Next();
		break;
	default:
		return;
	}
	CallEvent(UI_CHANGE);
}
开发者ID:8441918,项目名称:evg-parser,代码行数:15,代码来源:uiListBox.cpp


示例16: CallEvent

void CClientPickup::Callback_OnLeave ( CClientColShape& Shape, CClientEntity& Entity )
{
    if ( IS_PLAYER ( &Entity ) )
    {
        bool bMatchingDimensions = (GetDimension () == Entity.GetDimension ()); // Matching dimensions?

        // Call the pickup leave event (source = the pickup that was left)
        CLuaArguments Arguments;
        Arguments.PushElement ( &Entity ); // The element that left the pickup
        Arguments.PushBoolean ( bMatchingDimensions );
        CallEvent ( "onClientPickupLeave", Arguments, true);

        // Call the player pickup leave event (source = the player that left the pickup)
        CLuaArguments Arguments2;
        Arguments2.PushElement ( this ); // The pickup that was left (this)
        Arguments2.PushBoolean ( bMatchingDimensions );
        Entity.CallEvent ( "onClientPlayerPickupLeave", Arguments2, true );
    }
}
开发者ID:Jusonex,项目名称:mtasa-awesomium,代码行数:19,代码来源:CClientPickup.cpp


示例17: GetDimension

void CMarker::Callback_OnLeave ( CColShape& Shape, CElement& Element )
{
    // Matching interior?
    if ( GetInterior () == Element.GetInterior () )
    {
        // Call the marker hit event
        CLuaArguments Arguments;
        Arguments.PushElement ( &Element ); // Hit element
        Arguments.PushBoolean ( GetDimension () == Element.GetDimension () );        // Matching dimension?
        CallEvent ( "onMarkerLeave", Arguments );

        if ( IS_PLAYER ( &Element ) )
        {
            CLuaArguments Arguments2;
            Arguments2.PushElement ( this );        // marker
            Arguments2.PushBoolean ( GetDimension () == Element.GetDimension () );        // Matching dimension?
            Element.CallEvent ( "onPlayerMarkerLeave", Arguments2 );
        }
    }
}
开发者ID:pombredanne,项目名称:openvice,代码行数:20,代码来源:CMarker.cpp


示例18: CLuaArgument

void CElement::DeleteCustomData ( const char* szName )
{
    // Grab the old variable
    SCustomData * pData = m_pCustomData->Get ( szName );
    if ( pData )
    {
        CLuaArgument oldVariable;
        oldVariable = pData->Variable;

        // Delete the custom data
        m_pCustomData->Delete ( szName );

        // Trigger the onElementDataChange event on us
        CLuaArguments Arguments;
        Arguments.PushString ( szName );
        Arguments.PushArgument ( oldVariable );
        Arguments.PushArgument ( CLuaArgument() );  // Use nil as the new value to indicate the data has been removed
        CallEvent ( "onElementDataChange", Arguments );
    }
}
开发者ID:AdiBoy,项目名称:mtasa-blue,代码行数:20,代码来源:CElement.cpp


示例19: assert

void CElement::SetCustomData ( const char* szName, const CLuaArgument& Variable, CLuaMain* pLuaMain, bool bSynchronized )
{
    assert ( szName );

    // Grab the old variable
    CLuaArgument oldVariable;
    const SCustomData * pData = m_pCustomData->Get ( szName );
    if ( pData )
    {
        oldVariable = pData->Variable;
    }

    // Set the new data
    m_pCustomData->Set ( szName, Variable, pLuaMain, bSynchronized );

    // Trigger the onElementDataChange event on us
    CLuaArguments Arguments;
    Arguments.PushString ( szName );
    Arguments.PushArgument ( oldVariable  );
    CallEvent ( "onElementDataChange", Arguments );
}
开发者ID:50p,项目名称:multitheftauto,代码行数:21,代码来源:CElement.cpp


示例20: GetCorners

bool kGUIDividerObj::UpdateInput(void)
{
	kGUICorners c;

	GetCorners(&c);
	if(kGUI::MouseOver(&c)==true)
	{
		kGUI::SetTempMouseCursor(MOUSECURSOR_ADJUSTVERT);

		if(this!=kGUI::GetActiveObj() && kGUI::GetMouseClickLeft()==true)
		{
			kGUI::PushActiveObj(this);
			SetCurrent();
		}
	}

	if(this==kGUI::GetActiveObj())
	{
		int dy;
		if(kGUI::GetMouseReleaseLeft()==true)
		{
			kGUI::PopActiveObj();
			return(true);
		}

		dy=kGUI::GetMouseDY();
		if(dy)
		{
			kGUIEvent e;

			e.m_value[0].i=dy;
			CallEvent(EVENT_AFTERUPDATE,&e);
		}
		kGUI::SetTempMouseCursor(MOUSECURSOR_ADJUSTVERT);

		return(true);
	}
	else
		return(false);
}
开发者ID:CarlHuff,项目名称:kgui,代码行数:40,代码来源:kguidivider.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CallFunction函数代码示例发布时间:2022-05-30
下一篇:
C++ CallContactService函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap