home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / wxwin140 / samples / form / form.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-18  |  1.9 KB  |  68 lines

  1. /*
  2.  * File:     form.h
  3.  * Purpose:  Demo for wxWindows `forms' class
  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. // Define a new frame
  37. class MyFrame: public wxFrame
  38. {
  39.   public:
  40.     MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
  41.     Bool OnClose(void);
  42.     void OnMenuCommand(int id);
  43. };
  44.  
  45. class MyObject: public wxObject
  46. {
  47.  public:
  48.    char *string1;
  49.    char *string2;
  50.    char *string3;
  51.    int int1;
  52.    Bool bool1;
  53.    float float1;
  54.    wxList string_list1;
  55.    MyObject(void);
  56. };
  57.  
  58. class MyForm: public wxForm
  59. {
  60.  public:
  61.   void EditForm(MyObject *object, wxPanel *panel);
  62.   void OnOk(void);
  63.   void OnCancel(void);
  64. };
  65.  
  66. #define FORM_QUIT  1
  67. #define FORM_EDIT  2
  68.