1 /* 2 * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #include <goocanvas.h> 20 #include "browser-canvas-table.h" 21 22 G_BEGIN_DECLS 23 24 enum { 25 CANVAS_SHAPE_EXT_JOIN_OUTER_1 = 1 << 0, 26 CANVAS_SHAPE_EXT_JOIN_OUTER_2 = 1 << 1 27 }; 28 29 typedef struct { 30 gchar *id; 31 GooCanvasItem *item; 32 gboolean _used; 33 gboolean is_new; 34 } BrowserCanvasCanvasShape; 35 36 GSList *browser_canvas_util_compute_anchor_shapes (GooCanvasItem *parent, GSList *shapes, 37 BrowserCanvasTable *fk_ent, BrowserCanvasTable *ref_pk_ent, 38 guint nb_anchors, guint ext, gboolean with_handle); 39 GSList *browser_canvas_util_compute_connect_shapes (GooCanvasItem *parent, GSList *shapes, 40 BrowserCanvasTable *ent1, GdaMetaTableColumn *field1, 41 BrowserCanvasTable *ent2, GdaMetaTableColumn *field2, 42 guint nb_connect, guint ext); 43 44 void browser_canvas_canvas_shapes_dump (GSList *list); 45 void browser_canvas_canvas_shapes_remove_all (GSList *list); 46 GSList *browser_canvas_canvas_shapes_remove_obsolete_shapes (GSList *list); 47 48 #define BROWSER_CANVAS_CANVAS_SHAPE(x) ((BrowserCanvasCanvasShape *)(x)) 49 50 G_END_DECLS 51