* lib/libdia.def: added color_new_rgb(), focus_previous(),focus_next(),
[dia.git] / lib / handle.h
blob42a3fe5c8c601bad75d2fa9f28e22b319a03406b
1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #ifndef HANDLE_H
19 #define HANDLE_H
21 #include "diatypes.h"
23 /* Is this needed? */
24 typedef enum {
25 HANDLE_RESIZE_NW,
26 HANDLE_RESIZE_N,
27 HANDLE_RESIZE_NE,
28 HANDLE_RESIZE_W,
29 HANDLE_RESIZE_E,
30 HANDLE_RESIZE_SW,
31 HANDLE_RESIZE_S,
32 HANDLE_RESIZE_SE,
33 HANDLE_MOVE_STARTPOINT,
34 HANDLE_MOVE_ENDPOINT,
36 /* These handles can be used privately by objects: */
37 HANDLE_CUSTOM1=200,
38 HANDLE_CUSTOM2,
39 HANDLE_CUSTOM3,
40 HANDLE_CUSTOM4,
41 HANDLE_CUSTOM5,
42 HANDLE_CUSTOM6,
43 HANDLE_CUSTOM7,
44 HANDLE_CUSTOM8,
45 HANDLE_CUSTOM9
46 } HandleId;
48 typedef enum {
49 HANDLE_NON_MOVABLE,
50 HANDLE_MAJOR_CONTROL,
51 HANDLE_MINOR_CONTROL,
53 NUM_HANDLE_TYPES /* Must be last */
54 } HandleType;
56 typedef enum {
57 HANDLE_MOVE_USER,
58 HANDLE_MOVE_USER_FINAL,
59 HANDLE_MOVE_CONNECTED,
60 HANDLE_MOVE_CREATE, /* the initial drag during object placement */
61 HANDLE_MOVE_CREATE_FINAL /* finish of initial drag */
62 } HandleMoveReason;
64 typedef enum {
65 HANDLE_NONCONNECTABLE,
66 HANDLE_CONNECTABLE,
67 HANDLE_CONNECTABLE_NOBREAK /* Don't break connection on object move */
68 } HandleConnectType;
70 #include "geometry.h"
71 #include "object.h"
73 struct _Handle {
74 HandleId id;
75 HandleType type;
76 Point pos;
78 HandleConnectType connect_type;
79 ConnectionPoint *connected_to; /* NULL if not connected */
83 #endif /* HANDLE_H */