FreeBSD Bugzilla – Attachment 212337 Details for
Bug 244464
math/wxmaxima doesn't launch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
testfile for wx paths
testwx.cpp (text/plain), 2.52 KB, created by
Loïc Bartoletti
on 2020-03-11 17:17:30 UTC
(
hide
)
Description:
testfile for wx paths
Filename:
MIME Type:
Creator:
Loïc Bartoletti
Created:
2020-03-11 17:17:30 UTC
Size:
2.52 KB
patch
obsolete
>#include <wx/wx.h> >#include <wx/stdpaths.h> >#include <wx/filename.h> > >class MyApp: public wxApp >{ >public: > virtual bool OnInit(); >}; >class MyFrame: public wxFrame >{ >public: > MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); >private: > void OnStdPath(wxCommandEvent& event); > void OnInstallPrefix(wxCommandEvent& event); > void OnGetCWD(wxCommandEvent& event); > void OnExit(wxCommandEvent& event); > void OnAbout(wxCommandEvent& event); > wxDECLARE_EVENT_TABLE(); >}; >enum >{ > ID_StdPath = 1, > ID_GetCWD, > ID_InstallPrefix > >}; >wxBEGIN_EVENT_TABLE(MyFrame, wxFrame) > EVT_MENU(ID_StdPath, MyFrame::OnStdPath) > EVT_MENU(ID_InstallPrefix, MyFrame::OnInstallPrefix) > EVT_MENU(ID_GetCWD, MyFrame::OnGetCWD) > EVT_MENU(wxID_EXIT, MyFrame::OnExit) > EVT_MENU(wxID_ABOUT, MyFrame::OnAbout) >wxEND_EVENT_TABLE() >wxIMPLEMENT_APP(MyApp); >bool MyApp::OnInit() >{ > MyFrame *frame = new MyFrame( "Get Exe Path", wxPoint(50, 50), wxSize(450, 340) ); > frame->Show( true ); > return true; >} >MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) > : wxFrame(NULL, wxID_ANY, title, pos, size) >{ > wxMenu *menuFile = new wxMenu; > menuFile->Append(ID_StdPath, "Standard Paths...", > "Test with wxStandardPaths"); > menuFile->Append(ID_InstallPrefix, "Install Prefix...", > "Test with Install Prefix"); > menuFile->Append(ID_GetCWD, "Get CWD...", > "Test with wxGetCwd"); > menuFile->AppendSeparator(); > menuFile->Append(wxID_EXIT); > wxMenu *menuHelp = new wxMenu; > menuHelp->Append(wxID_ABOUT); > wxMenuBar *menuBar = new wxMenuBar; > menuBar->Append( menuFile, "&File" ); > menuBar->Append( menuHelp, "&Help" ); > SetMenuBar( menuBar ); > CreateStatusBar(); > SetStatusText( "Welcome to wxWidgets!" ); >} >void MyFrame::OnExit(wxCommandEvent& event) >{ > Close( true ); >} >void MyFrame::OnAbout(wxCommandEvent& event) >{ > wxMessageBox( "This is a wxWidgets' Hello world sample", > "About Hello World", wxOK | wxICON_INFORMATION ); >} >void MyFrame::OnStdPath(wxCommandEvent& event) >{ > wxLogMessage(wxStandardPaths::Get().GetExecutablePath()); >} >void MyFrame::OnInstallPrefix(wxCommandEvent& event) >{ > wxLogMessage(wxStandardPaths::Get().GetInstallPrefix()); > /* > wxString prefix(wxStandardPaths::Get().GetInstallPrefix()); > prefix = prefix + wxT("/share/wxMaxima"); > wxLogMessage(prefix); > */ >} >void MyFrame::OnGetCWD(wxCommandEvent& event) >{ > wxLogMessage(wxGetCwd()); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 244464
:
212296
|
212332
| 212337