protected virtual void OnFigureInvalidated(FigureEventArgs e) { if (FigureInvalidated != null) { FigureInvalidated(this, e); } }
protected virtual void OnFigureChanged(FigureEventArgs e) { if (FigureChanged != null) { FigureChanged(this, e); } }
protected virtual void OnFigureInvalidated(FigureEventArgs e) { //assure that invalidation and then drawing is done using GTK+ main loop thread to avoid any threading problems Gtk.Application.Invoke(delegate { if (FigureInvalidated != null) { FigureInvalidated(this, e); } }); }
protected override void OnFigureChanged(FigureEventArgs e) { base.OnFigureChanged(e); if (_text != null) { double x = DisplayBox.X + DisplayBox.Width/2 - _text.DisplayBox.Width/2; double y = DisplayBox.Y + DisplayBox.Height/2 - _text.DisplayBox.Height/2; _text.MoveTo(x, y); } }
protected virtual void OnFigureChanged (FigureEventArgs e) { if (FigureChanged != null) { FigureChanged (this, e); } }
protected void FigureChangedHandler (object sender, FigureEventArgs args) { CalculateDimensions(); }
private void OnFigureChanged(object sender, FigureEventArgs args) { if (_displayBox.Contains (args.Rectangle)) return; _displayBox.Add (args.Rectangle); OnSizeAllocated (); }
protected virtual void OnFigureInvalidated (FigureEventArgs e) { if (FigureInvalidated != null) { FigureInvalidated (this, e); } }
protected void OnCreatedHandler(object o, FigureEventArgs e) { Add (e.Figure); Figure last = Children.FirstOrDefault (); if (last == null) return; RectangleD rect = last.DisplayBox; rect.Inflate (25 + e.Figure.DisplayBox.Width, 25 + e.Figure.DisplayBox.Height); if (rect.X2 < BasicDisplayBox.X2 + 100) e.Figure.MoveTo (rect.X2, rect.Y); else e.Figure.MoveTo (rect.Y2 + 25, 0); }
void OnFigureRemovedInheritanceHandler(object o, FigureEventArgs e) { var cf = e.Figure as ClassFigure; if (cf != null) { var toRemove = new List<InheritanceLine> (); var lines = Children .OfType<InheritanceLine> () .Where (l => l.StartFigure == e.Figure || l.EndFigure == e.Figure); foreach (var line in lines) { toRemove.Add (line); } toRemove.ForEach (line => Remove (line)); } }
protected override sealed void OnChildRemoved(FigureEventArgs e) { e.Figure.FigureChanged -= OnChildChanged; CalculateDimensions (); base.OnChildRemoved (e); }
protected override void OnFigureChanged(FigureEventArgs e) { base.OnFigureChanged (e); MoveTextFigures (); }
protected virtual void OnFigureInvalidated(FigureEventArgs e) { var handler = FigureInvalidated; if (handler != null) handler (this, e); }
protected override void OnFigureChanged(FigureEventArgs e) { base.OnFigureChanged(e); if (_name != null) { UpdateNamePosition(); } }
protected virtual void OnFigureInvalidated (FigureEventArgs e) { //assure that invalidation and then drawing is done using GTK+ main loop thread to avoid any threading problems Gtk.Application.Invoke(delegate { if (FigureInvalidated != null) { FigureInvalidated (this, e); } }); }
protected virtual void OnChildRemoved(FigureEventArgs e) { var handler = ChildRemoved; if (handler != null) handler (this, e); }
protected virtual void OnChildInvalidated(object sender, FigureEventArgs args) { OnFigureInvalidated (new FigureEventArgs (this, args.Rectangle)); }
protected virtual void FigureInvalidatedHandler(object sender, FigureEventArgs args) { OnFigureInvalidated(new FigureEventArgs(this, args.Rectangle)); }
protected override void FigureInvalidatedHandler (object sender, FigureEventArgs args) { OnDrawingInvalidated (new DrawingEventArgs (this, args.Rectangle)); }
protected void OnCreated(FigureEventArgs e) { var handler = CreatedFigure; if (handler != null) handler (e.Figure, e); }
protected void FigureChangedHandler(object sender, FigureEventArgs args) { CalculateDimensions(); }
void OnFigureAddedInheritanceHandler(object o, FigureEventArgs e) { var cf = e.Figure as ClassFigure; if (cf != null) { BaseInheritanceLineFromDiagram (cf); DerivedInheritanceLinesFromDiagram (cf); } }
protected void OnChildChanged(object sender, FigureEventArgs args) { CalculateDimensions (); }
private void FigureChangedHandler (object sender, FigureEventArgs args) { if (_displayBox.Contains (args.Rectangle)) { return; } _displayBox.Add (args.Rectangle); //OnSizeAllocated (); }
protected override sealed void OnChildRemoved(FigureEventArgs e) { var handler = FigureRemoved; e.Figure.FigureChanged -= OnFigureChanged; if (handler != null) handler (this, e); RecalculateDisplayBox (); }
private void FigureChangedHandler(object sender, FigureEventArgs args) { UpdateConnection (); }
private void FigureChangedHandler(object sender, FigureEventArgs args) { UpdateConnection(); }
//todo: avoid same effort of BasicMoveBy and OnfigureChanged protected override void OnFigureChanged(FigureEventArgs e) { base.OnFigureChanged (e); //Arrange position for table title and columns _tableName.MoveTo (DisplayBox.X + 2, DisplayBox.Y - 2); double y = 0.0; foreach (AbstractColumnFigure col in _tableModel.columns) { y += col.BasicDisplayBox.Height - 4; col.MoveTo ((DisplayBox.X + 5 + iconsWidth), (DisplayBox.Y + y)); } //Arrange position for Indexes y = calcIndexLabelHeightPos (); _indexLabel.MoveTo ((DisplayBox.X + 20), (DisplayBox.Y + y - 2)); foreach (Index indx in _tableModel.indexes) { y += indx.BasicDisplayBox.Height - 4; indx.MoveTo ((DisplayBox.X + 5), (DisplayBox.Y + y)); } //Arrange position for Triggers y = calcTriggerLabelHeightPos (); _triggerLabel.MoveTo ((DisplayBox.X + 20), (DisplayBox.Y + y - 2)); foreach (Trigger trg in _tableModel.triggers) { y += trg.BasicDisplayBox.Height - 4; trg.MoveTo ((DisplayBox.X + 5), (DisplayBox.Y + y)); } }
protected override void OnFigureChanged(FigureEventArgs e) { classname.MoveTo(DisplayBox.X, DisplayBox.Y); }