[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dia contribution - system modelling sheets - patch#2



larsrc raeder dk wrote:

The main issue about stability remains unfixed but I must have a deeper
look at the code
(probably wrt to evolution of the code I was relying on, mostly in UML
and flowcharts sheets)



Be careful about relying on UML, esp. the Class object, it's broken in
many ways. The flowcharts obejcts are fine, AFAIR.


Hello

I think I found the stability problem: while upgrading the code I overlooked the new
ObjectChange* return in move_handle and move functions.
I change consistently with the box SADT example I am relying
(I am still a "monkey-do-er" for many things in dia).
Even though the return is NULL, the code seems much more stable now.


the patch is attached to this email. It also contain some cleaning of the comment
(especially in the file headers)


next I plan to let the use control properties unrelated with diagram semantics
as suggested.


regards
- christophe




diff -urNbB dia-clean/objects/KAOS/goal.c dia/objects/KAOS/goal.c
--- dia-clean/objects/KAOS/goal.c	2004-06-23 14:34:20.648823048 +0200
+++ dia/objects/KAOS/goal.c	2004-06-23 13:30:10.287166992 +0200
@@ -1,20 +1,3 @@
-/***************************************************************************
-                          goal.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp cetic be
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
@@ -116,10 +99,10 @@
 static real goal_distance_from(Goal *goal, Point *point);
 static void goal_select(Goal *goal, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void goal_move_handle(Goal *goal, Handle *handle,
+static ObjectChange* goal_move_handle(Goal *goal, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void goal_move(Goal *goal, Point *to);
+static ObjectChange* goal_move(Goal *goal, Point *to);
 static void goal_draw(Goal *goal, DiaRenderer *renderer);
 static void goal_update_data(Goal *goal, AnchorShape horix, AnchorShape vert);
 static DiaObject *goal_create(Point *startpoint,
@@ -257,7 +240,7 @@
   element_update_handles(&goal->element);
 }
 
-static void
+static ObjectChange*
 goal_move_handle(Goal *goal, Handle *handle,
 		Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -291,14 +274,16 @@
     break;
   }
   goal_update_data(goal, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 goal_move(Goal *goal, Point *to)
 {
   goal->element.corner = *to;
 
   goal_update_data(goal, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 /* auxialliary computations */
diff -urNbB dia-clean/objects/KAOS/kaos.c dia/objects/KAOS/kaos.c
--- dia-clean/objects/KAOS/kaos.c	2004-06-23 14:34:20.648823048 +0200
+++ dia/objects/KAOS/kaos.c	2004-06-23 13:30:16.728187808 +0200
@@ -1,19 +1,30 @@
-/***************************************************************************
-                          kaos.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing KAOS goal diagrams.
+ * This class supports the whole goal specialization hierarchy
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * Based on SADT box object
+ * Copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
                 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
diff -urNbB dia-clean/objects/KAOS/kaos.h dia/objects/KAOS/kaos.h
--- dia-clean/objects/KAOS/kaos.h	2004-06-23 14:34:20.649822896 +0200
+++ dia/objects/KAOS/kaos.h	2004-06-23 13:30:22.887251488 +0200
@@ -1,19 +1,30 @@
-/***************************************************************************
-                          kaos.h  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing KAOS goal diagrams.
+ * This class supports the whole goal specialization hierarchy
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * Based on SADT box object
+ * Copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #ifndef KAOS_H
 #define KAOS_H
diff -urNbB dia-clean/objects/KAOS/metaandorrel.c dia/objects/KAOS/metaandorrel.c
--- dia-clean/objects/KAOS/metaandorrel.c	2004-06-23 14:34:20.649822896 +0200
+++ dia/objects/KAOS/metaandorrel.c	2004-06-23 13:30:29.916182928 +0200
@@ -1,5 +1,15 @@
 /* Dia -- an diagram creation/manipulation program
- * Copyright (C) 1998, 1999 Alexander Larsson
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing KAOS goal diagrams.
+ * This class supports the whole goal specialization hierarchy
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * Based on SADT box object
+ * Copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -77,10 +87,10 @@
 
 static DiaFont *maor_font = NULL;
 
-static void maor_move_handle(Maor *maor, Handle *handle,
+static ObjectChange* maor_move_handle(Maor *maor, Handle *handle,
 				   Point *to, ConnectionPoint *cp,
 				   HandleMoveReason reason, ModifierKeys modifiers);
-static void maor_move(Maor *maor, Point *to);
+static ObjectChange* maor_move(Maor *maor, Point *to);
 static void maor_select(Maor *maor, Point *clicked_point,
 			      DiaRenderer *interactive_renderer);
 static void maor_draw(Maor *maor, DiaRenderer *renderer);
@@ -211,7 +221,7 @@
   connection_update_handles(&maor->connection);
 }
 
-static void
+static ObjectChange*
 maor_move_handle(Maor *maor, Handle *handle,
 		 Point *to, ConnectionPoint *cp,
 		 HandleMoveReason reason, ModifierKeys modifiers)
@@ -237,9 +247,10 @@
   }
 
   maor_update_data(maor);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 maor_move(Maor *maor, Point *to)
 {
   Point start_to_end;
@@ -258,6 +269,7 @@
   point_add(&maor->text_pos, &delta);
 
   maor_update_data(maor);
+  return NULL;
 }
 
 /* this is replicated from dia_image.c -- bad design -- ask for constructor based on xpm char** */
diff -urNbB dia-clean/objects/KAOS/metabinrel.c dia/objects/KAOS/metabinrel.c
--- dia-clean/objects/KAOS/metabinrel.c	2004-06-23 14:34:20.649822896 +0200
+++ dia/objects/KAOS/metabinrel.c	2004-06-23 13:31:02.418241864 +0200
@@ -1,5 +1,15 @@
 /* Dia -- an diagram creation/manipulation program
- * Copyright (C) 1998, 1999 Alexander Larsson
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing KAOS goal diagrams.
+ * This class supports the whole goal specialization hierarchy
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * Based on SADT box object
+ * Copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -90,10 +100,10 @@
 
 static DiaFont *mbr_font = NULL;
 
-static void mbr_move_handle(Mbr *mbr, Handle *handle,
+static ObjectChange* mbr_move_handle(Mbr *mbr, Handle *handle,
 				   Point *to, ConnectionPoint *cp,
 				   HandleMoveReason reason, ModifierKeys modifiers);
-static void mbr_move(Mbr *mbr, Point *to);
+static ObjectChange* mbr_move(Mbr *mbr, Point *to);
 static void mbr_select(Mbr *mbr, Point *clicked_point,
 			      DiaRenderer *interactive_renderer);
 static void mbr_draw(Mbr *mbr, DiaRenderer *renderer);
@@ -220,7 +230,7 @@
   connection_update_handles(&mbr->connection);
 }
 
-static void
+static ObjectChange*
 mbr_move_handle(Mbr *mbr, Handle *handle,
 		 Point *to, ConnectionPoint *cp,
 		 HandleMoveReason reason, ModifierKeys modifiers)
@@ -246,9 +256,10 @@
   }
 
   mbr_update_data(mbr);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 mbr_move(Mbr *mbr, Point *to)
 {
   Point start_to_end;
@@ -267,6 +278,7 @@
   point_add(&mbr->pm, &delta);
 
   mbr_update_data(mbr);
+  return NULL;
 }
 
 /* this is replicated from dia_image.c -- bad design -- ask for constructor based on xpm char** */
diff -urNbB dia-clean/objects/KAOS/other.c dia/objects/KAOS/other.c
--- dia-clean/objects/KAOS/other.c	2004-06-23 14:34:20.649822896 +0200
+++ dia/objects/KAOS/other.c	2004-06-23 13:31:59.258600816 +0200
@@ -1,26 +1,8 @@
-/***************************************************************************
-                          other.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp cetic be
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
- * Objects for drawing KAOS other diagrams.
- * This class supports all other concepts than goals
- * Actually this only codes an AGENT
+ * Objects for drawing KAOS goal diagrams.
+ * This class supports the whole goal specialization hierarchy
  * Copyright (C) 2002 Christophe Ponsard
  *
  * Based on SADT box object
@@ -109,10 +91,10 @@
 static real other_distance_from(Other *other, Point *point);
 static void other_select(Other *other, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void other_move_handle(Other *other, Handle *handle,
+static ObjectChange* other_move_handle(Other *other, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void other_move(Other *other, Point *to);
+static ObjectChange* other_move(Other *other, Point *to);
 static void other_draw(Other *other, DiaRenderer *renderer);
 static void other_update_data(Other *other, AnchorShape horix, AnchorShape vert);
 static DiaObject *other_create(Point *startpoint,
@@ -251,7 +233,7 @@
   element_update_handles(&other->element);
 }
 
-static void
+static ObjectChange*
 other_move_handle(Other *other, Handle *handle,
 		Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -285,14 +267,16 @@
     break;
   }
   other_update_data(other, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 other_move(Other *other, Point *to)
 {
   other->element.corner = *to;
 
   other_update_data(other, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 static void compute_agent(Other *other, Point *pl) {
diff -urNbB dia-clean/objects/Istar/actor.c dia/objects/Istar/actor.c
--- dia-clean/objects/Istar/actor.c	2004-06-23 14:34:20.645823504 +0200
+++ dia/objects/Istar/actor.c	2004-06-23 13:36:12.623083560 +0200
@@ -84,10 +84,10 @@
 static real actor_distance_from(Actor *actor, Point *point);
 static void actor_select(Actor *actor, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void actor_move_handle(Actor *actor, Handle *handle,
+static ObjectChange* actor_move_handle(Actor *actor, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void actor_move(Actor *actor, Point *to);
+static ObjectChange* actor_move(Actor *actor, Point *to);
 static void actor_draw(Actor *actor, DiaRenderer *renderer);
 static void actor_update_data(Actor *actor, AnchorShape h,AnchorShape v);
 static DiaObject *actor_create(Point *startpoint,
@@ -239,7 +239,7 @@
   element_update_handles(&actor->element);
 }
 
-static void
+static ObjectChange*
 actor_move_handle(Actor *actor, Handle *handle,
 		Point *to, ConnectionPoint *cp, 
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -273,14 +273,16 @@
     break;
   }
   actor_update_data(actor, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 actor_move(Actor *actor, Point *to)
 {
   actor->element.corner = *to;
 
   actor_update_data(actor, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 // drawing stuff */
diff -urNbB dia-clean/objects/Istar/goal.c dia/objects/Istar/goal.c
--- dia-clean/objects/Istar/goal.c	2004-06-23 14:34:20.646823352 +0200
+++ dia/objects/Istar/goal.c	2004-06-23 13:36:54.274751544 +0200
@@ -1,20 +1,3 @@
-/***************************************************************************
-                          goal.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp cetic be
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
@@ -108,10 +91,10 @@
 static real goal_distance_from(Goal *goal, Point *point);
 static void goal_select(Goal *goal, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void goal_move_handle(Goal *goal, Handle *handle,
+static ObjectChange* goal_move_handle(Goal *goal, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void goal_move(Goal *goal, Point *to);
+static ObjectChange* goal_move(Goal *goal, Point *to);
 static void goal_draw(Goal *goal, DiaRenderer *renderer);
 static void goal_update_data(Goal *goal, AnchorShape horix, AnchorShape vert);
 static DiaObject *goal_create(Point *startpoint,
@@ -243,7 +226,7 @@
   element_update_handles(&goal->element);
 }
 
-static void
+static ObjectChange*
 goal_move_handle(Goal *goal, Handle *handle,
 		Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -277,14 +260,16 @@
     break;
   }
   goal_update_data(goal, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 goal_move(Goal *goal, Point *to)
 {
   goal->element.corner = *to;
 
   goal_update_data(goal, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 static void compute_cloud(Goal *goal, BezPoint* bpl) {
diff -urNbB dia-clean/objects/Istar/istar.c dia/objects/Istar/istar.c
--- dia-clean/objects/Istar/istar.c	2004-06-23 14:34:20.646823352 +0200
+++ dia/objects/Istar/istar.c	2004-06-23 13:32:34.132299208 +0200
@@ -1,19 +1,26 @@
-/***************************************************************************
-                          kaos.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing i* actor diagrams.
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * based on Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
                 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
diff -urNbB dia-clean/objects/Istar/istar.h dia/objects/Istar/istar.h
--- dia-clean/objects/Istar/istar.h	2004-06-23 14:34:20.646823352 +0200
+++ dia/objects/Istar/istar.h	2004-06-23 13:32:39.333508504 +0200
@@ -1,19 +1,26 @@
-/***************************************************************************
-                          kaos.h  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Objects for drawing i* actor diagrams.
+ * Copyright (C) 2002 Christophe Ponsard
+ *
+ * based on Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #ifndef ISTAR_H
 #define ISTAR_H
diff -urNbB dia-clean/objects/Istar/link.c dia/objects/Istar/link.c
--- dia-clean/objects/Istar/link.c	2004-06-23 14:34:20.646823352 +0200
+++ dia/objects/Istar/link.c	2004-06-23 13:37:02.216544208 +0200
@@ -1,7 +1,7 @@
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998, 1999 Alexander Larsson
  *
- * Objects for drawing
+ * Objects for drawing i* diagrams
  * This class supports all i* links as decoraterd bezier curves
  * Copyright (C) 2002-2003 Christophe Ponsard
  *
@@ -85,10 +85,10 @@
 
 static DiaFont *link_font = NULL;
 
-static void link_move_handle(Link *link, Handle *handle,
+static ObjectChange* link_move_handle(Link *link, Handle *handle,
 				   Point *to, ConnectionPoint *cp,
 				   HandleMoveReason reason, ModifierKeys modifiers);
-static void link_move(Link *link, Point *to);
+static ObjectChange* link_move(Link *link, Point *to);
 static void link_select(Link *link, Point *clicked_point,
 			      DiaRenderer *interactive_renderer);
 static void link_draw(Link *link, DiaRenderer *renderer);
@@ -216,7 +216,7 @@
   connection_update_handles(&link->connection);
 }
 
-static void
+static ObjectChange*
 link_move_handle(Link *link, Handle *handle,
 		 Point *to, ConnectionPoint *cp, 
 		 HandleMoveReason reason, ModifierKeys modifiers)
@@ -242,9 +242,10 @@
   }
 
   link_update_data(link);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 link_move(Link *link, Point *to)
 {
   Point start_to_end;
@@ -263,6 +264,7 @@
   point_add(&link->pm, &delta);
 
   link_update_data(link);
+  return NULL;
 }
 
 /* this is replicated from dia_image.c -- bad design -- ask for constructor based on xpm char** */
diff -urNbB dia-clean/objects/Istar/other.c dia/objects/Istar/other.c
--- dia-clean/objects/Istar/other.c	2004-06-23 14:34:20.646823352 +0200
+++ dia/objects/Istar/other.c	2004-06-23 13:33:57.219668008 +0200
@@ -1,20 +1,3 @@
-/***************************************************************************
-                          other.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp cetic be
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
@@ -107,10 +90,10 @@
 static real other_distance_from(Other *other, Point *point);
 static void other_select(Other *other, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void other_move_handle(Other *other, Handle *handle,
+static ObjectChange* other_move_handle(Other *other, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void other_move(Other *other, Point *to);
+static ObjectChange* other_move(Other *other, Point *to);
 static void other_draw(Other *other, DiaRenderer *renderer);
 static void other_update_data(Other *other, AnchorShape horix, AnchorShape vert);
 static DiaObject *other_create(Point *startpoint,
@@ -249,7 +232,7 @@
   element_update_handles(&other->element);
 }
 
-static void
+static ObjectChange*
 other_move_handle(Other *other, Handle *handle,
 		Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -283,14 +266,16 @@
     break;
   }
   other_update_data(other, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 other_move(Other *other, Point *to)
 {
   other->element.corner = *to;
 
   other_update_data(other, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 static void compute_task(Other *other, Point *pl) {
diff -urNbB dia-clean/objects/Jackson/domain.c dia/objects/Jackson/domain.c
--- dia-clean/objects/Jackson/domain.c	2004-06-23 14:34:20.647823200 +0200
+++ dia/objects/Jackson/domain.c	2004-06-23 13:28:22.675526448 +0200
@@ -1,20 +1,3 @@
-/***************************************************************************
-                          domain.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp cetic be
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
@@ -134,10 +117,10 @@
 static real jackson_box_distance_from(Box *box, Point *point);
 static void jackson_box_select(Box *box, Point *clicked_point,
 		       DiaRenderer *interactive_renderer);
-static void jackson_box_move_handle(Box *box, Handle *handle,
+static ObjectChange* jackson_box_move_handle(Box *box, Handle *handle,
 			    Point *to, ConnectionPoint *cp,
 			    HandleMoveReason reason, ModifierKeys modifiers);
-static void jackson_box_move(Box *box, Point *to);
+static ObjectChange* jackson_box_move(Box *box, Point *to);
 static void jackson_box_draw(Box *box, DiaRenderer *renderer);
 static void jackson_box_update_data(Box *box, AnchorShape horix, AnchorShape vert);
 static DiaObject *jackson_box_create(Point *startpoint,
@@ -293,7 +276,7 @@
   element_update_handles(&box->element);
 }
 
-static void
+static ObjectChange*
 jackson_box_move_handle(Box *box, Handle *handle,
 		Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -327,14 +310,16 @@
     break;
   }
   jackson_box_update_data(box, horiz, vert);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 jackson_box_move(Box *box, Point *to)
 {
   box->element.corner = *to;
 
   jackson_box_update_data(box, ANCHOR_MIDDLE, ANCHOR_MIDDLE);
+  return NULL;
 }
 
 /* draw method */
diff -urNbB dia-clean/objects/Jackson/jackson.c dia/objects/Jackson/jackson.c
--- dia-clean/objects/Jackson/jackson.c	2004-06-23 14:34:20.647823200 +0200
+++ dia/objects/Jackson/jackson.c	2004-06-23 13:28:40.503816136 +0200
@@ -1,19 +1,29 @@
-/***************************************************************************
-                          kaos.c  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Jackson diagram -  adapted by Christophe Ponsard
+ * This class captures all kind of domains (given, designed, machine)
+ * both for generic problems and for problem frames (ie. with domain kinds)
+ *
+ * based on SADT diagrams copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
                 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
diff -urNbB dia-clean/objects/Jackson/jackson.h dia/objects/Jackson/jackson.h
--- dia-clean/objects/Jackson/jackson.h	2004-06-23 14:34:20.647823200 +0200
+++ dia/objects/Jackson/jackson.h	2004-06-23 13:28:59.173977840 +0200
@@ -1,19 +1,29 @@
-/***************************************************************************
-                          kaos.h  -  description
-                             -------------------
-    begin                : Sat Nov 23 2002
-    copyright            : (C) 2002 by cp
-    email                : cp DELL-FAUST
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
+/* Dia -- an diagram creation/manipulation program
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Jackson diagram -  adapted by Christophe Ponsard
+ * This class captures all kind of domains (given, designed, machine)
+ * both for generic problems and for problem frames (ie. with domain kinds)
+ *
+ * based on SADT diagrams copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #ifndef JACKSON_H
 #define JACKSON_H
diff -urNbB dia-clean/objects/Jackson/phenomenon.c dia/objects/Jackson/phenomenon.c
--- dia-clean/objects/Jackson/phenomenon.c	2004-06-23 14:34:20.647823200 +0200
+++ dia/objects/Jackson/phenomenon.c	2004-06-23 13:29:18.532034968 +0200
@@ -1,5 +1,14 @@
 /* Dia -- an diagram creation/manipulation program
- * Copyright (C) 1998, 1999 Alexander Larsson
+ * Copyright (C) 1998 Alexander Larsson
+ *
+ * Jackson diagram -  adapted by Christophe Ponsard
+ * This class captures all kind of domains (given, designed, machine)
+ * both for generic problems and for problem frames (ie. with domain kinds)
+ *
+ * based on SADT diagrams copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -67,10 +76,10 @@
 
 static DiaFont *message_font = NULL;
 
-static void message_move_handle(Message *message, Handle *handle,
+static ObjectChange* message_move_handle(Message *message, Handle *handle,
 				   Point *to, ConnectionPoint *cp,
 				   HandleMoveReason reason, ModifierKeys modifiers);
-static void message_move(Message *message, Point *to);
+static ObjectChange* message_move(Message *message, Point *to);
 static void message_select(Message *message, Point *clicked_point,
 			      DiaRenderer *interactive_renderer);
 static void message_draw(Message *message, DiaRenderer *renderer);
@@ -192,7 +201,7 @@
   connection_update_handles(&message->connection);
 }
 
-static void
+static ObjectChange*
 message_move_handle(Message *message, Handle *handle,
 		 Point *to, ConnectionPoint *cp,
 		 HandleMoveReason reason, ModifierKeys modifiers)
@@ -218,9 +227,10 @@
   }
 
   message_update_data(message);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 message_move(Message *message, Point *to)
 {
   Point start_to_end;
@@ -239,6 +249,7 @@
   point_add(&message->text_pos, &delta);
 
   message_update_data(message);
+  return NULL;
 }
 
 /* drawing here -- TBD inverse flow ??  */
diff -urNbB dia-clean/objects/Jackson/requirement.c dia/objects/Jackson/requirement.c
--- dia-clean/objects/Jackson/requirement.c	2004-06-23 14:34:20.647823200 +0200
+++ dia/objects/Jackson/requirement.c	2004-06-23 14:58:58.789111568 +0200
@@ -1,6 +1,15 @@
 /* Dia -- an diagram creation/manipulation program
  * Copyright (C) 1998 Alexander Larsson
  *
+ * Jackson diagram -  adapted by Christophe Ponsard
+ * This class captures all kind of domains (given, designed, machine)
+ * both for generic problems and for problem frames (ie. with domain kinds)
+ *
+ * based on SADT diagrams copyright (C) 2000, 2001 Cyrille Chepelov
+ *
+ * Forked from Flowchart toolbox -- objects for drawing flowcharts.
+ * Copyright (C) 1999 James Henstridge.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -72,10 +81,10 @@
 static real req_distance_from(Requirement *req, Point *point);
 static void req_select(Requirement *req, Point *clicked_point,
 			   DiaRenderer *interactive_renderer);
-static void req_move_handle(Requirement *req, Handle *handle,
+static ObjectChange* req_move_handle(Requirement *req, Handle *handle,
 				Point *to, ConnectionPoint *cp,
 				HandleMoveReason reason, ModifierKeys modifiers);
-static void req_move(Requirement *req, Point *to);
+static ObjectChange* req_move(Requirement *req, Point *to);
 static void req_draw(Requirement *req, DiaRenderer *renderer);
 static DiaObject *req_create(Point *startpoint,
 			      void *user_data,
@@ -189,7 +198,7 @@
   element_update_handles(&req->element);
 }
 
-static void
+static ObjectChange* 
 req_move_handle(Requirement *req, Handle *handle,
                 Point *to, ConnectionPoint *cp,
 		HandleMoveReason reason, ModifierKeys modifiers)
@@ -199,9 +208,10 @@
   assert(to!=NULL);
 
   assert(handle->id < 8);
+  return NULL;
 }
 
-static void
+static ObjectChange*
 req_move(Requirement *req, Point *to)
 {
   real h;
@@ -219,6 +229,7 @@
   }
   text_set_position(req->text, &p);
   req_update_data(req);
+  return NULL;
 }
 
 /** draw is here */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK