1
/* $Id: selection.h,v 1.3 2008/03/04 17:54:51 arif Exp $ $Revision: 1.3 $ */
2
/* vim:set shiftwidth=4 ts=8: */
4
/**********************************************************
5
* This software is part of the graphviz package *
6
* http://www.graphviz.org/ *
8
* Copyright (c) 1994-2004 AT&T Corp. *
9
* and is licensed under the *
10
* Common Public License, Version 1.0 *
13
* Information and Software Systems Research *
14
* AT&T Research, Florham Park NJ *
15
**********************************************************/
22
#define SELECTION_SEGMENT_DIVIDER 5.0 //control points count to check if a line segment is withing clipping rect
23
#define SINGLE_SELECTION_WIDTH 10 //width of the rect clip for single selections , higher values more catches less sensitivity
28
extern int intersect (pointf a, pointf b, pointf c, pointf d, pointf* x);
30
int lineintersects(float X1,float X2,float Y1,float Y2);
31
int rectintersects(float x,float y,float W,float H);
32
int point_within_ellipse( xdot_op* op);
33
int point_within_ellips_with_coords(float ex,float ey,float ea,float eb,float px,float py);
34
int point_within_polygon(xdot_op* op);
35
int line_intersects (float* x,float* y,float* X,float* Y);
37
int is_point_in_rectangle(float X,float Y,float RX,float RY,float RW,float RH);
38
int within_bezier(GLfloat* xp,GLfloat* yp,GLfloat* zp,int isx);
40
int ellipse_in_rect(xdot_op* op);
41
int ellipse_x_rect(xdot_op* op);
44
int SelectBeziers(xdot_op* op);
45
int SelectEllipse(xdot_op* op);
46
int SelectPolygon(xdot_op* op);
47
int SelectPolyline(xdot_op* op);
48
int SelectText(xdot_op* op);
49
int SelectImage(xdot_op* op);
53
int spline_in_rect(xdot_op* op);
54
int spline_x_rect(xdot_op* op);
56
int polygon_in_rect(xdot_op* op);
57
int polygon_x_rect(xdot_op* op);
59
int polyline_in_rect(xdot_op* op);
60
int polyline_x_rect(xdot_op* op);
63
int text_in_rect(xdot_op* op);
64
int text_x_rect(xdot_op* op);
66
int image_in_rect(xdot_op* op);
67
int image_x_rect(xdot_op* op);
71
int select_graph(Agraph_t* g,Agraph_t*);
72
int select_node(Agraph_t* g,Agnode_t*);
73
int select_edge(Agraph_t* g,Agedge_t*);
75
int select_object (Agraph_t* g,void* obj);
76
int deselect_object (Agraph_t* g,void* obj);
77
int deselect_graph(Agraph_t* g,Agraph_t*);
78
int deselect_node(Agraph_t* g,Agnode_t*);
79
int deselect_edge(Agraph_t* g,Agedge_t*);
81
int select_all_nodes(Agraph_t* g);
82
int select_all_edges(Agraph_t* g);
83
int select_all_graphs(Agraph_t* g);
86
int deselect_all_nodes(Agraph_t* g);
87
int deselect_all_edges(Agraph_t* g);
88
int deselect_all_graphs(Agraph_t* g);
90
int select_all(Agraph_t* g);
91
int deselect_all(Agraph_t* g);