projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version bump as all known wxWidgets 2.8 bugs have been fixed
[ctsim.git]
/
src
/
views.cpp
diff --git
a/src/views.cpp
b/src/views.cpp
index f7898314fca127d73cc121433749e1c2a8867a87..5f0d4d4a3d7cbf88b74909d68630d2ee94ef4c48 100644
(file)
--- a/
src/views.cpp
+++ b/
src/views.cpp
@@
-1063,7
+1063,7
@@
ImageFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) )
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
- m_pFrame->SetTitle(
_T("ImageFileView"
));
+ m_pFrame->SetTitle(
doc->GetFilename(
));
m_pFrame->Show(true);
Activate(true);
m_pFrame->Show(true);
Activate(true);
@@
-1413,7
+1413,7
@@
ImageFileView::OnPlotRow (wxCommandEvent& event)
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Row " << yCursor
<< ": "
;
+ os << "Row " << yCursor;
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
@@
-1443,7
+1443,7
@@
ImageFileView::OnPlotRow (wxCommandEvent& event)
}
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
}
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << "
P
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
+ os << "
: p
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
@@
-1499,7
+1499,7
@@
ImageFileView::OnPlotCol (wxCommandEvent& event)
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Column " << xCursor
<< ": "
;
+ os << "Column " << xCursor;
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
@@
-1529,7
+1529,7
@@
ImageFileView::OnPlotCol (wxCommandEvent& event)
}
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
}
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << "
P
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
+ os << "
: p
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
@@
-1599,7
+1599,7
@@
ImageFileView::OnPlotFFTRow (wxCommandEvent& event)
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Row " << yCursor
<< ": "
;
+ os << "Row " << yCursor;
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
@@
-1624,7
+1624,7
@@
ImageFileView::OnPlotFFTRow (wxCommandEvent& event)
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << "
FFT P
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
+ os << "
: FFT p
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
@@
-1699,7
+1699,7
@@
ImageFileView::OnPlotFFTCol (wxCommandEvent& event)
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
} else {
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Column " << xCursor
<< ": "
;
+ os << "Column " << xCursor;
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
@@
-1724,7
+1724,7
@@
ImageFileView::OnPlotFFTCol (wxCommandEvent& event)
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
rPlotFile.addColumn (3, pYMag);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
- os << "
FFT P
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
+ os << "
: FFT p
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
}
@@
-1965,7
+1965,7
@@
ImageFileView::OnPlotHistogram (wxCommandEvent& event)
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
PlotFile& rPlotFile = pPlotDoc->getPlotFile();
std::ostringstream os;
- os << "Histogram
";
+ os << "Histogram";
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
std::string title("title ");
title += os.str();
rPlotFile.addEzsetCommand (title.c_str());
@@
-1982,7
+1982,7
@@
ImageFileView::OnPlotHistogram (wxCommandEvent& event)
os << ": " << rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (os.str().c_str());
}
os << ": " << rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (os.str().c_str());
}
- os << "
P
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
+ os << "
p
lot of " << wxConvUTF8.cWX2MB(dynamic_cast<wxFrame*>(GetDocument()->GetFirstView()->GetFrame())->GetTitle().c_str());
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
delete pX;
*theApp->getLog() << wxConvUTF8.cMB2WX(os.str().c_str()) << _T("\n");
rPlotFile.addDescription (os.str().c_str());
delete pX;
@@
-2312,7
+2312,6
@@
PhantomFileView::CreateCanvas (wxFrame *parent)
wxSize(-1,-1), wxFULL_REPAINT_ON_RESIZE);
pCanvas->SetBackgroundColour(*wxWHITE);
pCanvas->ClearBackground();
wxSize(-1,-1), wxFULL_REPAINT_ON_RESIZE);
pCanvas->SetBackgroundColour(*wxWHITE);
pCanvas->ClearBackground();
-
return pCanvas;
}
return pCanvas;
}
@@
-2391,7
+2390,7
@@
PhantomFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
- m_pFrame->SetTitle (
_T("PhantomFileView"
));
+ m_pFrame->SetTitle (
doc->GetFilename(
));
m_pFrame->Show(true);
Activate(true);
m_pFrame->Show(true);
Activate(true);
@@
-3134,7
+3133,7
@@
ProjectionFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
- m_pFrame->SetTitle (
_T("ProjectionFileView"
));
+ m_pFrame->SetTitle (
doc->GetFilename(
));
m_pFrame->Show(true);
Activate(true);
m_pFrame->Show(true);
Activate(true);
@@
-3255,7
+3254,9
@@
ProjectionFileView::OnClose (bool deleteWindow)
// PlotFileCanvas
// PlotFileCanvas
-PlotFileCanvas::PlotFileCanvas (PlotFileView* v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style)
+PlotFileCanvas::PlotFileCanvas (PlotFileView* v, wxFrame *frame,
+ const wxPoint& pos, const wxSize& size,
+ const long style)
: wxScrolledWindow(frame, -1, pos, size, style), m_pView(v)
{
}
: wxScrolledWindow(frame, -1, pos, size, style), m_pView(v)
{
}
@@
-3346,8
+3347,7
@@
void
PlotFileView::OnScaleMinMax (wxCommandEvent& event)
{
const PlotFile& rPlotFile = GetDocument()->getPlotFile();
PlotFileView::OnScaleMinMax (wxCommandEvent& event)
{
const PlotFile& rPlotFile = GetDocument()->getPlotFile();
- double min;
- double max;
+ double min, max;
if (! m_bMinSpecified || ! m_bMaxSpecified) {
if (! rPlotFile.getMinMax (1, min, max)) {
if (! m_bMinSpecified || ! m_bMaxSpecified) {
if (! rPlotFile.getMinMax (1, min, max)) {
@@
-3376,11
+3376,9
@@
PlotFileView::OnScaleMinMax (wxCommandEvent& event)
void
PlotFileView::OnScaleFull (wxCommandEvent& event)
{
void
PlotFileView::OnScaleFull (wxCommandEvent& event)
{
- if (m_bMinSpecified || m_bMaxSpecified) {
- m_bMinSpecified = false;
- m_bMaxSpecified = false;
- OnUpdate (this, NULL);
- }
+ m_bMinSpecified = false;
+ m_bMaxSpecified = false;
+ OnUpdate (this, NULL);
GetDocument()->Activate();
}
GetDocument()->Activate();
}
@@
-3480,7
+3478,10
@@
PlotFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) )
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas = CreateCanvas (m_pFrame);
m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
- m_pFrame->SetTitle (_T("Plot File"));
+ m_pFrame->SetTitle (_T("test"));
+ *theApp->getLog() << _T("Plot doc name: ") << doc->GetDocumentName() << _T("\n");
+ *theApp->getLog() << _T("Plot file name: ") << doc->GetFilename() << _T("\n");
+ m_pFrame->SetTitle (doc->GetFilename());
m_pFrame->Show(true);
Activate(true);
m_pFrame->Show(true);
Activate(true);
@@
-3568,8
+3569,9
@@
PlotFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
delete pdY;
}
delete pdY;
}
- if (m_pCanvas)
+ if (m_pCanvas)
{
m_pCanvas->Refresh();
m_pCanvas->Refresh();
+ }
}
bool
}
bool
@@
-3617,9
+3619,8
@@
bool TextFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
int width, height;
m_pFrame->GetClientSize(&width, &height);
int width, height;
m_pFrame->GetClientSize(&width, &height);
- m_pFrame->SetTitle(
_T("TextFile"
));
+ m_pFrame->SetTitle(
doc->GetFilename(
));
m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(-1,-1), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY);
m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(-1,-1), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY);
- m_pFrame->SetTitle(_T("Log"));
m_pFrame->Show (true);
Activate (true);
m_pFrame->Show (true);
Activate (true);