Bwidget Source Code
Check-in [5a57a30f89]
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:Changed bwinclude ... "" to bwinclude ... :cmd so that reverse mappings work.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5a57a30f89268c58b175d72763e9a482c3e31b22
User & Date: ericm 2000-02-24 00:04:29
Context
2000-02-24
18:06
Corrected target.xbm from Boudillier. check-in: e65e332467 user: ericm tags: trunk
00:04
Changed bwinclude ... "" to bwinclude ... :cmd so that reverse mappings work. check-in: 5a57a30f89 user: ericm tags: trunk
2000-02-23
19:22
Replaced the boolean test function with a more efficient one. check-in: f3f827b7ac user: ericm tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to messagedlg.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    Widget::tkinclude MessageDlg message .frame.msg \
        remove     {-cursor -highlightthickness -highlightbackground -highlightcolor \
                        -relief -borderwidth -takefocus -textvariable} \
        rename     {-text -message} \
        initialize {-aspect 800 -anchor c -justify center}

    Widget::bwinclude MessageDlg Dialog "" \
        remove {-modal -image -bitmap -side -anchor -separator \
                    -homogeneous -padx -pady -spacing}

    Widget::declare MessageDlg {
        {-icon       Enum   info 0 {none error info question warning}}
        {-type       Enum   user 0 {abortretryignore ok okcancel retrycancel yesno yesnocancel user}}
        {-buttons    String ""   0}
................................................................................
    Widget::setoption "$path#Message" -title $title
    if { $tcl_platform(platform) == "unix" || $type == "user" } {
        if { $icon != "none" } {
            set image [Bitmap::get $icon]
        } else {
            set image ""
        }
        eval Dialog::create $path [Widget::subcget "$path#Message" ""] \
            -image $image -modal local -side bottom -anchor c
        set idbut 0
        foreach but $lbut {
            Dialog::add $path -text $but -name $but
        }
        set frame [Dialog::getframe $path]







|







 







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    Widget::tkinclude MessageDlg message .frame.msg \
        remove     {-cursor -highlightthickness -highlightbackground -highlightcolor \
                        -relief -borderwidth -takefocus -textvariable} \
        rename     {-text -message} \
        initialize {-aspect 800 -anchor c -justify center}

    Widget::bwinclude MessageDlg Dialog :cmd \
        remove {-modal -image -bitmap -side -anchor -separator \
                    -homogeneous -padx -pady -spacing}

    Widget::declare MessageDlg {
        {-icon       Enum   info 0 {none error info question warning}}
        {-type       Enum   user 0 {abortretryignore ok okcancel retrycancel yesno yesnocancel user}}
        {-buttons    String ""   0}
................................................................................
    Widget::setoption "$path#Message" -title $title
    if { $tcl_platform(platform) == "unix" || $type == "user" } {
        if { $icon != "none" } {
            set image [Bitmap::get $icon]
        } else {
            set image ""
        }
        eval Dialog::create $path [Widget::subcget "$path#Message" :cmd] \
            -image $image -modal local -side bottom -anchor c
        set idbut 0
        foreach but $lbut {
            Dialog::add $path -text $but -name $but
        }
        set frame [Dialog::getframe $path]

Changes to progressdlg.tcl.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#     - ProgressDlg::create
# ------------------------------------------------------------------------------

namespace eval ProgressDlg {
    Dialog::use
    ProgressBar::use

    Widget::bwinclude ProgressDlg Dialog "" \
        remove {
            -modal -image -bitmap -side -anchor -cancel -default
            -homogeneous -padx -pady -spacing
        }

    Widget::bwinclude ProgressDlg ProgressBar .frame.pb \
        remove {-orient -width -height}
................................................................................
        {-height       TkResource 2  0 label}
        {-textvariable TkResource "" 0 label}
        {-font         TkResource "" 0 label}
        {-stop         String "" 0}
        {-command      String "" 0}
    }

    Widget::addmap ProgressDlg "" .frame.msg \
        {-width {} -height {} -textvariable {} -font {} -background {}}

    proc ::ProgressDlg { path args } { return [eval ProgressDlg::create $path $args] }
    proc use {} {}
}


# ------------------------------------------------------------------------------
#  Command ProgressDlg::create
# ------------------------------------------------------------------------------
proc ProgressDlg::create { path args } {
    Widget::init ProgressDlg "$path#ProgressDlg" $args

    eval Dialog::create $path [Widget::subcget "$path#ProgressDlg" ""] \
        -image [Bitmap::get hourglass] -modal none -side bottom -anchor c
    wm protocol $path WM_DELETE_WINDOW {;}

    set frame [Dialog::getframe $path]
    bind $frame <Destroy> "Widget::destroy $path#ProgressDlg"
    $frame configure -cursor watch







|







 







|













|







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#     - ProgressDlg::create
# ------------------------------------------------------------------------------

namespace eval ProgressDlg {
    Dialog::use
    ProgressBar::use

    Widget::bwinclude ProgressDlg Dialog :cmd \
        remove {
            -modal -image -bitmap -side -anchor -cancel -default
            -homogeneous -padx -pady -spacing
        }

    Widget::bwinclude ProgressDlg ProgressBar .frame.pb \
        remove {-orient -width -height}
................................................................................
        {-height       TkResource 2  0 label}
        {-textvariable TkResource "" 0 label}
        {-font         TkResource "" 0 label}
        {-stop         String "" 0}
        {-command      String "" 0}
    }

    Widget::addmap ProgressDlg :cmd .frame.msg \
        {-width {} -height {} -textvariable {} -font {} -background {}}

    proc ::ProgressDlg { path args } { return [eval ProgressDlg::create $path $args] }
    proc use {} {}
}


# ------------------------------------------------------------------------------
#  Command ProgressDlg::create
# ------------------------------------------------------------------------------
proc ProgressDlg::create { path args } {
    Widget::init ProgressDlg "$path#ProgressDlg" $args

    eval Dialog::create $path [Widget::subcget "$path#ProgressDlg" :cmd] \
        -image [Bitmap::get hourglass] -modal none -side bottom -anchor c
    wm protocol $path WM_DELETE_WINDOW {;}

    set frame [Dialog::getframe $path]
    bind $frame <Destroy> "Widget::destroy $path#ProgressDlg"
    $frame configure -cursor watch