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


C++ wxTimerEvent类代码示例

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


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


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