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


C++ wxFocusEvent::GetWindow方法代码示例

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


在下文中一共展示了wxFocusEvent::GetWindow方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnFocus

void HexEditorCtrl::OnFocus( wxFocusEvent& event){
#ifdef _DEBUG_
	std::cout << "HexEditorCtrl::OnFocus( wxFocusEvent& event ) \n" ;
#endif
	if( event.GetWindow() == hex_ctrl ||
		 event.GetWindow() == text_ctrl  )
		LastFocused=event.GetWindow();
	event.Skip();//let wxHexCtrl::Focus set the cursor
	}
开发者ID:ChunHungLiu,项目名称:wxHexEditor,代码行数:9,代码来源:HexEditorCtrl.cpp

示例2: OnChildKillFocus

void wxRibbonPanel::OnChildKillFocus(wxFocusEvent& evt)
{
    if(m_child_with_focus == NULL)
        return; // Should never happen, but a check can't hurt

    m_child_with_focus->Disconnect(wxEVT_KILL_FOCUS,
      wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this);
    m_child_with_focus = NULL;

    wxWindow *receiver = evt.GetWindow();
    if(receiver == this || IsAncestorOf(this, receiver))
    {
        m_child_with_focus = receiver;
        receiver->Connect(wxEVT_KILL_FOCUS,
            wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus), NULL, this);
        evt.Skip();
    }
    else if(receiver == NULL || receiver != m_expanded_dummy)
    {
        HideExpanded();
        // Do not skip event, as the panel has been de-expanded, causing the
        // child with focus to be reparented (and hidden). If the event
        // continues propagation then bad things happen.
    }
    else
    {
        evt.Skip();
    }
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:29,代码来源:panel.cpp

示例3: OnSetFocus

void OutputPane::OnSetFocus(wxFocusEvent &event)
{
	if( m_canFocus ){
		return;
	}

	wxWindow *prevFocusWin = event.GetWindow();
	if( prevFocusWin ){
		prevFocusWin->SetFocus();
	}
	event.Skip();
}
开发者ID:BackupTheBerlios,项目名称:codelite-svn,代码行数:12,代码来源:output_pane.cpp

示例4: OnFocus

void VikeEvtBinder::OnFocus(wxFocusEvent &event)
{
    LOGIT(_("on focus"));
    cbEditor *edBase = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
    wxScintilla *editor = NULL;

    if(edBase){
        editor = (wxScintilla *)edBase->GetControl();
        LOGIT(_T("window is %p, edbase is %p, editor is %p"),event.GetWindow(), edBase, editor);
        m_pVikeWin->UpdateStatusBar();
        m_pVikeWin->UpdateCaret((wxScintilla *)editor);
    }
    event.Skip();
}
开发者ID:KurumiSerori,项目名称:cbvike,代码行数:14,代码来源:cbvike.cpp

示例5: OnSetFocus

// The focus event handler doesn't appear to be triggered for some reason
void CGoToDlg::OnSetFocus(wxFocusEvent& event)
{
	if (event.GetWindow() == m_pSpinCtrlChapter)// IDC_EDIT_CHAPTER)
	{
		m_pSpinCtrlChapter->SetFocus();
		m_pSpinCtrlChapter->SetSelection(-1,-1);
	}
	else if (event.GetId() == IDC_EDIT_VERSE)
	{
		m_pSpinCtrlVerse->SetFocus();
		m_pSpinCtrlVerse->SetSelection(-1,-1);
	}

}
开发者ID:eb1,项目名称:adaptit,代码行数:15,代码来源:GoToDlg.cpp

示例6: OnKillFocus

void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event)
{
    // when we lose focus we always disappear - unless it goes to the popup (in
    // which case we don't really lose it)
    wxWindow *win = event.GetWindow();
    while ( win )
    {
        if ( win == m_popup )
            return;
        win = win->GetParent();
    }

    m_popup->DismissAndNotify();
}
开发者ID:lanurmi,项目名称:wxWidgets,代码行数:14,代码来源:popupcmn.cpp

示例7: OnKillFocus

void wxRibbonPanel::OnKillFocus(wxFocusEvent& evt)
{
    if(m_expanded_dummy)
    {
        wxWindow *receiver = evt.GetWindow();
        if(IsAncestorOf(this, receiver))
        {
            m_child_with_focus = receiver;
            receiver->Connect(wxEVT_KILL_FOCUS,
                wxFocusEventHandler(wxRibbonPanel::OnChildKillFocus),
                NULL, this);
        }
        else if(receiver == NULL || receiver != m_expanded_dummy)
        {
            HideExpanded();
        }
    }
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:18,代码来源:panel.cpp


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