本文整理汇总了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;
}
示例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;
}
示例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;
}