本文整理汇总了C++中wxEndBusyCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ wxEndBusyCursor函数的具体用法?C++ wxEndBusyCursor怎么用?C++ wxEndBusyCursor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxEndBusyCursor函数的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: 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;
}
示例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: 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();
}
示例5: wxEndBusyCursor
void SigUIFrame::OnTerminateInstall(wxProcessEvent &event)
{
wxEndBusyCursor();
wxWakeUpIdle();
if (event.GetExitCode() == 0) {
m_sig_candidates->Clear();
wxLogMessage(_("Successfully installed new virus signatures\n"));
reload();
} else {
bool had_errors = false;
wxInputStream *err = m_siginst_process->GetErrorStream();
wxTextInputStream tis(*err);
while (!err->Eof()) {
wxString line = tis.ReadLine();
line.Trim();
if (!line.IsEmpty()) {
wxLogWarning("%s", line);
had_errors = true;
}
}
if (had_errors) {
wxLogError(_("Errors encountered during virus signature install"));
}
}
delete m_siginst_process;
m_panel_sigman->Enable();
}
示例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: 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();
*/
}
示例9: 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();
}
示例10: 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();
}
示例11: 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();
}
}
示例12: 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();
}
示例13: GetStackDialog
void wxLuaDebuggerBase::OnDebugTableEnum(wxLuaDebuggerEvent &event)
{
if (GetStackDialog() != NULL)
GetStackDialog()->FillTableEntry(event.GetReference(), event.GetDebugData());
else
event.Skip();
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();
}