当前位置: 首页>>代码示例>>C++>>正文


C++ Selection::Exclusive方法代码示例

本文整理汇总了C++中Selection::Exclusive方法的典型用法代码示例。如果您正苦于以下问题:C++ Selection::Exclusive方法的具体用法?C++ Selection::Exclusive怎么用?C++ Selection::Exclusive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Selection的用法示例。


在下文中一共展示了Selection::Exclusive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreateManipulator

Manipulator* AttributeTool::CreateManipulator (
    Viewer* v, Event& e, Transformer* rel
) {
    Manipulator* m = nil;
    GraphicView* views = v->GetGraphicView();
    Selection* s = v->GetSelection(), *newSel;

    newSel = views->ViewIntersecting(e.x-SLOP, e.y-SLOP, e.x+SLOP, e.y+SLOP);
    if (e.shift) {
        Localize(s, v);
    } else {
	s->Clear();
    }
    if (newSel->IsEmpty()) {		// do nothing
    } else {				// else user selected object directly
	s->Exclusive(newSel);
    }
    delete newSel;

    if (s->Number() == 1) {
	Iterator i;
	s->First(i);
	GraphicView* view = s->GetView(i);
	if (view->IsA(OVERLAY_VIEW)) {
            ((OverlayEditor*)v->GetEditor())->MouseDocObservable()->textvalue("");
	    ((OverlayEditor*)v->GetEditor())->AttrEdit(((OverlayView*)view)->GetOverlayComp());
            ((OverlayEditor*)v->GetEditor())->MouseDocObservable()->textvalue(OverlayKit::mouse_attr);
        }
    }
    return m;
}
开发者ID:barak,项目名称:ivtools-cvs,代码行数:31,代码来源:attrtool.c

示例2: InterpretManipulator

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;
}
开发者ID:PNCG,项目名称:neuron,代码行数:16,代码来源:select.cpp

示例3: CreateManipulator

Manipulator* SelectTool::CreateManipulator (
    Viewer* v, Event& e, Transformer* rel
) {
    Manipulator* m = nil;
    GraphicView* views = v->GetGraphicView();
    Selection* s = v->GetSelection(), *newSel;

    newSel = views->ViewIntersecting(e.x-SLOP, e.y-SLOP, e.x+SLOP, e.y+SLOP);
    if (e.shift) {
        Localize(s, v);
    } else {
	s->Clear();
    }
    if (newSel->IsEmpty()) {		// select w/RubberRect if nothing hit
	m = new DragManip(v, new RubberRect(nil,nil, e.x,e.y,e.x,e.y), rel);
    } else {				// else user selected object directly
	s->Exclusive(newSel);
    }
    delete newSel;
    return m;
}
开发者ID:PNCG,项目名称:neuron,代码行数:21,代码来源:select.cpp


注:本文中的Selection::Exclusive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。