⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mousemotionlistener.cpp

📁 使用stl技术,(还没看,是听说的)
💻 CPP
字号:
#ifdef HAVE_CONFIG_H
#   include "config.h"
#endif
  
#include "OgrePythonLink.h"
#include "OgreEventListeners.h"
  
using namespace boost::python;
using namespace Ogre;

class pythonMouseMotionListener : public MouseMotionListener
{
public:
    pythonMouseMotionListener(PyObject* self_) : self(self_)
    { }

    void mouseMoved(MouseEvent* e)
    { return call_method<void>(self, "mouseMoved", e); }
    void mouseDragged(MouseEvent* e)
    { return call_method<void>(self, "mouseDragged", e); }
private:
    PyObject* self;
};

void exportMouseMotionListener()
{
    class_<MouseMotionListener, pythonMouseMotionListener, boost::noncopyable>(
        "MouseMotionListener", no_init);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -