1 /*****************************************************************************
5 ** Purpose: Header file for View & Canvas routines of CTSim program
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: July 2000
9 ** This is part of the CTSim program
10 ** Copyright (C) 1983-2000 Kevin Rosenberg
12 ** $Id: views.h,v 1.1 2000/07/13 07:01:59 kevin Exp $
14 ** This program is free software; you can redistribute it and/or modify
15 ** it under the terms of the GNU General Public License (version 2) as
16 ** published by the Free Software Foundation.
18 ** This program is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
23 ** You should have received a copy of the GNU General Public License
24 ** along with this program; if not, write to the Free Software
25 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 ******************************************************************************/
36 #include "imagefile.h"
38 class ImageFileCanvas;
39 class ImageFileView : public wxView
41 DECLARE_DYNAMIC_CLASS(ImageFileView)
43 wxMemoryDC m_memoryDC;
47 ImageFileCanvas *CreateCanvas(wxView *view, wxFrame *parent);
48 wxFrame *CreateChildFrame(wxDocument *doc, wxView *view);
50 ImageFileCanvas *m_canvas;
57 static bool m_bPColoursInitialized;
58 static wxColour* m_pColours[256];
64 bool OnCreate(wxDocument *doc, long flags);
65 void OnDraw(wxDC* dc);
66 void OnUpdate(wxView *sender, wxObject *hint = NULL);
67 bool OnClose (bool deleteWindow = true);
68 void OnProperties (wxCommandEvent& event);
73 class ImageFileCanvas: public wxScrolledWindow
76 ImageFileView* m_pView;
78 ImageFileCanvas (ImageFileView* v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
79 virtual void OnDraw(wxDC& dc);
80 void OnMouseEvent(wxMouseEvent& event);
86 class MyTextWindow: public wxTextCtrl
91 MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
95 class TextEditView: public wxView
97 DECLARE_DYNAMIC_CLASS(TextEditView)
99 wxFrame *CreateChildFrame(wxDocument *doc, wxView *view);
103 MyTextWindow *textsw;
105 TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
106 ~TextEditView(void) {}
108 bool OnCreate(wxDocument *doc, long flags);
109 void OnDraw(wxDC* dc);
110 void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
111 bool OnClose(bool deleteWindow = TRUE);
114 class ProjectionFileCanvas;
115 class ProjectionFileView : public wxView
117 DECLARE_DYNAMIC_CLASS(ProjectionFileView)
119 wxMemoryDC m_memoryDC;
123 ProjectionFileCanvas *CreateCanvas(wxView *view, wxFrame *parent);
124 wxFrame *CreateChildFrame(wxDocument *doc, wxView *view);
126 ProjectionFileCanvas *m_canvas;
129 static bool m_bPColoursInitialized;
130 static wxColour* m_pColours[256];
133 ProjectionFileView(void);
134 ~ProjectionFileView(void);
136 bool OnCreate(wxDocument *doc, long flags);
137 void OnDraw(wxDC* dc);
138 void OnUpdate(wxView *sender, wxObject *hint = NULL);
139 bool OnClose (bool deleteWindow = true);
140 void OnProperties (wxCommandEvent& event);
141 void OnReconstruct (wxCommandEvent& event);
143 DECLARE_EVENT_TABLE()
146 class ProjectionFileCanvas: public wxScrolledWindow
149 ProjectionFileView* m_pView;
151 ProjectionFileCanvas (ProjectionFileView* v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
152 virtual void OnDraw(wxDC& dc);