MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_CONTROLLER_REPEATCLICK_H__ 00008 #define __MYGUI_CONTROLLER_REPEATCLICK_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 #include "MyGUI_Delegate.h" 00012 #include "MyGUI_Types.h" 00013 #include "MyGUI_WidgetDefines.h" 00014 #include "MyGUI_ControllerItem.h" 00015 00016 00017 namespace MyGUI 00018 { 00019 00021 class ControllerRepeatClick : 00022 public ControllerItem 00023 { 00024 MYGUI_RTTI_DERIVED( ControllerRepeatClick ) 00025 00026 public: 00027 ControllerRepeatClick(); 00028 virtual ~ControllerRepeatClick(); 00029 00034 void setRepeat(float init, float step); 00035 00036 virtual void setProperty(const std::string& _key, const std::string& _value); 00037 00038 typedef delegates::CMultiDelegate2<Widget*, ControllerItem*> EventHandle_RepeatClick; 00039 00043 EventHandle_RepeatClick eventRepeatClick; 00044 00045 private: 00046 bool addTime(MyGUI::Widget* _widget, float _time); 00047 void prepareItem(MyGUI::Widget* _widget); 00048 00049 private: 00050 float mInit; 00051 float mStep; 00052 float mTimeLeft; 00053 }; 00054 00055 } 00056 00057 #endif