MyGUI_ControllerItem.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_ITEM_H_
#define MYGUI_CONTROLLER_ITEM_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_WidgetDefines.h"
#include "MyGUI_IObject.h"
#include "MyGUI_Delegate.h"
#include "MyGUI_EventPair.h"
namespace MyGUI
{
class ControllerItem;
using EventHandle_WidgetPtr = delegates::MultiDelegate<Widget*>;
using EventHandle_WidgetPtrControllerItemPtr = delegates::MultiDelegate<Widget*, ControllerItem*>;
class MYGUI_EXPORT ControllerItem : public IObject
{
MYGUI_RTTI_DERIVED(ControllerItem)
public:
virtual void prepareItem(Widget* _widget) = 0;
virtual bool addTime(Widget* _widget, float _time) = 0;
virtual void setProperty(std::string_view /*_key*/, std::string_view /*_value*/)
{
}
EventPairAddParameter<EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr> eventPreAction;
EventPairAddParameter<EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr> eventUpdateAction;
EventPairAddParameter<EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr> eventPostAction;
};
} // namespace MyGUI
#endif // MYGUI_CONTROLLER_ITEM_H_
MyGUI_Delegate.h
MyGUI_EventPair.h
MyGUI_IObject.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_WidgetDefines.h
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:26
MyGUI::ControllerItem::eventPreAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPreAction
Definition MyGUI_ControllerItem.h:41
MyGUI::ControllerItem::eventPostAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPostAction
Definition MyGUI_ControllerItem.h:53
MyGUI::ControllerItem::eventUpdateAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventUpdateAction
Definition MyGUI_ControllerItem.h:47
MyGUI::ControllerItem::addTime
virtual bool addTime(Widget *_widget, float _time)=0
MyGUI::ControllerItem::setProperty
virtual void setProperty(std::string_view, std::string_view)
Definition MyGUI_ControllerItem.h:33
MyGUI::ControllerItem::prepareItem
virtual void prepareItem(Widget *_widget)=0
MyGUI::EventPairAddParameter
Definition MyGUI_EventPair.h:176
MyGUI::IObject
Definition MyGUI_IObject.h:17
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
MyGUI::EventHandle_WidgetPtr
delegates::MultiDelegate< Widget * > EventHandle_WidgetPtr
Definition MyGUI_ControllerItem.h:21
MyGUI::EventHandle_WidgetPtrControllerItemPtr
delegates::MultiDelegate< Widget *, ControllerItem * > EventHandle_WidgetPtrControllerItemPtr
Definition MyGUI_ControllerItem.h:22