]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/ogledit/ogledit.h
Use 'wx/' for contrib samples and make wxTinderbox properly rebuilded after commits...
[wxWidgets.git] / contrib / samples / ogl / ogledit / ogledit.h
CommitLineData
1fc25a89 1/////////////////////////////////////////////////////////////////////////////
f4ec6bd2 2// Name: contrib/samples/ogl/ogledit/ogledit.h
1fc25a89
JS
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
1fc25a89
JS
12#ifndef _OGLSAMPLE_OGLEDIT_H_
13#define _OGLSAMPLE_OGLEDIT_H_
14
f4ec6bd2
WS
15#include "wx/docview.h"
16#include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
1fc25a89
JS
17
18// Define a new application
19class MyFrame;
20class EditorToolPalette;
21class MyApp: public wxApp
22{
cecdcad1
WS
23 public:
24 MyFrame *frame;
25 wxDocManager* myDocManager;
1fc25a89 26
cecdcad1
WS
27 MyApp(void);
28 bool OnInit(void);
29 int OnExit(void);
1fc25a89 30
cecdcad1
WS
31 // Palette stuff
32 EditorToolPalette *CreatePalette(wxFrame *parent);
1fc25a89
JS
33};
34
35DECLARE_APP(MyApp)
36
37// Define a new frame
38class MyCanvas;
39class MyFrame: public wxDocParentFrame
40{
cecdcad1
WS
41 DECLARE_CLASS(MyFrame)
42public:
43 wxMenu *editMenu;
44
45 MyCanvas *canvas;
46 EditorToolPalette *palette;
47
48 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxDEFAULT_FRAME_STYLE);
52
53 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
54 void OnSize(wxSizeEvent& event);
55 void OnCloseWindow(wxCloseEvent& event);
56 void OnAbout(wxCommandEvent& event);
1fc25a89
JS
57
58DECLARE_EVENT_TABLE()
59};
60
61extern MyFrame *GetMainFrame(void);
62
63// Menu/undo/redo commands
64
cecdcad1
WS
65enum
66{
67 OGLEDIT_ADD_SHAPE = wxID_HIGHEST,
68 OGLEDIT_ADD_LINE,
69 OGLEDIT_EDIT_LABEL,
70 OGLEDIT_CHANGE_BACKGROUND_COLOUR,
71 OGLEDIT_ABOUT = wxID_ABOUT
72};
1fc25a89
JS
73
74#endif
75 // _OGLSAMPLE_OGLEDIT_H_