These constraints are realized:
obj method canvaseditor makeConstraintDialog {} { set elements [my selection] if {[llength $elements] != 1} then { return -code error {Select exactly one element, please.} } lassign $elements obj set var [namespace current]::constraint catch {unset $var} catch {array unset $var} # destroy [my canvas].constraint set dialog [toplevel [my canvas].constraint] wm transient $dialog [my canvas] wm resizable $dialog no no # $self basicBindings no # foreach constraint { noprint size orient shear gravity fillcolor linecolor linewidth } { set [set var]($constraint) [$obj constraint $constraint] ::pack [checkbutton $dialog.$constraint\ -text [string totitle $constraint]\ -variable [set var]($constraint)\ -command "$obj constraint $constraint toggle"\ -width 18 -anchor nw -onvalue yes -offvalue no] } set before [list $obj configure -constraint [$obj cget -constraint]] frame $dialog.finish bind $dialog.finish <Destroy> [subst -nocommand { $self basicBindings $self initUndoRedo [list $before]\ "$obj configure -constraint [list [$obj cget -constraint]]" }] }
© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z