#ifndef MWGUI_CONTROLLERS_H #define MWGUI_CONTROLLERS_H #include #include namespace MWGui { namespace Controllers { class ControllerRepeatClick : public MyGUI::ControllerItem { MYGUI_RTTI_DERIVED( ControllerRepeatClick ) public: ControllerRepeatClick(); virtual ~ControllerRepeatClick(); void setRepeat(float init, float step); void setEnabled(bool enable); virtual void setProperty(const std::string& _key, const std::string& _value); // Events typedef MyGUI::delegates::CMultiDelegate2 EventHandle_RepeatClickVoid; /** Event : Repeat Click.\n signature : void method(MyGUI::Widget* _sender, MyGUI::ControllerItem *_controller)\n */ EventHandle_RepeatClickVoid eventRepeatClick; private: bool addTime(MyGUI::Widget* _widget, float _time); void prepareItem(MyGUI::Widget* _widget); private: float mInit; float mStep; bool mEnabled; float mTimeLeft; }; /// Automatically positions a widget below the mouse cursor. class ControllerFollowMouse : public MyGUI::ControllerItem { MYGUI_RTTI_DERIVED( ControllerFollowMouse ) private: bool addTime(MyGUI::Widget* _widget, float _time); void prepareItem(MyGUI::Widget* _widget); }; } } #endif