本文整理汇总了C++中wxChildFocusEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxChildFocusEvent类的具体用法?C++ wxChildFocusEvent怎么用?C++ wxChildFocusEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxChildFocusEvent类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OnChildFocus
void frmMain::OnChildFocus(wxChildFocusEvent &event)
{
// Grab the focussed control and stash it away for later use
currentControl = dynamic_cast<wxControl *>(event.GetEventObject());
// Setup the menu controls according to the control that's selected
// and it's status.
// Defaults.
editMenu->Enable(MNU_COPY, false);
// ctlSQLBox?
ctlSQLBox *sb = dynamic_cast<ctlSQLBox *>(event.GetEventObject());
if (sb)
{
// Copy
editMenu->Enable(MNU_COPY, !sb->GetSelectedText().IsEmpty());
}
// Listview?
ctlListView *lv = dynamic_cast<ctlListView *>(event.GetEventObject());
if (lv)
{
// Copy
editMenu->Enable(MNU_COPY, lv->GetSelectedItemCount() > 0);
}
}
开发者ID:search5,项目名称:pgadmin3,代码行数:27,代码来源:events.cpp
示例2: FindFocus
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
示例3: 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
示例4: 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
示例5: OnChildFocus
void CToolDlg::OnChildFocus(wxChildFocusEvent& event)
{
if(m_ignore_event_functions)return;
if(event.GetWindow())
{
SetPicture();
}
}
开发者ID:DavidNicholls,项目名称:heekscnc,代码行数:8,代码来源:CToolDlg.cpp
示例6: OnFocus
void OnFocus(wxChildFocusEvent& evt)
{
CmdProc* p1=wm.cmdptr.GetData();
CmdProc* p2=m_pActiveView? &m_pActiveView->Target:NULL;
if(p1!=p2)
{
wm.cmdptr.SetData(p2);
wm.wup.gp_add("CmdProc");
}
evt.Skip(true);
}
开发者ID:hanwd,项目名称:ew_base,代码行数:11,代码来源:mvc_book.cpp
示例7: OnFocus
void OnFocus(wxChildFocusEvent& evt)
{
CmdProc* p1=WndManager::current().cmdptr.GetData();
CmdProc* p2=NULL;
if(p1!=p2)
{
WndManager::current().cmdptr.SetData(p2);
WndUpdator::current().gp_add("CmdProc");
}
evt.Skip(true);
}
开发者ID:xuanya4202,项目名称:ew_base,代码行数:11,代码来源:plugin_message.cpp
示例8: 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
示例9: onFocusChange
void mmStockDialog::onFocusChange(wxChildFocusEvent& event)
{
updateControls();
event.Skip();
}
开发者ID:Neurone,项目名称:moneymanagerex,代码行数:5,代码来源:stockdialog.cpp
示例10: 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
示例11: OnChildFocus
void DialogStyleEditor::OnChildFocus(wxChildFocusEvent &event) {
UpdateWorkStyle();
SubsPreview->SetStyle(*work);
event.Skip();
}
开发者ID:KagamiChan,项目名称:Aegisub,代码行数:5,代码来源:dialog_style_editor.cpp
示例12: OnSetChildFocus
void myTextCtrl::OnSetChildFocus(wxChildFocusEvent& event)
{
VRenderFrame *vrf = (VRenderFrame *)m_frame;
if (vrf) vrf->SetKeyLock(true);
event.Skip();
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:6,代码来源:VAnnoView.cpp
示例13: 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类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论