Graph3dFileView::~Graph3dFileView()
{
GetDocumentManager()->FileHistoryRemoveMenu (m_pFileMenu);
- GetDocumentManager()->ActivateView(this, false, true);
+ GetDocumentManager()->ActivateView(this, false);
}
bool
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
- m_pFrame->SetTitle("Graph3dFileView");
+ m_pFrame->SetTitle(_T("Graph3dFileView"));
m_pCanvas->SetCurrent();
InitGL();
Graph3dFileCanvas* pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
pCanvas->SetBackgroundColour(*wxWHITE);
- pCanvas->Clear();
+ pCanvas->ClearBackground();
return pCanvas;
}
void
Graph3dFileView::OnProperties (wxCommandEvent& event)
{
- std::ostringstream os;
- *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
- wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(),
- "Imagefile Properties", wxOK | wxICON_INFORMATION);
+ wxString os;
+ *theApp->getLog() << _T(">>>>\n") << os << _T("<<<<\n");
+ wxMessageDialog dialogMsg (getFrameForChild(), os,
+ _T("Imagefile Properties"),
+ wxOK | wxICON_INFORMATION);
dialogMsg.ShowModal();
}
if (m_pCanvas) {
m_pCanvas->SetCurrent();
#ifdef DEBUG
- *theApp->getLog() << "Drawing 3d surface\n";
+ *theApp->getLog() << _T("Drawing 3d surface\n");
#endif
Draw();
m_pCanvas->SwapBuffers();
}
if (m_pStatusBar) {
- std::ostringstream os;
- os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate
- << ", Zangle=" << m_dZRotate;
- m_pStatusBar->SetStatusText (os.str().c_str());
+ wxString os;
+ os << _T("Xangle=") << m_dXRotate << _T(", Yangle=") << m_dYRotate
+ << _T(", Zangle=") << m_dZRotate;
+ m_pStatusBar->SetStatusText (os);
}
}
if (m_bColorScaleMaxSet)
dMax = m_dColorScaleMax;
- DialogGetMinMax dialogMinMax (getFrameForChild(), "Set Color Scale Minimum & Maximum", dMin, dMax);
+ DialogGetMinMax dialogMinMax (getFrameForChild(), _T("Set Color Scale Minimum & Maximum"), dMin, dMax);
int retVal = dialogMinMax.ShowModal();
if (retVal == wxID_OK) {
m_bColorScaleMinSet = true;
Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
{
#if CTSIM_MDI
- wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
+ wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
#else
- wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
+ wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, _T("Graph3dFile Frame"), wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE);
#endif
theApp->setIconForFrame (subframe);
m_pFileMenu = new wxMenu;
- m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
- m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
- m_pFileMenu->Append(wxID_OPEN, "&Open...\tCtrl-O");
- m_pFileMenu->Append(wxID_CLOSE, "&Close\tCtrl-W");
+ m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, _T("Cr&eate Phantom...\tCtrl-P"));
+ m_pFileMenu->Append(MAINMENU_FILE_CREATE_FILTER, _T("Create &Filter...\tCtrl-F"));
+ m_pFileMenu->Append(wxID_OPEN, _T("&Open...\tCtrl-O"));
+ m_pFileMenu->Append(wxID_CLOSE, _T("&Close\tCtrl-W"));
m_pFileMenu->AppendSeparator();
- m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, "P&roperties");
+ m_pFileMenu->Append(IFMENU_FILE_PROPERTIES, _T("P&roperties"));
m_pFileMenu->AppendSeparator();
- m_pFileMenu->Append(wxID_PRINT, "&Print...");
- m_pFileMenu->Append(wxID_PRINT_SETUP, "Print &Setup...");
- m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
+ m_pFileMenu->Append(wxID_PRINT, _T("&Print..."));
+ m_pFileMenu->Append(wxID_PRINT_SETUP, _T("Print &Setup..."));
+ m_pFileMenu->Append(wxID_PREVIEW, _T("Print Preview"));
m_pFileMenu->AppendSeparator();
- m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
- m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
+ m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, _T("Prefere&nces..."));
+ m_pFileMenu->Append(MAINMENU_FILE_EXIT, _T("E&xit"));
GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
GetDocumentManager()->FileHistoryUseMenu(m_pFileMenu);
m_pViewMenu = new wxMenu;
- m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, "Wi&reframe\tCtrl-R", "", true);
- m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, "S&mooth\tCtrl-M", "", true);
- m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, "Co&lor\tCtrl-L", "", true);
- m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, "Li&ghting\tCtrl-G", "", true);
+ m_pViewMenu->Append(GRAPH3D_VIEW_WIREFRAME, _T("Wi&reframe\tCtrl-R"), _T(""), true);
+ m_pViewMenu->Append(GRAPH3D_VIEW_SMOOTH, _T("S&mooth\tCtrl-M"), _T(""), true);
+ m_pViewMenu->Append(GRAPH3D_VIEW_COLOR, _T("Co&lor\tCtrl-L"), _T(""), true);
+ m_pViewMenu->Append(GRAPH3D_VIEW_LIGHTING, _T("Li&ghting\tCtrl-G"), _T(""), true);
m_pViewMenu->AppendSeparator();
- m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, "Color Scale S&et Min/Max...\tCtrl-E");
- m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, "Color Scale &Auto...\tCtrl-A");
- m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, "Color F&ull Scale\tCtrl-U");
+ m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_MINMAX, _T("Color Scale S&et Min/Max...\tCtrl-E"));
+ m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_AUTO, _T("Color Scale &Auto...\tCtrl-A"));
+ m_pViewMenu->Append(GRAPH3D_VIEW_SCALE_FULL, _T("Color F&ull Scale\tCtrl-U"));
wxMenu *help_menu = new wxMenu;
- help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
- help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
+ help_menu->Append(MAINMENU_HELP_CONTENTS, _T("&Contents\tF1"));
+ help_menu->Append(MAINMENU_HELP_ABOUT, _T("&About"));
wxMenuBar *menu_bar = new wxMenuBar;
- menu_bar->Append(m_pFileMenu, "&File");
- menu_bar->Append(m_pViewMenu, "&View");
- menu_bar->Append(help_menu, "&Help");
+ menu_bar->Append(m_pFileMenu, _T("&File"));
+ menu_bar->Append(m_pViewMenu, _T("&View"));
+ menu_bar->Append(help_menu, _T("&Help"));
subframe->SetMenuBar(menu_bar);
return;
wxCommandEvent dummyEvent;
- switch (event.KeyCode()) {
+ switch (event.GetKeyCode()) {
case WXK_LEFT:
m_pView->m_dZRotate += 15.0;
Refresh (false);