本文整理汇总了C++中wxLogStatus函数的典型用法代码示例。如果您正苦于以下问题:C++ wxLogStatus函数的具体用法?C++ wxLogStatus怎么用?C++ wxLogStatus使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxLogStatus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Converter
void MainWindow::OnConverter(wxCommandEvent& event)
{
int id = event.GetId();
wxTreeItemId itemId = tree->GetSelection();
NodeTree *itemData = itemId.IsOk() ? (NodeTree *) tree->GetItemData(itemId):NULL;
Converter* conver;
if(id == ID_CONVERMESH)
{
conver = new Converter(this,ID_CONVERMESH,wxT("CPP CODE"));
conver->OnlyRead(itemData->pointer.meshpart);
conver->ShowModal();
wxLogStatus(wxT("See cpp code"));
}
if(id == ID_CONVER)
{
conver = new Converter(this,ID_CONVER,wxT("Converter .stl"));
conver->ShowModal();
wxLogStatus(wxT("Converter"));
}
delete conver;
}
示例2: bmx_wxlogstatus
void bmx_wxlogstatus(BBString * message, wxFrame * frame) {
if (frame) {
wxLogStatus(frame, _("%s"), wxStringFromBBString(message).c_str());
} else {
wxLogStatus(_("%s"), wxStringFromBBString(message).c_str());
}
}
示例3: wxExVariable
bool wxExViMacros::Expand(wxExEx* ex, const wxString& variable, wxString& value)
{
std::map<wxString, wxExVariable>::iterator it = m_Variables.find(variable);
bool ok;
if (it == m_Variables.end())
{
std::pair<std::map<wxString, wxExVariable>::iterator, bool> ret =
m_Variables.insert(std::make_pair(variable, wxExVariable(variable)));
wxLogStatus(_("Added variable") + ": " + variable);
ok = ret.first->second.Expand(ex, value);
// If we are expanding, one input is enough.
if (m_IsExpand)
{
ret.first->second.SkipInput();
}
if (ret.first->second.IsModified())
{
m_IsModified = true;
}
}
else
{
ok = it->second.Expand(ex, value);
// If we are expanding, one input is enough.
if (m_IsExpand)
{
it->second.SkipInput();
}
if (it->second.IsModified())
{
m_IsModified = true;
}
}
if (!ok)
{
wxLogStatus(_("Could not expand variable") + ": " + variable);
}
else
{
wxLogStatus(_("Variable expanded"));
if (!m_IsRecording)
{
m_Macro = variable;
}
}
return ok;
}
示例4: WXUNUSED
void MyFrame::OnHangUp(wxCommandEvent& WXUNUSED(event))
{
if ( wxGetApp().GetDialer()->HangUp() )
{
wxLogStatus(this, wxT("Connection was successfully terminated."));
}
else
{
wxLogStatus(this, wxT("Failed to hang up."));
}
}
示例5: DoNavigate
void DoNavigate(int flags)
{
if ( m_panel->NavigateIn(flags) )
{
wxLogStatus(this, wxT("Navigation event processed"));
}
else
{
wxLogStatus(this, wxT("Navigation event ignored"));
}
}
示例6: OpenWaveFile2
int OpenWaveFile2(const char *path)
/*********************************/
{
// Set the length of 0x7fffffff for --stdout
// This will be changed to the correct length for -w (write to file)
static unsigned char wave_hdr[44] = {
'R','I','F','F',0,0,0,0,'W','A','V','E','f','m','t',' ',
0x10,0,0,0,1,0,1,0, 9,0x3d,0,0,0x12,0x7a,0,0,
2,0,0x10,0,'d','a','t','a', 0xff,0xff,0xff,0x7f};
if(path == NULL)
return(2);
if(strcmp(path,"stdout")==0)
f_wave = stdout;
else
f_wave = fopen(path,"wb");
if(f_wave != NULL)
{
fwrite(wave_hdr,1,24,f_wave);
Write4Bytes(f_wave,samplerate);
Write4Bytes(f_wave,samplerate * 2);
fwrite(&wave_hdr[32],1,12,f_wave);
return(0);
}
wxLogStatus(_T("Can't write to WAV file: '"+wxString(path,wxConvLocal))+_T("'"));
return(1);
} // end of OpenWaveFile
示例7: GetNode
void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event)
{
TreeNode *pNode = GetNode(event);
bool bExpanding = event.GetEventType() == wxEVT_TREE_ITEM_EXPANDING;
// expansion might take some time
wxSetCursor(*wxHOURGLASS_CURSOR);
wxLogStatus(wxT("Working..."));
wxYield(); // to give the status line a chance to refresh itself
m_restoreStatus = true; // some time later...
if ( pNode->IsKey() )
{
if ( bExpanding )
{
// expanding: add subkeys/values
if ( !pNode->OnExpand() )
return;
}
else
{
// collapsing: clean up
pNode->OnCollapse();
}
}
}
示例8: switch
void wxExFrameWithHistory::OnCommandConfigDialog(
wxWindowID dialogid,
int commandid)
{
switch (commandid)
{
case wxID_CANCEL:
if (wxExDir::GetIsBusy())
{
wxExDir::Cancel();
wxLogStatus(_("Cancelled"));
}
break;
case wxID_OK:
switch (dialogid)
{
case wxID_ADD:
GetProject()->AddItems();
break;
case ID_FIND_IN_FILES:
case ID_REPLACE_IN_FILES:
FindInFiles(dialogid);
break;
default: wxFAIL;
}
break;
default: wxFAIL;
}
}
示例9: wxLogStatus
void wxExFrameWithHistory::FindInFiles(wxWindowID dialogid)
{
const bool replace = (dialogid == ID_REPLACE_IN_FILES);
const wxExTool tool =
(replace ?
ID_TOOL_REPORT_REPLACE:
ID_TOOL_REPORT_FIND);
if (!wxExTextFileWithListView::SetupTool(tool, this))
{
return;
}
wxLogStatus(
wxExFindReplaceData::Get()->GetFindReplaceInfoText(replace));
int flags = wxDIR_FILES | wxDIR_HIDDEN;
if (wxConfigBase::Get()->ReadBool(m_TextRecursive, true))
{
flags |= wxDIR_DIRS;
}
wxExDirTool dir(
tool,
wxExConfigFirstOf(m_TextInFolder),
wxExConfigFirstOf(m_TextInFiles),
flags);
dir.FindFiles();
tool.Log(&dir.GetStatistics().GetElements());
}
示例10: dlg
void wxExSTCFile::DoFileLoad(bool synced)
{
if (GetContentsChanged())
{
wxExFileDialog dlg(m_STC, this);
if (dlg.ShowModalIfChanged() == wxID_CANCEL) return;
}
// Synchronizing by appending only new data only works for log files.
// Other kind of files might get new data anywhere inside the file,
// we cannot sync that by keeping pos.
// Also only do it for reasonably large files.
ReadFromFile(
synced &&
GetFileName().GetExt().CmpNoCase("log") == 0 &&
m_STC->GetTextLength() > 1024);
m_STC->SetLexer(GetFileName().GetLexer().GetScintillaLexer(), true);
if (!synced)
{
wxLogStatus(_("Opened") + ": " + GetFileName().GetFullPath());
}
m_STC->PropertiesMessage(synced ? STAT_SYNC: STAT_DEFAULT);
// No edges for log files.
if (GetFileName().GetExt() == "log")
{
m_STC->SetEdgeMode(wxSTC_EDGE_NONE);
}
}
示例11: wxLoadFileSelector
void MyFrame::OnThumbnail( wxCommandEvent &WXUNUSED(event) )
{
#if wxUSE_FILEDLG
wxString filename = wxLoadFileSelector(wxT("image"), wxEmptyString, wxEmptyString, this);
if ( filename.empty() )
return;
static const int THUMBNAIL_WIDTH = 320;
static const int THUMBNAIL_HEIGHT = 240;
wxImage image;
image.SetOption(wxIMAGE_OPTION_MAX_WIDTH, THUMBNAIL_WIDTH);
image.SetOption(wxIMAGE_OPTION_MAX_HEIGHT, THUMBNAIL_HEIGHT);
wxStopWatch sw;
if ( !image.LoadFile(filename) )
{
wxLogError(wxT("Couldn't load image from '%s'."), filename.c_str());
return;
}
int origWidth = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_WIDTH );
int origHeight = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_HEIGHT );
const long loadTime = sw.Time();
MyImageFrame * const frame = new MyImageFrame(this, filename, image);
wxLogStatus(frame, "Loaded \"%s\" in %ldms; original size was (%d, %d)",
filename, loadTime, origWidth, origHeight);
#else
wxLogError( wxT("Couldn't create file selector dialog") );
return;
#endif // wxUSE_FILEDLG
}
示例12: va_start
void gravUtil::logStatus( const char* str, ... )
{
va_list args;
va_start( args, str );
wxLogStatus( getWXStringFromArgs( str, args ) );
va_end( args );
}
示例13: wxLogStatus
void HtMainFrame::OnJumpHexTextEnter (wxCommandEvent &event)
{
auto *cbxPtr = dynamic_cast<wxComboBox *>(event.GetEventObject());
wxString addressStr = cbxPtr->GetValue();
wxLogStatus("[HtMainFrame] ::OnJumpHexTextEnter (%s)", addressStr);
}
示例14: dlg
void MyFrame::OnAbout(wxCommandEvent& event)
{//=========================================
int result;
char buf[300];
wxString url_docs;
wxBoxSizer *topsizer;
HtmlWindow *html;
wxDialog dlg(this, wxID_ANY, wxString(_("About")));
topsizer = new wxBoxSizer(wxVERTICAL);
switch(event.GetId())
{
case MENU_ABOUT:
{
sprintf(buf,about_string,espeak_Info(NULL));
html = new HtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html -> SetBorders(0);
html -> SetPage(wxString(buf,wxConvLocal));
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
html -> GetInternalRepresentation() -> GetHeight());
topsizer -> Add(html, 1, wxALL, 10);
//#if wxUSE_STATLINE
// topsizer -> Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
//#endif // wxUSE_STATLINE
wxButton *bu1 = new wxButton(&dlg, wxID_OK, _("OK"));
bu1 -> SetDefault();
topsizer -> Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
dlg.SetSizer(topsizer);
topsizer -> Fit(&dlg);
dlg.ShowModal();
}
break;
case MENU_DOCS:
strcpy(buf,"/docs/docindex.html");
url_docs = wxGetCwd() + wxString(buf,wxConvLocal); // look for "docs" in the current directory
if(!wxFileExists(url_docs))
{
strcpy(buf,"http://espeak.sourceforge.net/docindex.html");
url_docs = wxString(buf,wxConvLocal);
}
else
{
url_docs = _T("file://") + url_docs;
}
result = wxLaunchDefaultBrowser(url_docs);
if(result == 0)
wxLogStatus(_T("Failed to launch default browser: "+url_docs));
break;
}
}
示例15: WXUNUSED
void MyFrame::OnReloadResourceMenuCommand(wxCommandEvent& WXUNUSED(event))
{
if ( wxXmlResource::Get()->Load(wxT("rc/basicdlg.xrc")) )
wxLogStatus(_T("Basic dialog resource has been loaded."));
else
wxLogError(_T("Failed to load basic dialog resource"));
}