Check-in [267c9e500d]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:some bwidget SpinBox tweaks
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 267c9e500d31d707b11349fef3db05327512acbb
User & Date: chw 2019-11-07 09:46:59.503
Context
2019-11-07
14:32
improve handling of right mouse button in jsmpeg driver check-in: af21b3793f user: chw tags: trunk
09:46
some bwidget SpinBox tweaks check-in: 267c9e500d user: chw tags: trunk
05:45
add tk upstream changes check-in: 598bd224b9 user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to assets/bwidget1.9.13/spinbox.tcl.
61
62
63
64
65
66
67

68




69
70
71
72
73
74
75
proc SpinBox::create { path args } {
    array set maps [list SpinBox {} :cmd {} .e {} .arrup {} .arrdn {}]
    array set maps [Widget::parseArgs SpinBox $args]
    eval [list frame $path] $maps(:cmd) \
	[list -highlightthickness 0 -takefocus 0 -class SpinBox]
    Widget::initFromODB SpinBox $path $maps(SpinBox)


    set entry [eval [list Entry::create $path.e] $maps(.e) -relief flat -bd 0]




    bindtags $path.e [linsert [bindtags $path.e] 1 SpinBoxEntry]

    set farr   [frame $path.farr -relief flat -bd 0 -highlightthickness 0]
    set height [expr {[winfo reqheight $path.e]/2-2}]
    set width  11
    set arrup  [eval [list ArrowButton::create $path.arrup -dir top] \
	    $maps(.arrup) \







>
|
>
>
>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
proc SpinBox::create { path args } {
    array set maps [list SpinBox {} :cmd {} .e {} .arrup {} .arrdn {}]
    array set maps [Widget::parseArgs SpinBox $args]
    eval [list frame $path] $maps(:cmd) \
	[list -highlightthickness 0 -takefocus 0 -class SpinBox]
    Widget::initFromODB SpinBox $path $maps(SpinBox)

    if {[Widget::theme]} {
        set entry [eval [list Entry::create $path.e] $maps(.e)]
    } else {
        set entry [eval [list Entry::create $path.e] $maps(.e) \
            -relief flat -bd 0]
    }
    bindtags $path.e [linsert [bindtags $path.e] 1 SpinBoxEntry]

    set farr   [frame $path.farr -relief flat -bd 0 -highlightthickness 0]
    set height [expr {[winfo reqheight $path.e]/2-2}]
    set width  11
    set arrup  [eval [list ArrowButton::create $path.arrup -dir top] \
	    $maps(.arrup) \
Changes to assets/bwidget1.9.13/widget.tcl.
494
495
496
497
498
499
500



501
502
503
504
505
506
507
    upvar 0 ${class}::optionExports exports
    upvar 0 ${class}::map classmap
    upvar 0 ${class}::map$subpath submap

    foreach {option realopt} $options {
        if { ![string length $realopt] } {
            set realopt $option



        }
	set val [lindex $classopt($option) 1]
	set optDb ".[lindex [_configure_option $realopt ""] 0]"
	if { ![string equal $subpath ":cmd"] } {
	    set optDb "$subpath$optDb"
	}
	option add *${class}${optDb} $val widgetDefault







>
>
>







494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
    upvar 0 ${class}::optionExports exports
    upvar 0 ${class}::map classmap
    upvar 0 ${class}::map$subpath submap

    foreach {option realopt} $options {
        if { ![string length $realopt] } {
            set realopt $option
        }
        if { ![info exists classopt($option)] } {
            continue
        }
	set val [lindex $classopt($option) 1]
	set optDb ".[lindex [_configure_option $realopt ""] 0]"
	if { ![string equal $subpath ":cmd"] } {
	    set optDb "$subpath$optDb"
	}
	option add *${class}${optDb} $val widgetDefault