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

C++ wxTimerEvent类代码示例

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

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



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

示例1: OnTimer

void CUpdateWizard::OnTimer(wxTimerEvent& event)
{
	if (event.GetId() == m_statusTimer.GetId())
	{
		bool changed;
		CTransferStatus status;
		if (!m_pEngine)
			m_statusTimer.Stop();
		else if (!m_pEngine->GetTransferStatus(status, changed))
			SetTransferStatus(0);
		else if (changed)
			SetTransferStatus(&status);
		else
			m_statusTimer.Stop();
	}
	else if (event.GetId() == m_autoCheckTimer.GetId())
	{
		if (m_autoUpdateCheckRunning)
			return;

		if (CanAutoCheckForUpdateNow())
		{
			m_autoUpdateCheckRunning = true;
			const wxDateTime& now = wxDateTime::Now();
			COptions::Get()->SetOption(OPTION_UPDATECHECK_LASTDATE, now.Format(_T("%Y-%m-%d %H:%M:%S")));
			StartUpdateCheck();
		}
	}
	else if (event.GetId() == m_busy_timer.GetId())
		DisplayUpdateAvailability(true);
}
开发者ID:madnessw,项目名称:thesnow,代码行数:31,代码来源:updatewizard.cpp


示例2: OnTimer

void CLed::OnTimer(wxTimerEvent& event)
{
	if (event.GetId() != TIMER_ID)
	{
		event.Skip();
		return;
	}

	if (!m_timer.IsRunning())
		return;

	if (!m_pState->m_pEngine)
	{
		m_timer.Stop();
		return;
	}

	if (!m_pState->m_pEngine->IsActive(m_index == 0))
	{
		Unset();
		m_timer.Stop();
	}

	return;
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:25,代码来源:led.cpp


示例3: OnTimer

void CCManager::OnTimer(wxTimerEvent& event)
{
    if (event.GetId() == idCallTipTimer) // m_CallTipTimer
    {
        CodeBlocksEvent evt(cbEVT_SHOW_CALL_TIP);
        evt.SetInt(FROM_TIMER);
        Manager::Get()->ProcessEvent(evt);
    }
    else if (event.GetId() == idAutoLaunchTimer) // m_AutoLaunchTimer
    {
        cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
        if (ed && ed->GetControl()->GetCurrentPos() == m_AutocompPosition)
        {
            CodeBlocksEvent evt(cbEVT_COMPLETE_CODE);
            evt.SetInt(FROM_TIMER);
            Manager::Get()->ProcessEvent(evt);
        }
        m_AutocompPosition = wxSCI_INVALID_POSITION;
    }
    else if (event.GetId() == idAutocompSelectTimer) // m_AutocompSelectTimer
    {
        cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
        if (ed)
        {
            cbStyledTextCtrl* stc = ed->GetControl();
            if (stc->AutoCompActive())
            {
                m_LastAutocompIndex = stc->AutoCompGetCurrent();
                DoShowDocumentation(ed);
            }
        }
    }
    else // ?!
        event.Skip();
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:35,代码来源:ccmanager.cpp


示例4: OnTimer

void CQueueViewBase::OnTimer(wxTimerEvent& event)
{
	if (event.GetId() != m_filecount_delay_timer.GetId())
	{
		event.Skip();
		return;
	}

	if (m_fileCountChanged || m_folderScanCountChanged)
		DisplayNumberQueuedFiles();
}
开发者ID:ErichKrause,项目名称:filezilla,代码行数:11,代码来源:queue.cpp


示例5: OnTimer

//
// Watch for shift key changes
//
void ToolManager::OnTimer( wxTimerEvent & event )
{
   // Go ahead and set the event to propagate
   event.Skip();

   // Can't do anything if we're not dragging.  This also prevents
   // us from intercepting events that don't belong to us from the
   // parent since we're Connect()ed to a couple.
   if( !mDragWindow )
   {
      return;
   }

   bool state = wxGetKeyState( WXK_SHIFT );
   if( mLastState != state )
   {
      mLastState = state;

#if defined(__WXMAC__)
      // Disable window animation
      wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, 1 );
#endif

      mIndicator->Show( !state );

#if defined(__WXMAC__)
      // Disable window animation
      wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, mTransition );
#endif
   }

   return;
}
开发者ID:GYGit,项目名称:Audacity,代码行数:36,代码来源:ToolManager.cpp


示例6: OnTimer

// Various timers
void dlgMain::OnTimer(wxTimerEvent& event)
{
	// Don't wipe the server list if a refresh is already running
	if(GetThread() && GetThread()->IsRunning())
		return;

	// Don't update the list if the client is still running
	if(ClientIsRunning())
		return;

	// What timer generated this event and what actions to perform
	switch(event.GetId())
	{

	case TIMER_ID_NEWLIST:
	{
		DoGetList(true);
	}
	break;

	case TIMER_ID_REFRESH:
	{
		DoRefreshList(true);
	}
	break;

	}
}
开发者ID:davidsgalbraith,项目名称:odamex,代码行数:29,代码来源:dlg_main.cpp


示例7: OnPollingTimer

void CSafeCombinationChange::OnPollingTimer(wxTimerEvent &evt)
{
  if (evt.GetId() == CYubiMixin::POLLING_TIMER_ID) {
    m_yubiMixin1.HandlePollingTimer();
    m_yubiMixin2.HandlePollingTimer();
  }
}
开发者ID:NonPlayerCharactor,项目名称:PasswordSafeFork,代码行数:7,代码来源:safecombinationchange.cpp


示例8: OnTimer

void OpenResourceDlg::OnTimer(wxTimerEvent& event)
{
    event.Skip();
    wxString currentFilter = m_textCtrlFilter->GetValue();
    if(currentFilter != m_lastFilter) {
        m_lastFilter = currentFilter;

        m_dvListCtrl->DeleteAllItems();
        if(m_lastFilter.IsEmpty()) {
            m_timer->Start(500, true);
            return;
        }

        ResourceVector_t filesVec;
        ResourceVector_t allVec;

        // Refresh the list
        filesVec = DoGetFiles(m_lastFilter);
        DoGetResources(m_lastFilter);

        allVec.insert(allVec.end(), filesVec.begin(), filesVec.end());
        allVec.insert(allVec.end(), m_resources.begin(), m_resources.end());
        DoPopulateListCtrl(allVec);
    }
    m_timer->Start(500, true);
}
开发者ID:bugparty,项目名称:codelite,代码行数:26,代码来源:php_open_resource_dlg.cpp


示例9: OnIdleTimer

void PwsafeApp::OnIdleTimer(wxTimerEvent &evt)
{
    if (evt.GetId() == IDLE_TIMER_ID && PWSprefs::GetInstance()->GetPref(PWSprefs::LockDBOnIdleTimeout)) {
        if (m_frame != NULL && !m_frame->GetCurrentSafe().IsEmpty()) {
            m_frame->HideUI(true);  //true => lock
        }
    }
}
开发者ID:bwilcox,项目名称:pwsafe,代码行数:8,代码来源:pwsafeapp.cpp


示例10: OnTimer

void CmdRecorder::OnTimer(wxTimerEvent& event) {
  if( event.GetId() == ME_CmdTimer ) {
    if( ScriptOp.isPlaying(wxGetApp().getScript(), NULL) )
      m_Timer->Start( 1000, wxTIMER_ONE_SHOT );
    else
      m_labStatus->SetLabel( wxT("") );
  }
}
开发者ID:pmansvelder,项目名称:Rocrail,代码行数:8,代码来源:cmdrecorder.cpp


示例11: OnTimer

void wxToolBar::OnTimer ( wxTimerEvent& rEvent )
{
    if (rEvent.GetId() == m_vToolTimer.GetId())
    {
        wxPoint vPos( m_vXMouse, m_vYMouse );

        m_pToolTip->DisplayToolTipWindow(vPos);
        m_vToolTimer.Stop();
        m_vToolExpTimer.Start(4000L, TRUE);
    }
    else if (rEvent.GetId() == m_vToolExpTimer.GetId())
    {
        m_pToolTip->HideToolTipWindow();
        GetParent()->Refresh();
        m_vToolExpTimer.Stop();
    }
} // end of wxToolBar::OnTimer
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:17,代码来源:toolbar.cpp


示例12: OnTimer

void TimedDialogEnder::OnTimer (wxTimerEvent& event)
{
    wxLogTrace (_T("TimedDialogEnder"), _T("OnTimer"));

    if (event.GetId () == m_timerId) {

        // Hm, apparently the main thread is calling this event handling
        // function (this is standard?), even though the message box is
        // blocking the application??? Thus, ::wxMutexGuiEnter() and
        // ::wxMutexGuiLeave() functions must not be used in favour of:
        #if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPM__)
            ::wxMutexGuiLeaveOrEnter ();
        #endif
        // Try using portable (standard wxWidgets) code - does not work even
        // when using wxMessageDialog and it's SetName() method which seems to
        // be the compared window identifier instead of the window caption?
        /*
        wxWindow* parent = NULL;
        wxWindow* dlgWdw = wxWindow::FindWindowByName (m_windowCaption, parent);
        if (dlgWdw) {

            wxDialog *dlg = wxDynamicCast (dlgWdw, wxDialog);
            if (dlg) {

                dlg->EndModal (m_returnCode);
                ::wxLogTrace (_T("TimedDialogEnder"), _T("Window killed"));
                this->DestroyTimer ();
            }
        }*/

        // So we currently have to use M$ specific code :-(((
        #ifndef WIN32
            wxFAIL_MSG (_T("Only supported under M$ Windows"));
        #else
            HWND wdw = FindWindow (NULL, m_windowCaption);
            if (wdw) {

                // Killing the message box using brute force is detected
                // because of an irregular return code of the message box:
                //if (DestroyWindow (wdw)) {
                // Interestingly the message box can be killed "softly" or as
                // not irregular detected:
                if (EndDialog (wdw, m_returnCode)) {

                    wxLogTrace (_T("TimedDialogEnder"), _T("Window killed"));
                    this->DestroyTimer ();
                    m_success = true;
                }
            }
        #endif

        #if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPM__)
            ::wxMutexGuiLeaveOrEnter ();
        #endif
    }
}
开发者ID:cedrus-opensource,项目名称:build_oss_deps,代码行数:56,代码来源:TimedDialogEnder.cpp


示例13: OnDeviceTimer

void SDRDevicesDialog::OnDeviceTimer( wxTimerEvent& event ) {
    if (refresh) {
        if (wxGetApp().areDevicesEnumerating() || !wxGetApp().areDevicesReady()) {
            std::string msg = wxGetApp().getNotification();
            devStatusBar->SetStatusText(msg);
            devTree->DeleteAllItems();
            devTree->AddRoot(msg);
            event.Skip();
            return;
        }
        
        devTree->DeleteAllItems();
        
        wxTreeItemId devRoot = devTree->AddRoot("Devices");
        wxTreeItemId localBranch = devTree->AppendItem(devRoot, "Local");
        wxTreeItemId dsBranch = devTree->AppendItem(devRoot, "Local Net");
        wxTreeItemId remoteBranch = devTree->AppendItem(devRoot, "Remote");
        
        devs[""] = SDREnumerator::enumerate_devices("",true);
        if (devs[""] != NULL) {
            for (devs_i = devs[""]->begin(); devs_i != devs[""]->end(); devs_i++) {
                if ((*devs_i)->isRemote()) {
                    devItems[devTree->AppendItem(dsBranch, (*devs_i)->getName())] = (*devs_i);
                } else {
                    devItems[devTree->AppendItem(localBranch, (*devs_i)->getName())] = (*devs_i);
                }
            }
        }
        
        std::vector<std::string> remotes = SDREnumerator::getRemotes();
        std::vector<std::string>::iterator remotes_i;
        std::vector<SDRDeviceInfo *>::iterator remoteDevs_i;
        
        if (remotes.size()) {
            for (remotes_i = remotes.begin(); remotes_i != remotes.end(); remotes_i++) {
                devs[*remotes_i] = SDREnumerator::enumerate_devices(*remotes_i, true);
                wxTreeItemId remoteNode = devTree->AppendItem(remoteBranch, *remotes_i);
                
                if (devs[*remotes_i] != NULL) {
                    for (remoteDevs_i = devs[*remotes_i]->begin(); remoteDevs_i != devs[*remotes_i]->end(); remoteDevs_i++) {
                        devItems[devTree->AppendItem(remoteNode, (*remoteDevs_i)->getName())] = (*remoteDevs_i);
                    }
                }
            }
        }
        
        m_addRemoteButton->Enable();
        m_useSelectedButton->Enable();
        devTree->Enable();
        devTree->ExpandAll();
        
        devStatusBar->SetStatusText("Ready.");

        refresh = false;
    }
}
开发者ID:Rebel3311,项目名称:CubicSDR,代码行数:56,代码来源:SDRDevices.cpp


示例14: OnTimer

//-----------------------------------------------------------------------------
void LogOutputHandlerDlg::OnTimer( wxTimerEvent& e )
//-----------------------------------------------------------------------------
{
    switch( e.GetId() )
    {
    case teUpdate:
        UpdateMissingConfigsList();
        break;
    }
}
开发者ID:alperaydemir,项目名称:idd,代码行数:11,代码来源:LogOutputHandlerDlg.cpp


示例15: OnTimerPulseM

void ScoreBot::OnTimerPulseM(wxTimerEvent &evt)
{
    if (m_alert)
    {
        evt.SetId(m_alert_id);
        m_alert->ProcessEvent(evt);
    }

    OnTimerPulse(evt);
}
开发者ID:cdrttn,项目名称:fragmon,代码行数:10,代码来源:scorebot.cpp


示例16: OnTimer

//----------------------------------------------------------------------------
void RenderView::OnTimer(wxTimerEvent& event)
{
	int ival = event.GetInterval();
	double dIval = ival / 1000.0;

	if (mTimerID == event.GetId())
	{
		std::map<std::string, PX2::EditRenderViewPtr>::iterator it
			= mEditRenderViews.begin();
		for (; it != mEditRenderViews.end(); it++)
		{
			EditRenderView *renderView = it->second;
			if (renderView)
			{
				renderView->Tick(dIval);
			}
		}
	}
}
开发者ID:bobbyzhu,项目名称:Phoenix3D,代码行数:20,代码来源:PX2E_RenderView.cpp


示例17: OnTimer

void CLed::OnTimer(wxTimerEvent& event)
{
    if (!m_timer.IsRunning())
        return;

    if (event.GetId() != m_timer.GetId())
    {
        event.Skip();
        return;
    }

    if (!m_pEngine || !m_pEngine->IsActive((enum CFileZillaEngine::_direction)m_index))
    {
        Unset();
        m_timer.Stop();
    }

    return;
}
开发者ID:ErichKrause,项目名称:filezilla,代码行数:19,代码来源:led.cpp


示例18: OnTimer

//----------------------------------------------------------------------------
void MainFrame::OnTimer (wxTimerEvent& event)
{
	if (mInited)
	{
		int ival = event.GetInterval();
		double dIval = ival/1000.0;

		EditSystem::GetSingleton().Update(dIval);
	}
}
开发者ID:ascetic85,项目名称:Phoenix3d,代码行数:11,代码来源:PX2MainFrame.cpp


示例19: OnTimer

void ClangPlugin::OnTimer(wxTimerEvent& event)
{
    cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
    if ( (!ed) || (m_TranslUnitId == wxNOT_FOUND) )
        return;
    const int evId = event.GetId();
    if ( evId == idReparseTimer )
    {
        RequestReparse( m_TranslUnitId, ed->GetFilename() );
    }
}
开发者ID:progmboy,项目名称:ClangLib,代码行数:11,代码来源:clangplugin.cpp


示例20: OnTimer

void WXAppBar::OnTimer(wxTimerEvent& event)
{
#if defined(__WXGTK__)
	long x, y;
	
	m_pMouseControl->GetPointerLocation (x, y);
	wxRect barRect = GetRect();
	
	if (m_autohide && m_currentDockingMode != NON_DOCKED && m_isAutohideWindowShown && !barRect.Contains(x,y))
	{
		// Get X11 display
		Display* dd= (Display *) wxGetDisplay(); assert (dd);
		
		// Get desktop working area dimensions
		int xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight;
		GetDesktopDimensions (dd, xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight);

		// Get original dimensions of the bar
		wxSize proposedSize= GetBestSize();

		// Compute bar position and size depending on docking mode
		m_Width= proposedSize.GetWidth();
		m_Height= proposedSize.GetHeight();
	
		switch (m_currentDockingMode) {
			case TOP_DOCKED:
				m_X= (screenWidth - proposedSize.GetWidth())/2;
				m_Y= 0 - proposedSize.GetHeight() + AUTOHIDE_FLANGE;
				break;
			case BOTTOM_DOCKED:
				m_X= (screenWidth - proposedSize.GetWidth())/2;
				m_Y= screenHeight - AUTOHIDE_FLANGE;
				break;
			case LEFT_DOCKED:
				m_X= 0 - proposedSize.GetWidth() + AUTOHIDE_FLANGE;
				m_Y= (screenHeight - proposedSize.GetHeight())/2;
				break; 
			case RIGHT_DOCKED:
				m_X= screenWidth - AUTOHIDE_FLANGE;
				m_Y= (screenHeight - proposedSize.GetHeight())/2;
				break;
			case NON_DOCKED:
			default:
				assert (false);
		}
		
		// Set desired location and dimensions
		SetSize(m_X, m_Y, m_Width, m_Height);
		
		m_isAutohideWindowShown= false;
	}
#endif
	event.Skip(false);
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:54,代码来源:wxappbar.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxTreeEvent类代码示例发布时间:2022-05-31
下一篇:
C++ wxThreadEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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