예제 #1
0
 protected virtual void OnFigureInvalidated(FigureEventArgs e)
 {
     if (FigureInvalidated != null)
     {
         FigureInvalidated(this, e);
     }
 }
예제 #2
0
 protected virtual void OnFigureChanged(FigureEventArgs e)
 {
     if (FigureChanged != null)
     {
         FigureChanged(this, e);
     }
 }
예제 #3
0
 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);
         }
     });
 }
예제 #4
0
        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);
			}
		}
예제 #6
0
		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);
 }
예제 #12
0
 protected override void OnFigureChanged(FigureEventArgs e)
 {
     base.OnFigureChanged (e);
     MoveTextFigures ();
 }
예제 #13
0
 protected virtual void OnFigureInvalidated(FigureEventArgs e)
 {
     var handler = FigureInvalidated;
     if (handler != null)
         handler (this, e);
 }
예제 #14
0
        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));
 }
예제 #18
0
 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);
 }
예제 #21
0
 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 ();
 }
예제 #27
0
 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));
            }
        }
예제 #29
0
 protected override void OnFigureChanged(FigureEventArgs e)
 {
     classname.MoveTo(DisplayBox.X, DisplayBox.Y);
 }