home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / wxwin140 / samples / mdi / mdi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-19  |  2.1 KB  |  69 lines

  1. /*
  2.  * File:     mdi.h
  3.  * Purpose:  MDI demo for wxWindows class library
  4.  *
  5.  *                       wxWindows 1.40
  6.  * Copyright (c) 1993 Artificial Intelligence Applications Institute,
  7.  *                   The University of Edinburgh
  8.  *
  9.  *                     Author: Julian Smart
  10.  *                        Date: 18-4-93
  11.  *
  12.  * Permission to use, copy, modify, and distribute this software and its
  13.  * documentation for any purpose is hereby granted without fee, provided
  14.  * that the above copyright notice, author statement and this permission
  15.  * notice appear in all copies of this software and related documentation.
  16.  *
  17.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
  18.  * IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
  19.  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  20.  *
  21.  * IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
  22.  * UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
  23.  * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
  24.  * LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
  25.  * DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
  26.  * THE USE OR PERFORMANCE OF THIS SOFTWARE.
  27.  */
  28.  
  29. // Define a new application
  30. class MyApp: public wxApp
  31. {
  32.   public:
  33.     wxFrame *OnInit(void);
  34. };
  35.  
  36. class MyCanvas: public wxCanvas
  37. {
  38.   public:
  39.     MyCanvas(wxFrame *frame, int x, int y, int w, int h);
  40.     void OnPaint(void);
  41.     void OnEvent(wxEvent& event);
  42. };
  43.  
  44. // Define a new frame
  45. class MyFrame: public wxFrame
  46. {
  47.   public:
  48.     MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h, int type);
  49.     Bool OnClose(void);
  50.     void OnMenuCommand(int id);
  51. };
  52.  
  53. class MyChild: public wxFrame
  54. {
  55.   public:
  56.     MyChild(wxFrame *frame, char *title, int x, int y, int w, int h, int type);
  57.     ~MyChild(void);
  58.     Bool OnClose(void);
  59.     void OnMenuCommand(int id);
  60. };
  61.  
  62. void GenericOk(wxButton& but, wxEvent& event);
  63.  
  64. #define MDI_QUIT        1
  65. #define MDI_NEW_WINDOW  2
  66. #define MDI_REFRESH     3
  67. #define MDI_CHILD_QUIT  4
  68. #define MDI_ABOUT       5
  69.