本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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();
}
示例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());
}
}
示例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();
}
示例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);
}
示例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();
}
示例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
示例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();
}
示例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();
}
示例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");
}
示例13: OnKillFocus
void wxNumberEditCtrl::OnKillFocus(wxFocusEvent& event)
{
if(!GetValue().IsNumber())
{
Clear();
*this << *m_pValue;
}
else
{
GetValue().ToLong(m_pValue);
m_pParent->OnNumberEditCtrlChanged();
}
event.Skip();
}
示例14: OnKillFocus
void cbStyledTextCtrl::OnKillFocus(wxFocusEvent& event)
{
// cancel auto-completion list when losing focus
if (AutoCompActive())
{
AutoCompCancel();
}
if (CallTipActive())
{
CallTipCancel();
}
event.Skip();
}
示例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