本文整理汇总了C++中Viewer::GetGraphicView方法的典型用法代码示例。如果您正苦于以下问题:C++ Viewer::GetGraphicView方法的具体用法?C++ Viewer::GetGraphicView怎么用?C++ Viewer::GetGraphicView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Viewer
的用法示例。
在下文中一共展示了Viewer::GetGraphicView方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DetachComponentViews
static void DetachComponentViews (Editor* ed) {
int i = 0;
Viewer* viewer;
Component* comp = ed->GetComponent();
if (comp != nil) {
while ((viewer = ed->GetViewer(i++)) != nil) {
GraphicView* gv = viewer->GetGraphicView();
comp->Detach(gv);
}
}
}
示例2: SelectViewsOf
void OverlaysComp::SelectViewsOf (OverlayComp* comp, Editor* ed) {
Selection* s = ed->GetSelection();
s->Clear();
Viewer* viewer;
for (int i = 0; (viewer = ed->GetViewer(i)) != nil; ++i) {
GraphicView* views = viewer->GetGraphicView();
GraphicView* view = views->GetGraphicView(comp);
if (view != nil) s->Append(view);
}
}
示例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;
}
示例4: SelectClipboard
void OverlaysComp::SelectClipboard (Clipboard* cb, Editor* ed) {
Selection* s = ed->GetSelection();
s->Clear();
Viewer* viewer;
Iterator i;
for (int j = 0; (viewer = ed->GetViewer(j)) != nil; ++j) {
for (cb->First(i); !cb->Done(i); cb->Next(i)) {
GraphicView* views = viewer->GetGraphicView();
GraphicView* view = views->GetGraphicView(cb->GetComp(i));
if (view != nil) s->Append(view);
}
}
((OverlaySelection*)s)->Reserve();
}
示例5: InterpLinkCompManip
Command* LinkView::InterpLinkCompManip (Manipulator* m) {
Viewer* v = m->GetViewer();
Editor* ed = v->GetEditor();
GraphicView* views = v->GetGraphicView();
BrushVar* brVar = (BrushVar*) ed->GetState("BrushVar");
ConnectManip* cm = (ConnectManip*) m;
Transformer* rel = cm->GetTransformer();
RubberGroup* rg = (RubberGroup*) cm->GetRubberband();
RubberLine* rl = (RubberLine*) rg->First();
Coord x0, y0, x1, y1;
Connector* c1, *c2;
ConnectorView* target1, *target2;
MacroCmd* macro = new MacroCmd(ed);
rl->GetCurrent(x0, y0, x1, y1);
if (rel != nil) {
rel = new Transformer(rel);
rel->Invert();
}
Graphic* pg = GetGraphicComp()->GetGraphic();
Line* line = new Line(x0, y0, x1, y1, pg);
if (brVar != nil) line->SetBrush(brVar->GetBrush());
line->SetTransformer(rel);
Unref(rel);
LinkComp* linkComp = NewSubject(line);
linkComp->GetConnectors(c1, c2);
macro->Append(new PasteCmd(ed, new Clipboard(linkComp)));
target1 = views->ConnectorIntersecting(x0-SLOP, y0-SLOP, x0+SLOP, y0+SLOP);
target2 = views->ConnectorIntersecting(x1-SLOP, y1-SLOP, x1+SLOP, y1+SLOP);
if (target1 != nil) {
macro->Append(new ConnectCmd(ed, c1, target1->GetConnector()));
}
if (target2 != nil) {
macro->Append(new ConnectCmd(ed, c2, target2->GetConnector()));
}
return macro;
}