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

  1. /*
  2.  * File:     wx_event.h
  3.  * Purpose:  wxEvent declaration
  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.  
  30. #ifndef wx_eventh
  31. #define wx_eventh
  32.  
  33. #include "common.h"
  34.  
  35. #ifdef wx_motif
  36. #include <Xm/Xm.h>
  37. #endif
  38.  
  39. #ifdef wx_xview
  40. #include <xview/canvas.h>
  41. #endif
  42.  
  43. #ifdef wx_msw
  44. #include <windows.h>
  45. #endif
  46.  
  47. // General event object
  48. class wxEvent: public wxObject
  49. {
  50.  public:
  51. #ifdef wx_motif
  52.   XButtonEvent *event_handle;
  53.   Bool button1Pressed;
  54.   Bool button2Pressed;
  55.   Bool button3Pressed;
  56. #endif
  57. #ifdef wx_xview
  58.   Event *event_handle;
  59. #endif
  60.  
  61.   float x;
  62.   float y;
  63.  
  64. #ifdef wx_msw
  65.   int event;
  66.   UINT flags;
  67. #endif
  68.  
  69.   int index;
  70.   char *string;
  71.   char *client_data;
  72.  
  73.   wxEvent();
  74. #ifdef wx_xview
  75.   wxEvent(Event *x_event);
  76. #endif
  77.  
  78.   Bool IsButton(void);
  79.   Bool ButtonDown(void);
  80.   Bool ControlDown(void);
  81.   Bool ShiftDown(void);
  82.   Bool Button(int);          // True if button N was changing state
  83.   Bool LeftDown(void);
  84.   Bool MiddleDown(void);
  85.   Bool RightDown(void);
  86.   Bool LeftUp(void);
  87.   Bool MiddleUp(void);
  88.   Bool RightUp(void);
  89.   Bool Dragging(void);
  90.   void Position(float *x, float *y);
  91.   int Index(void);
  92.   char *String(void);
  93. };
  94.  
  95. #endif // wx_eventh
  96.