equal
deleted
inserted
replaced
1083 |
1083 |
1084 "Created: / 6.3.1997 / 15:46:02 / cg" |
1084 "Created: / 6.3.1997 / 15:46:02 / cg" |
1085 "Modified: / 31.10.1997 / 11:54:35 / cg" |
1085 "Modified: / 31.10.1997 / 11:54:35 / cg" |
1086 ! ! |
1086 ! ! |
1087 |
1087 |
1088 !DialogBox class methodsFor:'Signal constants'! |
|
1089 |
|
1090 aboutToOpenBoxNotificationSignal |
|
1091 ^ AboutToOpenBoxNotificationSignal |
|
1092 ! ! |
|
1093 |
|
1094 !DialogBox class methodsFor:'class initialization'! |
1088 !DialogBox class methodsFor:'class initialization'! |
1095 |
1089 |
1096 initialize |
1090 initialize |
1097 self == DialogBox ifTrue:[ |
1091 self == DialogBox ifTrue:[ |
1098 Dialog := self |
1092 Dialog := self |
1099 ]. |
1093 ]. |
1100 |
1094 |
1101 DefaultFocusToOKOnLeave := false. |
1095 DefaultFocusToOKOnLeave := false. |
1102 AboutToOpenBoxNotificationSignal := QuerySignal new. |
1096 |
1103 |
1097 "/ for backward whitebox compatibility (customer subclasses which access the classVar directly) |
1104 "Created: 8.3.1996 / 21:18:54 / cg" |
1098 AboutToOpenBoxNotificationSignal := SimpleView aboutToOpenBoxNotificationSignal |
1105 "Modified: 10.4.1996 / 08:16:18 / cg" |
|
1106 ! ! |
1099 ! ! |
1107 |
1100 |
1108 !DialogBox class methodsFor:'common dialogs'! |
1101 !DialogBox class methodsFor:'common dialogs'! |
1109 |
1102 |
1110 about:text label:label icon:image |
1103 about:text label:label icon:image |
3434 "/ box entryCompletionBlock:[:text | box |
3427 "/ box entryCompletionBlock:[:text | box |
3435 "/ initialText:(entryCompletionBlock value:text) |
3428 "/ initialText:(entryCompletionBlock value:text) |
3436 "/ selected:false]. |
3429 "/ selected:false]. |
3437 box entryCompletionBlock:entryCompletionBlock. |
3430 box entryCompletionBlock:entryCompletionBlock. |
3438 ]. |
3431 ]. |
3439 AboutToOpenBoxNotificationSignal raiseRequestWith:box. |
|
3440 |
3432 |
3441 centered := centeredOrNil ? (ForceModalBoxesToOpenAtCenter ? false). |
3433 centered := centeredOrNil ? (ForceModalBoxesToOpenAtCenter ? false). |
3442 |
3434 |
3443 aPoint notNil ifTrue:[ |
3435 aPoint notNil ifTrue:[ |
3444 box showAt:aPoint center:centered |
3436 box showAt:aPoint center:centered |
4154 |
4146 |
4155 |dialog textHolder| |
4147 |dialog textHolder| |
4156 |
4148 |
4157 textHolder := ValueHolder new. |
4149 textHolder := ValueHolder new. |
4158 dialog := Dialog forRequestText:title lines:numLines columns:numCols initialAnswer:initialText model:textHolder. |
4150 dialog := Dialog forRequestText:title lines:numLines columns:numCols initialAnswer:initialText model:textHolder. |
4159 AboutToOpenBoxNotificationSignal raiseRequestWith:dialog. |
|
4160 dialog open. |
4151 dialog open. |
4161 dialog accepted ifTrue:[ |
4152 dialog accepted ifTrue:[ |
4162 ^ textHolder value |
4153 ^ textHolder value |
4163 ]. |
4154 ]. |
4164 ^ nil |
4155 ^ nil |
5084 ! |
5075 ! |
5085 |
5076 |
5086 showBox:aBox |
5077 showBox:aBox |
5087 |wg v| |
5078 |wg v| |
5088 |
5079 |
5089 AboutToOpenBoxNotificationSignal raiseRequestWith:aBox. |
|
5090 ForceModalBoxesToOpenAtCenter == true ifTrue:[ |
5080 ForceModalBoxesToOpenAtCenter == true ifTrue:[ |
5091 aBox showAtCenter. |
5081 aBox showAtCenter. |
5092 ^ self. |
5082 ^ self. |
5093 ]. |
5083 ]. |
5094 ForceModalBoxesToOpenAtPointer == true ifTrue:[ |
5084 ForceModalBoxesToOpenAtPointer == true ifTrue:[ |
8789 ! ! |
8779 ! ! |
8790 |
8780 |
8791 !DialogBox class methodsFor:'documentation'! |
8781 !DialogBox class methodsFor:'documentation'! |
8792 |
8782 |
8793 version |
8783 version |
8794 ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.283 2009-05-14 18:54:37 cg Exp $' |
8784 ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.284 2009-07-08 11:49:02 cg Exp $' |
8795 ! ! |
8785 ! ! |
8796 |
8786 |
8797 DialogBox initialize! |
8787 DialogBox initialize! |