Bwidget Source Code
Check-in [bd129c0d53]
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:* dialog.tcl Changed behaviour of window close button. If -cancel is given, this button is invoked. The cancel option may now be changed the using configure method.
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: bd129c0d539244e718200f2548e8b58b1bbb9e26
User & Date: oehhar 2010-08-04 13:07:57
Context
2010-08-04
15:05
* init.tcl If msgcat is available use its locale to load a lang/*.rc file instead always using en.rc. check-in: 3bfa95eabd user: oehhar tags: bwidget
13:07
* dialog.tcl Changed behaviour of window close button. If -cancel is given, this button is invoked. The cancel option may now be changed the using configure method. check-in: bd129c0d53 user: oehhar tags: bwidget
2010-06-09
06:57
included lang/pl.rc from HEAD. check-in: fab9625df4 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to BWman/ButtonBox.html.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TR>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
 ?<I>option value...</I>?






|



|



|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
</TR>
<TR>
<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TD>
<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
 ?<I>option value...</I>?

Changes to BWman/Dialog.html.

145
146
147
148
149
150
151
152
153


154
155
156
157
158
159
160
Specifies the width of the buttons as specified for the option <B>width</B>
of the <B>button</b> widget.
</DD>
</DL>
<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
<DD>

Specifies the number of the cancel button of the Dialog. When user press Esc in the Dialog,
this button is invoked.


</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>

Specifies the number of the default button of the Dialog.
When user press Return in the Dialog, this button is invoked.






|
|
>
>







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Specifies the width of the buttons as specified for the option <B>width</B>
of the <B>button</b> widget.
</DD>
</DL>
<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
<DD>

Specifies the number of the cancel button of the Dialog. When user presses Esc or the windows close button,
this button is invoked.<BR>
If set to <B>-1</B>, Esc does not invoke anything.
The window close button <I>destroys</I> the dialog in this case and returns <B>-1</B>.
</DD>
</DL>
<DL><DT><A NAME="-default"><B>-default</B></A></DT>
<DD>

Specifies the number of the default button of the Dialog.
When user press Return in the Dialog, this button is invoked.

Changes to ChangeLog.








1
2
3
4
5
6
7






2010-06-09 Harald Oehlmann <[email protected]>

	* Included lang/pl.rc from HEAD.

2010-06-07 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.2 tagged ****
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
2010-08-04 Harald Oehlmann <[email protected]>

	* dialog.tcl Changed behaviour of window close button.
	If -cancel is given, this button is invoked.
	The cancel option may now be changed the using configure
	method.

2010-06-09 Harald Oehlmann <[email protected]>

	* Included lang/pl.rc from HEAD.

2010-06-07 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.2 tagged ****

Changes to dialog.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
114
115
116
117
118
119
120

121



122
123
124
125
126
127
128
...
137
138
139
140
141
142
143








144
145
146
147
148
149
150
# ----------------------------------------------------------------------------
#  dialog.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: dialog.tcl,v 1.15 2004/09/24 23:56:59 hobbs Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Dialog::create
#     - Dialog::configure
#     - Dialog::cget
#     - Dialog::getframe
#     - Dialog::add
................................................................................
    }
    if { [Widget::getoption $path -separator] } {
	Separator::create $path.sep -orient $orient -background $bg
    }
    set _widget($path,realized) 0
    set _widget($path,nbut)     0


    bind $path <Escape>  [list ButtonBox::invoke $path.bbox [Widget::getoption $path -cancel]]



    bind $path <Return>  [list ButtonBox::invoke $path.bbox default]

    return [Widget::create Dialog $path]
}


# ----------------------------------------------------------------------------
................................................................................
    if { [Widget::hasChanged $path -background bg] } {
        if { [winfo exists $path.label] } {
            $path.label configure -background $bg
        }
        if { [winfo exists $path.sep] } {
            Separator::configure $path.sep -background $bg
        }








    }
    return $res
}


# ----------------------------------------------------------------------------
#  Command Dialog::cget


|







 







>
|
>
>
>







 







>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
...
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# ----------------------------------------------------------------------------
#  dialog.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: dialog.tcl,v 1.15.2.1 2010/08/04 13:07:59 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - Dialog::create
#     - Dialog::configure
#     - Dialog::cget
#     - Dialog::getframe
#     - Dialog::add
................................................................................
    }
    if { [Widget::getoption $path -separator] } {
	Separator::create $path.sep -orient $orient -background $bg
    }
    set _widget($path,realized) 0
    set _widget($path,nbut)     0

    set cancel [Widget::getoption $path -cancel]
    bind $path <Escape>  [list ButtonBox::invoke $path.bbox $cancel]
    if {$cancel != -1} {
        wm protocol $path WM_DELETE_WINDOW [list ButtonBox::invoke $path.bbox $cancel]
    }
    bind $path <Return>  [list ButtonBox::invoke $path.bbox default]

    return [Widget::create Dialog $path]
}


# ----------------------------------------------------------------------------
................................................................................
    if { [Widget::hasChanged $path -background bg] } {
        if { [winfo exists $path.label] } {
            $path.label configure -background $bg
        }
        if { [winfo exists $path.sep] } {
            Separator::configure $path.sep -background $bg
        }
    }
    if { [Widget::hasChanged $path -cancel cancel] } {
        bind $path <Escape>  [list ButtonBox::invoke $path.bbox $cancel]
        if {$cancel == -1} {
            wm protocol $path WM_DELETE_WINDOW ""
        } else {
            wm protocol $path WM_DELETE_WINDOW [list ButtonBox::invoke $path.bbox $cancel]
        }
    }
    return $res
}


# ----------------------------------------------------------------------------
#  Command Dialog::cget