Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreEventListeners.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://ogre.sourceforge.net/
00006 
00007 Copyright © 2000-2002 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 
00026 /***************************************************************************
00027 OgreEventListeners.h  -  
00028     This file contains definatitions of all the different EventListeners.
00029     They are all included in 1 file, due to their small size.
00030 
00031     They all inherit from an abstract base listener called EventListener.
00032 
00033     So far we have the following listeners:
00034         MouseListener - handles mouse buttons clicked, pressed released,
00035                         and mouse entered,exited, 
00036         MouseMotionListener - handles mouse move and mouse drag
00037         ActionListener - Used for buttons, when pressed and released.
00038         ListSelectionListener - Used when a list item is selected.
00039 
00040 -------------------
00041 begin                : Nov 19 2002
00042 copyright            : (C) 2002 by Kenny Sabir
00043 email                : kenny@sparksuit.com
00044 ***************************************************************************/
00045 
00046 #ifndef __MouseListener_H__
00047 #define __MouseListener_H__
00048 
00049 #include "OgrePrerequisites.h"
00050 #include "OgreMouseEvent.h"
00051 #include "OgreActionEvent.h"
00052 
00053 namespace Ogre {
00054 
00058     class _OgreExport EventListener 
00059     {
00063     public:
00064         virtual bool isMulticaster()
00065         { return false; }
00066 
00067     };
00068     
00074     class _OgreExport MouseListener : public EventListener
00075     {
00076     protected:
00077 
00078     public :
00082         virtual void mouseClicked(MouseEvent* e) = 0;
00086         virtual void mouseEntered(MouseEvent* e) = 0;
00090         virtual void mouseExited(MouseEvent* e) = 0;
00091 
00095         virtual void mousePressed(MouseEvent* e) = 0;
00099         virtual void mouseReleased(MouseEvent* e) = 0;
00100 
00101     };
00102 
00104     class _OgreExport MouseMotionListener : public EventListener
00105     {
00106     protected:
00107 
00108     public :
00112         virtual void mouseMoved(MouseEvent* e) = 0;
00116         virtual void mouseDragged(MouseEvent* e) = 0;
00117     };
00118 
00120     class _OgreExport ActionListener : public EventListener
00121     {
00122     protected:
00123 
00124     public :
00125 
00129         virtual void actionPerformed(ActionEvent* e) = 0;
00130     };
00131 
00133     class _OgreExport ListSelectionListener : public EventListener
00134     {
00135     protected:
00136 
00137     public :
00138 
00142         virtual void listSelected(ListSelectionEvent* e) = 0;
00143     };
00144 
00145 
00146 
00147 }
00148 
00149 
00150 #endif  // __MouseListener_H__

Copyright © 2002 by The OGRE Team