YesNoBox.st
changeset 572 121735c2aff6
parent 444 ef26eba8c854
child 585 8f395aba0173
equal deleted inserted replaced
571:ddc5d56bd636 572:121735c2aff6
   138 ! !
   138 ! !
   139 
   139 
   140 !YesNoBox class methodsFor:'instance creation'!
   140 !YesNoBox class methodsFor:'instance creation'!
   141 
   141 
   142 title:t yesText:yesString noText:noString
   142 title:t yesText:yesString noText:noString
       
   143     "return a new YesNoBox with title, and buttonLabels yesString/noString"
       
   144 
   143     ^ (self new) title:t yesText:yesString noText:noString
   145     ^ (self new) title:t yesText:yesString noText:noString
       
   146 
       
   147     "Modified: 23.4.1996 / 00:12:48 / cg"
   144 ! !
   148 ! !
   145 
   149 
   146 !YesNoBox class methodsFor:'icon bitmap'!
   150 !YesNoBox class methodsFor:'icon bitmap'!
   147 
   151 
   148 iconBitmap
   152 iconBitmap
   272     "Modified: 21.2.1996 / 00:58:38 / cg"
   276     "Modified: 21.2.1996 / 00:58:38 / cg"
   273 ! !
   277 ! !
   274 
   278 
   275 !YesNoBox methodsFor:'initialization'!
   279 !YesNoBox methodsFor:'initialization'!
   276 
   280 
   277 focusSequence
       
   278     ^ Array with:abortButton with:okButton 
       
   279 !
       
   280 
       
   281 initialize
   281 initialize
   282     super initialize.
   282     super initialize.
   283 
   283 
   284     label := resources string:'Choose'.
   284     label := resources string:'Choose'.
   285 
   285 
   295     abortButton model:self; change:#noPressed
   295     abortButton model:self; change:#noPressed
   296 ! !
   296 ! !
   297 
   297 
   298 !YesNoBox methodsFor:'queries'!
   298 !YesNoBox methodsFor:'queries'!
   299 
   299 
       
   300 focusSequence
       
   301     "return the focusSequence through the box"
       
   302 
       
   303     ^ Array with:abortButton with:okButton
       
   304 
       
   305     "Modified: 23.4.1996 / 00:13:12 / cg"
       
   306 !
       
   307 
   300 preferredExtent 
   308 preferredExtent 
       
   309     "compute the boxes preferredExtent from the components' sizes"
       
   310 
   301     |w h max mm|
   311     |w h max mm|
   302 
   312 
   303     mm := ViewSpacing.
   313     mm := ViewSpacing.
   304 
   314 
   305     "
   315     "
   315          + ((formLabel height) max:(textLabel height))
   325          + ((formLabel height) max:(textLabel height))
   316          + okButton heightIncludingBorder.
   326          + okButton heightIncludingBorder.
   317 
   327 
   318     ^ (w @ h).
   328     ^ (w @ h).
   319 
   329 
   320     "Modified: 21.2.1996 / 00:58:04 / cg"
   330     "Modified: 23.4.1996 / 00:13:41 / cg"
   321 ! !
   331 ! !
   322 
   332 
   323 !YesNoBox methodsFor:'startup'!
   333 !YesNoBox methodsFor:'startup'!
   324 
   334 
   325 confirm
   335 confirm
   369 ! !
   379 ! !
   370 
   380 
   371 !YesNoBox class methodsFor:'documentation'!
   381 !YesNoBox class methodsFor:'documentation'!
   372 
   382 
   373 version
   383 version
   374     ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.25 1996-03-01 13:05:52 cg Exp $'
   384     ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.26 1996-04-22 22:20:42 cg Exp $'
   375 ! !
   385 ! !