class EE::Scene::EventDispatcher

#include <eventdispatcher.hpp>

class EventDispatcher {
public:
    // typedefs

    typedef std::function<void(const Uint32&cbId, Node*focus, Node*focusLoss)> FocusCallback;

    // construction

    EventDispatcher(SceneNode* sceneNode);
    virtual ~EventDispatcher();

    // methods

    static EventDispatcher* New(SceneNode* sceneNode);
    virtual void update(const Time& elapsed);
    Input* getInput() const;
    Node* getFocusNode() const;
    void setFocusNode(Node* node, NodeFocusReason reason = NodeFocusReason::Unknown);
    Node* getMouseOverNode() const;
    void setMouseOverNode(Node* node);
    Node* getMouseDownNode() const;
    void resetMouseDownNode();
    Node* getLossFocusNode() const;
    void sendMsg(Node* node, const Uint32& Msg, const Uint32& Flags = 0);
    void sendTextInput(const Uint32& textChar, const Uint32& timestamp);
    void sendTextEditing(const String& text, const Int32& start, const Int32& length);
    void sendKeyUp(const Keycode& keyCode, const Scancode& scancode, const Uint32& chr, const Uint32& mod);
    void sendKeyDown(const Keycode& keyCode, const Scancode& scancode, const Uint32& chr, const Uint32& mod);
    void sendMouseClick(Node* toNode, const Vector2i& pos, const Uint32 flags);
    void sendMouseUp(Node* toNode, const Vector2i& pos, const Uint32 flags);
    void sendMouseDown(Node* toNode, const Vector2i& pos, const Uint32 flags);
    void sendMouseWheel(const Vector2f& offset, bool flipped);
    const Uint32& getPressTrigger() const;
    const Uint32& getLastPressTrigger() const;
    const Uint32& getClickTrigger() const;
    const Uint32& getDoubleClickTrigger() const;
    const Uint32& getReleaseTrigger() const;
    bool justPressTriggered(Uint32 flag);
    void setNodeDragging(Node* dragging);
    bool isNodeDragging() const;
    bool wasNodeDragging() const;
    bool isOrWasNodeDragging() const;
    Vector2i getMousePos();
    Vector2f getMousePosf();
    Vector2i getMouseDownPos();
    Vector2f getLastMousePos();
    SceneNode* getSceneNode() const;
    const Time& getLastFrameTime() const;
    Node* getNodeDragging() const;
    Node* getNodeWasDragging() const;
    bool getDisableMousePress() const;
    void setDisableMousePress(bool disableMousePress);
    Uint32 addFocusEventCallback(const FocusCallback& cb);
    bool removeFocusEventCallback(const Uint32& cbId);
    Node* getLastFocusNode() const;
    void setLastFocusNode(Node* lastFocusNode);
};