Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
tcldot.h File Reference
#include <tcl.h>
#include <common/render.h>
#include <gvc/gvc.h>
#include <gvc/gvio.h>
#include "../../plugin/core/tcl_context.h"
Include dependency graph for tcldot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ictx_t
 
struct  gctx_t
 

Functions

int graphcmd (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[])
 
int nodecmd (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[])
 
int edgecmd (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[])
 
int myiodisc_afread (void *channel, char *ubuf, int n)
 
int myiodisc_memiofread (void *chan, char *buf, int bufsize)
 
Agraph_tcmd2g (const char *cmd)
 
Agnode_tcmd2n (const char *cmd)
 
Agedge_tcmd2e (const char *cmd)
 
char * obj2cmd (void *obj)
 
void deleteEdge (gctx_t *gctx, Agraph_t *g, Agedge_t *e)
 
void deleteNode (gctx_t *gctx, Agraph_t *g, Agnode_t *n)
 
void deleteGraph (gctx_t *gctx, Agraph_t *g)
 
void listGraphAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void listNodeAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void listEdgeAttrs (Tcl_Interp *interp, Agraph_t *g)
 
void setgraphattributes (Agraph_t *g, char *argv[], int argc)
 
void setedgeattributes (Agraph_t *g, Agedge_t *e, char *argv[], int argc)
 
void setnodeattributes (Agraph_t *g, Agnode_t *n, char *argv[], int argc)
 
size_t Tcldot_string_writer (GVJ_t *job, const char *s, size_t len)
 
size_t Tcldot_channel_writer (GVJ_t *job, const char *s, size_t len)
 
void tcldot_layout (GVC_t *gvc, Agraph_t *g, const char *engine)
 
char ** tcldot_argv_dup (int argc, const char *argv[])
 duplicate the strings pointed to by argv as non-const strings
 
void tcldot_argv_free (int argc, char *argv[])
 free the strings pointed to by argv
 

Variables

Agiddisc_t myiddisc
 

Function Documentation

◆ cmd2e()

Agedge_t * cmd2e ( const char *  cmd)
extern

Definition at line 55 of file tcldot-util.c.

References cmd, and NULL.

Referenced by edgecmd_internal().

Here is the caller graph for this function:

◆ cmd2g()

Agraph_t * cmd2g ( const char *  cmd)
extern

Definition at line 41 of file tcldot-util.c.

References cmd, and NULL.

Referenced by graphcmd_internal().

Here is the caller graph for this function:

◆ cmd2n()

Agnode_t * cmd2n ( const char *  cmd)
extern

Definition at line 48 of file tcldot-util.c.

References cmd, and NULL.

Referenced by graphcmd_internal(), and nodecmd_internal().

Here is the caller graph for this function:

◆ deleteEdge()

void deleteEdge ( gctx_t gctx,
Agraph_t g,
Agedge_t e 
)
extern

Definition at line 80 of file tcldot-util.c.

References agdelete(), gctx_t::g, gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteNodeEdges(), and edgecmd_internal().

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

◆ deleteGraph()

void deleteGraph ( gctx_t gctx,
Agraph_t g 
)
extern

Definition at line 124 of file tcldot-util.c.

References agclose(), agdelsubg(), agfstsubg(), agnxtsubg(), agroot(), deleteGraph(), deleteGraphNodes(), gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteGraph(), and graphcmd_internal().

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

◆ deleteNode()

void deleteNode ( gctx_t gctx,
Agraph_t g,
Agnode_t n 
)
extern

Definition at line 101 of file tcldot-util.c.

References agdelete(), deleteNodeEdges(), gctx_t::g, gctx_t::ictx, ictx_t::interp, and obj2cmd().

Referenced by deleteGraphNodes(), and nodecmd_internal().

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

◆ edgecmd()

int edgecmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
const char *  argv[] 
)
extern

Definition at line 129 of file tcldot-edgecmd.c.

References edgecmd_internal(), tcldot_argv_dup(), and tcldot_argv_free().

Referenced by myiddisc_idregister().

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

◆ graphcmd()

int graphcmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
const char *  argv[] 
)
extern

Definition at line 490 of file tcldot-graphcmd.c.

References graphcmd_internal(), tcldot_argv_dup(), and tcldot_argv_free().

Referenced by myiddisc_idregister().

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

◆ listEdgeAttrs()

void listEdgeAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)
extern

Definition at line 225 of file tcldot-util.c.

References AGEDGE, agnxtattr(), Agsym_s::name, and NULL.

Referenced by edgecmd_internal(), and graphcmd_internal().

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

◆ listGraphAttrs()

void listGraphAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)
extern

Definition at line 211 of file tcldot-util.c.

References agnxtattr(), AGRAPH, Agsym_s::name, and NULL.

Referenced by graphcmd_internal().

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

◆ listNodeAttrs()

void listNodeAttrs ( Tcl_Interp *  interp,
Agraph_t g 
)
extern

Definition at line 218 of file tcldot-util.c.

References AGNODE, agnxtattr(), Agsym_s::name, and NULL.

Referenced by graphcmd_internal(), and nodecmd_internal().

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

◆ myiodisc_afread()

int myiodisc_afread ( void *  channel,
char *  ubuf,
int  n 
)
extern

Definition at line 31 of file tcldot-io.c.

Referenced by dotread().

Here is the caller graph for this function:

◆ myiodisc_memiofread()

int myiodisc_memiofread ( void *  chan,
char *  buf,
int  bufsize 
)
extern

Definition at line 88 of file tcldot-io.c.

Referenced by dotstring().

Here is the caller graph for this function:

◆ nodecmd()

int nodecmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
const char *  argv[] 
)
extern

Definition at line 186 of file tcldot-nodecmd.c.

References nodecmd_internal(), tcldot_argv_dup(), and tcldot_argv_free().

Referenced by myiddisc_idregister().

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

◆ obj2cmd()

char * obj2cmd ( void *  obj)
extern

Definition at line 66 of file tcldot-util.c.

References AGINEDGE, AGNODE, AGOUTEDGE, AGRAPH, AGTYPE, and UNREACHABLE.

Referenced by deleteEdge(), deleteGraph(), deleteNode(), dotnew_internal(), dotread(), dotstring(), edgecmd_internal(), graphcmd_internal(), myiddisc_idregister(), and nodecmd_internal().

Here is the caller graph for this function:

◆ setedgeattributes()

void setedgeattributes ( Agraph_t g,
Agedge_t e,
char *  argv[],
int  argc 
)
extern

Definition at line 170 of file tcldot-util.c.

References agattr(), AGEDGE, agfindedgeattr, agroot(), and myagxset().

Referenced by edgecmd_internal(), graphcmd_internal(), and nodecmd_internal().

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

◆ setgraphattributes()

void setgraphattributes ( Agraph_t g,
char *  argv[],
int  argc 
)
extern

Definition at line 158 of file tcldot-util.c.

References agattr(), agfindgraphattr, AGRAPH, agroot(), and myagxset().

Referenced by dotnew_internal(), and graphcmd_internal().

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

◆ setnodeattributes()

void setnodeattributes ( Agraph_t g,
Agnode_t n,
char *  argv[],
int  argc 
)
extern

Definition at line 193 of file tcldot-util.c.

References agattr(), agfindnodeattr, AGNODE, agroot(), and myagxset().

Referenced by graphcmd_internal(), and nodecmd_internal().

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

◆ tcldot_argv_dup()

char ** tcldot_argv_dup ( int  argc,
const char *  argv[] 
)

Definition at line 254 of file tcldot-util.c.

References gv_calloc(), and gv_strdup().

Referenced by dotnew(), edgecmd(), graphcmd(), and nodecmd().

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

◆ tcldot_argv_free()

void tcldot_argv_free ( int  argc,
char *  argv[] 
)

Definition at line 263 of file tcldot-util.c.

References free().

Referenced by dotnew(), edgecmd(), graphcmd(), and nodecmd().

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

◆ Tcldot_channel_writer()

size_t Tcldot_channel_writer ( GVJ_t job,
const char *  s,
size_t  len 
)
extern

Definition at line 27 of file tcldot-util.c.

References len(), and GVJ_s::output_file.

Referenced by graphcmd_internal().

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

◆ tcldot_layout()

void tcldot_layout ( GVC_t gvc,
Agraph_t g,
const char *  engine 
)
extern

Definition at line 233 of file tcldot-util.c.

References agisdirected(), engine, gvc, gvFreeLayout(), gvLayout(), Nop, POINTS_PER_INCH, and PSinputscale.

Referenced by graphcmd_internal().

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

◆ Tcldot_string_writer()

size_t Tcldot_string_writer ( GVJ_t job,
const char *  s,
size_t  len 
)
extern

Definition at line 20 of file tcldot-util.c.

References GVJ_s::context, tcldot_context_t::interp, len(), and NULL.

Referenced by graphcmd_internal().

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

Variable Documentation

◆ myiddisc

Agiddisc_t myiddisc
extern

Definition at line 97 of file tcldot-id.c.

Referenced by Tcldot_Init().