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


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

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


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

示例1: OnFocus

void SelectionBar::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);

   event.Skip();
}
开发者ID:LBoggino,项目名称:audacity,代码行数:14,代码来源:SelectionBar.cpp

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

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

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

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

示例6: OnTerrainCountChange

void AGE_Frame::OnTerrainCountChange(wxFocusEvent &Event)
{
	if(!((AGETextCtrl*)Event.GetEventObject())->SaveEdits()) return;
	uint16_t UsedTerrains = lexical_cast<uint16_t>(((wxTextCtrl*)Event.GetEventObject())->GetValue());
	// Resize terrain restrictions
	for(short loop = 0; loop < GenieFile->TerrainRestrictions.size(); loop++)
	{
		GenieFile->TerrainRestrictions[loop].TerrainAccessible.resize(UsedTerrains);
		if(GenieVersion >= genie::GV_AoK)
		GenieFile->TerrainRestrictions[loop].TerrainPassGraphics.resize(UsedTerrains);
	}
	
	wxCommandEvent E;
	OnTerrainRestrictionsSelect(E);
	Event.Skip();
}
开发者ID:hex007,项目名称:AGE,代码行数:16,代码来源:Terrains.cpp

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

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

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

示例10: RefreshLine

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

   // Refresh the selected line to pull in any changes while
   // focus was away...like when setting a new key value.  This
   // will also refresh the visual (highlighted) state.
   if (GetSelection() != wxNOT_FOUND)
   {
      RefreshLine(GetSelection());
   }

#if wxUSE_ACCESSIBILITY
   // Tell accessibility of the change
   mAx->SetCurrentLine(GetSelection());
#endif
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:22,代码来源:KeyView.cpp

示例11: onBlur

void LoginForm::onBlur(wxFocusEvent& event)
{
	if (event.GetId() == m_tbUsername->GetId())
	{
		if (m_tbUsername->GetValue() == "")
			m_tbUsername->SetValue(Managers::GetString(L"#LF_USER"));
	}
	else if (event.GetId() == m_tbPassword->GetId())
	{
		if (m_tbPassword->GetValue() == "" && m_tbPassword->IsShown())
		{
			m_tbPassword->Show(false);
			m_tbPasswordDisp->Show(true);
			Layout();
			return;
		}
	}

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

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

示例13: OnDpcKillFocus

//----------------------------------------------------------------------------
// Workaround for bug http://trac.wxwidgets.org/ticket/11630
void mmTransDialog::OnDpcKillFocus(wxFocusEvent& event)
{
    if (wxGetKeyState(WXK_TAB) && wxGetKeyState(WXK_SHIFT))
        itemButtonCancel_->SetFocus();
    else if (wxGetKeyState(WXK_TAB))
        choiceStatus_->SetFocus();
    else if (wxGetKeyState(WXK_UP))
    {
        wxCommandEvent evt(wxEVT_SPIN, wxID_ANY);
        evt.SetInt(1);
        this->GetEventHandler()->AddPendingEvent(evt);
    }
    else if (wxGetKeyState(WXK_DOWN))
    {
        wxCommandEvent evt(wxEVT_SPIN, wxID_ANY);
        evt.SetInt(-1);
        this->GetEventHandler()->AddPendingEvent(evt);
    }
    else
        event.Skip();
}
开发者ID:twoubt,项目名称:moneymanagerex,代码行数:23,代码来源:transdialog.cpp

示例14: OnKillFocus

void wxTimeSpinCtrl::OnKillFocus(wxFocusEvent &ev)
{
#ifdef __WXGTK__
	ev.Skip();
#endif

	long time = GetTextTime();

	if (time < 0)
	{
		m_txt->SetValue(wxEmptyString);
		spinValue = 0;
		m_spn->SetValue(0);
	}
	else
	{
		int tp = GetTimePart();
		SetValue(wxTimeSpan(0, 0, time));
		Highlight(tp);
	}
}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:21,代码来源:timespin.cpp

示例15: OnKillFocus

void wxGridCellEditorEvtHandler::OnKillFocus(wxFocusEvent& event)
{
    // We must let the native control have this event so in any case don't mark
    // it as handled, otherwise various weird problems can happen (see #11681).
    event.Skip();

    // Don't disable the cell if we're just starting to edit it
    if (m_inSetFocus)
        return;

    // Tell the grid to dismiss the control but don't do it immediately as it
    // could result in the editor being destroyed right now and a crash in the
    // code searching for the next event handler, so post an event asking the
    // grid to do it slightly later instead.

    // FIXME-VC6: Once we drop support for VC6, we should use a simpler
    //            m_grid->CallAfter(&wxGrid::DisableCellEditControl) and get
    //            rid of wxEVT_GRID_HIDE_EDITOR entirely.
    m_grid->GetEventHandler()->
        AddPendingEvent(wxCommandEvent(wxEVT_GRID_HIDE_EDITOR));
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:21,代码来源:grideditors.cpp


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