geode/loader/include/Geode/cocos/robtop/mouse_dispatcher/CCMouseDispatcher.h

39 lines
729 B
C
Raw Normal View History

2022-07-30 12:24:03 -04:00
#ifndef __CCMOUSE_DISPATCHER_H__
#define __CCMOUSE_DISPATCHER_H__
#include "CCMouseDelegate.h"
#include "../../cocoa/CCArray.h"
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
NS_CC_BEGIN
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
// @note RobTop Addition
class CC_DLL CCMouseDispatcher : public CCObject
{
GEODE_FRIEND_MODIFY
public:
CCMouseDispatcher();
virtual ~CCMouseDispatcher();
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
void addDelegate(CCMouseDelegate* pDelegate);
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
void removeDelegate(CCMouseDelegate* pDelegate);
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
void forceAddDelegate(CCMouseDelegate* pDelegate);
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
void forceRemoveDelegate(CCMouseDelegate* pDelegate);
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
bool dispatchScrollMSG(float x, float y);
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
protected:
CCArray* m_pMouseHandlers;
bool m_bLocked;
bool m_bToAdd;
bool m_bToRemove;
ccCArray* m_pHandlersToAdd;
ccCArray* m_pHandlersToRemove;
};
2022-07-30 12:24:03 -04:00
2024-06-20 08:19:43 -04:00
NS_CC_END
2022-07-30 12:24:03 -04:00
#endif