set lcolor black
}
label $wi.colors.color -text $color -width 8 \
- -bg $color -fg $lcolor
+ -bg $color -fg $lcolor
button $wi.colors.fg -text "fg" -command \
- "popupColor fg $wi.colors.color false"
+ "popupColor fg $wi.colors.color false"
button $wi.colors.bg -text "bg" -command \
- "popupColor bg $wi.colors.color true"
+ "popupColor bg $wi.colors.color true"
pack $wi.colors.fg $wi.colors.bg $wi.colors.color $wi.colors.label \
- -side right -padx 4 -pady 4
+ -side right -padx 4 -pady 4
pack $wi.colors -side top
set applycmd "popupOvalApply $c $wi $target"
}
# -outline red -stipple gray50
set newoval [.c create oval $x1 $y1 $x2 $y2 \
- -fill $color -width 2 -tags "oval $oval"]
+ -fill $color -width 2 -tags "oval $oval"]
.c raise $newoval background
.c create text $lx $ly -tags "oval $oval" -text $label \
- -justify center -font $defOvalLabelFont -fill $lcolor
+ -justify center -font $defOvalLabelFont -fill $lcolor
setNodeCanvas $oval $curcanvas
setType $oval "oval"
}
# set fg or bg of the "l" label control
if { $newcolor == "" } {
- return
+ return
}
if { $settext == "true" } {
- $l configure -text $newcolor -$type $newcolor
+ $l configure -text $newcolor -$type $newcolor
} else {
- $l configure -$type $newcolor
+ $l configure -$type $newcolor
}
}
# rounded-rectangle radius
set rad 25
set newrect [roundRect .c $x1 $y1 $x2 $y2 $rad \
- -fill $color -outline blue -tags "rectangle $rectangle"]
+ -fill $color -outline blue -tags "rectangle $rectangle"]
.c raise $newrect background
.c create text $lx $ly -tags "rectangle $rectangle" -text $label \
- -justify center -font $defRectLabelFont -fill $lcolor
+ -justify center -font $defRectLabelFont -fill $lcolor
setNodeCanvas $rectangle $curcanvas
setType $rectangle "rectangle"
}
frame $wi.lab -borderwidth 4
label $wi.lab.name_label -text "Text for top of rectangle:"
entry $wi.lab.name -bg white -width 16 \
- -validate focus -invcmd "focusAndFlash %W"
+ -validate focus -invcmd "focusAndFlash %W"
$wi.lab.name insert 0 $label
pack $wi.lab.name $wi.lab.name_label -side right -padx 4 -pady 4
pack $wi.lab -side top
set lcolor black
}
label $wi.colors.color -text $color -width 8 \
- -bg $color -fg $lcolor
+ -bg $color -fg $lcolor
button $wi.colors.fg -text "fg" -command \
- "popupColor fg $wi.colors.color false"
+ "popupColor fg $wi.colors.color false"
button $wi.colors.bg -text "bg" -command \
- "popupColor bg $wi.colors.color true"
+ "popupColor bg $wi.colors.color true"
pack $wi.colors.fg $wi.colors.bg $wi.colors.color $wi.colors.label \
- -side right -padx 4 -pady 4
+ -side right -padx 4 -pady 4
pack $wi.colors -side top
# Add new oval or modify old one?
}
frame $wi.butt -borderwidth 6
- button $wi.butt.apply -text $applytext -command "popupRectApply $c $wi $rectangle"
+ button $wi.butt.apply -text $applytext \
+ -command "popupRectApply $c $wi $rectangle"
button $wi.butt.cancel -text "Cancel" -command $cancelcmd
bind $wi <Key-Escape> "$cancelcmd"
global curcanvas
set object [newObjectId "text"]
- set newtext [$c create text $x $y -text "" -anchor w -justify left -tags "text $object"]
+ set newtext [$c create text $x $y -text "" \
+ -anchor w -justify left -tags "text $object"]
set coords [$c coords "text && $object"]
set iconcoords "iconcoords"
set font [list "$fontfamily" $fontsize]
set effects [lindex [lsearch -inline [set $text] "effects *"] 1]
set newtext [.c create text $x $y -text $label -anchor w \
- -font "$font $effects" -justify left -fill $color \
- -tags "text $text"]
+ -font "$font $effects" -justify left -fill $color -tags "text $text"]
.c addtag text withtag $newtext
.c raise $text background
set fontmenu [tk_optionMenu $wi.prop.font.menu fontfamily "$fontfamily"]
set sizemenu [tk_optionMenu $wi.prop.font.size fontsize "$fontsize"]
- pack $wi.prop.font.label \
- $wi.prop.font.menu \
- $wi.prop.font.size -side left -pady 2
+ pack $wi.prop.font.label $wi.prop.font.menu \
+ $wi.prop.font.size -side left -pady 2
frame $wi.prop.format -relief groove -bd 2
label $wi.prop.format.label -text "Effects:"
set color $defTextColor
}
button $wi.prop.format.fg -text "Color" -command \
- "popupColor fg $wi.text false"
+ "popupColor fg $wi.text false"
checkbutton $wi.prop.format.bold -text "Bold" -variable textBold \
- -command [list fontupdate $wi.text bold]
+ -command [list fontupdate $wi.text bold]
checkbutton $wi.prop.format.italic -text "Italic" -variable textItalic \
- -command [list fontupdate $wi.text italic]
- checkbutton $wi.prop.format.underline -text "Underline" -variable textUnderline \
- -command [list fontupdate $wi.text underline]
+ -command [list fontupdate $wi.text italic]
+ checkbutton $wi.prop.format.underline -text "Underline" \
+ -variable textUnderline \
+ -command [list fontupdate $wi.text underline]
- if {$textBold == 1} { $wi.prop.format.bold select
- } else { $wi.prop.format.bold deselect }
- if {$textItalic == 1} { $wi.prop.format.italic select
- } else { $wi.prop.format.italic deselect }
- if {$textUnderline == 1} { $wi.prop.format.underline select
- } else { $wi.prop.format.underline deselect }
+ if {$textBold == 1} {
+ $wi.prop.format.bold select
+ } else {
+ $wi.prop.format.bold deselect
+ }
+ if {$textItalic == 1} {
+ $wi.prop.format.italic select
+ } else {
+ $wi.prop.format.italic deselect
+ }
+ if {$textUnderline == 1} {
+ $wi.prop.format.underline select
+ } else {
+ $wi.prop.format.underline deselect
+ }
pack $wi.prop.format.label \
$wi.prop.format.fg \
lappend $target $iconcoords "color $color" "label {$caption}"\
"fontfamily {$fontfamily}" "fontsize $fontsize"
set ef {}
- if {"$textBold" == 1} { lappend ef bold}
- if {"$textItalic" == 1} { lappend ef italic}
- if {"$textUnderline" == 1} { lappend ef underline}
- if {"$ef" != ""} { lappend $target "effects {$ef}"}
+ if {"$textBold" == 1} {
+ lappend ef bold
+ }
+ if {"$textItalic" == 1} {
+ lappend ef italic
+ }
+ if {"$textUnderline" == 1} {
+ lappend ef underline
+ }
+ if {"$ef" != ""} {
+ lappend $target "effects {$ef}"
+ }
# draw it
drawText $target