public DiagramContextMenu(DiagramView view) { this._View = null; if (view == null) { throw new ArgumentNullException("view"); } this._View = view; }
public ToolPanning(DiagramView v) : base(v) { this.myAutoPan = true; this.myModal = false; this.myActive = false; this.myOriginSet = false; this.myOrigin = new Point(); this.myPaintHandler = null; }
public ToolResizing(DiagramView v) : base(v) { this.myMinimumSize = new SizeF(1f, 1f); this.myMaximumSize = new SizeF(1E+21f, 1E+21f); this.myHidesSelectionHandles = true; this.myResizeHandle = null; this.mySelectionHidden = false; this.mySelectedObject = null; }
protected DiagramTool(DiagramView view) { this.myView = null; this.myDragSize = SystemInformation.DragSize; this.myStopTransactionName = null; this.myCurrentObject = null; if (view == null) { throw new ArgumentNullException("view"); } this.myView = view; }
public DiagramSelection(DiagramView view) { this.myView = null; this.myObjTable = new Hashtable(); this.myHotSpot = new SizeF(); this.myHandles = null; this.myBoundingHandlePen = null; this.myResizeHandlePen = null; this.myResizeHandlePenColor = Color.Black; this.myResizeHandleBrush = null; this.myFocused = true; this.myView = view; }
public ToolDragging(DiagramView v) : base(v) { this.myCopiesEffectiveSelection = false; this.myHidesSelectionHandles = true; this.myEffectiveSelection = null; this.myDragSelection = null; this.myDragSelectionOrigObj = null; this.myMoveOffset = new SizeF(); this.mySelectionHidden = false; this.myModalDropped = false; this.mySelectionSet = false; }
protected ToolLinking(DiagramView v) : base(v) { this.myForwardsOnly = false; this.myOrthogonal = false; this.myOrthogonalSet = false; this.myLinkingNew = true; this.myForwards = true; this.myOrigStartPort = null; this.myOrigEndPort = null; this.myTempStartPort = null; this.myTempEndPort = null; this.myTempLink = null; this.myValidPortsCache = new Hashtable(); }
public ToolRubberBanding(DiagramView v) : base(v) { this.myModal = false; this.myAutoScrolling = false; }
internal void Dispose(DiagramView view) { Rectangle rectangle1 = view.myPaintEventArgs.ClipRectangle; view.myGraphics.DrawImage(view.myBuffer, rectangle1, rectangle1, GraphicsUnit.Pixel); if ((this.myBrush.Color.B & 7) < 4) { view.myGraphics.DrawString(DiagramViewLicenseProvider.GONAME + ", for evaluation only\r\nNorthwoods Software\r\nwww.nwoods.com", this.myFont, this.myBrush, (float)10f, (float)10f); } }
public static RectangleF ComputeBounds(Shapes.IDiagramShapeCollection coll, DiagramView view) { bool flag1 = false; float single1 = 0f; float single2 = 0f; float single3 = 0f; float single4 = 0f; bool flag2 = (view != null) ? view.IsPrinting : false; foreach (Shapes.DiagramShape obj1 in coll) { if (flag2 ? !obj1.CanPrint() : !obj1.CanView()) { continue; } RectangleF ef1 = obj1.Bounds; RectangleF ef2 = obj1.ExpandPaintBounds(ef1, view); if (!flag1) { flag1 = true; single1 = ef2.X; single2 = ef2.Y; single3 = ef2.X + ef2.Width; single4 = ef2.Y + ef2.Height; continue; } if (ef2.X < single1) { single1 = ef2.X; } if (ef2.Y < single2) { single2 = ef2.Y; } if ((ef2.X + ef2.Width) > single3) { single3 = ef2.X + ef2.Width; } if ((ef2.Y + ef2.Height) > single4) { single4 = ef2.Y + ef2.Height; } } if (flag1) { return new RectangleF(single1, single2, single3 - single1, single4 - single2); } return new RectangleF(); }
public ToolContext(DiagramView v) : base(v) { this.myBackgroundContextMenu = null; this.mySingleSelection = true; }
public ToolZooming(DiagramView v) : base(v) { this.myZoomedView = v; }
public ToolLinkingNew(DiagramView v) : base(v) { }
public void Paint(Graphics g, DiagramView view, RectangleF clipRect) { bool flag1 = view.IsPrinting; if (!(flag1 ? !this.CanPrintObjects() : !this.CanViewObjects())) { RectangleF ef1 = view.DocExtent; GoLayerCache cache1 = this.FindCache(view); if ((cache1 != null) && (cache1.Rect == ef1)) { foreach (Shapes.DiagramShape obj1 in cache1.Objects) { if (!(flag1 ? obj1.CanPrint() : obj1.CanView())) { continue; } RectangleF ef2 = obj1.Bounds; ef2 = obj1.ExpandPaintBounds(ef2, view); if (Shapes.DiagramShape.IntersectsRect(ef2, clipRect)) { obj1.Paint(g, view); } } } else { LayerEnumerator enumerator2; if (this.CacheWanted(view)) { if (cache1 == null) { cache1 = new GoLayerCache(view); this.Caches.Add(cache1); } else { cache1.Reset(); } cache1.Rect = ef1; enumerator2 = this.GetEnumerator(); while (enumerator2.MoveNext()) { Shapes.DiagramShape obj2 = enumerator2.Current; RectangleF ef3 = obj2.Bounds; ef3 = obj2.ExpandPaintBounds(ef3, view); if ((flag1 ? obj2.CanPrint() : obj2.CanView()) && Shapes.DiagramShape.IntersectsRect(ef3, clipRect)) { obj2.Paint(g, view); } if (Shapes.DiagramShape.IntersectsRect(ef3, ef1)) { cache1.Objects.Add(obj2); } } } else { enumerator2 = this.GetEnumerator(); while (enumerator2.MoveNext()) { Shapes.DiagramShape obj3 = enumerator2.Current; if (flag1 ? obj3.CanPrint() : obj3.CanView()) { RectangleF ef4 = obj3.Bounds; ef4 = obj3.ExpandPaintBounds(ef4, view); if (Shapes.DiagramShape.IntersectsRect(ef4, clipRect)) { obj3.Paint(g, view); } } } } } } }
internal GoLayerCache FindCache(DiagramView view) { foreach (GoLayerCache cache1 in this.Caches) { if (cache1.View == view) { return cache1; } } return null; }
private bool CacheWanted(DiagramView view) { if (this.IsInDocument && DiagramDocument.myCaching) { return !view.IsPrinting; } return false; }
internal GoLayerCache(DiagramView view) { this.myView = null; this.myObjects = null; this.myRect = new RectangleF(0f, 0f, 0f, 0f); this.myStrokes = null; this.myView = view; this.myObjects = new ArrayList(); this.myStrokes = new ArrayList(); }
public virtual Shapes.OverviewRectangleGraph CreateOverviewRectangle(DiagramView observed) { return new Shapes.OverviewRectangleGraph(); }
public ToolAction(DiagramView v) : base(v) { this.myActionObject = null; }