• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxFocusEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: onFocusLoss

/* TextEditor::onFocusLoss
 * Called when the text editor loses focus
 *******************************************************************/
void TextEditor::onFocusLoss(wxFocusEvent& e)
{
	// Hide calltip+autocomplete box
	hideCalltip();
	AutoCompCancel();

	// Hide current line marker
	MarkerDeleteAll(1);
	MarkerDeleteAll(2);

	// Clear word matches
	SetIndicatorCurrent(8);
	IndicatorClearRange(0, GetTextLength());
	prev_word_match = "";

	e.Skip();
}
开发者ID:Gaerzi,项目名称:SLADE,代码行数:20,代码来源:TextEditor.cpp


示例17: OnFocusLost

void GSPanel::OnFocusLost( wxFocusEvent& evt )
{
	evt.Skip();
	m_HasFocus = false;
	DoShowMouse();
#if defined(__unix__)
	// 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");

	UpdateScreensaver();
}
开发者ID:jerrys123111,项目名称:pcsx2,代码行数:17,代码来源:FrameForGS.cpp


示例18: wxFocusEventHandler

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


示例19: OnKillFocus

void wxGridCellEditorEvtHandler::OnKillFocus(wxFocusEvent& event)
{
    // Don't disable the cell if we're just starting to edit it
    if ( m_inSetFocus )
    {
        event.Skip();
        return;
    }

    // accept changes
    m_grid->DisableCellEditControl();

    // notice that we must not skip the event here because the call above may
    // delete the control which received the kill focus event in the first
    // place and if we pretend not having processed the event, the search for a
    // handler for it will continue using the now deleted object resulting in a
    // crash
}
开发者ID:beanhome,项目名称:dev,代码行数:18,代码来源:grideditors.cpp


示例20: EvtKillFocus

void Panel_Remaps::EvtKillFocus(wxFocusEvent& event )
{
	if(	paletteCtrl->isChanged && curr_ind_remap >= 0 )
	{
		//Make the user sure to abort his modifications
		int res = wxMessageBox( wxT("Change have been made in the current palette.\n"
							 "If you don't save them now you can loose them\n" 
							 "Do the save ?")
							 , wxT("Question"), wxYES_NO | wxICON_INFORMATION, this );

		if( res == wxYES )
		{
			if( mode8bit )
				Save_8Bit_Remap();
			else
				Save_16Bit_Remap();
		}
	}
	paletteCtrl->isChanged = false;
	event.Skip();
}
开发者ID:OpenBOR,项目名称:obeditor,代码行数:21,代码来源:entity__panel_remaps.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxFont类代码示例发布时间:2022-05-31
下一篇:
C++ wxFindDialogEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap