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
	}
Example #2
0
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();
    }
}
void OutputPane::OnSetFocus(wxFocusEvent &event)
{
	if( m_canFocus ){
		return;
	}

	wxWindow *prevFocusWin = event.GetWindow();
	if( prevFocusWin ){
		prevFocusWin->SetFocus();
	}
	event.Skip();
}
Example #4
0
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();
}
Example #5
0
// 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);
	}

}
Example #6
0
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();
}
Example #7
0
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();
        }
    }
}