本文整理汇总了C++中Viewer::GetSelection方法的典型用法代码示例。如果您正苦于以下问题:C++ Viewer::GetSelection方法的具体用法?C++ Viewer::GetSelection怎么用?C++ Viewer::GetSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Viewer
的用法示例。
在下文中一共展示了Viewer::GetSelection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Grasp
void TextManip::Grasp (Event& e) {
_grasp_e = e;
Viewer* v = GetViewer();
Selection* s = v->GetSelection();
v->Constrain(e.x, e.y);
_selecting = true;
if (!_prepositioned) {
_xpos = e.x;
_ypos = e.y;
}
PlaceTextDisplay(_xpos, _ypos);
Coord l, b, r, t;
_display->CaretStyle(BarCaret);
_display->Bounds(l, b, r, t);
_display->Redraw(l, b, r, t);
_selection = new Selection(s);
s->Clear();
if (_prepositioned) {
Select(Locate(e.x, e.y));
}
}
示例2: Effect
void TextManip::Effect (Event& e) {
Viewer* v = GetViewer();
_display->CaretStyle(NoCaret);
Select(0);
v->GetSelection()->Merge(_selection);
v->UnRead(e);
v->IncurTextDisplayDamage(_display, _painter);
delete _selection;
}
示例3: 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;
}