MyGUI_ControllerManager.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_MANAGER_H_
#define MYGUI_CONTROLLER_MANAGER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Singleton.h"
#include "MyGUI_ControllerItem.h"
#include "MyGUI_IUnlinkWidget.h"
#include "MyGUI_WidgetDefines.h"
#include "MyGUI_ActionController.h"
namespace MyGUI
{
class MYGUI_EXPORT ControllerManager : public IUnlinkWidget
{
MYGUI_SINGLETON_DECLARATION(ControllerManager);
public:
ControllerManager();
void initialise();
void shutdown();
ControllerItem* createItem(std::string_view _type);
void addItem(Widget* _widget, ControllerItem* _item);
void removeItem(Widget* _widget);
const std::string& getCategoryName() const;
private:
void _unlinkWidget(Widget* _widget) override;
void frameEntered(float _time);
void clear();
private:
using PairControllerItem = std::pair<Widget*, ControllerItem*>;
using ListControllerItem = std::list<PairControllerItem>;
ListControllerItem mListItem;
bool mIsInitialise{false};
std::string mCategoryName;
};
} // namespace MyGUI
#endif // MYGUI_CONTROLLER_MANAGER_H_
MyGUI_ActionController.h
MyGUI_ControllerItem.h
MyGUI_IUnlinkWidget.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:112
MyGUI_WidgetDefines.h
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:26
MyGUI::ControllerManager::createItem
ControllerItem * createItem(std::string_view _type)
Definition MyGUI_ControllerManager.cpp:71
MyGUI::ControllerManager::shutdown
void shutdown()
Definition MyGUI_ControllerManager.cpp:45
MyGUI::ControllerManager::getCategoryName
const std::string & getCategoryName() const
Definition MyGUI_ControllerManager.cpp:142
MyGUI::ControllerManager::ControllerManager
ControllerManager(const ControllerManager &)=delete
MyGUI::ControllerManager::removeItem
void removeItem(Widget *_widget)
Definition MyGUI_ControllerManager.cpp:102
MyGUI::ControllerManager::addItem
void addItem(Widget *_widget, ControllerItem *_item)
Definition MyGUI_ControllerManager.cpp:77
MyGUI::ControllerManager::initialise
void initialise()
Definition MyGUI_ControllerManager.cpp:29
MyGUI::IUnlinkWidget
Definition MyGUI_IUnlinkWidget.h:17
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI
Definition MyGUI_ActionController.h:15