Play-/Source/ui_win32/CommandSink.h
2018-04-30 21:01:23 +01:00

26 lines
442 B
C++

#ifndef _COMMANDSINK_H_
#define _COMMANDSINK_H_
#include "win32/Window.h"
#include <map>
#include <boost/function.hpp>
class CCommandSink
{
public:
typedef boost::function<long()> CallbackType;
CCommandSink();
virtual ~CCommandSink();
void RegisterCallback(HWND, CallbackType);
long OnCommand(unsigned short, unsigned short, HWND);
private:
typedef std::map<HWND, CallbackType> CallbackList;
CallbackList m_Callbacks;
};
#endif