projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r469: Fixed shutdown error, take 2
[ctsim.git]
/
src
/
views.cpp
diff --git
a/src/views.cpp
b/src/views.cpp
index a2a30f40abd2590dd9fe78b0c5cee84b025a25c2..713733b88383e3c5013972cc075e2b30acdc8f72 100644
(file)
--- a/
src/views.cpp
+++ b/
src/views.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.8
8 2001/01/29 23:11:32
kevin Exp $
+** $Id: views.cpp,v 1.8
9 2001/01/30 01:21:37
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-65,6
+65,7
@@
BEGIN_EVENT_TABLE(ImageFileCanvas, wxScrolledWindow)
EVT_MOUSE_EVENTS(ImageFileCanvas::OnMouseEvent)
BEGIN_EVENT_TABLE(ImageFileCanvas, wxScrolledWindow)
EVT_MOUSE_EVENTS(ImageFileCanvas::OnMouseEvent)
+EVT_CHAR(ImageFileCanvas::OnChar)
END_EVENT_TABLE()
END_EVENT_TABLE()
@@
-175,6
+176,18
@@
ImageFileCanvas::OnMouseEvent(wxMouseEvent& event)
}
}
}
}
+void
+ImageFileCanvas::OnChar (wxKeyEvent& event)
+{
+ if (event.GetKeyCode() == WXK_ESCAPE) {
+ m_xCursor = -1;
+ m_yCursor = -1;
+ if (m_pView)
+ m_pView->OnUpdate (NULL);
+ } else
+ wxScrolledWindow::OnChar (event);
+}
+
wxSize
ImageFileCanvas::GetBestSize() const
{
wxSize
ImageFileCanvas::GetBestSize() const
{
@@
-1000,11
+1013,9
@@
ImageFileView::OnClose (bool deleteWindow)
return false;
if (m_pCanvas) {
return false;
if (m_pCanvas) {
- //m_pCanvas->Show(false);
m_pCanvas->setView(NULL);
m_pCanvas = NULL;
}
m_pCanvas->setView(NULL);
m_pCanvas = NULL;
}
- //m_pFrame->Show(false);
wxString s(theApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
wxString s(theApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
@@
-1013,7
+1024,6
@@
ImageFileView::OnClose (bool deleteWindow)
Activate(false);
if (deleteWindow) {
Activate(false);
if (deleteWindow) {
- //delete m_pFrame;
m_pFrame->Destroy();
m_pFrame = NULL;
}
m_pFrame->Destroy();
m_pFrame = NULL;
}
@@
-2065,11
+2075,9
@@
PhantomFileView::OnClose (bool deleteWindow)
return false;
if (m_pCanvas) {
return false;
if (m_pCanvas) {
- m_pCanvas->Show(false);
m_pCanvas->setView(NULL);
m_pCanvas = NULL;
}
m_pCanvas->setView(NULL);
m_pCanvas = NULL;
}
- m_pFrame->Show(false);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
@@
-2078,7
+2086,6
@@
PhantomFileView::OnClose (bool deleteWindow)
Activate(false);
if (deleteWindow) {
Activate(false);
if (deleteWindow) {
- //delete m_pFrame;
m_pFrame->Destroy();
m_pFrame = NULL;
}
m_pFrame->Destroy();
m_pFrame = NULL;
}
@@
-2545,11
+2552,9
@@
ProjectionFileView::OnClose (bool deleteWindow)
return false;
if (m_pCanvas) {
return false;
if (m_pCanvas) {
- m_pCanvas->Show(false);
- m_pCanvas->setView(NULL);
+ m_pCanvas->setView(NULL);
m_pCanvas = NULL;
}
m_pCanvas = NULL;
}
- m_pFrame->Show(false);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
@@
-2558,7
+2563,6
@@
ProjectionFileView::OnClose (bool deleteWindow)
Activate(false);
if (deleteWindow) {
Activate(false);
if (deleteWindow) {
-// delete m_pFrame;
m_pFrame->Destroy();
m_pFrame = NULL;
}
m_pFrame->Destroy();
m_pFrame = NULL;
}
@@
-2876,21
+2880,17
@@
PlotFileView::OnClose (bool deleteWindow)
return false;
if (m_pCanvas) {
return false;
if (m_pCanvas) {
- //m_pCanvas->Show(false);
m_pCanvas->setView (NULL);
m_pCanvas = NULL;
}
m_pCanvas->setView (NULL);
m_pCanvas = NULL;
}
- //m_pFrame->Show(false);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
Activate(false);
wxString s(wxTheApp->GetAppName());
if (m_pFrame)
m_pFrame->SetTitle(s);
Activate(false);
- m_pFrame->SetView(NULL);
SetFrame(NULL);
if (deleteWindow) {
SetFrame(NULL);
if (deleteWindow) {
- //delete m_pFrame;
m_pFrame->Destroy();
m_pFrame = NULL;
}
m_pFrame->Destroy();
m_pFrame = NULL;
}
@@
-2953,14
+2953,10
@@
TextFileView::OnClose (bool deleteWindow)
if (! GetDocument() || ! GetDocument()->Close())
return false;
if (! GetDocument() || ! GetDocument()->Close())
return false;
- //m_pCanvas->Show(false);
- //m_pFrame->Show(false);
Activate(false);
SetFrame(NULL);
Activate(false);
SetFrame(NULL);
- m_pFrame->SetView(NULL);
if (deleteWindow) {
if (deleteWindow) {
- //delete m_pFrame;
m_pFrame->Destroy();
m_pFrame = NULL;
m_pFrame->Destroy();
m_pFrame = NULL;