]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/mdi/mdi.h
Added more makefiles; fixed some samples for Cygwin
[wxWidgets.git] / samples / mdi / mdi.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: mdi.cpp
3// Purpose: MDI sample
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#include <wx/toolbar.h>
13
14// Define a new application
15class MyApp: public wxApp
16{
17 public:
18 bool OnInit(void);
19};
20
21class MyCanvas: public wxScrolledWindow
22{
23 public:
24 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
25 virtual void OnDraw(wxDC& dc);
26 void OnEvent(wxMouseEvent& event);
27
28 DECLARE_EVENT_TABLE()
29};
30
31// Define a new frame
32class MyFrame: public wxMDIParentFrame
33{
34 public:
35 wxTextCtrl *textWindow;
36
37 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
38
39 void InitToolBar(wxToolBar* toolBar);
40
41 void OnSize(wxSizeEvent& event);
42 void OnAbout(wxCommandEvent& event);
43 void OnNewWindow(wxCommandEvent& event);
44 void OnQuit(wxCommandEvent& event);
45
46DECLARE_EVENT_TABLE()
47};
48
49class MyChild: public wxMDIChildFrame
50{
51 public:
52 MyCanvas *canvas;
53 MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
54 ~MyChild(void);
55 void OnActivate(wxActivateEvent& event);
56 void OnQuit(wxCommandEvent& event);
57
58DECLARE_EVENT_TABLE()
59};
60
61#define MDI_QUIT 1
62#define MDI_NEW_WINDOW 2
63#define MDI_REFRESH 3
64#define MDI_CHILD_QUIT 4
65#define MDI_ABOUT 5