<commit_before>//
//  poEventCenter.cpp
//  BasicTest
//
//  Created by <NAME> on 3/17/14.
//
//
#include "cinder/app/Window.h"

#include "poEventCenter.h"
#include "poScene.h"


namespace po {
    //------------------------------------------------------------------
    EventCenterRef EventCenter::create() {
        return EventCenterRef(new EventCenter());
    }
    
    EventCenter::EventCenter()
    : mOffset(0,0)
    {
        //Connect mouse events
//        ci::app::getWindow()->connectMouseDown(&EventCenter::mouseDown,   this);
//        ci::app::getWindow()->connectMouseMove(&EventCenter::mouseMove,   this);
//        ci::app::getWindow()->connectMouseDrag(&EventCenter::mouseDrag,   this);
//        ci::app::getWindow()->connectMouseUp(&EventCenter::mouseUp,       this);
//        ci::app::getWindow()->connectMouseWheel(&EventCenter::mouseWheel, this);
        
        ci::app::getWindow()->connectTouchesBegan(&EventCenter::touchesBegan, this);
        ci::app::getWindow()->connectTouchesMoved(&EventCenter::touchesMoved, this);
        ci::app::getWindow()->connectTouchesEnded(&EventCenter::touchesEnded, this);
        
        ci::app::getWindow()->connectKeyDown(&EventCenter::keyDown, this);
        ci::app::getWindow()->connectKeyUp(&EventCenter::keyUp,     this);
    }
    
    void EventCenter::setInteractionOffset(ci::Vec2f offset)
    {
        mOffset = offset;
    }
    
    //Process all the event queues for this scene
    void EventCenter::processEvents(std::vector<NodeRef> &nodes)
    {
        //Sort nodes to be top down<commit_msg>Accidentally disabled mouse events in last commit-need to create an interface for doing this externally<commit_after>//
//  poEventCenter.cpp
//  BasicTest
//
//  Created by <NAME> on 3/17/14.
//
//
#include "cinder/app/Window.h"

#include "poEventCenter.h"
#include "poScene.h"


namespace po {
    //------------------------------------------------------------------
    EventCenterRef EventCenter::create() {
        return EventCenterRef(new EventCenter());
    }
    
    EventCenter::EventCenter()
    : mOffset(0,0)
    {
        //Connect mouse events
        ci::app::getWindow()->connectMouseDown(&EventCenter::mouseDown,   this);
        ci::app::getWindow()->connectMouseMove(&EventCenter::mouseMove,   this);
        ci::app::getWindow()->connectMouseDrag(&EventCenter::mouseDrag,   this);
        ci::app::getWindow()->connectMouseUp(&EventCenter::mouseUp,       this);
        ci::app::getWindow()->connectMouseWheel(&EventCenter::mouseWheel, this);
        
        ci::app::getWindow()->connectTouchesBegan(&EventCenter::touchesBegan, this);
        ci::app::getWindow()->connectTouchesMoved(&EventCenter::touchesMoved, this);
        ci::app::getWindow()->connectTouchesEnded(&EventCenter::touchesEnded, this);
        
        ci::app::getWindow()->connectKeyDown(&EventCenter::keyDown, this);
        ci::app::getWindow()->connectKeyUp(&EventCenter::keyUp,     this);
    }
    
    void EventCenter::setInteractionOffset(ci::Vec2f offset)
    {
        mOffset = offset;
    }
    
    //Process all the event queues for this scene
    void EventCenter::processEvents(std::vector<NodeRef> &nodes)
    {
        //Sort nodes to be top down
{'fraction_non_alphanumeric': 0.19054972205064855, 'fraction_numerical': 0.004941321803582459, 'mean_word_length': 2.8286052009456264, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4414513', 'n_tokens_mistral': 955, 'n_tokens_neox': 940, 'n_words': 149}