本文整理汇总了C++中wxBeginBusyCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ wxBeginBusyCursor函数的具体用法?C++ wxBeginBusyCursor怎么用?C++ wxBeginBusyCursor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxBeginBusyCursor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxDialog
EditServerListDlg::EditServerListDlg(wxWindow *parent,
const wxString& caption,
const wxString& message,
const wxString& filename) : wxDialog(parent, -1, caption,
wxDefaultPosition, wxSize(400,200),
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
m_file = filename;
wxBeginBusyCursor();
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
m_textctrl = new wxTextCtrl(this, -1, wxEmptyString,
wxDefaultPosition,
wxDefaultSize,
wxTE_MULTILINE);
topsizer->Add( m_textctrl, 1, wxEXPAND | wxLEFT|wxRIGHT, 15 );
topsizer->Add( CreateButtonSizer( wxOK | wxCANCEL ), 0, wxCENTRE | wxALL, 10 );
SetAutoLayout( TRUE );
SetSizer( topsizer );
Centre( wxBOTH );
if (wxFile::Exists(filename))
m_textctrl->LoadFile(filename);
m_textctrl->SetFocus();
wxEndBusyCursor();
}
示例2: wxDialog
wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
const wxString& message,
const wxString& prompt,
const wxString& caption,
long value,
long min,
long max,
const wxPoint& pos)
: wxDialog(parent, wxID_ANY, caption,
pos, wxDefaultSize)
{
m_value = value;
m_max = max;
m_min = min;
wxBeginBusyCursor();
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
#if wxUSE_STATTEXT
// 1) text message
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
#endif
// 2) prompt and text ctrl
wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL );
#if wxUSE_STATTEXT
// prompt if any
if (!prompt.empty())
inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 );
#endif
// spin ctrl
wxString valStr;
valStr.Printf(wxT("%ld"), m_value);
m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ), wxSP_ARROW_KEYS, (int)m_min, (int)m_max, (int)m_value);
inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
// add both
topsizer->Add( inputsizer, 0, wxEXPAND | wxLEFT|wxRIGHT, 5 );
// 3) buttons if any
wxSizer *buttonSizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL);
if ( buttonSizer )
{
topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder());
}
SetSizer( topsizer );
SetAutoLayout( true );
topsizer->SetSizeHints( this );
topsizer->Fit( this );
Centre( wxBOTH );
m_spinctrl->SetSelection(-1, -1);
m_spinctrl->SetFocus();
wxEndBusyCursor();
}
示例3: wxWindowDisabler
void IntensityCorrectionFilterPanel::OnSetProgress( wxCommandEvent& event )
{
int progress = event.GetInt();
// start_progress() sends -1
if (progress < 0)
{
disabler_ = new wxWindowDisabler();
#ifndef _WIN32
wxBeginBusyCursor();
#endif
progress = 0;
}
// finish_progress() sends 101
if (progress > 100)
{
if (disabler_) { delete disabler_; disabler_ = 0; }
#ifndef _WIN32
wxEndBusyCursor();
#endif
progress = 100;
}
if (progress == 0 || progress > mPercentage->GetValue())
{
mPercentage->SetValue(progress);
}
}
示例4: wxBeginBusyCursor
///////////////////////////////////////////////////////
// Report base
///////////////////////////////////////////////////////
wxWindow *reportBaseFactory::StartDialog(frmMain *form, pgObject *obj)
{
parent = form;
wxBeginBusyCursor();
frmReport *report = new frmReport(GetFrmMain());
// Generate the report header
wxDateTime now = wxDateTime::Now();
report->XmlAddHeaderValue(wxT("generated"), now.Format(wxT("%c")));
if (obj->GetServer())
report->XmlAddHeaderValue(wxT("server"), obj->GetServer()->GetFullIdentifier());
if (obj->GetDatabase())
report->XmlAddHeaderValue(wxT("database"), obj->GetDatabase()->GetName());
if (obj->GetSchema())
{
if (obj->GetSchema()->GetMetaType() == PGM_CATALOG)
report->XmlAddHeaderValue(wxT("catalog"), obj->GetSchema()->GetDisplayName());
else
report->XmlAddHeaderValue(wxT("schema"), obj->GetSchema()->GetName());
}
if (obj->GetJob())
report->XmlAddHeaderValue(wxT("job"), obj->GetJob()->GetName());
if (obj->GetTable())
report->XmlAddHeaderValue(wxT("table"), obj->GetTable()->GetName());
GenerateReport(report, obj);
wxEndBusyCursor();
report->ShowModal();
return 0;
}
示例5: WXUNUSED
void SigUIFrame::m_installOnButtonClick( wxCommandEvent& WXUNUSED(event) )
{
wxWakeUpIdle();
wxBeginBusyCursor();
m_panel_sigman->Disable();
wxFileName exec(wxStandardPaths::Get().GetExecutablePath());
m_siginst_process = new wxProcess(this);
m_siginst_process->Redirect();
long pid = wxExecute("\"" + exec.GetFullPath() + "\" -i", wxEXEC_ASYNC | wxEXEC_NOHIDE, m_siginst_process);
if (!pid) {
wxLogError(_("Failed to reexecute self for installing the virus signatures!"));
return;
}
m_siginst_process->SetPid(pid);
wxOutputStream *out = m_siginst_process->GetOutputStream();
for (unsigned i=0;i<m_sig_candidates->GetCount();i++) {
wxString str = m_sig_candidates->GetString(i) + "\n";
const char *s = str.mb_str();
if (*s) {
out->Write(s, strlen(s));
} else {
// see bb #2343
wxLogError(_("Filenames with non-ASCII characters not yet supported: %s"), str);
return;
}
}
m_siginst_process->CloseOutput();
wxWakeUpIdle();
}
示例6: OnButtonBrowseRptFileClick
void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event )
{
wxString reportName;
bool make_report = m_CreateRptCtrl->IsChecked();
if( make_report ) // Create a rpt file
{
reportName = m_RptFilenameCtrl->GetValue();
if( reportName.IsEmpty() )
{
wxCommandEvent dummy;
OnButtonBrowseRptFileClick( dummy );
}
if( !reportName.IsEmpty() )
reportName = makeValidFileNameReport();
}
SetDrcParmeters();
m_tester->SetSettings( true, // Pad to pad DRC test enabled
true, // unconnected pads DRC test enabled
true, // DRC test for zones enabled
true, // DRC test for keepout areas enabled
reportName, make_report );
DelDRCMarkers();
wxBeginBusyCursor();
// run all the tests, with no UI at this time.
m_Messages->Clear();
wxSafeYield(); // Allows time slice to refresh the m_Messages window
m_brdEditor->GetBoard()->m_Status_Pcb = 0; // Force full connectivity and ratsnest recalculations
m_tester->RunTests(m_Messages);
m_Notebook->ChangeSelection( 0 ); // display the 1at tab "...Markers ..."
// Generate the report
if( !reportName.IsEmpty() )
{
if( writeReport( reportName ) )
{
wxString msg;
msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) );
wxString caption( _( "Disk File Report Completed" ) );
wxMessageDialog popupWindow( this, msg, caption );
popupWindow.ShowModal();
}
else
DisplayError( this, wxString::Format( _( "Unable to create report file '%s' "),
GetChars( reportName ) ) );
}
wxEndBusyCursor();
RedrawDrawPanel();
}
示例7: wxBeginBusyCursor
void CamShiftPlugin::OnOK()
{
wxBeginBusyCursor();
if (!GetScope())
ProcessImage(cm->book[cm->GetPos()], cm->GetPos());
else{
FetchParams();
ImagePlus *oimg;
CvRect orect, searchwin;
CvPoint ocenter;
oimg = cm->book[0];
int numContours = (int) oimg->contourArray.size();
for (int i=1; i<cm->GetFrameCount(); i++)
cm->book[i]->CloneContours(oimg);
int frameCount = cm->GetFrameCount();
CreateProgressDlg(numContours*frameCount);
bool cont=true;
for (int j=0; j<numContours && cont; j++){
for (int i=1; i<frameCount && (cont=progressDlg->Update(j*frameCount+i, wxString::Format("Cell %d of %d, Frame %d of %d", j+1,numContours, i+1, frameCount))); i++){
ProcessStatic(j, cm->book[i], cm->book[useFirst ? 0 : i-1], hsizes, criteria,
planes, hist, backproject, orect, ocenter, searchwin, rotation, shift, i>1);
}
}
DestroyProgressDlg();
}
cm->ReloadCurrentFrameContours(true, false);
wxEndBusyCursor();
}
示例8: wxFAIL_MSG
void tmwxOptimizerDialog::DoStartModal() {
/* CAF - essentially lifted from wxGTK 2.5.1's wxDialog::ShowModal, up to
grabbing the focus. */
if (IsModal()) {
wxFAIL_MSG( wxT("wxDialog:ShowModal called twice") );
mStatus = GetReturnCode();
return;
}
// use the apps top level window as parent if none given unless explicitly
// forbidden
if (! GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT)) {
wxWindow *parent = wxTheApp->GetTopWindow();
if (parent && parent != this &&
parent -> IsBeingDeleted() &&
! (parent->GetExtraStyle() & wxWS_EX_TRANSIENT)) {
m_parent = parent;
gtk_window_set_transient_for (GTK_WINDOW(m_widget),
GTK_WINDOW(parent->m_widget) );
}
}
wxBeginBusyCursor ();
Show (true);
SetFocus();
m_modalShowing = true;
g_openDialogs++;
gtk_grab_add (m_widget);
}
示例9: OnButtonBrowseRptFileClick
void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
{
wxString reportName;
bool make_report = m_CreateRptCtrl->IsChecked();
if( make_report ) // Create a file rpt
{
reportName = m_RptFilenameCtrl->GetValue();
if( reportName.IsEmpty() )
{
wxCommandEvent junk;
OnButtonBrowseRptFileClick( junk );
}
if( !reportName.IsEmpty() )
reportName = makeValidFileNameReport();
}
SetDrcParmeters();
m_tester->SetSettings( true, // Pad to pad DRC test enabled
true, // unconnected pads DRC test enabled
true, // DRC test for zones enabled
true, // DRC test for keepout areas enabled
reportName, make_report );
DelDRCMarkers();
wxBeginBusyCursor();
m_Messages->Clear();
m_tester->ListUnconnectedPads();
m_Notebook->ChangeSelection( 1 ); // display the 2nd tab "Unconnected..."
// Generate the report
if( !reportName.IsEmpty() )
{
if( writeReport( reportName ) )
{
wxString msg;
msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) );
wxString caption( _( "Disk File Report Completed" ) );
wxMessageDialog popupWindow( this, msg, caption );
popupWindow.ShowModal();
}
else
DisplayError( this, wxString::Format( _( "Unable to create report file '%s' "),
GetChars( reportName ) ) );
}
wxEndBusyCursor();
/* there is currently nothing visible on the DrawPanel for unconnected pads
* RedrawDrawPanel();
*/
}
示例10: wxBeginBusyCursor
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for START_BUTTON
*/
void CropVolCylinder::OnStartButtonClick( wxCommandEvent& event )
{
wxBeginBusyCursor();
SCIRun::Painter::ThrowSkinnerSignal("Painter::FinishTool");
wxEndBusyCursor();
SCIRun::Painter::global_seg3dframe_pointer_->HideTool();
}
示例11: OnButtonBrowseRptFileClick
void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event )
{
wxString reportName;
if( m_CreateRptCtrl->IsChecked() ) // Create a file rpt
{
reportName = m_RptFilenameCtrl->GetValue();
if( reportName.IsEmpty() )
{
wxCommandEvent junk;
OnButtonBrowseRptFileClick( junk );
}
reportName = m_RptFilenameCtrl->GetValue();
}
SetDrcParmeters();
m_tester->SetSettings( true, // Pad to pad DRC test enabled
true, // unconnected pdas DRC test enabled
true, // DRC test for zones enabled
true, // DRC test for keepout areas enabled
reportName, m_CreateRptCtrl->IsChecked() );
DelDRCMarkers();
wxBeginBusyCursor();
// run all the tests, with no UI at this time.
m_Messages->Clear();
wxSafeYield(); // Allows time slice to refresh the m_Messages window
m_tester->m_pcb->m_Status_Pcb = 0; // Force full connectivity and ratsnest recalculations
m_tester->RunTests(m_Messages);
m_Notebook->ChangeSelection( 0 ); // display the 1at tab "...Markers ..."
// Generate the report
if( !reportName.IsEmpty() )
{
FILE* fp = wxFopen( reportName, wxT( "w" ) );
writeReport( fp );
fclose( fp );
wxString msg;
msg.Printf( _( "Report file \"%s\" created" ), GetChars( reportName ) );
wxString caption( _( "Disk File Report Completed" ) );
wxMessageDialog popupWindow( this, msg, caption );
popupWindow.ShowModal();
}
wxEndBusyCursor();
RedrawDrawPanel();
}
示例12: wxDirDialog
void
AnPickFromFs::onPickButton(wxCommandEvent &)
{
if (pickButtonMenu_.IsChecked(dirMenuId_)) {
wxDirDialog *dlg;
long flags = wxDD_DEFAULT_STYLE;
if ((pickerMode_ & MODE_NEW) == 0)
flags |= wxDD_DIR_MUST_EXIST;
dlg = new wxDirDialog(this,wxEmptyString, wxEmptyString, flags);
wxBeginBusyCursor();
dlg->SetPath(getDialogPath());
wxEndBusyCursor();
if (dlg->ShowModal() == wxID_OK) {
adoptFileName(dlg->GetPath());
}
dlg->Destroy();
} else {
wxFileDialog *dlg;
long flags;
wxFileName defaultPath;
defaultPath.Assign(fileName_);
flags = wxDD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST;
if (pickerMode_ & MODE_NEW)
flags = wxFD_SAVE;
dlg = new wxFileDialog(this,wxEmptyString, wxEmptyString,
wxEmptyString, wxEmptyString, flags);
wxBeginBusyCursor();
dlg->SetDirectory(getDialogPath());
dlg->SetFilename(defaultPath.GetFullName());
dlg->SetWildcard(wxT("*"));
wxEndBusyCursor();
if (dlg->ShowModal() == wxID_OK) {
adoptFileName(dlg->GetPath());
}
dlg->Destroy();
}
}
示例13: wxBeginBusyCursor
void wxGenericColourDialog::CreateWidgets()
{
wxBeginBusyCursor();
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
const int sliderHeight = 160;
// first sliders
#if wxUSE_SLIDER
const int sliderX = m_singleCustomColourRect.x + m_singleCustomColourRect.width + m_sectionSpacing;
m_redSlider = new wxSlider(this, wxID_RED_SLIDER, m_colourData.m_dataColour.Red(), 0, 255,
wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE);
m_greenSlider = new wxSlider(this, wxID_GREEN_SLIDER, m_colourData.m_dataColour.Green(), 0, 255,
wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE);
m_blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, m_colourData.m_dataColour.Blue(), 0, 255,
wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE);
wxBoxSizer *sliderSizer = new wxBoxSizer( wxHORIZONTAL );
sliderSizer->Add(sliderX, sliderHeight );
wxSizerFlags flagsRight;
flagsRight.Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL).DoubleBorder();
sliderSizer->Add(m_redSlider, flagsRight);
sliderSizer->Add(m_greenSlider,flagsRight);
sliderSizer->Add(m_blueSlider,flagsRight);
topSizer->Add(sliderSizer, wxSizerFlags().Centre().DoubleBorder());
#else
topSizer->Add(1, sliderHeight, wxSizerFlags(1).Centre().TripleBorder());
#endif // wxUSE_SLIDER
// then the custom button
topSizer->Add(new wxButton(this, wxID_ADD_CUSTOM,
_("Add to custom colours") ),
wxSizerFlags().DoubleHorzBorder());
// then the standard buttons
wxSizer *buttonsizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL);
if ( buttonsizer )
{
topSizer->Add(buttonsizer, wxSizerFlags().Expand().DoubleBorder());
}
SetAutoLayout( true );
SetSizer( topSizer );
topSizer->SetSizeHints( this );
topSizer->Fit( this );
Centre( wxBOTH );
wxEndBusyCursor();
}
示例14: wxBeginBusyCursor
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ERASE_BUTTON
*/
void PolylineToolPanel::OnEraseButtonClick( wxCommandEvent& event )
{
wxBeginBusyCursor();
SCIRun::ThrowSkinnerSignalEvent *tsse =
new SCIRun::ThrowSkinnerSignalEvent("Painter::FinishTool");
tsse->add_var("Painter::polylinetool_erase", "1");
SCIRun::Painter::ThrowSkinnerSignal(tsse);
wxEndBusyCursor();
}
示例15: WXUNUSED
void DecisionLogicFrame::OnSaveProject(wxCommandEvent& WXUNUSED(event))
{
wxBeginBusyCursor();
this->m_tree->Enable(false);
if (m_worker->Save())
EnableAllMenus();
this->m_tree->Enable(true);
wxEndBusyCursor();
}