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


C++ wxFocusEvent类代码示例

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


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

示例1: OnFocus

void TimeTextCtrl::OnFocus(wxFocusEvent &event)
{
   wxCommandEvent e(EVT_CAPTURE_KEYBOARD);

   if (event.GetEventType() == wxEVT_KILL_FOCUS) {
      e.SetEventType(EVT_RELEASE_KEYBOARD);
   }
   e.SetEventObject(this);
   GetParent()->GetEventHandler()->ProcessEvent(e);

   Refresh(false);
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:12,代码来源:TimeTextCtrl.cpp

示例2: OnKillFocus

void wxWebView::OnKillFocus(wxFocusEvent& event)
{
    WebCore::Frame* frame = 0;
    if (m_mainFrame)
        frame = m_mainFrame->GetFrame();
        
    if (frame) {
        m_impl->page->focusController()->setActive(false);
        frame->selection()->setFocused(false);
    }
    event.Skip();
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:12,代码来源:WebView.cpp

示例3: OnSetFocus

void WebView::OnSetFocus(wxFocusEvent& event)
{
    if (m_impl && m_impl->page && m_impl->page->focusController()) {
        m_impl->page->focusController()->setFocused(true);
        m_impl->page->focusController()->setActive(true);

        if (!m_impl->page->focusController()->focusedFrame() && m_mainFrame)
            m_impl->page->focusController()->setFocusedFrame(m_mainFrame->GetFrame());
    }
    
    event.Skip();
}
开发者ID:jiezh,项目名称:h5vcc,代码行数:12,代码来源:WebView.cpp

示例4: onFocus

void SearchControl::onFocus(wxFocusEvent& event)
{
	gcString txt((wchar_t*)m_tbSearchBox->GetValue().wchar_str());

	if (txt == m_szDefaultText)
		m_tbSearchBox->SetValue(L"");
	else
		onSearchEvent(txt);

	m_tbSearchBox->SetForegroundColour(m_NormalCol);
	event.Skip();
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:12,代码来源:SearchControl.cpp

示例5: RefreshLine

//
// Handle the wxEVT_KILL_FOCUS event
//
void
KeyView::OnKillFocus(wxFocusEvent & event)
{
   // Allow further processing
   event.Skip();

   // Refresh the selected line to adjust visual highlighting.
   if (GetSelection() != wxNOT_FOUND)
   {
      RefreshLine(GetSelection());
   }
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:15,代码来源:KeyView.cpp

示例6: OnSetFocus

void wxWebView::OnSetFocus(wxFocusEvent& event)
{
    WebCore::Frame* frame = 0;
    if (m_mainFrame)
        frame = m_mainFrame->GetFrame();
        
    if (frame) {
        frame->selection()->setFocused(true);
    }

    event.Skip();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:12,代码来源:WebView.cpp

示例7: OnSetFocus

void FontFaceCtrl::OnSetFocus(wxFocusEvent & evt)
{
    evt.Skip();
    // Set the combobox list contents
    wxCriticalSectionLocker lock(s_fontCS);
    wxString value = GetValue();
    Set(s_facenames);
    AutoComplete(s_facenames);
    wxComboBox::SetValue(value);
    if (s_threadComplete)
        Unbind(wxEVT_SET_FOCUS, &FontFaceCtrl::OnSetFocus, this);
}
开发者ID:mattprintz,项目名称:wx-xword,代码行数:12,代码来源:fontface.cpp

示例8: OnTextKillFocus

/** OnTextKillFocus
  *
  * Reverts whatever textbox to the proper text
  */
void ComplxFrame::OnTextKillFocus(wxFocusEvent& event)
{
    wxTextCtrl* text = static_cast<wxTextCtrl*>(event.GetEventObject());
    wxString name = text->GetName();

    if (name == _("PC"))
    {
        UpdateRegister(text, state.pc, 8);
    }
    else if (name == _("CC"))
    {
        int cc = state.n ? -1 : (state.z ? 0 : 1);
        UpdateRegister(text, cc, 9);
    }
    else
    {
        int reg = name[1] - '0';
        assert(reg <= 7);
        UpdateRegister(text, state.regs[reg], reg);
    }
    event.Skip();
}
开发者ID:cchen396,项目名称:complx,代码行数:26,代码来源:ComplxFrame.cpp

示例9: OnKillFocus

void DisassemblyTextCtrl::OnKillFocus(wxFocusEvent& event)
{
    // cancel auto-completion list when losing focus
    if (AutoCompActive())
    {
        AutoCompCancel();
    }
    if (CallTipActive())
    {
        CallTipCancel();
    }
    event.Skip();
} // end of OnKillFocus
开发者ID:yjdwbj,项目名称:cb10-05-ide,代码行数:13,代码来源:disassemblytextctrl.cpp

示例10: 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

示例11: onFocus

void LoginForm::onFocus(wxFocusEvent& event)
{
	if (event.GetId() == m_tbUsername->GetId())
	{
		gcString defaultText = Managers::GetString(L"#LF_USER");

		if (m_tbUsername->GetValue() == defaultText)
			m_tbUsername->SetValue("");
	}
	else if (event.GetId() == m_tbPasswordDisp->GetId())
	{
		if (m_tbPasswordDisp->IsShown())
		{
			m_tbPasswordDisp->Show(false);
			m_tbPassword->Show();
			Layout();
			m_tbPassword->SetFocus();
			return;
		}
	}

	event.Skip();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:23,代码来源:LoginForm.cpp

示例12: OnFocusLost

void GSPanel::OnFocusLost( wxFocusEvent& evt )
{
	evt.Skip();
	m_HasFocus = false;
	DoShowMouse();
#ifdef __linux__ // TODO OSX handle properly these HACK2: otherwise events are not recognized
	// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
	// the event before the pad see it. So you send key event directly to the pad.
	if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
		keyEvent event = {0, 10}; // X equivalent of FocusOut
		PADWriteEvent(event);
	}
#endif
	//Console.Warning("GS frame > focus lost");
}
开发者ID:juhalaukkanen,项目名称:pcsx2,代码行数:15,代码来源:FrameForGS.cpp

示例13: OnKillFocus

void wxNumberEditCtrl::OnKillFocus(wxFocusEvent& event)
{
	if(!GetValue().IsNumber())
	{
		Clear();
		*this << *m_pValue;
	}
	else
	{
		GetValue().ToLong(m_pValue);
		m_pParent->OnNumberEditCtrlChanged();
	}

	event.Skip();
}
开发者ID:bestdpf,项目名称:xface-error,代码行数:15,代码来源:wxNumberEditCtrl.cpp

示例14: OnKillFocus

void cbStyledTextCtrl::OnKillFocus(wxFocusEvent& event)
{
    // cancel auto-completion list when losing focus
    if (AutoCompActive())
    {
        AutoCompCancel();
    }

    if (CallTipActive())
    {
        CallTipCancel();
    }

    event.Skip();
}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:15,代码来源:cbstyledtextctrl.cpp

示例15: OnSetFocus

void wxNotebook::OnSetFocus (
  wxFocusEvent&                     rEvent
)
{
    //
    // This function is only called when the focus is explicitly set (i.e. from
    // the program) to the notebook - in this case we don't need the
    // complicated OnNavigationKey() logic because the programmer knows better
    // what [s]he wants
    //
    // set focus to the currently selected page if any
    //
    if (m_nSelection != -1)
        m_pages[m_nSelection]->SetFocus();
    rEvent.Skip();
} // end of wxNotebook::OnSetFocus
开发者ID:jonntd,项目名称:dynamica,代码行数:16,代码来源:notebook.cpp


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