MyGUI_ControllerRepeatClick.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_CONTROLLER_REPEATCLICK_H_
#define MYGUI_CONTROLLER_REPEATCLICK_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Delegate.h"
#include "MyGUI_Types.h"
#include "MyGUI_WidgetDefines.h"
#include "MyGUI_ControllerItem.h"
namespace MyGUI
{
class MYGUI_EXPORT ControllerRepeatClick : public ControllerItem
{
MYGUI_RTTI_DERIVED(ControllerRepeatClick)
public:
void setRepeat(float init, float step);
bool addTime(Widget* _widget, float _time) override;
void prepareItem(Widget* _widget) override;
void setProperty(std::string_view _key, std::string_view _value) override;
using EventHandle_RepeatClick = delegates::MultiDelegate<Widget*, ControllerItem*>;
EventHandle_RepeatClick eventRepeatClick;
private:
float mInit{0.5f};
float mStep{0.1f};
float mTimeLeft{0};
};
}
#endif
MyGUI_ControllerItem.h
MyGUI_Delegate.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
MyGUI_Types.h
MyGUI_WidgetDefines.h
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:26
MyGUI::ControllerRepeatClick
Definition MyGUI_ControllerRepeatClick.h:22
MyGUI::ControllerRepeatClick::prepareItem
void prepareItem(Widget *_widget) override
Definition MyGUI_ControllerRepeatClick.cpp:40
MyGUI::ControllerRepeatClick::eventRepeatClick
EventHandle_RepeatClick eventRepeatClick
Definition MyGUI_ControllerRepeatClick.h:41
MyGUI::ControllerRepeatClick::setProperty
void setProperty(std::string_view _key, std::string_view _value) override
Definition MyGUI_ControllerRepeatClick.cpp:36
MyGUI::ControllerRepeatClick::addTime
bool addTime(Widget *_widget, float _time) override
Definition MyGUI_ControllerRepeatClick.cpp:13
MyGUI::ControllerRepeatClick::setRepeat
void setRepeat(float init, float step)
Definition MyGUI_ControllerRepeatClick.cpp:30
MyGUI::ControllerRepeatClick::EventHandle_RepeatClick
delegates::MultiDelegate< Widget *, ControllerItem * > EventHandle_RepeatClick
Definition MyGUI_ControllerRepeatClick.h:36
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::delegates::MultiDelegate
Definition MyGUI_Delegate.h:190
MyGUI
Definition MyGUI_ActionController.h:15