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


C++ wxEvent::Skip方法代码示例

本文整理汇总了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;
}
开发者ID:SpliFF,项目名称:springlobby,代码行数:50,代码来源:wxbackgroundimage.cpp

示例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);
}
开发者ID:brkpt,项目名称:luaplus51-all,代码行数:25,代码来源:wxlcallb.cpp

示例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;
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:29,代码来源:cshelp.cpp

示例4: onEnter

void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent )
{
    // Getting focus is necessary in order to receive key events properly
    SetFocus();

    aEvent.Skip();
}
开发者ID:reportingsjr,项目名称:kicad-source-mirror,代码行数:7,代码来源:draw_panel_gal.cpp

示例5: OnEvent

void wxTestableFrame::OnEvent(wxEvent& evt)
{
    m_count[evt.GetEventType()]++;

    if(! evt.IsCommandEvent() )
        evt.Skip();
}
开发者ID:beanhome,项目名称:dev,代码行数:7,代码来源:testableframe.cpp

示例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();
}
开发者ID:eriser,项目名称:wired,代码行数:8,代码来源:SeqTrack.cpp

示例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();
}
开发者ID:reportingsjr,项目名称:kicad-source-mirror,代码行数:12,代码来源:draw_panel_gal.cpp

示例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();
}
开发者ID:repetier,项目名称:Slic3r,代码行数:12,代码来源:AboutDialog.cpp

示例9: onEvent

void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent )
{
    if( !m_eventDispatcher )
    {
        aEvent.Skip();
        return;
    }
    else
    {
        m_eventDispatcher->DispatchWxEvent( aEvent );
    }

    Refresh();
}
开发者ID:johnbeard,项目名称:kicad-source-mirror,代码行数:14,代码来源:draw_panel_gal.cpp

示例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
开发者ID:stahta01,项目名称:EmBlocks,代码行数:17,代码来源:MouseSap.cpp

示例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();

}
开发者ID:artificerpi,项目名称:multiget,代码行数:18,代码来源:taskdetailreport.cpp

示例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
开发者ID:469306621,项目名称:Languages,代码行数:19,代码来源:ThreadSearchFrame.cpp

示例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;
}
开发者ID:05storm26,项目名称:codelite,代码行数:41,代码来源:outline_symbol_tree.cpp

示例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
开发者ID:stahta01,项目名称:EmBlocks,代码行数:37,代码来源:MouseSap.cpp

示例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();
 }
开发者ID:oeuftete,项目名称:wx-xword,代码行数:7,代码来源:PreferencesPanel.hpp


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