1 /* Dynamic container for connection points -*- c -*-
2 * Copyright(C) 2000 Cyrille Chepelov
4 * Connection point line is a helper struct, to hold a few connection points
5 * on a line segment. There can be a variable number of these connection
6 * points. The user should be made able to add or remove some connection
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef __CONNPOINT_LINE_H
25 #define __CONNPOINT_LINE_H
34 #include "connectionpoint.h"
47 ConnPointLine
*connpointline_create(DiaObject
*parent
,
49 void connpointline_destroy(ConnPointLine
*cpl
);
50 void connpointline_update(ConnPointLine
*cpl
);
51 void connpointline_putonaline(ConnPointLine
*cpl
,Point
*start
,Point
*end
);
52 int connpointline_can_add_point(ConnPointLine
*cpl
,
54 int connpointline_can_remove_point(ConnPointLine
*cpl
,
57 ObjectChange
*connpointline_add_points(ConnPointLine
*cpl
,
60 ObjectChange
*connpointline_remove_points(ConnPointLine
*cpl
,
63 ConnPointLine
*connpointline_load(DiaObject
*obj
,ObjectNode obj_node
,
64 const gchar
*name
, int default_nc
,
66 void connpointline_save(ConnPointLine
*cpl
,ObjectNode obj_node
,
68 ConnPointLine
*connpointline_copy(DiaObject
*newobj
,ConnPointLine
*cpl
,
71 #define connpointline_add_point(cpl, clickedpoint) \
72 connpointline_add_points(cpl, clickedpoint, 1)
73 #define connpointline_remove_point(cpl, clickedpoint) \
74 connpointline_remove_points(cpl, clickedpoint, 1)
76 int connpointline_adjust_count(ConnPointLine
*cpl
,
77 int newcount
, Point
*where
);
79 #endif /* __CONNPOINT_LINE_H */