]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/ogledit/ogledit.h
Added new stream tests to typetest.
[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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13// #pragma interface
14#endif
15
16#ifndef _OGLSAMPLE_OGLEDIT_H_
17#define _OGLSAMPLE_OGLEDIT_H_
18
19#include <wx/docview.h>
20
21// Define a new application
22class MyFrame;
23class EditorToolPalette;
24class MyApp: public wxApp
25{
26 public:
27 MyFrame *frame;
28 wxDocManager* myDocManager;
29
30 MyApp(void);
31 bool OnInit(void);
32 int OnExit(void);
33
34 // Palette stuff
35 EditorToolPalette *CreatePalette(wxFrame *parent);
36};
37
38DECLARE_APP(MyApp)
39
40// Define a new frame
41class MyCanvas;
42class MyFrame: public wxDocParentFrame
43{
44 DECLARE_CLASS(MyFrame)
45 public:
46 wxMenu *editMenu;
47
48 MyCanvas *canvas;
49 EditorToolPalette *palette;
50
51 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
52 const wxPoint& pos = wxDefaultPosition,
53 const wxSize& size = wxDefaultSize,
54 long style = wxDEFAULT_FRAME_STYLE);
55
56 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
57 void OnSize(wxSizeEvent& event);
58 void OnCloseWindow(wxCloseEvent& event);
59 void OnAbout(wxCommandEvent& event);
60
61DECLARE_EVENT_TABLE()
62};
63
64extern MyFrame *GetMainFrame(void);
65
66// Menu/undo/redo commands
67
68#define OGLEDIT_CUT 1
69#define OGLEDIT_ADD_SHAPE 2
70#define OGLEDIT_ADD_LINE 3
71#define OGLEDIT_EDIT_LABEL 4
72#define OGLEDIT_CHANGE_BACKGROUND_COLOUR 5
73
74#define OGLEDIT_ABOUT 100
75
76#endif
77 // _OGLSAMPLE_OGLEDIT_H_