00001 /* 00002 00003 ----------------------------------------------------------------------------- 00004 00005 This source file is part of OGRE 00006 00007 (Object-oriented Graphics Rendering Engine) 00008 00009 For the latest info, see http://www.ogre3d.org/ 00010 00011 00012 00013 Copyright © 2000-2002 The OGRE Team 00014 00015 Also see acknowledgements in Readme.html 00016 00017 00018 00019 This program is free software; you can redistribute it and/or modify it under 00020 00021 the terms of the GNU Lesser General License as published by the Free Software 00022 00023 Foundation; either version 2 of the License, or (at your option) any later 00024 00025 version. 00026 00027 00028 00029 This program is distributed in the hope that it will be useful, but WITHOUT 00030 00031 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00032 00033 FOR A PARTICULAR PURPOSE. See the GNU Lesser General License for more details. 00034 00035 00036 00037 You should have received a copy of the GNU Lesser General License along with 00038 00039 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00040 00041 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00042 00043 http://www.gnu.org/copyleft/lesser.txt. 00044 00045 00046 00047 ----------------------------------------------------------------------------- 00048 00049 */ 00050 00051 00052 00053 /*************************************************************************** 00054 00055 OgreScrollEvent.h - 00056 00057 A semantic event which indicates that a component-defined Scroll occured. 00058 00059 This high-level event is generated by a component (such as a Button) when 00060 00061 the component-specific Scroll occurs (such as being pressed). 00062 00063 The event is passed to every every ScrollListener object 00064 00065 that registered to receive such events using the component's 00066 00067 addScrollListener method. 00068 00069 00070 00071 The object that implements the ScrollListener interface 00072 00073 gets this ScrollEvent when the event occurs. The listener 00074 00075 is therefore spared the details of processing individual mouse movements 00076 00077 and mouse clicks, and can instead process a "meaningful" (semantic) 00078 00079 event like "button pressed". 00080 00081 00082 00083 ------------------- 00084 00085 begin : Nov 19 2002 00086 00087 copyright : (C) 2002 by Kenny Sabir 00088 00089 email : kenny@sparksuit.com 00090 00091 ***************************************************************************/ 00092 00093 00094 00095 00096 00097 #ifndef __ScrollEvent_H__ 00098 00099 #define __ScrollEvent_H__ 00100 00101 00102 00103 #include "OgrePrerequisites.h" 00104 00105 #include "OgreString.h" 00106 00107 #include "OgreInputEvent.h" 00108 00109 00110 00111 namespace Ogre { 00112 00113 00114 00121 class _OgreExport ScrollEvent : public InputEvent 00122 00123 { 00124 00125 protected: 00126 00141 size_t mTopVisible; 00142 00143 size_t mRange; 00144 00145 size_t mTotal; 00146 00147 00148 00149 00150 00151 00152 00153 public: 00154 00155 enum 00156 00157 { 00158 00165 SE_SCROLL_FIRST = 2001, 00166 00167 00168 00175 SE_SCROLL_LAST = 2001 00176 00177 }; 00178 00179 00180 00187 enum 00188 00189 { 00190 00191 SE_SCROLL_PERFORMED = SE_SCROLL_FIRST 00192 00193 }; 00194 00195 00196 00197 00198 00227 ScrollEvent(ScrollTarget* source, int id, Real when, int modifiers, 00228 00229 size_t topVisible, size_t range, size_t total) ; 00230 00231 00232 00233 size_t getTopVisible() const; 00234 00235 size_t getRange() const; 00236 00237 size_t getTotal() const; 00238 00239 00240 00241 00242 00255 String paramString() const; 00256 00257 00258 00259 }; 00260 00261 00262 00263 00264 00265 } 00266 00267 00268 00269 00270 00271 #endif 00272 00273 00274
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:27 2004