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

C++ ProcessEvent函数代码示例

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

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



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

示例1: event

bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
    wxTabEvent event(wxEVT_NULL, m_windowId);
    wxEventType eventType wxDUMMY_INITIALIZE(wxEVT_NULL);
    NMHDR* hdr1 = (NMHDR*) lParam;
    switch ( hdr1->code )
    {
        case TCN_SELCHANGE:
            eventType = wxEVT_COMMAND_TAB_SEL_CHANGED;
            break;

        case TCN_SELCHANGING:
            eventType = wxEVT_COMMAND_TAB_SEL_CHANGING;
            break;

#ifndef __WXWINCE__
        case TTN_NEEDTEXT:
        {
            // TODO
//            if (!tool->m_shortHelpString.empty())
//                ttText->lpszText = (char *) (const char *)tool->m_shortHelpString;
        }
#endif
        default :
            return wxControl::MSWOnNotify(idCtrl, lParam, result);
    }

    event.SetEventObject( this );
    event.SetEventType(eventType);
    event.SetInt(idCtrl) ;
    event.SetSelection(idCtrl);

    return ProcessEvent(event);
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:34,代码来源:tabctrl.cpp


示例2: key_to_event

bool
InputEvents::ProcessKey(Mode mode, unsigned key_code)
{
  if (IsAltair() && key_code == 0xF5) {
    UIActions::SignalShutdown(false);
    return true;
  }

  if (!global_running)
    return false;

#ifdef KOBO
#ifdef ENABLE_SDL
  if (key_code == SDLK_POWER)
    /* the Kobo power button opens the main menu */
    key_code = KEY_MENU;
#else
  // TODO: check the console key code
#endif
#endif

  // Which key - can be defined locally or at default (fall back to default)
  unsigned event_id = key_to_event(mode, overlay_mode, key_code);
  if (event_id == 0)
    return false;

  ProcessEvent(event_id);
  return true;
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:29,代码来源:InputEvents.cpp


示例3: ProcessEvent

//
// Event_OnProjectileLaunch()
//
void hhHarvesterSimple::Event_OnProjectileLaunch(hhProjectile *proj) {
	
	// Can't launch again yet
	float min = spawnArgs.GetFloat( "dda_delay_min" );
	float max = spawnArgs.GetFloat( "dda_delay_max" );
	float delay = min + (max - min) * (1.0f - gameLocal.GetDDAValue());

	if(gameLocal.GetTime() - lastAntiProjectileAttack < delay)
		return;	
	
	// The person who launched this projectile wasn't someone to worry about
	if(proj->GetOwner() && !(ReactionTo(proj->GetOwner()) & (ATTACK_ON_SIGHT | ATTACK_ON_DAMAGE)))
		return;
	
	// TODO: more intelligent checks for if we should launch the anti-projectile chaff
	idVec3 fw		= viewAxis[0];
	idVec3 projFw	= proj->GetAxis()[0]; 
	if(proj->GetOwner())
		projFw = proj->GetOwner()->GetAxis()[0];
	float dot = fw * projFw;
	if(dot > -.7f)
		return;

	ProcessEvent(&MA_AntiProjectileAttack, proj);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:28,代码来源:ai_harvester_simple.cpp


示例4: event

void
SbModel::fireSbModelChanged(void)
{
	wxCommandEvent event(anEVT_ROW_SIZECHANGE);
	event.SetInt(entries_.size());
	ProcessEvent(event);
}
开发者ID:genua,项目名称:anoubis,代码行数:7,代码来源:SbModel.cpp


示例5: ProcessEvent

/*
================
idMoveable::Event_SetOwnerFromSpawnArgs
================
*/
void idMoveable::Event_SetOwnerFromSpawnArgs( void ) {
	idStr owner;

	if ( spawnArgs.GetString( "owner", "", owner ) ) {
		ProcessEvent( &EV_SetOwner, gameLocal.FindEntity( owner ) );
	}
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:12,代码来源:Moveable.cpp


示例6: WXUNUSED

void wxRibbonToolBar::OnMouseUp(wxMouseEvent& WXUNUSED(evt))
{
    if(m_active_tool)
    {
        if(m_active_tool->state & wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK)
        {
            wxEventType evt_type = wxEVT_COMMAND_RIBBONTOOL_CLICKED;
            if(m_active_tool->state & wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE)
                evt_type = wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED;
            wxRibbonToolBarEvent notification(evt_type, m_active_tool->id);
            if(m_active_tool->kind == wxRIBBON_BUTTON_TOGGLE)
            {
                m_active_tool->state ^=
                    wxRIBBON_BUTTONBAR_BUTTON_TOGGLED;
                notification.SetInt(m_active_tool->state &
                    wxRIBBON_BUTTONBAR_BUTTON_TOGGLED);
            }
            notification.SetEventObject(this);
            notification.SetBar(this);
            ProcessEvent(notification);
        }

        // Notice that m_active_tool could have been reset by the event handler
        // above so we need to test it again.
        if (m_active_tool)
        {
            m_active_tool->state &= ~wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK;
            m_active_tool = NULL;
            Refresh(false);
        }
    }
}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:32,代码来源:toolbar.cpp


示例7: FileTypeOf

// ----------------------------------------------------------------------------
bool ThreadSearchFrame::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& files)
// ----------------------------------------------------------------------------
{
    bool success = true; // Safe case initialisation

    // first check to see if a workspace is passed. If so, only this will be loaded
    wxString foundWorkspace;
    for (unsigned int i = 0; i < files.GetCount(); ++i)
    {
        FileType ft = FileTypeOf(files[i]);
        if (ft == ftCodeBlocksWorkspace || ft == ftMSVC6Workspace || ft == ftMSVC7Workspace)
        {
            foundWorkspace = files[i];
            break;
        }
    }

    if (!foundWorkspace.IsEmpty())
      success &= OpenGeneric(foundWorkspace);
    else
    {
        wxBusyCursor useless;
        wxPaintEvent e;
        ProcessEvent(e);

        Freeze();
        for (unsigned int i = 0; i < files.GetCount(); ++i)
          success &= OpenGeneric(files[i]);
        Thaw();
    }
    return success;
}
开发者ID:469306621,项目名称:Languages,代码行数:33,代码来源:ThreadSearchFrame.cpp


示例8: while

/*
===============
idEventLoop::RunEventLoop
===============
*/
int idEventLoop::RunEventLoop( bool commandExecution )
{
	sysEvent_t	ev;
	
	while( 1 )
	{
	
		if( commandExecution )
		{
			// execute any bound commands before processing another event
			cmdSystem->ExecuteCommandBuffer();
		}
		
		ev = GetEvent();
		
		// if no more events are available
		if( ev.evType == SE_NONE )
		{
			return 0;
		}
		ProcessEvent( ev );
	}
	
	return 0;	// never reached
}
开发者ID:BielBdeLuna,项目名称:StormEngine2,代码行数:30,代码来源:EventLoop.cpp


示例9: mail

void KIWAY::ExpressMail( FRAME_T aDestination,
                MAIL_T aCommand, const std::string& aPayload, wxWindow* aSource )
{
    KIWAY_EXPRESS   mail( aDestination, aCommand, aPayload, aSource );

    ProcessEvent( mail );
}
开发者ID:blairbonnett-mirrors,项目名称:kicad,代码行数:7,代码来源:kiway.cpp


示例10: GetPhysics

/*
================
rvEffect::Event_EarthQuake
================
*/
void rvEffect::Event_EarthQuake ( float requiresLOS ) {
    float quakeChance;

    if ( !spawnArgs.GetFloat("quakeChance", "0", quakeChance) ) {
        return;
    }

    if ( rvRandom::flrand(0, 1.0f) > quakeChance ) {
        // failed its activation roll
        return;
    }

    if ( requiresLOS ) {
        // if the player doesn't have line of sight to this fx, don't do anything
        trace_t		trace;
        idPlayer	*player = gameLocal.GetLocalPlayer();
        idVec3		viewOrigin;
        idMat3		viewAxis;

        player->GetViewPos(viewOrigin, viewAxis);
// RAVEN BEGIN
// ddynerman: multiple collision worlds
        gameLocal.TracePoint( this, trace, viewOrigin, GetPhysics()->GetOrigin(), MASK_OPAQUE, player );
// RAVEN END
        if (trace.fraction < 1.0f)
        {
            // something blocked LOS
            return;
        }
    }

    // activate this effect now
    ProcessEvent ( &EV_Activate, gameLocal.entities[ENTITYNUM_WORLD] );
}
开发者ID:Big-Zam,项目名称:IT266-gameMod,代码行数:39,代码来源:Effect.cpp


示例11: switch

    void ReplicatedStore::StateMachine::PostChangeRoleEvent(
        ::FABRIC_REPLICA_ROLE newRole, 
        StateMachineCallback const & callback,
        ComponentRootSPtr const & root)
    {
        ReplicatedStoreEvent::Enum event;
        switch (newRole)
        {
            case ::FABRIC_REPLICA_ROLE_PRIMARY:
                event = ReplicatedStoreEvent::ChangePrimary;
                break;

            case ::FABRIC_REPLICA_ROLE_IDLE_SECONDARY:
            case ::FABRIC_REPLICA_ROLE_ACTIVE_SECONDARY:
                event = ReplicatedStoreEvent::ChangeSecondary;
                break;

            default:
                Assert::CodingError(
                    "{0} unrecognized ::FABRIC_REPLICA_ROLE = {1}", 
                    this->TraceId, 
                    static_cast<int>(newRole));
        }

        Threadpool::Post([this, root, event, callback]{ ProcessEvent(event, callback); });
    }
开发者ID:vturecek,项目名称:Service-Fabric,代码行数:26,代码来源:ReplicatedStore.StateMachine.cpp


示例12: switch

        void KeyboardShortcutEditor::OnKeyUp(wxKeyEvent& event) {
            if (m_key == WXK_NONE) {
                const int key = event.GetKeyCode();
                switch (key) {
                    case WXK_SHIFT:
                    case WXK_ALT:
                    case WXK_CONTROL:
                        if (m_modifierKey1 == key)
                            m_modifierKey1 = WXK_NONE;
                        else if (m_modifierKey2 == key)
                            m_modifierKey2 = WXK_NONE;
                        else if (m_modifierKey3 == key)
                            m_modifierKey3 = WXK_NONE;
                        break;
#if defined __APPLE__
                    case WXK_RAW_CONTROL:
                        // not supported
                        break;
#endif
                    default:
                        break;
                }
                update();
            } else {
                KeyboardShortcutEvent shortcutEvent(m_modifierKey1, m_modifierKey2, m_modifierKey3, m_key);
                shortcutEvent.SetEventType(EVT_KEYBOARD_SHORTCUT_EVENT);
                shortcutEvent.SetEventObject(this);
                shortcutEvent.SetId(GetId());
                ProcessEvent(shortcutEvent);
            }
        }
开发者ID:ProPuke,项目名称:TrenchBroom,代码行数:31,代码来源:KeyboardShortcutEditor.cpp


示例13: event

void LLDBConnector::DeleteAllBreakpoints()
{
    if ( !IsRunning() ) {
        m_pendingDeletionBreakpoints.clear();
        m_breakpoints.clear();
        
        LLDBEvent event(wxEVT_LLDB_BREAKPOINTS_UPDATED);
        event.SetBreakpoints( GetAllBreakpoints() );
        ProcessEvent( event );
        return;
     }

    // mark all breakpoints for deletion
    CL_DEBUGS(wxString () << "codelite: DeleteAllBreakpoints called");
    m_pendingDeletionBreakpoints.swap( m_breakpoints );
    
    if ( !IsCanInteract() ) {
        Interrupt( kInterruptReasonDeleteAllBreakpoints );
        
    } else {
        LLDBCommand command;
        command.SetCommandType(kCommandDeleteAllBreakpoints);
        SendCommand( command );
        m_pendingDeletionBreakpoints.clear();

    }
}
开发者ID:blitz-research,项目名称:codelite,代码行数:27,代码来源:LLDBConnector.cpp


示例14: xwl_pollevent

i32 xwl_pollevent( xwl_event_t *event )
{
#ifdef _WIN32
	MSG msg;

	while ( PeekMessage( &msg, 0, 0, 0, PM_REMOVE ) )
	{
		TranslateMessage( &msg );
		DispatchMessage( &msg );
	}
#endif

#if LINUX
    XEvent ev;
    i32 i;
    xwl_window_handle_t *wh = 0;
    XEvent lastKeyReleaseEvent;

    for( i = 0; i < XWL_MAX_WINDOW_HANDLES; ++i )
    {
        wh = &xwl_windowHandles[i];
        if ( wh->handle.handle != 0 )
        {
            while (XCheckIfEvent( currentDisplay, &ev, &CheckEvent, wh->handle.handle) )
            {
                if ((ev.type == KeyPress) || (ev.type == KeyRelease) )
                {
                    if ( ev.xkey.keycode < 256 )
                    {
                        // To detect if it is a repeated key event, we check the current state of the key.
                        // - If the state is "down", KeyReleased events must obviously be discarded.
                        // - KeyPress events are a little bit harder to handle: they depend on the EnableKeyRepeat state,
                        //   and we need to properly forward the first one.
                        char keys[32];
                        XQueryKeymap(currentDisplay, keys);
                        if (keys[ev.xkey.keycode >> 3] & (1 << (ev.xkey.keycode % 8)))
                        {
                            // KeyRelease event + key down = repeated event --> discard
                            if (ev.type == KeyRelease)
                            {
                                lastKeyReleaseEvent = ev;
                                continue;
                            }

                            // KeyPress event + key repeat disabled + matching KeyRelease event = repeated event --> discard
                            if ((ev.type == KeyPress) &&
                                (lastKeyReleaseEvent.xkey.keycode == ev.xkey.keycode) &&
                                (lastKeyReleaseEvent.xkey.time == ev.xkey.time))
                            {
                                continue;
                            }
                        }
                    }
                }

                ProcessEvent( ev, wh );
            }
        }
    }
开发者ID:apetrone,项目名称:precache,代码行数:59,代码来源:xwl.c


示例15: ev_pause

void CMusikPlayer::FinalizePause()
{
	m_SndEngine.SetPlayState( MUSIKEngine::Paused );
	m_Paused = true;
    MusikPlayerEvent ev_pause(this,wxEVT_MUSIKPLAYER_PLAY_PAUSE);
    ProcessEvent(ev_pause);

}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:8,代码来源:MusikPlayer.cpp


示例16: e

void TrackList::ResizedEvent(const TrackListNode *node)
{
   if (node) {
      wxCommandEvent e(EVT_TRACKLIST_RESIZED);
      e.SetClientData(node->t);
      ProcessEvent(e);
   }
}
开发者ID:ScorpioJonesy,项目名称:audacity,代码行数:8,代码来源:Track.cpp


示例17: GetSize

void CardViewer::onChangeSize() {
	wxSize ws = GetSize(), cs = GetClientSize();
	wxSize desired_cs = (wxSize)getRotation().getExternalSize() + ws - cs;
	if (desired_cs != cs) {
		wxCommandEvent ev(EVENT_SIZE_CHANGE, GetId());
		ProcessEvent(ev);
	}
}
开发者ID:CustomCardsOnline,项目名称:MagicSetEditor,代码行数:8,代码来源:card_viewer.cpp


示例18: FTRACE

//Devsound initialization is completed.Configure devsound capabilities.
void CAudioOutputControlTestClass::InitializeComplete(TInt aError)
{
    FTRACE(FPrint(_L("CAudioOutputControlTestClass::InitializeComplete")));

    iLog->Log(_L("InitializeComplete, return code =%d!!!"),aError);
    ProcessEvent(EInitializeComplete, aError);

}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:9,代码来源:AudioOutputControlTestClassBlocksCallbacks.cpp


示例19: WxStrToStr

void InterfaceConfigPane::OnThemeSelected(wxCommandEvent& event)
{
  SConfig::GetInstance().theme_name = WxStrToStr(m_theme_choice->GetStringSelection());

  wxCommandEvent theme_event{DOLPHIN_EVT_RELOAD_THEME_BITMAPS};
  theme_event.SetEventObject(this);
  ProcessEvent(theme_event);
}
开发者ID:stenzek,项目名称:dolphin,代码行数:8,代码来源:InterfaceConfigPane.cpp


示例20: event

void ButcherView::DoChangedEvent(ButcherViewChangedEvent::change_t change, long movex, long movey)
{
    ButcherViewChangedEvent event(change);
    event.SetMove(movex, movey);
    event.SetEventObject(this);

    ProcessEvent(event);
}
开发者ID:RangelReale,项目名称:htmlbutcher,代码行数:8,代码来源:ButcherView.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ProcessMessages函数代码示例发布时间:2022-05-30
下一篇:
C++ ProcessData函数代码示例发布时间: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