Bwidget Source Code
Check-in [cc45806c6f]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:remove apparently unused procedure Widget::syncoptions and all calls. Ticket [3c2b8eafc6]
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: cc45806c6faa7b4d3f6f9d53f73768fa0cb8c8bc
User & Date: oehhar 2014-05-21 07:46:43
References
2014-05-21
07:50 Closed ticket [3c2b8eafc6]: Drop Widget::syncoptions plus 7 other changes artifact: fe81ff507e user: oehhar
Context
2014-07-18
06:47
All message rc files must have \n\n at the end for freewrap. Ticket [683c6245b4] check-in: c4cfe0f45e user: oehhar tags: bwidget
2014-05-21
07:46
remove apparently unused procedure Widget::syncoptions and all calls. Ticket [3c2b8eafc6] check-in: cc45806c6f user: oehhar tags: bwidget
07:36
Remove unneeded upvar. Ticket [43f93e0a97] check-in: 6e550c5f21 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

9
10
11
12
13
14
15




16
17
18
19
20
21
22
        widget.tcl: New procedure Widget::which (as in [namespace which]),
        that returns the fully qualified name for a widget option or
        widget variable. By Adrian Medrano Calvo. Ticket [a8705e5fd9]

        widget.tcl: Remove unneeded upvar. By Adrian Medrano Calvo.
        Ticket [43f93e0a97]






2013-12-13 Harald Oehlmann <[email protected]>

	scrollframe.tcl: Make -constrainedwidth 1 and
	-constrainedheight 1 work together.
	Patch by Simon Bachmann. Ticket [2fa44401d5]






>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
        widget.tcl: New procedure Widget::which (as in [namespace which]),
        that returns the fully qualified name for a widget option or
        widget variable. By Adrian Medrano Calvo. Ticket [a8705e5fd9]

        widget.tcl: Remove unneeded upvar. By Adrian Medrano Calvo.
        Ticket [43f93e0a97]
        
        widget.tcl et al: remove apparently unused procedure
        Widget::syncoptions and all calls. By Adrian Medrano Calvo.
        Ticket [3c2b8eafc6]


2013-12-13 Harald Oehlmann <[email protected]>

	scrollframe.tcl: Make -constrainedwidth 1 and
	-constrainedheight 1 work together.
	Patch by Simon Bachmann. Ticket [2fa44401d5]

Changes to button.tcl.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
        {-repeatdelay     Int    0  0 "%d >= 0"}
        {-repeatinterval  Int    0  0 "%d >= 0"}
        {-relief          Enum   raised  0 {raised sunken flat ridge solid groove link}}
    }

    DynamicHelp::include Button balloon

    Widget::syncoptions Button "" :cmd {-text {} -underline {}}

    variable _current ""
    variable _pressed ""

    bind BwButton <Enter>           {Button::_enter %W}
    bind BwButton <Leave>           {Button::_leave %W}
    bind BwButton <ButtonPress-1>   {Button::_press %W}
    bind BwButton <ButtonRelease-1> {Button::_release %W}






<
<







38
39
40
41
42
43
44


45
46
47
48
49
50
51
        {-repeatdelay     Int    0  0 "%d >= 0"}
        {-repeatinterval  Int    0  0 "%d >= 0"}
        {-relief          Enum   raised  0 {raised sunken flat ridge solid groove link}}
    }

    DynamicHelp::include Button balloon



    variable _current ""
    variable _pressed ""

    bind BwButton <Enter>           {Button::_enter %W}
    bind BwButton <Leave>           {Button::_leave %W}
    bind BwButton <ButtonPress-1>   {Button::_press %W}
    bind BwButton <ButtonRelease-1> {Button::_release %W}

Changes to combobox.tcl.

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	}
    } else {
	Widget::addmap ComboBox ArrowButton .a {
	    -background {} -foreground {} -disabledforeground {} -state {}
	}
    }

    Widget::syncoptions ComboBox Entry .e {-text {}}

    ::bind BwComboBox <FocusIn> [list after idle {BWidget::refocus %W %W.e}]
    ::bind BwComboBox <Destroy> [list ComboBox::_destroy %W]

    ::bind ListBoxHotTrack <Motion> {
        %W selection clear 0 end
        %W activate @%x,%y
        %W selection set @%x,%y






<
<







57
58
59
60
61
62
63


64
65
66
67
68
69
70
	}
    } else {
	Widget::addmap ComboBox ArrowButton .a {
	    -background {} -foreground {} -disabledforeground {} -state {}
	}
    }



    ::bind BwComboBox <FocusIn> [list after idle {BWidget::refocus %W %W.e}]
    ::bind BwComboBox <Destroy> [list ComboBox::_destroy %W]

    ::bind ListBoxHotTrack <Motion> {
        %W selection clear 0 end
        %W activate @%x,%y
        %W selection set @%x,%y

Changes to label.tcl.

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
        IMAGE   {move {}}
        BITMAP  {move {}}
        FGCOLOR {move {}}
        BGCOLOR {move {}}
        COLOR   {move {}}
    }

    Widget::syncoptions Label "" .l {-text {} -underline {}}

    bind BwLabel <FocusIn> [list Label::setfocus %W]
    bind BwLabel <Destroy> [list Label::_destroy %W]
}


# ------------------------------------------------------------------------------
#  Command Label::create






<
<







44
45
46
47
48
49
50


51
52
53
54
55
56
57
        IMAGE   {move {}}
        BITMAP  {move {}}
        FGCOLOR {move {}}
        BGCOLOR {move {}}
        COLOR   {move {}}
    }



    bind BwLabel <FocusIn> [list Label::setfocus %W]
    bind BwLabel <Destroy> [list Label::_destroy %W]
}


# ------------------------------------------------------------------------------
#  Command Label::create

Changes to labelentry.tcl.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    Widget::bwinclude LabelEntry Entry .e \
        remove {-fg -bg} \
        rename {-foreground -entryfg -background -entrybg}

    Widget::addmap LabelEntry "" :cmd {-background {}}

    Widget::syncoptions LabelEntry Entry .e {-text {}}
    Widget::syncoptions LabelEntry LabelFrame .labf {-label -text -underline {}}

    ::bind BwLabelEntry <FocusIn> [list focus %W.labf]
    ::bind BwLabelEntry <Destroy> [list LabelEntry::_destroy %W]
}


# ------------------------------------------------------------------------------
#  Command LabelEntry::create






<
<
<







20
21
22
23
24
25
26



27
28
29
30
31
32
33
    Widget::bwinclude LabelEntry Entry .e \
        remove {-fg -bg} \
        rename {-foreground -entryfg -background -entrybg}

    Widget::addmap LabelEntry "" :cmd {-background {}}




    ::bind BwLabelEntry <FocusIn> [list focus %W.labf]
    ::bind BwLabelEntry <Destroy> [list LabelEntry::_destroy %W]
}


# ------------------------------------------------------------------------------
#  Command LabelEntry::create

Changes to labelframe.tcl.

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
        {-side        Enum       left 1 {left right top bottom}}
        {-bd          Synonym    -borderwidth}
    }

    Widget::addmap LabelFrame "" :cmd {-background {}}
    Widget::addmap LabelFrame "" .f   {-background {} -relief {} -borderwidth {}}

    Widget::syncoptions LabelFrame Label .l {-text {} -underline {}}

    bind BwLabelFrame <FocusIn> [list Label::setfocus %W.l]
    bind BwLabelFrame <Destroy> [list LabelFrame::_destroy %W]
}


# ----------------------------------------------------------------------------
#  Command LabelFrame::create






<
<







29
30
31
32
33
34
35


36
37
38
39
40
41
42
        {-side        Enum       left 1 {left right top bottom}}
        {-bd          Synonym    -borderwidth}
    }

    Widget::addmap LabelFrame "" :cmd {-background {}}
    Widget::addmap LabelFrame "" .f   {-background {} -relief {} -borderwidth {}}



    bind BwLabelFrame <FocusIn> [list Label::setfocus %W.l]
    bind BwLabelFrame <Destroy> [list LabelFrame::_destroy %W]
}


# ----------------------------------------------------------------------------
#  Command LabelFrame::create

Changes to widget.tcl.

452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
	# Store the forward and backward mappings for this
	# option <-> realoption pair
        lappend classmap($option) $subpath $subclass $realopt
	set submap($realopt) $option
    }
}


# ----------------------------------------------------------------------------
#  Command Widget::syncoptions
# ----------------------------------------------------------------------------
proc Widget::syncoptions { class subclass subpath options } {
    upvar 0 ${class}::sync classync

    foreach {option realopt} $options {
        if { ![string length $realopt] } {
            set realopt $option
        }
        set classync($option) [list $subpath $subclass $realopt]
    }
}


# ----------------------------------------------------------------------------
#  Command Widget::init
# ----------------------------------------------------------------------------
proc Widget::init { class path options } {
    variable _inuse
    variable _class






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







452
453
454
455
456
457
458















459
460
461
462
463
464
465
	# Store the forward and backward mappings for this
	# option <-> realoption pair
        lappend classmap($option) $subpath $subclass $realopt
	set submap($realopt) $option
    }
}

















# ----------------------------------------------------------------------------
#  Command Widget::init
# ----------------------------------------------------------------------------
proc Widget::init { class path options } {
    variable _inuse
    variable _class