Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
selectionfuncs.c File Reference
#include <limits.h>
#include <stddef.h>
#include <util/alloc.h>
#include "selectionfuncs.h"
#include "topviewfuncs.h"
#include "smyrna_utils.h"
Include dependency graph for selectionfuncs.c:

Go to the source code of this file.

Functions

static void select_node (Agraph_t *g, Agnode_t *obj, int reverse)
 
static void select_edge (Agraph_t *g, Agedge_t *obj, int reverse)
 
static void pick_objects_in_rect (Agraph_t *g, float x1, float y1, float x2, float y2)
 
static void * pick_object (Agraph_t *g, glCompPoint p)
 
void pick_object_xyz (Agraph_t *g, topview *t, float x, float y, float z)
 
void pick_objects_rect (Agraph_t *g)
 
void deselect_all (Agraph_t *g)
 
static int close_poly (glCompPoly_t *selPoly, glCompPoint pt)
 
static void select_polygon (Agraph_t *g, glCompPoly_t *selPoly)
 
void add_selpoly (Agraph_t *g, glCompPoly_t *selPoly, glCompPoint pt)
 

Function Documentation

◆ add_selpoly()

void add_selpoly ( Agraph_t g,
glCompPoly_t *  selPoly,
glCompPoint  pt 
)

Definition at line 258 of file selectionfuncs.c.

References close_poly(), select_polygon(), glCompPoint::x, and glCompPoint::y.

Referenced by apply_actions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close_poly()

static int close_poly ( glCompPoly_t *  selPoly,
glCompPoint  pt 
)
static

Definition at line 234 of file selectionfuncs.c.

References EPS, GetOGLDistance(), glCompPoint::x, and glCompPoint::y.

Referenced by add_selpoly().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deselect_all()

void deselect_all ( Agraph_t g)

Definition at line 208 of file selectionfuncs.c.

References agattr(), AGEDGE, agfstnode(), agfstout(), AGNODE, agnxtnode(), agnxtout(), agxset(), cacheSelectedEdges(), cacheSelectedNodes(), ED_selected, GE_selected, GN_selected, ND_printLabel, ND_selected, _ViewInfo::Topview, and view.

Referenced by menu_click_pan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_object()

static void * pick_object ( Agraph_t g,
glCompPoint  p 
)
static

Definition at line 107 of file selectionfuncs.c.

References agfstnode(), agfstout(), agnxtnode(), agnxtout(), dist(), distBetweenPts(), ED_posHead, ED_posTail, topview::fitin_zoom, getAttrBool(), GetOGLDistance(), ND_A, ND_size, ND_visible, _ViewInfo::nodeScale, NULL, point_to_lineseg_dist(), _ViewInfo::Topview, view, and _ViewInfo::zoom.

Referenced by pick_object_xyz().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_object_xyz()

void pick_object_xyz ( Agraph_t g,
topview t,
float  x,
float  y,
float  z 
)

Definition at line 153 of file selectionfuncs.c.

References AGEDGE, AGNODE, agobjkind(), cacheSelectedEdges(), cacheSelectedNodes(), ND_printLabel, pick_object(), select_edge(), select_node(), glCompPoint::x, glCompPoint::y, glCompPoint::z, and z.

Referenced by apply_actions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_objects_in_rect()

static void pick_objects_in_rect ( Agraph_t g,
float  x1,
float  y1,
float  x2,
float  y2 
)
static

Definition at line 75 of file selectionfuncs.c.

References agfstnode(), agfstout(), agnxtnode(), agnxtout(), ED_posHead, ED_posTail, is_point_in_rectangle(), ND_A, ND_visible, topview::sel, select_edge(), select_node(), _selection::selectEdges, _selection::selectNodes, _ViewInfo::Topview, view, glCompPoint::x, and glCompPoint::y.

Referenced by pick_objects_rect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_objects_rect()

void pick_objects_rect ( Agraph_t g)

Definition at line 174 of file selectionfuncs.c.

References cacheSelectedEdges(), cacheSelectedNodes(), glCompMouse::GLfinalPos, glCompMouse::GLinitPos, _ViewInfo::mouse, pick_objects_in_rect(), _ViewInfo::Topview, view, glCompPoint::x, and glCompPoint::y.

Referenced by apply_actions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_edge()

static void select_edge ( Agraph_t g,
Agedge_t obj,
int  reverse 
)
static

Definition at line 47 of file selectionfuncs.c.

References agattr(), AGEDGE, agxset(), ED_selected, and GE_selected.

Referenced by pick_object_xyz(), and pick_objects_in_rect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_node()

static void select_node ( Agraph_t g,
Agnode_t obj,
int  reverse 
)
static

Definition at line 18 of file selectionfuncs.c.

References agattr(), AGNODE, agxset(), GN_selected, ND_printLabel, and ND_selected.

Referenced by pick_object_xyz(), pick_objects_in_rect(), and select_polygon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_polygon()

static void select_polygon ( Agraph_t g,
glCompPoly_t *  selPoly 
)
static

Definition at line 245 of file selectionfuncs.c.

References agfstnode(), agnxtnode(), cacheSelectedNodes(), ND_A, point_in_polygon(), select_node(), _ViewInfo::Topview, and view.

Referenced by add_selpoly().

Here is the call graph for this function:
Here is the caller graph for this function: