diff options
Diffstat (limited to 'colorgrid/colorgrid.tk')
-rwxr-xr-x | colorgrid/colorgrid.tk | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/colorgrid/colorgrid.tk b/colorgrid/colorgrid.tk deleted file mode 100755 index b5bb173..0000000 --- a/colorgrid/colorgrid.tk +++ /dev/null @@ -1,88 +0,0 @@ -############ colorgrid procedures -- ydegoyon@free.fr ######### -package require Img - -proc colorgrid_apply {id} { -# strip "." from the TK id to make a variable name suffix - set vid [string trimleft $id .] -# for each variable, make a local variable to hold its name... - set var_graph_colorgrid [concat graph_colorgrid_$vid] - global $var_graph_colorgrid - set var_graph_xlines [concat graph_xlines_$vid] - global $var_graph_xlines - set var_graph_ylines [concat graph_ylines_$vid] - global $var_graph_ylines - - set cmd [concat $id dialog \ - [eval concat $$var_graph_xlines] \ - [eval concat $$var_graph_ylines] \ - [eval concat $$var_graph_colorgrid] \ - \;] - #puts stderr $cmd - pd $cmd -} - -proc colorgrid_cancel {id} { - set cmd [concat $id cancel \;] - #puts stderr $cmd - pd $cmd -} - -proc colorgrid_ok {id} { - colorgrid_apply $id - colorgrid_cancel $id -} - -proc pdtk_colorgrid_dialog {id xlines ylines colorgrid} { - set vid [string trimleft $id .] - set var_graph_colorgrid [concat graph_colorgrid_$vid] - global $var_graph_colorgrid - set var_graph_xlines [concat graph_xlines_$vid] - global $var_graph_xlines - set var_graph_ylines [concat graph_ylines_$vid] - global $var_graph_ylines - - set $var_graph_colorgrid $colorgrid - set $var_graph_xlines $xlines - set $var_graph_ylines $ylines - - toplevel $id - wm title $id {colorgrid} - wm protocol $id WM_DELETE_WINDOW [concat colorgrid_cancel $id] - - label $id.label -text {COLORGRID PROPERTIES} - pack $id.label -side top - - frame $id.buttonframe - pack $id.buttonframe -side bottom -fill x -pady 2m - button $id.buttonframe.cancel -text {Cancel}\ - -command "colorgrid_cancel $id" - button $id.buttonframe.apply -text {Apply}\ - -command "colorgrid_apply $id" - button $id.buttonframe.ok -text {OK}\ - -command "colorgrid_ok $id" - pack $id.buttonframe.cancel -side left -expand 1 - pack $id.buttonframe.apply -side left -expand 1 - pack $id.buttonframe.ok -side left -expand 1 - - frame $id.42rangef - pack $id.42rangef -side top - label $id.42rangef.lxlines -text "X sections :" - entry $id.42rangef.xlines -textvariable $var_graph_xlines -width 7 - pack $id.42rangef.lxlines $id.42rangef.xlines -side left - - frame $id.72rangef - pack $id.72rangef -side top - label $id.72rangef.lylines -text "Y sections :" - entry $id.72rangef.ylines -textvariable $var_graph_ylines -width 7 - pack $id.72rangef.lylines $id.72rangef.ylines -side left - - checkbutton $id.showcolorgrid -text {Show Grid} -variable $var_graph_colorgrid \ - -anchor w - pack $id.showcolorgrid -side top - - bind $id.42rangef.xlines <KeyPress-Return> [concat colorgrid_ok $id] - bind $id.72rangef.ylines <KeyPress-Return> [concat colorgrid_ok $id] - focus $id.42rangef.xlines -} - -############ colorgrid procedures END -- lluis@artefacte.org ######### |