示例#1
0
文件: select.cpp 项目: PNCG/neuron
Command* SelectTool::InterpretManipulator (Manipulator* m) {
    DragManip* dm = (DragManip*) m;
    Viewer* viewer = dm->GetViewer();
    GraphicView* views = viewer->GetGraphicView();
    Selection* s = viewer->GetSelection();
    RubberRect* rr = (RubberRect*) dm->GetRubberband();
    Selection* newSel;
    Coord l, b, r, t;

    rr->GetCurrent(l, b, r, t);
    newSel = views->ViewsWithin(l, b, r, t);
    s->Exclusive(newSel);
    delete newSel;

    return nil;
}