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

# OgreActionEvent.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://www.ogre3d.org/
    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  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  License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General  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 /***************************************************************************
    00028 OgreActionEvent.h  -
    00029   A semantic event which indicates that a component-defined action occured.
    00030   This high-level event is generated by a component (such as a Button) when
    00031   the component-specific action occurs (such as being pressed).
    00032   The event is passed to every every ActionListener object
    00033   that registered to receive such events using the component's
    00034   addActionListener method.
    00035
    00036   The object that implements the ActionListener interface
    00037   gets this ActionEvent when the event occurs. The listener
    00038   is therefore spared the details of processing individual mouse movements
    00039   and mouse clicks, and can instead process a "meaningful" (semantic)
    00040   event like "button pressed".
    00041
    00042 -------------------
    00043 begin                : Nov 19 2002
    00044 copyright            : (C) 2002 by Kenny Sabir
    00045 email                : kenny@sparksuit.com
    00046 ***************************************************************************/
    00047
    00048
    00049 #ifndef __ActionEvent_H__
    00050 #define __ActionEvent_H__
    00051
    00052 #include "OgrePrerequisites.h"
    00053 #include "OgreString.h"
    00054 #include "OgreInputEvent.h"
    00055
    00056 namespace Ogre {
    00057
    00058 /***
    00059   A semantic event which indicates that a component-defined action occured.
    00060   @remarks
    00061     This high-level event is generated by a component (such as a Button) when
    00062     the component-specific action occurs (such as being pressed).
    00063     The event is passed to every every ActionListener object
    00064     that registered to receive such events using the component's
    00065     addActionListener method.
    00066   @par
    00067     The object that implements the ActionListener interface
    00068     gets this ActionEvent when the event occurs. The listener
    00069     is therefore spared the details of processing individual mouse movements
    00070     and mouse clicks, and can instead process a "meaningful" (semantic)
    00071     event like "button pressed".
    00072  */
    00073     class _OgreExport ActionEvent : public InputEvent
    00074     {
    00075     protected:
    00083     String mActionCommand;
    00084
    00085
    00086
    00087     public:
    00088     enum
    00089     {
    00093         AE_ACTION_FIRST             = 1001,
    00094
    00098         AE_ACTION_LAST              = 1001
    00099     };
    00100
    00104     enum
    00105     {
    00106         AE_ACTION_PERFORMED = AE_ACTION_FIRST
    00107     };
    00108
    00109
    00124          ActionEvent(ActionTarget* source, int id, Real when, int modifiers,
    00125             const String& actionCommand);
    00126
    00137         const String& getActionCommand() const;
    00138
    00139
    00146         String paramString() const;
    00147
    00148     };
    00149
    00150
    00151 }
    00152
    00153
    00154 #endif
    00155

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:14 2004