本文整理汇总了C++中wxTimerEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxTimerEvent::Skip方法的具体用法?C++ wxTimerEvent::Skip怎么用?C++ wxTimerEvent::Skip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxTimerEvent
的用法示例。
在下文中一共展示了wxTimerEvent::Skip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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);
}
示例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: 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;
}
示例5: 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;
}
}
示例6: OnTimer
void wxVideoTerminal::OnTimer(wxTimerEvent &evt)
{
m_counter_blink = (m_counter_blink+1)% 10;
if (m_counter_blink == 0)
{
m_cursor_blink = !m_cursor_blink;
Refresh(false);
}
//wxLogDebug("%d", m_counter_test++);
evt.Skip();
}
示例7: OnTimer
void CQueueViewBase::OnTimer(wxTimerEvent& event)
{
if (event.GetId() != m_filecount_delay_timer.GetId())
{
event.Skip();
return;
}
if (m_fileCountChanged || m_folderScanCountChanged)
DisplayNumberQueuedFiles();
}
示例8: 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);
}
示例9: 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(50, 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());
// and sort the results
wxString lcFilter = m_lastFilter.Lower();
ResourceVector_t v1, v2, v3, v4, v5;
std::for_each(allVec.begin(), allVec.end(), [&](const ResourceItem& a) {
if(a.displayName == m_lastFilter) {
v1.push_back(a); // Exact match
} else if(a.displayName.Lower() == lcFilter) {
v2.push_back(a); // case insenstive exact match
} else if(a.displayName.StartsWith(m_lastFilter)) {
v3.push_back(a); // starts with
} else if(a.displayName.Lower().StartsWith(lcFilter)) {
v4.push_back(a); // case insenstive starts with
} else {
// other
v5.push_back(a);
}
});
allVec.clear();
allVec.insert(allVec.end(), v1.begin(), v1.end());
allVec.insert(allVec.end(), v2.begin(), v2.end());
allVec.insert(allVec.end(), v3.begin(), v3.end());
allVec.insert(allVec.end(), v4.begin(), v4.end());
allVec.insert(allVec.end(), v5.begin(), v5.end());
DoPopulateListCtrl(allVec);
}
m_timer->Start(50, true);
}
示例10: OnTimer
void ControlToolBar::OnTimer(wxTimerEvent & event)
{
event.Skip();
// bug 307 fix:
// Shift key-up events get swallowed if a command with a Shift in its keyboard
// shortcut opens a dialog, and ControlToolBar::OnKeyUp() doesn't get called.
if (!wxGetKeyState(WXK_SHIFT))
{
wxKeyEvent dummyEvent;
dummyEvent.m_keyCode = WXK_SHIFT;
this->OnKeyUp(dummyEvent);
mShiftKeyTimer.Stop();
}
}
示例11: OnTimer
void WConfirmCalibration::OnTimer(wxTimerEvent& event)
{
if (m_okCountdown == 0)
{
m_timer.Stop();
EndModal(BUTTON_OK);
}
else if (m_cancelCountdown == 0)
{
m_timer.Stop();
EndModal(BUTTON_CANCEL);
}
else if (m_repeatCountdown == 0)
{
m_timer.Stop();
EndModal(BUTTON_REPEAT);
}
else
{
switch (m_activeButton)
{
case OK:
m_okCountdown--;
m_buttonOk->SetLabel(_("Ok") + wxString::Format(wxT(" %i"), m_okCountdown));
m_buttonCancel->SetLabel(_("Cancel"));
m_buttonRepeat->SetLabel(_("Repeat"));
break;
case CANCEL:
m_cancelCountdown--;
m_buttonOk->SetLabel(_("Ok"));
m_buttonCancel->SetLabel(_("Cancel") + wxString::Format(wxT(" %i"), m_cancelCountdown));
m_buttonRepeat->SetLabel(_("Repeat"));
break;
case REPEAT:
m_repeatCountdown--;
m_buttonOk->SetLabel(_("Ok"));
m_buttonCancel->SetLabel(_("Cancel"));
m_buttonRepeat->SetLabel(_("Repeat") + wxString::Format(wxT(" %i"), m_repeatCountdown));
break;
}
m_timer.Stop();
m_timer.Start(1000);
}
event.Skip(false);
}
示例12: Update
void App::Update(wxTimerEvent& event)
{
switch(mPage) // refresh draw panel
{
case PAGE_OSZI:
{
mOsziPage->RefreshPanel();
break;
}
case PAGE_FFT:
{
mFFTPage->RefreshPanel();
break;
}
}
event.Skip();
}
示例13: OnTimer
void WebTools::OnTimer(wxTimerEvent& event)
{
event.Skip();
time_t curtime = time(NULL);
if((curtime - m_lastColourUpdate) < 5) return;
IEditor* editor = m_mgr->GetActiveEditor();
// Sanity
CHECK_PTR_RET(editor);
CHECK_PTR_RET(editor->IsModified());
if(!IsJavaScriptFile(editor->GetFileName())) return;
// This file is a modified JS file
m_lastColourUpdate = time(NULL);
m_jsColourThread->QueueBuffer(editor->GetFileName().GetFullPath(), editor->GetTextRange(0, editor->GetLength()));
}
示例14:
void AButton::Listener::OnTimer(wxTimerEvent & event)
{
event.Skip();
// bug 307 fix:
// Shift key-up events get swallowed if a command with a Shift in its keyboard
// shortcut opens a dialog, and OnKeyUp() doesn't get called.
// With CTRL now causing the button to change appearance, presumably similar
// can happen with that key.
if (!wxGetKeyState(WXK_SHIFT) ||
!wxGetKeyState(WXK_CONTROL))
{
wxKeyEvent dummy;
this->OnKeyUp(dummy);
mShiftKeyTimer.Stop();
}
}
示例15: 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;
}