]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/ogledit/ogledit.h
Avoid warnings from mgl headers if possible.
[wxWidgets.git] / contrib / samples / ogl / ogledit / ogledit.h
CommitLineData
1fc25a89
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: ogledit.h
3// Purpose: OGL sample
4// Author: Julian Smart
5// Modified by:
6// Created: 12/07/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
2ba06d5a 9// Licence: wxWindows licence
1fc25a89
JS
10/////////////////////////////////////////////////////////////////////////////
11
ab7ce33c 12#if defined(__GNUG__) && !defined(__APPLE__)
1fc25a89
JS
13// #pragma interface
14#endif
15
16#ifndef _OGLSAMPLE_OGLEDIT_H_
17#define _OGLSAMPLE_OGLEDIT_H_
18
19#include <wx/docview.h>
cecdcad1 20#include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
1fc25a89
JS
21
22// Define a new application
23class MyFrame;
24class EditorToolPalette;
25class MyApp: public wxApp
26{
cecdcad1
WS
27 public:
28 MyFrame *frame;
29 wxDocManager* myDocManager;
1fc25a89 30
cecdcad1
WS
31 MyApp(void);
32 bool OnInit(void);
33 int OnExit(void);
1fc25a89 34
cecdcad1
WS
35 // Palette stuff
36 EditorToolPalette *CreatePalette(wxFrame *parent);
1fc25a89
JS
37};
38
39DECLARE_APP(MyApp)
40
41// Define a new frame
42class MyCanvas;
43class MyFrame: public wxDocParentFrame
44{
cecdcad1
WS
45 DECLARE_CLASS(MyFrame)
46public:
47 wxMenu *editMenu;
48
49 MyCanvas *canvas;
50 EditorToolPalette *palette;
51
52 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
53 const wxPoint& pos = wxDefaultPosition,
54 const wxSize& size = wxDefaultSize,
55 long style = wxDEFAULT_FRAME_STYLE);
56
57 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
58 void OnSize(wxSizeEvent& event);
59 void OnCloseWindow(wxCloseEvent& event);
60 void OnAbout(wxCommandEvent& event);
1fc25a89
JS
61
62DECLARE_EVENT_TABLE()
63};
64
65extern MyFrame *GetMainFrame(void);
66
67// Menu/undo/redo commands
68
cecdcad1
WS
69enum
70{
71 OGLEDIT_ADD_SHAPE = wxID_HIGHEST,
72 OGLEDIT_ADD_LINE,
73 OGLEDIT_EDIT_LABEL,
74 OGLEDIT_CHANGE_BACKGROUND_COLOUR,
75 OGLEDIT_ABOUT = wxID_ABOUT
76};
1fc25a89
JS
77
78#endif
79 // _OGLSAMPLE_OGLEDIT_H_