本文整理汇总了C++中TransferDataFromWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ TransferDataFromWindow函数的具体用法?C++ TransferDataFromWindow怎么用?C++ TransferDataFromWindow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TransferDataFromWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oldSettings
void ecSettingsDialog::OnOK(wxCommandEvent& event)
{
ecSettings oldSettings(wxGetApp().GetSettings());
TransferDataFromWindow();
if (wxGetApp().GetSettings().m_bHex != oldSettings.m_bHex)
{
// Refresh the values window and currently selected properties
ecConfigToolHint hint(NULL, ecAllSaved);
if (wxGetApp().GetConfigToolDoc())
wxGetApp().GetConfigToolDoc()->UpdateAllViews (NULL, & hint);
}
if (wxGetApp().GetSettings().m_showMacroNames != oldSettings.m_showMacroNames)
{
ecConfigToolHint hint(NULL, ecNameFormatChanged);
if (wxGetApp().GetConfigToolDoc())
wxGetApp().GetConfigToolDoc()->UpdateAllViews (NULL, & hint);
}
event.Skip();
}
示例2: wxMessageBox
void udAggregationDialog::OnOk(wxCommandEvent& event)
{
if( m_eName->GetValue() == wxT("") )
{
wxMessageBox(wxT("Name cannot be empty."), wxT("CodeDesigner"), wxICON_WARNING | wxOK );
m_eName->SetFocus();
}
// else if( (m_Name != m_eName->GetValue()) && !IPluginManager::Get()->GetProject()->IsUniqueName( m_eName->GetValue() ) )
// {
// wxMessageBox(wxT("Name must be unique."), wxT("CodeDesigner"), wxICON_WARNING | wxOK );
// m_eName->SetFocus();
// }
else
{
// get data via validators...
TransferDataFromWindow();
m_pageAdv->TransferDataFromWindow();
m_AccessType = m_chAccess->GetSelection();
EndModal( wxID_OK );
}
}
示例3: WXUNUSED
void TagsEditor::OnOk(wxCommandEvent & WXUNUSED(event))
{
if (mGrid->IsCellEditControlShown()) {
mGrid->SaveEditControlValue();
mGrid->HideCellEditControl();
return;
}
if (!Validate() || !TransferDataFromWindow()) {
return;
}
*mTags = mLocal;
wxRect r = GetRect();
gPrefs->Write(wxT("/TagsEditor/x"), r.x);
gPrefs->Write(wxT("/TagsEditor/y"), r.y);
gPrefs->Write(wxT("/TagsEditor/width"), r.width);
gPrefs->Write(wxT("/TagsEditor/height"), r.height);
gPrefs->Flush();
EndModal(wxID_OK);
}
示例4: TransferDataFromWindow
void DialogStyleEditor::UpdateWorkStyle() {
updating = true;
TransferDataFromWindow();
updating = false;
work->font = from_wx(FontName->GetValue());
long templ = 0;
Encoding->GetValue().BeforeFirst('-').ToLong(&templ);
work->encoding = templ;
work->borderstyle = OutlineType->IsChecked() ? 3 : 1;
work->alignment = ControlToAlign(Alignment->GetSelection());
for (size_t i = 0; i < 3; ++i)
work->Margin[i] = margin[i]->GetValue();
work->bold = BoxBold->IsChecked();
work->italic = BoxItalic->IsChecked();
work->underline = BoxUnderline->IsChecked();
work->strikeout = BoxStrikeout->IsChecked();
}
示例5: AcceptAndClose
void wxDialogBase::OnButton(wxCommandEvent& event)
{
const int id = event.GetId();
if ( id == GetAffirmativeId() )
{
AcceptAndClose();
}
else if ( id == wxID_APPLY )
{
if ( Validate() )
TransferDataFromWindow();
// TODO: disable the Apply button until things change again
}
else if ( id == GetEscapeId() ||
(id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
{
EndDialog(wxID_CANCEL);
}
else // not a standard button
{
event.Skip();
}
}
示例6: TransferDataFromWindow
void mainwin::OnOkButtonClick( wxCommandEvent& event )
{
TransferDataFromWindow();
m_sourcemac.Replace("-", wxEmptyString);
m_desmac.Replace("-", wxEmptyString);
int checkresult = m_core.fillframe(m_sourcemac.MakeUpper().ToStdString(), m_desmac.MakeUpper().ToStdString(), m_userdata.ToStdString(), m_seedstr.ToStdString());
if (checkresult)
{
if (checkresult & 1)
wxMessageBox(wxT("error:源MAC地址格式不正确"), wxT("错误提示"), wxICON_ERROR);
if (checkresult & 2)
wxMessageBox(wxT("error:目的MAC地址格式不正确"), wxT("错误提示"), wxICON_ERROR);
if (checkresult & 4)
wxMessageBox(wxT("error:数据部分格式不正确"), wxT("错误提示"), wxICON_ERROR);
if (checkresult & 8)
wxMessageBox(wxT("error:生成多项式语法错误"), wxT("错误提示"), wxICON_ERROR);
}
else
{
if (FindWindow(XRCID("ID_BUTTON2")))
FindWindow(XRCID("ID_BUTTON2"))->Enable();
if (FindWindow(XRCID("ID_BUTTON3")))
FindWindow(XRCID("ID_BUTTON3"))->Enable();
if (FindWindow(XRCID("ID_SCROLLEDWINDOW")))
{
((wxTextCtrl*)FindWindow(XRCID("ID_SCROLLEDWINDOW")))->Clear();
((wxTextCtrl*)FindWindow(XRCID("ID_SCROLLEDWINDOW")))->AppendText(m_core.getcrcdata() + string(crcgenerater::checkseedstr(m_seedstr.ToStdString())-1,'0')+"\n");
}
if (FindWindow(XRCID("ID_TEXTCTRL3")))
((wxTextCtrl*)FindWindow(XRCID("ID_TEXTCTRL3")))->Clear();
if (FindWindow(XRCID("ID_TREECTRL")))
((wxTreeCtrl*)FindWindow(XRCID("ID_TREECTRL")))->DeleteAllItems();
clicknum = 1;
}
}
示例7: TransferDataFromWindow
void ProjectionDlg::OnHorizUnits( wxCommandEvent &event )
{
TransferDataFromWindow();
m_iUnits = m_pHorizCtrl->GetSelection();
LinearUnits iUnits = (LinearUnits) (long int) m_pHorizCtrl->GetClientData(m_iUnits);
if (iUnits == LU_METERS)
{
m_proj.SetLinearUnits(SRS_UL_METER, 1.0);
}
if (iUnits == LU_FEET_INT)
{
m_proj.SetLinearUnits(SRS_UL_FOOT, GetMetersPerUnit(iUnits));
}
if (iUnits == LU_FEET_US)
{
m_proj.SetLinearUnits(SRS_UL_US_FOOT, GetMetersPerUnit(iUnits));
}
TransferDataToWindow();
UpdateControlStatus();
}
示例8: OnProcess
void DialogExport::OnProcess(wxCommandEvent &) {
if (!TransferDataFromWindow()) return;
auto filename = SaveFileSelector(_("Export subtitles file"), "", "", "", to_wx(SubtitleFormat::GetWildcards(1)), this);
if (filename.empty()) return;
for (size_t i = 0; i < filter_list->GetCount(); ++i) {
if (filter_list->IsChecked(i))
exporter->AddFilter(from_wx(filter_list->GetString(i)));
}
try {
wxBusyCursor busy;
c->ass->SetScriptInfo("Export Encoding", from_wx(charset_list->GetStringSelection()));
exporter->Export(filename, from_wx(charset_list->GetStringSelection()), this);
}
catch (agi::UserCancelException const&) {
}
catch (const char *error) {
wxMessageBox(error, "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
}
catch (wxString const& error) {
wxMessageBox(error, "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
}
catch (agi::Exception const& err) {
wxMessageBox(to_wx(err.GetMessage()), "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
}
catch (std::exception const& err) {
wxMessageBox(to_wx(err.what()), "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
}
catch (...) {
wxMessageBox("Unknown error", "Error exporting subtitles", wxOK | wxICON_ERROR | wxCENTER, this);
}
EndModal(0);
}
示例9: TransferDataFromWindow
void wxDialog::OnApply(wxCommandEvent &WXUNUSED(event))
{
if ( Validate() )
TransferDataFromWindow();
}
示例10: EnsureOptimalFocus
void MvcController::UponUpdateUI(wxUpdateUIEvent& event)
{
event.Skip();
unit_test_idle_processing_completed_ = false;
// Explicitly disregard any wxUpdateUIEvent received while this
// application is not active: see
// http://lists.gnu.org/archive/html/lmi/2006-03/msg00006.html
// for a discussion.
if(!TheApp().IsActive())
{
return;
}
// A disabled window might have focus:
// http://lists.nongnu.org/archive/html/lmi/2005-11/msg00040.html
// so make sure focus is valid now.
EnsureOptimalFocus();
// Exit immediately if nothing changed. The library calls this
// function continually in idle time, and it's pointless to fret
// over inputs that didn't change on this update because they've
// already been handled. Complex processing of many inputs has
// been observed to consume excessive CPU time when a malloc
// debugger is running, so this optimization is significant.
//
// The early-exit condition cannot succeed until Assimilate() has
// been called: therefore, Assimilate() is guaranteed to be called
// here by the time the user can interact with the GUI.
TransferDataFromWindow();
if(cached_transfer_data_ == transfer_data_)
{
unit_test_idle_processing_completed_ = true;
return;
}
cached_transfer_data_ = transfer_data_;
DiagnosticsWindow().SetLabel("");
std::vector<std::string> control_changes;
std::string const name_to_ignore = NameOfControlToDeferEvaluating();
typedef std::map<std::string,std::string>::const_iterator smci;
for(smci i = transfer_data_.begin(); i != transfer_data_.end(); ++i)
{
std::string const& name = i->first;
std::string const& view_value = i->second;
std::string const& model_value = model_.Entity(name).str();
if(name == name_to_ignore || ModelAndViewValuesEquivalent(name))
{
continue;
}
try
{
std::string change =
name + ":\n"
+ " model: '" + model_value + "'\n"
+ " view: '" + view_value + "'\n"
;
control_changes.push_back(change);
model_.Entity(name) = view_value;
}
catch(std::exception const& e)
{
DiagnosticsWindow().SetLabel(name + ": " + e.what());
}
}
// wxEVT_UPDATE_UI events should occur frequently enough that two
// control changes cannot be simultaneous.
if(1 < control_changes.size())
{
warning() << "Contents of more than one control changed.\n";
typedef std::vector<std::string>::const_iterator svci;
for(svci i = control_changes.begin(); i != control_changes.end(); ++i)
{
warning() << *i;
}
warning() << LMI_FLUSH;
}
Assimilate(name_to_ignore);
}
示例11: TransferDataFromWindow
void TruncSilenceDialog::OnPreview(wxCommandEvent & event)
{
TransferDataFromWindow();
mEffect->Preview();
}
示例12: TransferDataFromWindow
void ConnectToDialog::OnOK( wxCommandEvent& event )
{
TransferDataFromWindow();
SaveHistoryValue();
EndModal(wxID_OK);
}
示例13: TransferDataFromWindow
void EqualizationDialog::OnPreview(wxCommandEvent &event)
{
TransferDataFromWindow();
m_pEffect->Preview();
//v Restore previous values?
}
示例14: TransferDataFromWindow
void DialogStyleEditor::OnSetColor(wxThreadEvent&) {
TransferDataFromWindow();
SubsPreview->SetStyle(*work);
}
示例15: TransferDataFromWindow
ExportMP2Options::~ExportMP2Options()
{
TransferDataFromWindow();
}