]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/docvwmdi/docview.h
don't give errors if SetLayeredWindowAttributes() is not available (as is the case...
[wxWidgets.git] / samples / docvwmdi / docview.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: docview.h
3// Purpose: Document/view demo
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __DOCVIEW_H__
13#define __DOCVIEW_H__
14
15#include "wx/mdi.h"
16#include "wx/docview.h"
17#include "wx/docmdi.h"
18
19class wxDocManager;
20
21// Define a new application
22class MyApp: public wxApp
23{
24public:
25 MyApp(void);
26 virtual bool OnInit();
27 virtual int OnExit();
28
29 wxMDIChildFrame* CreateChildFrame(wxDocument*, wxView*, bool isCanvas);
30
31protected:
32 wxDocManager* m_docManager;
33};
34
35DECLARE_APP(MyApp)
36
37// Define a new frame
38class MyCanvas;
39class DrawingView;
40class MyFrame: public wxDocMDIParentFrame
41{
42public:
43 wxMenu* m_editMenu;
44
45 MyFrame(wxDocManager*, wxFrame*, const wxString& title, const wxPoint&, const wxSize&, long type);
46
47 MyCanvas* CreateCanvas(DrawingView*, wxMDIChildFrame*);
48
49protected:
50 void OnAbout(wxCommandEvent&);
51
52 DECLARE_EVENT_TABLE()
53 DECLARE_CLASS(MyFrame)
54};
55
56extern MyFrame* GetMainFrame();
57
58#define DOCVIEW_CUT 1
59#define DOCVIEW_ABOUT wxID_ABOUT
60
61extern bool singleWindowMode;
62
63#endif