Exemplo n.º 1
0
void MouseController::shiftOver(View * n)
{
    RefPtr<View> target;
    target.reset(n);
    if (over_ != target)
    {
        EventDispatcher dispatcher;
        EventDispatcher::Path old_path;
        EventDispatcher::GetPath(over_.get(), old_path);
        EventDispatcher::Path new_path;
        EventDispatcher::GetPath(n, new_path);
        if (over_)
        {
            Point empty;
            MouseEvent me(kET_MOUSE_LEAVE, kMB_NONE, over_.get(), empty, empty, 0);
            dispatcher.run(me, old_path);
        }
        over_ = target;
        root_->setCursor(::LoadImage(NULL, IDC_ARROW, IMAGE_CURSOR, 0, 0, LR_SHARED));
        if (over_)
        {
            Point empty;
            MouseEvent me(kET_MOUSE_ENTER, kMB_NONE, over_.get(), empty, empty, 0);
            dispatcher.run(me, new_path);
        }
    }
}
Exemplo n.º 2
0
// loop
void loop() {
    // call the event generating functions
    timeManager(&q);
    USBReadManager(&q);
    analogManager(&q);

    // get events from the queue and call the
    // registered function(s)
    disp.run();
}