::itcl::class ::nv2::totalto_graph {
common _dot_path "";
proc arrowhead_list {} {
::return {
none
normal
inv
dot
odot
invdot
invodot
tee
empty
invempty
open
halfopen
diamond
odiamond
box
obox
crow
}
}
/* {
polygon
Mdiamond
Msquare
*/ }
proc node_shape_list {} {
::return {
box
ellipse
circle
point
egg
triangle
plaintext
diamond
trpaezium
parallelogram
house
pentagon
hexagon
septagon
octagon
doublecircle
doubleoctagon
tripleoctagon
invtriangle
invtrapezium
invhouse
}
}
proc node_style_list {} {
::return {
filled
solid
dashed
dotted
bold
invis
}
}
proc edge_style_list {} {
::return {
solid
dashed
dotted
bold
invis
}
}
proc initialize {} {
::switch -- $::tcl_platform(platform) {
"windows" {
::while {1} {
# simulated if then else
::set Path [::file join C:/ "Program Files" GraphViz bin dot.exe];
::if {[::file exists $Path]} {
::set _dot_path $Path;
::break;
}
::set Path [::file join C:/ Programme Graphviz bin dot.exe];
::if {[::file exists $Path]} {
::set _dot_path $Path;
::break;
}
::if {[auto_execok "dot"] ne ""} {
::set _dot_path "dot";
::break;
}
::break;
}
::if {$_dot_path eq ""} {
::qw::throw \
.text "The Graphviz application is not installed." \
.error_id 314120250326175311 \
.help_page {
.id 314120250326141529
.tags {error}
.body {
[p {
NewViews relies on the [qw_term Graphviz] application to draw graphs.
It appears that Graphviz is not installed on this computer.
See Installing Graphviz on Windows
}]
[ol {
[p {
Step 1: Download Graphviz
}]
[p {
Go to the official Graphviz website: https://graphviz.org/download/
Click on the Windows section.
Download the latest .exe installer (e.g., graphviz-.msi).
}]
[p {
` Step 2: Install Graphviz
}]
[p {
Run the downloaded .msi installer.
Follow the installation prompts:
Choose "Add Graphviz to the system PATH for all users" (recommended).
Click Next and install.
}]
[p {
Step 3: Verify Installation
}]
[p {
Open Command Prompt (cmd) or PowerShell.
}]
}]
[p {
When insalling Graphviz on Windows, you will be peompted
to specify the insallation folder.
We recommend that you select [qw_directory c:\ProgramFiles].
}]
}
} \
;
}
}
"unix" {
::qw::throw "Graphs are not implemented on linux (yet)."
}
}
}
}