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 / contrib / samples / ogl / ogledit / ogledit.h < prev    next >
C/C++ Source or Header  |  2002-09-08  |  2KB  |  78 lines

  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: ogledit.h,v 1.2 2002/09/07 12:12:21 GD Exp $
  8. // Copyright:   (c) Julian Smart
  9. // Licence:       wxWindows licence
  10. /////////////////////////////////////////////////////////////////////////////
  11.  
  12. #if defined(__GNUG__) && !defined(__APPLE__)
  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
  22. class MyFrame;
  23. class EditorToolPalette;
  24. class MyApp: public wxApp
  25. {
  26.  public:
  27.   MyFrame *frame;
  28.   wxDocManager* myDocManager;
  29.  
  30.   MyApp(void);
  31.   bool OnInit(void);
  32.   int OnExit(void);
  33.  
  34.   // Palette stuff
  35.   EditorToolPalette *CreatePalette(wxFrame *parent);
  36. };
  37.  
  38. DECLARE_APP(MyApp)
  39.  
  40. // Define a new frame
  41. class MyCanvas;
  42. class MyFrame: public wxDocParentFrame
  43. {
  44.   DECLARE_CLASS(MyFrame)
  45.  public:
  46.   wxMenu *editMenu;
  47.   
  48.   MyCanvas *canvas;
  49.   EditorToolPalette *palette;
  50.   
  51.   MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
  52.     const wxPoint& pos = wxDefaultPosition,
  53.     const wxSize& size = wxDefaultSize,
  54.     long style = wxDEFAULT_FRAME_STYLE);
  55.  
  56.   MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
  57.   void OnSize(wxSizeEvent& event);
  58.   void OnCloseWindow(wxCloseEvent& event);
  59.   void OnAbout(wxCommandEvent& event);
  60.  
  61. DECLARE_EVENT_TABLE()
  62. };
  63.  
  64. extern MyFrame *GetMainFrame(void);
  65.  
  66. // Menu/undo/redo commands
  67.  
  68. #define OGLEDIT_CUT                         1
  69. #define OGLEDIT_ADD_SHAPE                   2
  70. #define OGLEDIT_ADD_LINE                    3
  71. #define OGLEDIT_EDIT_LABEL                  4
  72. #define OGLEDIT_CHANGE_BACKGROUND_COLOUR    5
  73.  
  74. #define OGLEDIT_ABOUT   100
  75.  
  76. #endif
  77.     // _OGLSAMPLE_OGLEDIT_H_
  78.