1 /*
2  * create-wire.h
3  *
4  *
5  * Author:
6  *  Richard Hult <rhult@hem.passagen.se>
7  *  Ricardo Markiewicz <rmarkie@fi.uba.ar>
8  *  Andres de Barbara <adebarbara@fi.uba.ar>
9  *  Marc Lorber <lorber.marc@wanadoo.fr>
10  *
11  * Web page: https://ahoi.io/project/oregano
12  *
13  * Copyright (C) 1999-2001  Richard Hult
14  * Copyright (C) 2003,2004  Ricardo Markiewicz
15  * Copyright (C) 2009-2012  Marc Lorber
16  *
17  * This program is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU General Public License as
19  * published by the Free Software Foundation; either version 2 of the
20  * License, or (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
25  * General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public
28  * License along with this program; if not, write to the
29  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
30  * Boston, MA 02110-1301, USA.
31  */
32 
33 #ifndef __CREATE_WIRE_H
34 #define __CREATE_WIRE_H
35 
36 #include <goocanvas.h>
37 
38 #include "sheet.h"
39 #include "wire.h"
40 #include "wire-item.h"
41 #include "schematic-view.h"
42 
43 typedef enum { WIRE_START, WIRE_ACTIVE, WIRE_DISABLED } WireState;
44 
45 typedef struct _CreateWireInfo CreateWireInfo;
46 
47 struct _CreateWireInfo
48 {
49 	WireState state;
50 	GooCanvasPolyline *line;
51 	GooCanvasPoints *points;
52 	GooCanvasEllipse *dot;
53 	WireDir direction;
54 	gulong event_handler_id;
55 	//	gulong			 cancel_handler_id;
56 };
57 
58 CreateWireInfo *create_wire_info_new (Sheet *sheet);
59 void create_wire_info_destroy (CreateWireInfo *wire_info);
60 gboolean create_wire_setup (Sheet *sheet);
61 gboolean create_wire_orientationtoggle (Sheet *sheet);
62 gboolean create_wire_event (Sheet *sheet, GdkEvent *event, gpointer data);
63 gboolean create_wire_cleanup (Sheet *sheet);
64 
65 #endif
66