本文整理汇总了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;
}
}
示例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();
}
}
示例3: OnChildFocus
void CToolDlg::OnChildFocus(wxChildFocusEvent& event)
{
if(m_ignore_event_functions)return;
if(event.GetWindow())
{
SetPicture();
}
}
示例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;
}
}
示例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("");
}
}
示例6: changeFocus
void mmAssetDialog::changeFocus(wxChildFocusEvent& event)
{
wxWindow *w = event.GetWindow();
if (w) assetRichText = (w->GetId() == IDC_NOTES ? true : false);
}
示例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();
}