~ubuntu-dev/wxwidgets2.6/upstream-debian

« back to all changes in this revision

Viewing changes to samples/docvwmdi/docview.h

  • Committer: Daniel T Chen
  • Date: 2006-06-26 10:15:11 UTC
  • Revision ID: crimsun@ubuntu.com-20060626101511-a4436cec4c6d9b35
ImportĀ DebianĀ 2.6.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: docview.h,v 1.7 2005/06/02 12:04:03 JS Exp $
 
8
// Copyright:   (c) Julian Smart
 
9
// Licence:     wxWindows license
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifdef __GNUG__
 
13
// #pragma interface "docview.h"
 
14
#endif
 
15
 
 
16
#ifndef __DOCVIEWSAMPLEH__
 
17
#define __DOCVIEWSAMPLEH__
 
18
 
 
19
#include "wx/mdi.h"
 
20
#include "wx/docview.h"
 
21
#include "wx/docmdi.h"
 
22
 
 
23
class wxDocManager;
 
24
 
 
25
// Define a new application
 
26
class MyApp: public wxApp
 
27
{
 
28
  public:
 
29
    MyApp(void);
 
30
    bool OnInit(void);
 
31
    int OnExit(void);
 
32
 
 
33
    wxMDIChildFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
 
34
 
 
35
  protected:
 
36
    wxDocManager* m_docManager;
 
37
};
 
38
 
 
39
DECLARE_APP(MyApp)
 
40
 
 
41
// Define a new frame
 
42
class MyCanvas;
 
43
class MyFrame: public wxDocMDIParentFrame
 
44
{
 
45
  DECLARE_CLASS(MyFrame)
 
46
 public:
 
47
  wxMenu *editMenu;
 
48
  
 
49
  MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
 
50
    long type);
 
51
 
 
52
  void OnAbout(wxCommandEvent& event);
 
53
  MyCanvas *CreateCanvas(wxView *view, wxMDIChildFrame *parent);
 
54
 
 
55
DECLARE_EVENT_TABLE()
 
56
};
 
57
 
 
58
extern MyFrame *GetMainFrame(void);
 
59
 
 
60
#define DOCVIEW_CUT     1
 
61
#define DOCVIEW_ABOUT   wxID_ABOUT
 
62
 
 
63
extern bool singleWindowMode;
 
64
 
 
65
#endif