diff options
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/colorbar.tcl | 23 | ||||
-rw-r--r-- | ds9/library/grid.tcl | 23 | ||||
-rw-r--r-- | ds9/library/util.tcl | 23 | ||||
-rw-r--r-- | ds9/parsers/colorbarparser.tac | 2 | ||||
-rw-r--r-- | ds9/parsers/gridparser.tac | 6 |
5 files changed, 27 insertions, 50 deletions
diff --git a/ds9/library/colorbar.tcl b/ds9/library/colorbar.tcl index b6ca532..7706fa3 100644 --- a/ds9/library/colorbar.tcl +++ b/ds9/library/colorbar.tcl @@ -1267,29 +1267,6 @@ proc ProcessColorbarCmd {varname iname} { incr i [expr $colorbar::yycnt-1] } -proc ColorbarCmdFontStyle {value {cmd {}}} { - global colorbar - - switch $value { - normal { - set colorbar(font,weight) normal - set colorbar(font,slant) roman - } - bold { - set colorbar(font,weight) bold - set colorbar(font,slant) roman - } - italic { - set colorbar(font,weight) normal - set colorbar(font,slant) italic - } - } - - if {$cmd != {}} { - eval $cmd - } -} - proc ProcessSendColorbarCmd {proc id param {sock {}} {fn {}}} { global colorbar global view diff --git a/ds9/library/grid.tcl b/ds9/library/grid.tcl index eb56a3b..b527812 100644 --- a/ds9/library/grid.tcl +++ b/ds9/library/grid.tcl @@ -1146,29 +1146,6 @@ proc ProcessGridCmd {varname iname} { incr i [expr $grid::yycnt-1] } -proc GridCmdFontStyle {which value {cmd {}}} { - global grid - - switch $value { - normal { - set grid($which,weight) normal - set grid($which,slant) roman - } - bold { - set grid($which,weight) bold - set grid($which,slant) roman - } - italic { - set grid($which,weight) normal - set grid($which,slant) italic - } - } - - if {$cmd != {}} { - eval $cmd - } -} - proc ProcessSendGridCmd {proc id param {sock {}} {fn {}}} { global parse set parse(proc) $proc diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index 09cbe48..9c89ca1 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -217,6 +217,29 @@ proc ProcessCmdAppend {varname key value {cmd {}}} { } } +proc ProcessCmdFontStyle {varname key value {cmd {}}} { + global $varname + + switch $value { + normal { + set ${varname}($key,weight) normal + set ${varname}($key,slant) roman + } + bold { + set ${varname}($key,weight) bold + set ${varname}($key,slant) roman + } + italic { + set ${varname}($key,weight) normal + set ${varname}($key,slant) italic + } + } + + if {$cmd != {}} { + eval $cmd + } +} + proc ProcessCmdCVAR {key value {cmd {}}} { global cvarname upvar #0 $cvarname cvar diff --git a/ds9/parsers/colorbarparser.tac b/ds9/parsers/colorbarparser.tac index 21e7572..a1252a5 100644 --- a/ds9/parsers/colorbarparser.tac +++ b/ds9/parsers/colorbarparser.tac @@ -41,7 +41,7 @@ colorbar : yesno {ProcessCmdSet view colorbar $1 UpdateView} | FONTWEIGHT_ fontWeight {ProcessCmdSet colorbar font,weight $2 UpdateView} | FONTSLANT_ fontSlant {ProcessCmdSet colorbar font,slant $2 UpdateView} # backward compatibility - | FONTSTYLE_ fontStyle {ColorbarCmdFontStyle $2 UpdateView} + | FONTSTYLE_ fontStyle {ProcessCmdFontStyle colorbar font $2 UpdateView} | orientation {ProcessCmdSet colorbar orientation $1 UpdateView} # backward compatibility diff --git a/ds9/parsers/gridparser.tac b/ds9/parsers/gridparser.tac index ba7e681..f8f9efe 100644 --- a/ds9/parsers/gridparser.tac +++ b/ds9/parsers/gridparser.tac @@ -163,7 +163,7 @@ numerics : yesno {ProcessCmdSet grid numlab $1} | FONTWEIGHT_ fontWeight {ProcessCmdSet grid numlab,weight $2} | FONTSLANT_ fontSlant {ProcessCmdSet grid numlab,slant $2} # backward compatibility - | FONTSTYLE_ fontStyle {GridCmdFontStyle numlab $2} + | FONTSTYLE_ fontStyle {ProcessCmdFontStyle grid numlab $2} | COLOR_ STRING_ {ProcessCmdSet grid numlab,color $2} | GAP1_ numeric {ProcessCmdSet grid numlab,gap1 $2} | GAP2_ numeric {ProcessCmdSet grid numlab,gap2 $2} @@ -181,7 +181,7 @@ title : yesno {ProcessCmdSet grid title $1} | FONTWEIGHT_ fontWeight {ProcessCmdSet grid title,weight $2} | FONTSLANT_ fontSlant {ProcessCmdSet grid title,slant $2} # backward compatibility - | FONTSTYLE_ fontStyle {GridCmdFontStyle title $2} + | FONTSTYLE_ fontStyle {ProcessCmdFontStyle grid title $2} | COLOR_ STRING_ {ProcessCmdSet grid title,color $2} ; @@ -197,7 +197,7 @@ labels : yesno {ProcessCmdSet grid textlab $1} | FONTWEIGHT_ fontWeight {ProcessCmdSet grid textlab,weight $2} | FONTSLANT_ fontSlant {ProcessCmdSet grid textlab,slant $2} # backward compatibility - | FONTSTYLE_ fontStyle {GridCmdFontStyle textlab $2} + | FONTSTYLE_ fontStyle {ProcessCmdFontStyle grid textlab $2} | COLOR_ STRING_ {ProcessCmdSet grid textlab,color $2} ; |