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

  1. /*
  2.  * File:     client.h
  3.  * Purpose:  Client 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. // Define a new frame
  37. class MyFrame: public wxFrame
  38. {
  39.   public:
  40.     wxPanel *panel;
  41.  
  42.     MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
  43.     Bool OnClose(void);
  44.     void OnMenuCommand(int id);
  45. };
  46.  
  47. // IPC stuff
  48.  
  49. class MyConnection: public wxConnection
  50. {
  51.  public:
  52.   MyConnection(void);
  53.   ~MyConnection(void);
  54.   Bool OnAdvise(char *topic, char *item, char *data, int size, int format);
  55. };
  56.  
  57. class MyClient: public wxClient
  58. {
  59.  public:
  60.   MyClient(void);
  61.   wxConnection *OnMakeConnection(void);
  62. };
  63.  
  64. #define CLIENT_QUIT     1
  65. #define CLIENT_EXECUTE  2
  66. #define CLIENT_REQUEST  3
  67. #define CLIENT_POKE     4
  68.  
  69.