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


C++ wxChildFocusEvent::GetWindow方法代码示例

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


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

示例1: onChildFocus

void TextFrame::onChildFocus(wxChildFocusEvent& event)
{
    if(event.GetWindow()==_mainText)
    {
        _currentText = _mainText;
    }
    else if(event.GetWindow()==_secondText)
    {
        _currentText = _secondText;
    }
}
开发者ID:balooloo,项目名称:cody,代码行数:11,代码来源:text-frame.cpp

示例2: OnChildFocus

void DiffPanel::OnChildFocus(wxChildFocusEvent& event) {
	EditorCtrl* focused = (EditorCtrl*)event.GetWindow();
	if (focused != m_currentEditor) {
		if (focused == m_leftEditor) m_currentEditor = m_leftEditor;
		else if (focused == m_rightEditor) m_currentEditor = m_rightEditor;
		m_parentFrame->UpdateNotebook();
	}
}
开发者ID:sapient,项目名称:e,代码行数:8,代码来源:DiffPanel.cpp

示例3: OnChildFocus

void CToolDlg::OnChildFocus(wxChildFocusEvent& event)
{
	if(m_ignore_event_functions)return;
	if(event.GetWindow())
	{
		SetPicture();
	}
}
开发者ID:DavidNicholls,项目名称:heekscnc,代码行数:8,代码来源:CToolDlg.cpp

示例4: UponChildFocus

void MvcController::UponChildFocus(wxChildFocusEvent& event)
{
    event.Skip();

    wxWindow* new_focused_window = FindFocus();

    // A wxChildFocusEvent is sent for every window in the hierarchy,
    // from new_focused_window up to this MvcController. Ignore all
    // but the "deepest" one--see:
    //   http://lists.nongnu.org/archive/html/lmi/2009-01/msg00001.html
    if(event.GetWindow() != new_focused_window)
        {
        return;
        }

    // Do nothing if focus hasn't changed. This case arises when
    // another application is activated, and then this application
    // is reactivated.
    if(last_focused_window_ == new_focused_window)
        {
        return;
        }

    if
        (  wxID_CANCEL == new_focused_window->GetId()
        || wxID_HELP   == new_focused_window->GetId()
        )
        {
        return;
        }

    if(Validate())
        {
        if(new_focused_window)
            {
            last_focused_window_ = new_focused_window;
            }
        else
            {
            warning() << "Keyboard focus was lost." << LMI_FLUSH;
            RefocusLastFocusedWindow();
            }
        }
    else
        {
        LMI_ASSERT(!unit_test_refocus_event_pending_);
        if(!unit_test_under_way_)
            {
            wxCommandEvent event0(wxEVT_REFOCUS_INVALID_CONTROL);
            wxPostEvent(this, event0);
            }
        unit_test_refocus_event_pending_ = true;
        }
}
开发者ID:vadz,项目名称:lmi,代码行数:54,代码来源:mvc_controller.cpp

示例5: changeFocus

void mmNewAcctDialog::changeFocus(wxChildFocusEvent& event)
{
    wxWindow *w = event.GetWindow();
    int oject_in_focus = 0;
    if ( w )
        oject_in_focus = w->GetId();

    if (oject_in_focus == ID_DIALOG_NEWACCT_TEXTCTRL_ACCESSINFO)
    {
        wxTextCtrl* textCtrl = (wxTextCtrl*)FindWindow(ID_DIALOG_NEWACCT_TEXTCTRL_ACCESSINFO);
        textCtrl->SetValue(m_accessInfo);
        m_accessChanged = true;
    }

    if (m_notesCtrl->GetValue() == m_notesLabel)
    {
        m_notesCtrl->SetValue("");
    }
}
开发者ID:4silvertooth,项目名称:moneymanagerex,代码行数:19,代码来源:accountdialog.cpp

示例6: changeFocus

void mmAssetDialog::changeFocus(wxChildFocusEvent& event)
{
    wxWindow *w = event.GetWindow();
    if (w) assetRichText = (w->GetId() == IDC_NOTES ? true : false);
}
开发者ID:Maurizio13,项目名称:moneymanagerex,代码行数:5,代码来源:assetdialog.cpp

示例7: onFocusChange

void mmTransDialog::onFocusChange(wxChildFocusEvent& event)
{
    wxWindow *w = event.GetWindow();
    if (w)
        object_in_focus_ = w->GetId();

    m_currency = Model_Currency::GetBaseCurrency();
    wxString accountName = cbAccount_->GetValue();
    wxString toAccountName = cbPayee_->GetValue();
    for (const auto& acc : Model_Account::instance().all_checking_account_names()){
        if (acc.CmpNoCase(accountName) == 0) accountName = acc;
        if (acc.CmpNoCase(toAccountName) == 0) toAccountName = acc;
    }

    const Model_Account::Data* account = Model_Account::instance().get(accountName);
    if (account)
    {
        m_currency = Model_Account::currency(account);
        cbAccount_->SetValue(account->ACCOUNTNAME);
        m_trx_data.ACCOUNTID = account->ACCOUNTID;
    }

    if (!m_transfer)
    {
        Model_Payee::Data * payee = Model_Payee::instance().get(cbPayee_->GetValue());
        if (payee) 
        {
            cbPayee_->ChangeValue(payee->PAYEENAME);
            setCategoryForPayee(payee);
        }
        toTextAmount_->ChangeValue("");
    }
    else
    {
        const Model_Account::Data* to_account = Model_Account::instance().get(toAccountName);
        if (to_account)
        {
            m_to_currency = Model_Account::currency(to_account);
            cbPayee_->ChangeValue(to_account->ACCOUNTNAME);
            m_trx_data.TOACCOUNTID = to_account->ACCOUNTID;
        }
    }

    if (object_in_focus_ == textAmount_->GetId())
        textAmount_->SelectAll();
    else 
    {
        if (textAmount_->Calculate()) 
            textAmount_->GetDouble(m_trx_data.TRANSAMOUNT);
        skip_amount_init_ = false;
    }

    if (m_advanced && object_in_focus_ == toTextAmount_->GetId())
        toTextAmount_->SelectAll();
    else 
    {
        if (toTextAmount_->Calculate())
            toTextAmount_->GetDouble(m_trx_data.TOTRANSAMOUNT);
    }

    dataToControls();
    event.Skip();
}
开发者ID:twoubt,项目名称:moneymanagerex,代码行数:63,代码来源:transdialog.cpp


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