** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.h,v 1.1 2000/07/13 07:01:59 kevin Exp $
+** $Id: views.h,v 1.8 2000/08/31 08:38:58 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
#define __VIEWSH__
#include "wx/wx.h"
+#include "docs.h"
#include "imagefile.h"
class ImageFileCanvas;
DECLARE_DYNAMIC_CLASS(ImageFileView)
wxMemoryDC m_memoryDC;
- wxBitmap* m_pBitmap;
+ wxBitmap m_bitmap;
private:
ImageFileCanvas *CreateCanvas(wxView *view, wxFrame *parent);
wxFrame *m_frame;
bool m_bMinSpecified;
bool m_bMaxSpecified;
- double m_minPixel;
- double m_maxPixel;
-
- static bool m_bPColoursInitialized;
- static wxColour* m_pColours[256];
+ double m_dMinPixel;
+ double m_dMaxPixel;
+ double m_dAutoScaleFactor;
public:
ImageFileView(void);
- ~ImageFileView(void);
+ virtual ~ImageFileView(void);
bool OnCreate(wxDocument *doc, long flags);
void OnDraw(wxDC* dc);
void OnUpdate(wxView *sender, wxObject *hint = NULL);
bool OnClose (bool deleteWindow = true);
void OnProperties (wxCommandEvent& event);
+ void OnScaleAuto (wxCommandEvent& event);
+ void OnScaleMinMax (wxCommandEvent& event);
+
+ ImageFileDocument* GetDocument(void)
+ { return dynamic_cast<ImageFileDocument*>(wxView::GetDocument()); }
DECLARE_EVENT_TABLE()
};
};
-class MyTextWindow: public wxTextCtrl
-{
-public:
- wxView *m_pView;
-
- MyTextWindow(wxView *v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
-};
-
-
-class TextEditView: public wxView
-{
- DECLARE_DYNAMIC_CLASS(TextEditView)
-private:
- wxFrame *CreateChildFrame(wxDocument *doc, wxView *view);
-
-public:
- wxFrame *frame;
- MyTextWindow *textsw;
-
- TextEditView(): wxView() { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; }
- ~TextEditView(void) {}
-
- bool OnCreate(wxDocument *doc, long flags);
- void OnDraw(wxDC* dc);
- void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
- bool OnClose(bool deleteWindow = TRUE);
-};
-
class ProjectionFileCanvas;
class ProjectionFileView : public wxView
{
DECLARE_DYNAMIC_CLASS(ProjectionFileView)
wxMemoryDC m_memoryDC;
- wxBitmap* m_pBitmap;
+ wxBitmap m_bitmap;
private:
ProjectionFileCanvas *CreateCanvas(wxView *view, wxFrame *parent);
ProjectionFileCanvas *m_canvas;
wxFrame *m_frame;
- static bool m_bPColoursInitialized;
- static wxColour* m_pColours[256];
-
public:
ProjectionFileView(void);
- ~ProjectionFileView(void);
+ virtual ~ProjectionFileView(void);
bool OnCreate(wxDocument *doc, long flags);
void OnDraw(wxDC* dc);
void OnProperties (wxCommandEvent& event);
void OnReconstruct (wxCommandEvent& event);
+ ProjectionFileDocument* GetDocument(void)
+ { return dynamic_cast<ProjectionFileDocument*>(wxView::GetDocument()); }
DECLARE_EVENT_TABLE()
};
};
+class PhantomCanvas;
+class PhantomView : public wxView
+{
+ DECLARE_DYNAMIC_CLASS(PhantomView)
+
+private:
+ PhantomCanvas *CreateCanvas(wxView *view, wxFrame *parent);
+ wxFrame *CreateChildFrame(wxDocument *doc, wxView *view);
+
+ PhantomCanvas *m_canvas;
+ wxFrame *m_frame;
+
+public:
+ PhantomView(void);
+ virtual ~PhantomView(void);
+
+ bool OnCreate(wxDocument *doc, long flags);
+ void OnUpdate(wxView *sender, wxObject *hint = NULL);
+ bool OnClose (bool deleteWindow = true);
+ void OnDraw(wxDC* dc);
+ void OnProperties (wxCommandEvent& event);
+ void OnRasterize (wxCommandEvent& event);
+ void OnProjections (wxCommandEvent& event);
+
+ PhantomDocument* GetDocument(void)
+ { return dynamic_cast<PhantomDocument*>(wxView::GetDocument()); }
+
+ DECLARE_EVENT_TABLE()
+};
+
+class PhantomCanvas: public wxScrolledWindow
+{
+public:
+ PhantomView* m_pView;
+
+ PhantomCanvas (PhantomView* v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style);
+
+ virtual void OnDraw(wxDC& dc);
+
+};
+
+
#endif
+