]> git.saurik.com Git - wxWidgets.git/blame - utils/ogl/samples/ogledit/ogledit.h
Added SetFont to most controls and controls sample
[wxWidgets.git] / utils / ogl / samples / ogledit / ogledit.h
CommitLineData
f449ef69
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
29 MyApp(void);
30 bool OnInit(void);
31
32 // Palette stuff
33 EditorToolPalette *CreatePalette(wxFrame *parent);
34};
35
36DECLARE_APP(MyApp)
37
38// Define a new frame
39class MyCanvas;
40class MyFrame: public wxDocParentFrame
41{
42 DECLARE_CLASS(MyFrame)
43 public:
44 wxMenu *editMenu;
45
46 MyCanvas *canvas;
47 EditorToolPalette *palette;
48
49 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
52 long style = wxDEFAULT_FRAME_STYLE);
53
54 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
55 void OnSize(wxSizeEvent& event);
56 bool OnClose(void);
57 void OnAbout(wxCommandEvent& event);
58
59DECLARE_EVENT_TABLE()
60};
61
62extern MyFrame *GetMainFrame(void);
63
64// Menu/undo/redo commands
65
66#define OGLEDIT_CUT 1
67#define OGLEDIT_ADD_SHAPE 2
68#define OGLEDIT_ADD_LINE 3
69#define OGLEDIT_EDIT_LABEL 4
70#define OGLEDIT_CHANGE_BACKGROUND_COLOUR 5
71
72#define OGLEDIT_ABOUT 100
73
74#endif
75 // _OGLSAMPLE_OGLEDIT_H_