2000-02-28 03:22:57 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: isosurf.h
|
|
|
|
// Purpose: wxGLCanvas demo program
|
|
|
|
// Author: Brian Paul (original gltk version), Wolfram Gloger
|
|
|
|
// Modified by: Julian Smart
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2002-03-17 09:16:03 -05:00
|
|
|
// Licence: wxWindows licence
|
2000-02-28 03:22:57 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ISOSURF_H_
|
|
|
|
#define _WX_ISOSURF_H_
|
|
|
|
|
|
|
|
// Define a new application type
|
2008-02-10 08:26:01 -05:00
|
|
|
class MyApp : public wxApp
|
2003-11-14 23:21:10 -05:00
|
|
|
{
|
|
|
|
public:
|
2008-02-10 08:26:01 -05:00
|
|
|
virtual bool OnInit();
|
2000-02-28 03:22:57 -05:00
|
|
|
};
|
|
|
|
|
2003-11-14 23:21:10 -05:00
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
class TestGLCanvas : public wxGLCanvas
|
2000-02-28 03:22:57 -05:00
|
|
|
{
|
2003-11-14 23:21:10 -05:00
|
|
|
public:
|
2008-02-10 08:26:01 -05:00
|
|
|
TestGLCanvas(wxWindow *parent,
|
|
|
|
wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name = _T("TestGLCanvas"),
|
|
|
|
int *gl_attrib = NULL);
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
virtual ~TestGLCanvas();
|
2003-11-14 23:21:10 -05:00
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
void OnChar(wxKeyEvent& event);
|
|
|
|
void OnMouseEvent(wxMouseEvent& event);
|
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxGLContext* m_glRC;
|
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(TestGLCanvas)
|
2003-11-14 23:21:10 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2000-02-28 03:22:57 -05:00
|
|
|
};
|
2003-11-14 23:21:10 -05:00
|
|
|
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
class MyFrame : public wxFrame
|
2000-02-28 03:22:57 -05:00
|
|
|
{
|
|
|
|
public:
|
2008-02-10 08:26:01 -05:00
|
|
|
MyFrame(wxFrame *frame,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE);
|
2003-11-14 23:21:10 -05:00
|
|
|
|
|
|
|
virtual ~MyFrame();
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2003-11-14 23:21:10 -05:00
|
|
|
TestGLCanvas *m_canvas;
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2003-11-14 23:21:10 -05:00
|
|
|
private :
|
|
|
|
void OnExit(wxCommandEvent& event);
|
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2000-02-28 03:22:57 -05:00
|
|
|
};
|
|
|
|
|
2008-02-10 08:26:01 -05:00
|
|
|
#endif // _WX_ISOSURF_H_
|
2000-02-28 03:22:57 -05:00
|
|
|
|