home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2233.zip / wxOS2-2_3_3.zip / wxWindows-2.3.3 / samples / docview / docview.h < prev    next >
C/C++ Source or Header  |  2002-03-20  |  2KB  |  67 lines

  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.4 2002/03/17 14:15:40 VZ Exp $
  8. // Copyright:   (c) Julian Smart and Markus Holzem
  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/docview.h"
  20.  
  21. class wxDocManager;
  22.  
  23. // Define a new application
  24. class MyApp: public wxApp
  25. {
  26. public:
  27.     MyApp(void);
  28.     bool OnInit(void);
  29.     int OnExit(void);
  30.     
  31.     wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
  32.     
  33. protected:
  34.     wxDocManager* m_docManager;
  35. };
  36.  
  37. DECLARE_APP(MyApp)
  38.  
  39. // Define a new frame
  40. class MyCanvas;
  41. class MyFrame: public wxDocParentFrame
  42. {
  43.     DECLARE_CLASS(MyFrame)
  44. public:
  45.     wxMenu *editMenu;
  46.     
  47.     // This pointer only needed if in single window mode
  48.     MyCanvas *canvas;
  49.     
  50.     MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size,
  51.         const long type);
  52.     
  53.     void OnAbout(wxCommandEvent& event);
  54.     MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
  55.     
  56.     DECLARE_EVENT_TABLE()
  57. };
  58.  
  59. extern MyFrame *GetMainFrame(void);
  60.  
  61. #define DOCVIEW_CUT     1
  62. #define DOCVIEW_ABOUT   2
  63.  
  64. extern bool singleWindowMode;
  65.  
  66. #endif
  67.