Back to index

plt-scheme  4.2.1
wx_stdev.h
Go to the documentation of this file.
00001 /*                                                      -*- C++ -*-
00002  * File:             wx_stdev.h
00003  * Purpose:   Standard wxWindows event classes
00004  * Author:           Julian Smart
00005  * Created:   1993
00006  * Updated:   
00007  * Copyright: (c) 2004-2009 PLT Scheme Inc.
00008  * Copyright: (c) 1993, AIAI, University of Edinburgh
00009  */
00010 
00011 #ifndef wxb_stdevh
00012 #define wxb_stdevh
00013 
00014 #ifndef MZ_PRECISE_GC
00015 # ifdef __GNUG__
00016 # pragma interface
00017 # endif
00018 #endif
00019 
00020 // Item or menu event class
00021 class wxScrollEvent: public wxEvent
00022 {
00023  public:
00024   wxScrollEvent();
00025 
00026   int pos;
00027   int moveType;
00028   int direction;
00029 };
00030 
00031 
00032 // Item or menu event class
00033 class wxCommandEvent: public wxEvent
00034 {
00035  public:
00036   wxCommandEvent(WXTYPE commandType = 0);
00037   inline ~wxCommandEvent(void) {}
00038 };
00039 
00040 class wxPopupEvent: public wxCommandEvent
00041 {
00042 public:
00043   wxPopupEvent();
00044   long menuId;
00045 };
00046 
00047 // Mouse event class
00048 class wxMouseEvent: public wxEvent
00049 {
00050  public:
00051   int x;
00052   int y;
00053   Bool leftDown;
00054   Bool middleDown;
00055   Bool rightDown;
00056 
00057   Bool controlDown;
00058   Bool shiftDown;
00059   Bool altDown;
00060   Bool metaDown;
00061   Bool capsDown;
00062   
00063   wxMouseEvent(WXTYPE mouseType = 0);
00064 
00065   // Was it a button event?
00066   virtual Bool IsButton(void);
00067 
00068   // Was it a down event from button 1, 2 or 3 or any?
00069   virtual Bool ButtonDown(int but = -1);
00070 
00071   // Was it a dclick event from button 1, 2 or 3 or any?
00072   virtual Bool ButtonDClick(int but = -1);
00073 
00074   // Was it a up event from button 1, 2 or 3 or any?
00075   virtual Bool ButtonUp(int but = -1);
00076 
00077   // Was the given button 1,2,3 or any changing state?
00078   virtual Bool Button(int but);
00079 
00080   // Was the given button 1,2,3 or any in Down state?
00081   virtual Bool ButtonIsDown(int but);
00082 
00083   // Find state of shift/control keys
00084   virtual Bool ControlDown(void);
00085   virtual Bool MetaDown(void);
00086   virtual Bool AltDown(void);
00087   virtual Bool ShiftDown(void);
00088 
00089   // Find which event was just generated
00090   virtual Bool LeftDown(void);
00091   virtual Bool MiddleDown(void);
00092   virtual Bool RightDown(void);
00093 
00094   virtual Bool LeftUp(void);
00095   virtual Bool MiddleUp(void);
00096   virtual Bool RightUp(void);
00097 
00098   virtual Bool LeftDClick(void);
00099   virtual Bool MiddleDClick(void);
00100   virtual Bool RightDClick(void);
00101 
00102   // Find the current state of the mouse buttons (regardless
00103   // of current event type)
00104   virtual Bool LeftIsDown(void);
00105   virtual Bool MiddleIsDown(void);
00106   virtual Bool RightIsDown(void);
00107 
00108   // True if a button is down and the mouse is moving
00109   virtual Bool Dragging(void);
00110 
00111   // True if the mouse is moving, and no button is down
00112   virtual Bool Moving(void);
00113 
00114   // True if the mouse is just entering the window
00115   virtual Bool Entering(void);
00116 
00117   // True if the mouse is just leaving the window
00118   virtual Bool Leaving(void);
00119 
00120   // Find the position of the event
00121   virtual void Position(int *x, int *y);
00122 };
00123 
00124 // Keyboard input event class
00125 class wxKeyEvent: public wxEvent
00126 {
00127  public:
00128   int x ;
00129   int y ;
00130   long keyCode;
00131   long keyUpCode;
00132   long otherKeyCode;
00133   long altKeyCode;
00134   long otherAltKeyCode;
00135   long capsKeyCode;
00136   Bool controlDown;
00137   Bool shiftDown;
00138   Bool altDown;
00139   Bool metaDown;
00140   Bool capsDown;
00141   
00142   wxKeyEvent(WXTYPE keyType = 0);
00143 
00144   virtual Bool ControlDown(void);
00145   virtual Bool AltDown(void);
00146   virtual Bool MetaDown(void);
00147   virtual Bool ShiftDown(void);
00148   virtual long KeyCode(void);
00149 
00150   virtual void Position(int *x,int *y) ;
00151 };
00152 
00153 #endif // wxb_stdevh
00154