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
|
|
|
|
class MyApp: public wxApp
|
2003-11-14 23:21:10 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool OnInit();
|
2000-02-28 03:22:57 -05:00
|
|
|
};
|
|
|
|
|
2003-09-11 03:20:55 -04:00
|
|
|
#if wxUSE_GLCANVAS
|
2003-11-14 23:21:10 -05:00
|
|
|
|
2000-02-28 03:22:57 -05:00
|
|
|
class TestGLCanvas: public wxGLCanvas
|
|
|
|
{
|
2003-11-14 23:21:10 -05:00
|
|
|
public:
|
|
|
|
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
|
|
|
|
2004-10-06 16:54:57 -04:00
|
|
|
~TestGLCanvas(){};
|
2003-11-14 23:21:10 -05:00
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnSize(wxSizeEvent& event);
|
|
|
|
void OnEraseBackground(wxEraseEvent& event);
|
|
|
|
void OnChar(wxKeyEvent& event);
|
|
|
|
void OnMouseEvent(wxMouseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
2000-02-28 03:22:57 -05:00
|
|
|
};
|
2003-11-14 23:21:10 -05:00
|
|
|
|
|
|
|
#endif // #if wxUSE_GLCANVAS
|
|
|
|
|
2000-02-28 03:22:57 -05:00
|
|
|
|
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2003-11-14 23:21:10 -05:00
|
|
|
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
|
|
|
|
const wxSize& size, long style = wxDEFAULT_FRAME_STYLE);
|
|
|
|
|
|
|
|
virtual ~MyFrame();
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2003-09-11 03:20:55 -04:00
|
|
|
#if wxUSE_GLCANVAS
|
2003-11-14 23:21:10 -05:00
|
|
|
TestGLCanvas *m_canvas;
|
2003-09-11 03:20:55 -04:00
|
|
|
#endif
|
2000-02-28 03:22:57 -05:00
|
|
|
|
2003-11-14 23:21:10 -05:00
|
|
|
private :
|
|
|
|
|
|
|
|
void OnExit(wxCommandEvent& event);
|
|
|
|
|
2000-02-28 03:22:57 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2003-11-14 23:21:10 -05:00
|
|
|
#endif // #ifndef _WX_ISOSURF_H_
|
2000-02-28 03:22:57 -05:00
|
|
|
|