本文整理汇总了C++中wxEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxEvent::Skip方法的具体用法?C++ wxEvent::Skip怎么用?C++ wxEvent::Skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxEvent
的用法示例。
在下文中一共展示了wxEvent::Skip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessEvent
bool wxBackgroundBitmap::ProcessEvent(wxEvent &Event)
{
if(Event.GetEventType() == wxEVT_ERASE_BACKGROUND)
{
if(Bitmap.IsOk())
{
}
else
Event.Skip();
}
else if(Event.GetEventType() == wxEVT_PAINT)
{
bool TransactionIsOk = false;
if(Bitmap.IsOk())
{
wxWindow * TempWindow = wxDynamicCast(Event.GetEventObject(),wxWindow);
if(TempWindow)
{
wxAutoBufferedPaintDC DC(TempWindow);
int w, h;
TempWindow->GetClientSize(&w, &h);
wxSize current( w,h);
if ( current != m_lastSize )
{
wxImage TempImage = Bitmap.ConvertToImage();
TempImage.Rescale(w,h);
Bitmap = wxBitmap( TempImage );
}
DC.DrawBitmap(Bitmap, 0, 0, false);
m_lastSize = current;
TransactionIsOk = true;
}
}
if(TransactionIsOk == false)
Event.Skip();
}
else if(Event.GetEventType() == wxEVT_SIZE)
{
wxWindow * TempWindow = wxDynamicCast(Event.GetEventObject(),wxWindow);
if(TempWindow)
{
TempWindow->Refresh();
}
Event.Skip();
}
else
return Inherited::ProcessEvent(Event);
return true;
}
示例2: OnAllEvents
void wxLuaEventCallback::OnAllEvents(wxEvent& event)
{
wxEventType evtType = event.GetEventType();
// Get the wxLuaEventCallback instance to use which is NOT "this" since
// "this" is a central event handler function. i.e. this != theCallback
wxLuaEventCallback *theCallback = (wxLuaEventCallback *)event.m_callbackUserData;
wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaEventCallback in wxEvent user data"));
if (theCallback != NULL)
{
// Not an error if !Ok(), the wxLuaState is cleared during shutdown or after a destroy event.
wxLuaState wxlState(theCallback->GetwxLuaState());
if (wxlState.Ok())
{
wxlState.SetInEventType(evtType);
theCallback->OnEvent(&event);
wxlState.SetInEventType(wxEVT_NULL);
}
}
// we want the wxLuaWinDestroyCallback to get this too
if (evtType == wxEVT_DESTROY)
event.Skip(true);
}
示例3: ProcessEvent
bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
{
if (event.GetEventType() == wxEVT_LEFT_DOWN)
{
m_contextHelp->SetStatus(true);
m_contextHelp->EndContextHelp();
return true;
}
if ((event.GetEventType() == wxEVT_CHAR) ||
(event.GetEventType() == wxEVT_KEY_DOWN) ||
(event.GetEventType() == wxEVT_ACTIVATE) ||
(event.GetEventType() == wxEVT_MOUSE_CAPTURE_CHANGED))
{
// May have already been set to true by a left-click
//m_contextHelp->SetStatus(false);
m_contextHelp->EndContextHelp();
return true;
}
if ((event.GetEventType() == wxEVT_PAINT) ||
(event.GetEventType() == wxEVT_ERASE_BACKGROUND))
{
event.Skip();
return false;
}
return true;
}
示例4: onEnter
void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent )
{
// Getting focus is necessary in order to receive key events properly
SetFocus();
aEvent.Skip();
}
示例5: OnEvent
void wxTestableFrame::OnEvent(wxEvent& evt)
{
m_count[evt.GetEventType()]++;
if(! evt.IsCommandEvent() )
evt.Skip();
}
示例6:
void SeqTrack::PropagateEvent(wxEvent &event)
{
// set events propagationlevel to run down through the parents
event.ResumePropagation(wxEVENT_PROPAGATE_MAX);
// continue the event
event.Skip();
}
示例7: onEvent
void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent )
{
if( m_lostFocus )
SetFocus();
if( !m_eventDispatcher )
aEvent.Skip();
else
m_eventDispatcher->DispatchWxEvent( aEvent );
Refresh();
}
示例8: onRepaint
void AboutDialogLogo::onRepaint(wxEvent &event)
{
wxPaintDC dc(this);
dc.SetBackgroundMode(wxTRANSPARENT);
wxSize size = this->GetSize();
int logo_w = this->logo.GetWidth();
int logo_h = this->logo.GetHeight();
dc.DrawBitmap(this->logo, (size.GetWidth() - logo_w)/2, (size.GetHeight() - logo_h)/2, true);
event.Skip();
}
示例9: onEvent
void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent )
{
if( !m_eventDispatcher )
{
aEvent.Skip();
return;
}
else
{
m_eventDispatcher->DispatchWxEvent( aEvent );
}
Refresh();
}
示例10: OnWindowClose
// ----------------------------------------------------------------------------
void MouseSap::OnWindowClose(wxEvent& event)
// ----------------------------------------------------------------------------
{
// wxEVT_DESTROY entry
wxWindow* pWindow = (wxWindow*)(event.GetEventObject());
if ( (pWindow) && (m_EditorPtrs.Index(pWindow) != wxNOT_FOUND))
{ // window is one of ours
Detach(pWindow);
#ifdef LOGGING
LOGIT( _T("OnWindowClose Detached %p"), pWindow);
#endif //LOGGING
}
event.Skip();
}//OnWindowClose
示例11: OnSize
void CTaskDetailReport::OnSize( wxEvent& event )
{
//wxSize vs=GetVirtualSize();
wxSize vs = GetClientSize();
int fw = GetColumnWidth( 0 );
if ( vs.x >= fw + 300 )
{
SetColumnWidth( 1, vs.x - fw );
}
else
{
SetColumnWidth( 1, 300 );
}
event.Skip();
}
示例12: OnWindowDestroy
// ----------------------------------------------------------------------------
void ThreadSearchFrame::OnWindowDestroy(wxEvent& event)
// ----------------------------------------------------------------------------
{
// wxEVT_DESTROY entry
wxWindow* pWindow = (wxWindow*)(event.GetEventObject());
if ( (pWindow) && (pWindow->GetName() == _T("SCIwindow")))
{
#ifdef LOGGING
LOGIT( _T("ThreadSearchFrame::OnWindowDestroy [%p]"), pWindow);
#endif //LOGGING
int count = GetConfig()->GetEditorManager(this)->GetEditorsCount();
if (count == 1) //closing last window
GetConfig()->GetThreadSearchPlugin()->UnsplitThreadSearchWindow();
}
event.Skip();
}//OnWindowClose
示例13: DoItemActivated
bool svSymbolTree::DoItemActivated(wxTreeItemId item, wxEvent &event, bool notify)
{
//-----------------------------------------------------
// Each tree items, keeps a private user data that
// holds the key for searching the its corresponding
// node in the m_tree data structure
//-----------------------------------------------------
if (item.IsOk() == false)
return false;
MyTreeItemData* itemData = static_cast<MyTreeItemData*>(GetItemData(item));
if ( !itemData ) {
event.Skip();
return false;
}
wxString filename = itemData->GetFileName();
wxString project = m_manager->GetWorkspace()->GetActiveProjectName();
wxString pattern = itemData->GetPattern();
//int lineno = itemData->GetLine();
/*
// Open the file and set the cursor to line number
if(clMainFrame::Get()->GetMainBook()->OpenFile(filename, project, lineno-1)) {
// get the editor, and search for the pattern in the file
LEditor *editor = clMainFrame::Get()->GetMainBook()->GetActiveEditor();
if (editor) {
FindAndSelect(editor, pattern, GetItemText(item));
}
}
*/
FindAndSelect(m_manager->GetActiveEditor(), pattern, GetItemText(item));
// post an event that an item was activated
if ( notify ) {
wxCommandEvent e(wxEVT_CMD_CPP_SYMBOL_ITEM_SELECTED);
e.SetEventObject(this);
wxPostEvent(GetEventHandler(), e);
}
return true;
}
示例14: OnWindowOpen
// ----------------------------------------------------------------------------
void MouseSap::OnWindowOpen(wxEvent& event)
// ----------------------------------------------------------------------------
{
// wxEVT_CREATE entry
// Have to do this especially for split windows since CodeBlocks does not have
// events when opening/closing split windows
wxWindow* pWindow = (wxWindow*)(event.GetEventObject());
// Some code (at times) is not issuing event EVT_APP_STARTUP_DONE
// so here we do it ourselves. If not initialized and this is the first
// scintilla window, initialize now.
if ( (not m_bEditorsAttached)
&& ( pWindow->GetName().Lower() == wxT("sciwindow")) )
OnAppStartupDoneInit();
// Attach a split window (or any other window)
if ( m_bEditorsAttached )
{
wxWindow* pWindow = (wxWindow*)(event.GetEventObject());
cbEditor* ed = 0;
ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
if (pWindow->GetParent() == ed)
{ Attach(pWindow);
#ifdef LOGGING
LOGIT( _T("OnWindowOpen Attached:%p name: %s"),
pWindow, pWindow->GetName().GetData() );
#endif //LOGGING
}
}//fi (ed)
}//fi m_bNote...
event.Skip();
}//OnWindowOpen
示例15: OnChanged
// Automatic save when a control value is changed (if live preview is used)
void OnChanged(wxEvent & evt)
{
evt.Skip();
if (! m_disableEvent)
SaveConfig();
}