本文整理汇总了C++中wxTimerEvent::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ wxTimerEvent::GetId方法的具体用法?C++ wxTimerEvent::GetId怎么用?C++ wxTimerEvent::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxTimerEvent
的用法示例。
在下文中一共展示了wxTimerEvent::GetId方法的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);
}
示例2: 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();
}
示例3: 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;
}
示例4: OnPollingTimer
void CSafeCombinationChange::OnPollingTimer(wxTimerEvent &evt)
{
if (evt.GetId() == CYubiMixin::POLLING_TIMER_ID) {
m_yubiMixin1.HandlePollingTimer();
m_yubiMixin2.HandlePollingTimer();
}
}
示例5: 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;
}
}
示例6: 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("") );
}
}
示例7: 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
示例8: 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
}
}
}
示例9: 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
}
}
示例10: OnTimer
//-----------------------------------------------------------------------------
void LogOutputHandlerDlg::OnTimer( wxTimerEvent& e )
//-----------------------------------------------------------------------------
{
switch( e.GetId() )
{
case teUpdate:
UpdateMissingConfigsList();
break;
}
}
示例11: OnTimer
void CQueueViewBase::OnTimer(wxTimerEvent& event)
{
if (event.GetId() != m_filecount_delay_timer.GetId())
{
event.Skip();
return;
}
if (m_fileCountChanged || m_folderScanCountChanged)
DisplayNumberQueuedFiles();
}
示例12: 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() );
}
}
示例13: OnTimer
//-----------------------------------------------------------------------------
void PlotCanvasFeatureVsTime::OnTimer( wxTimerEvent& e )
//-----------------------------------------------------------------------------
{
try
{
switch( e.GetId() )
{
case teUpdate:
RefreshData();
break;
default:
break;
}
}
catch( const ImpactAcquireException& theException )
{
dynamic_cast<PropViewFrame*>( GetParent() )->WriteErrorMessage( wxString::Format( wxT( "%s: An exception was generated while updating the feature vs. time plot: %s(%s)\n" ), ConvertedString( __FUNCTION__ ).c_str(), ConvertedString( theException.getErrorString() ).c_str(), ConvertedString( theException.getErrorCodeAsString() ).c_str() ) );
}
}
示例14: 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;
}
示例15: 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);
}
}
}
}