Back to index

plt-scheme  4.2.1
EvtHandler.h
Go to the documentation of this file.
00001 /*                                                      -*- C++ -*-
00002  *
00003  * Purpose: base event handler of windows etc.
00004  *
00005  * Authors: Markus Holzem and Julian Smart
00006  *
00007  * Copyright: (C) 2004-2009 PLT Scheme Inc.
00008  * Copyright: (C) 1995, AIAI, University of Edinburgh (Julian)
00009  * Copyright: (C) 1995, GNU (Markus)
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00024  * 02110-1301 USA.
00025  */
00026 
00027 #ifndef EvtHandler_h
00028 #define EvtHandler_h
00029 
00030 #ifdef __GNUG__
00031 #pragma interface
00032 #endif
00033 
00034 class wxCommandEvent;
00035 class wxItem;
00036 class wxKeyEvent;
00037 class wxMouseEvent;
00038 class wxScrollEvent;
00039 class wxWindow;
00040 
00041 class wxEvtHandler : public wxObject {
00042 public:
00043     wxEvtHandler(void);
00044     ~wxEvtHandler(void);
00045 
00046     // virtual event functions
00047     inline virtual void OnActivate(Bool WXUNUSED(active)) {};
00048     inline virtual void OnChangeFocus(wxItem *WXUNUSED(from),
00049                                   wxItem *WXUNUSED(to)) {};
00050     inline virtual void OnChar(wxKeyEvent* WXUNUSED(event)) {};
00051     inline virtual Bool OnCharHook(wxKeyEvent* WXUNUSED(event)) { return FALSE; }
00052     inline virtual Bool OnClose(void) { return TRUE; };
00053     inline virtual void OnCommand(wxWindow* WXUNUSED(win),
00054                               wxCommandEvent* WXUNUSED(event)) {};
00055     inline virtual void OnDefaultAction(wxItem *WXUNUSED(initiatingItem)) {};
00056     inline virtual void OnDropFile(char *WXUNUSED(file)) {};
00057     inline virtual void OnEvent(wxMouseEvent* WXUNUSED(event)) {};
00058     inline virtual Bool OnFunctionKey(wxKeyEvent* WXUNUSED(event)) { return FALSE; };
00059     inline virtual void OnKillFocus(void) {};
00060     inline virtual void OnLeftClick(int WXUNUSED(x), int WXUNUSED(y),
00061                                 int WXUNUSED(keys)) {};
00062     inline virtual void OnMenuCommand(long WXUNUSED(cmd)) {};
00063     inline virtual void OnMenuSelect(long WXUNUSED(cmd)) {};
00064     inline virtual void OnMove(int WXUNUSED(x), int WXUNUSED(y)) {};
00065     inline virtual void OnPaint(void) {};
00066     inline virtual void OnRightClick(int WXUNUSED(x), int WXUNUSED(y),
00067                                  int WXUNUSED(keys)) {};
00068     inline virtual void OnScroll(wxScrollEvent* WXUNUSED(event)) {};
00069     inline virtual void OnSelect(Bool WXUNUSED(select)) {};
00070     inline virtual void OnSetFocus(void) {};
00071     inline virtual void OnSize(int WXUNUSED(width), int WXUNUSED(height)) {};
00072 };
00073 
00074 #if defined (Uses_XtIntrinsic) || defined (Uses_XtIntrinsicP) || defined (Uses_XLib)
00075 KeySym CharCodeWXToX(int id);
00076 int    CharCodeXToWX(KeySym key_sym);
00077 #endif
00078 
00079 #endif // EvtHandler_h