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


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

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


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

示例1: OnReceivingFocus

void QuickFindBar::OnReceivingFocus(wxFocusEvent& event)
{
    event.Skip();
    if((event.GetEventObject() == m_findWhat) || (event.GetEventObject() == m_replaceWith)) {
        PostCommandEvent(this, wxStaticCast(event.GetEventObject(), wxWindow));
    }
}
开发者ID:GaganJotSingh,项目名称:codelite,代码行数:7,代码来源:quickfindbar.cpp

示例2: OnFocus

void wxDynamicSashWindowLeaf::OnFocus(wxFocusEvent &event)
{
    if ( event.GetEventObject() == m_hscroll ||
            event.GetEventObject() == m_vscroll )
    {
        m_child->SetFocus();
    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:8,代码来源:dynamicsash.cpp

示例3: OnFocus

void SwitchView::OnFocus(wxFocusEvent& event) {
    wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this);
    wxScrollBar *vscroll = m_dyn_sash->GetVScrollBar(this);

    if (event.GetEventObject() == hscroll || event.GetEventObject() == vscroll) {
        m_view->SetFocus();
    } else {
        event.Skip();
    }
}
开发者ID:hajuuk,项目名称:R7000,代码行数:10,代码来源:dynsash_switch.cpp

示例4: ControlSetFocus

void VampEffectDialog::ControlSetFocus(wxFocusEvent &event)
{
   wxControl *c = (wxControl *) event.GetEventObject();
   wxScrolledWindow *p = (wxScrolledWindow *) c->GetParent();
   wxRect r = c->GetRect();
   wxRect rv = p->GetRect();
   rv.y = 0;

   event.Skip();

   int y;
   int yppu;
   p->GetScrollPixelsPerUnit(NULL, &yppu);

   if (r.y >= rv.y && r.GetBottom() <= rv.GetBottom()) {
      return;
   }

   if (r.y < rv.y) {
      p->CalcUnscrolledPosition(0, r.y, NULL, &r.y);
      y = r.y / yppu;
   }
   else {
      p->CalcUnscrolledPosition(0, r.y, NULL, &r.y);
      y = (r.GetBottom() - rv.GetBottom() + yppu) / yppu;
   }

   p->Scroll(-1, y);
};
开发者ID:tuanmasterit,项目名称:audacity,代码行数:29,代码来源:VampEffect.cpp

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

示例6: OnTextFocusLost

void DIALOG_MOVE_EXACT::OnTextFocusLost( wxFocusEvent& event )
{
    wxTextCtrl* obj = static_cast<wxTextCtrl*>( event.GetEventObject() );

    if( obj->GetValue().IsEmpty() )
        obj->SetValue("0");

    event.Skip();
}
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:9,代码来源:dialog_move_exact.cpp

示例7: OnKillFocusEvent

// ----------------------------------------------------------------------------
void MMSapEvents::OnKillFocusEvent( wxFocusEvent& event )
// ----------------------------------------------------------------------------
{
    //For GTK, we copy the selected text to the PRIMARY clipboard
    // when we lose the focus

    #if not defined(__WXGTK__)
        event.Skip(); return;
    #endif

    // If selected text, copy to clipboard

    //remember event window pointer
    wxObject* pEvtObject = event.GetEventObject();

    cbStyledTextCtrl* pControl = 0;
    cbEditor* ed = 0;
    wxString selectedText = wxEmptyString;
    if ( ((wxWindow*)pEvtObject)->GetName().Lower() == _T("sciwindow") )
    {   ed = (cbEditor*)((wxWindow*)pEvtObject)->GetParent();
        pControl = (cbStyledTextCtrl*)pEvtObject;
    }

    if ( ed ) do
    {
        if ( not MouseSap::pMouseSap->IsAttachedTo( pControl ) )
            break;

        selectedText = pControl->GetSelectedText();
        if ( selectedText.IsEmpty() )
            break;

        #if defined(__WXGTK__)
            gtk_clipboard_set_text(
                gtk_clipboard_get(GDK_SELECTION_PRIMARY),
                selectedText.mb_str(wxConvUTF8),
                selectedText.Length() );
        #else //__WXMSW__ //testing
                if (wxTheClipboard->Open())
                {
                    wxTheClipboard->AddData(new wxTextDataObject(selectedText));
                    wxTheClipboard->Close();
                }
        #endif

        #if defined(LOGGING)
            DumpClipboard();
            if (ed && pControl && (not selectedText.IsEmpty()))
            LOGIT( _T("OnKillFocus[%s][%s]"), ed->GetTitle().c_str(),selectedText.c_str());
        #endif
    }while(false);

    event.Skip();

} // end of OnGPM
开发者ID:stahta01,项目名称:EmBlocks,代码行数:56,代码来源:MouseSap.cpp

示例8: OnKillFocus_Terrains

void AGE_Frame::OnKillFocus_Terrains(wxFocusEvent &Event)
{
	if(!((AGETextCtrl*)Event.GetEventObject())->SaveEdits()) return;
	if(Event.GetId() == Terrains_Name->GetId())
	{
		ListTerrains();
	}
	else if(Event.GetId() == Terrains_Name2->GetId())
	{
		wxCommandEvent E;
		OnTerrainsSelect(E);
	}
	Event.Skip();
}
开发者ID:hex007,项目名称:AGE,代码行数:14,代码来源:Terrains.cpp

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

示例10: OnKillFocus_Sounds

void AGE_Frame::OnKillFocus_Sounds(wxFocusEvent &Event)
{
	if(((AGETextCtrl*)Event.GetEventObject())->SaveEdits() != 0) return;
	ListSoundItems();
	Event.Skip();
}
开发者ID:mic-e,项目名称:AGE,代码行数:6,代码来源:Sounds.cpp


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