.
--- a/ArrButton.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ArrButton.st Thu Sep 07 14:46:28 1995 +0200
@@ -30,7 +30,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/ArrButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ArrButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
'!
!ArrowButton class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/ArrButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ArrButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
"
!
@@ -642,7 +642,7 @@
drawWith:fg and:bg
"this is a q&d hack for motif ..."
- |topLeft botRight noColor allColor isString orgX orgY|
+ |topLeft botRight noColor allColor isString orgX orgY r|
arrowStyle ~~ #motif ifTrue:[
^ super drawWith:fg and:bg.
@@ -675,11 +675,15 @@
isString ifFalse:[
logo depth ~~ 1 ifTrue:[
"/ allow for 4-bit logos (for motif)
-
- logo colorMap:(Array with:bg
- with:topLeft
- with:botRight
- with:fg).
+ "/ one catch: if the view background is a complex pixmap
+ "/ we cannot use this as colorMap entry.
+ "/ therefore, compute their average colors and take these
+ "/ (this looks ok for buttons ...)
+ r := (0@0 corner:10@10).
+ logo colorMap:(Array with:(bg averageColorIn:r)
+ with:(topLeft averageColorIn:r)
+ with:(botRight averageColorIn:r)
+ with:(fg averageColorIn:r)).
logo photometric:#palette.
self displayForm:logo x:labelOriginX y:labelOriginY.
^ self
--- a/ArrowButton.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ArrowButton.st Thu Sep 07 14:46:28 1995 +0200
@@ -30,7 +30,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
'!
!ArrowButton class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
"
!
@@ -642,7 +642,7 @@
drawWith:fg and:bg
"this is a q&d hack for motif ..."
- |topLeft botRight noColor allColor isString orgX orgY|
+ |topLeft botRight noColor allColor isString orgX orgY r|
arrowStyle ~~ #motif ifTrue:[
^ super drawWith:fg and:bg.
@@ -675,11 +675,15 @@
isString ifFalse:[
logo depth ~~ 1 ifTrue:[
"/ allow for 4-bit logos (for motif)
-
- logo colorMap:(Array with:bg
- with:topLeft
- with:botRight
- with:fg).
+ "/ one catch: if the view background is a complex pixmap
+ "/ we cannot use this as colorMap entry.
+ "/ therefore, compute their average colors and take these
+ "/ (this looks ok for buttons ...)
+ r := (0@0 corner:10@10).
+ logo colorMap:(Array with:(bg averageColorIn:r)
+ with:(topLeft averageColorIn:r)
+ with:(botRight averageColorIn:r)
+ with:(fg averageColorIn:r)).
logo photometric:#palette.
self displayForm:logo x:labelOriginX y:labelOriginY.
^ self
--- a/Button.st Thu Aug 31 07:01:01 1995 +0200
+++ b/Button.st Thu Sep 07 14:46:28 1995 +0200
@@ -39,7 +39,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.28 1995-08-28 21:12:03 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.29 1995-09-07 12:44:18 claus Exp $
'!
!Button class methodsFor:'documentation'!
@@ -60,7 +60,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Button.st,v 1.28 1995-08-28 21:12:03 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Button.st,v 1.29 1995-09-07 12:44:18 claus Exp $
"
!
@@ -1074,6 +1074,11 @@
"return true, if this button is currently pressed"
^ controller pressed
+!
+
+specClass
+ self class == Button ifTrue:[^ ActionButtonSpec].
+ ^ nil
! !
!Button methodsFor:'accessing-look'!
@@ -1259,11 +1264,19 @@
!
autoRepeat
- "turn on autorepeat"
+ "turn on autorepeat OBSOLETE"
controller autoRepeat
!
+autoRepeat:aBoolean
+ "turn on/off autorepeat"
+
+ controller autoRepeat:aBoolean
+
+ "Modified: 5.9.1995 / 22:06:13 / claus"
+!
+
disable
"disable the button"
--- a/ButtonC.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ButtonC.st Thu Sep 07 14:46:28 1995 +0200
@@ -40,7 +40,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.16 1995-08-28 21:12:11 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.17 1995-09-07 12:44:23 claus Exp $
"
!
@@ -209,12 +209,21 @@
!
autoRepeat
- "turn on autorepeat"
+ "turn on autorepeat. OBSOLETE"
autoRepeat := true.
repeatBlock := [self repeat]
!
+autoRepeat:aBoolean
+ "turn on/off autorepeat"
+
+ autoRepeat := aBoolean.
+ repeatBlock := [self repeat]
+
+ "Modified: 5.9.1995 / 22:06:00 / claus"
+!
+
action:aBlock
"convenient method: depending on the setting the triggerOnDown flag,
either set the press-action clear any release-action or
@@ -492,10 +501,11 @@
pressed ifTrue:[
enableChannel value ifTrue:[
active ifFalse:[
- active := true.
- releaseActionBlock notNil ifTrue:[releaseActionBlock value].
- pressActionBlock notNil ifTrue:[pressActionBlock value].
- active := false.
+ self performAction.
+"/ active := true.
+"/ releaseActionBlock notNil ifTrue:[releaseActionBlock value].
+"/ pressActionBlock notNil ifTrue:[pressActionBlock value].
+"/ active := false.
autoRepeat ifTrue:[
Processor addTimedBlock:repeatBlock afterSeconds:repeatDelay
--- a/ButtonController.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ButtonController.st Thu Sep 07 14:46:28 1995 +0200
@@ -40,7 +40,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.16 1995-08-28 21:12:11 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.17 1995-09-07 12:44:23 claus Exp $
"
!
@@ -209,12 +209,21 @@
!
autoRepeat
- "turn on autorepeat"
+ "turn on autorepeat. OBSOLETE"
autoRepeat := true.
repeatBlock := [self repeat]
!
+autoRepeat:aBoolean
+ "turn on/off autorepeat"
+
+ autoRepeat := aBoolean.
+ repeatBlock := [self repeat]
+
+ "Modified: 5.9.1995 / 22:06:00 / claus"
+!
+
action:aBlock
"convenient method: depending on the setting the triggerOnDown flag,
either set the press-action clear any release-action or
@@ -492,10 +501,11 @@
pressed ifTrue:[
enableChannel value ifTrue:[
active ifFalse:[
- active := true.
- releaseActionBlock notNil ifTrue:[releaseActionBlock value].
- pressActionBlock notNil ifTrue:[pressActionBlock value].
- active := false.
+ self performAction.
+"/ active := true.
+"/ releaseActionBlock notNil ifTrue:[releaseActionBlock value].
+"/ pressActionBlock notNil ifTrue:[pressActionBlock value].
+"/ active := false.
autoRepeat ifTrue:[
Processor addTimedBlock:repeatBlock afterSeconds:repeatDelay
--- a/DialogBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/DialogBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -25,7 +25,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.20 1995-08-27 00:33:56 claus Exp $
+$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.21 1995-09-07 12:44:28 claus Exp $
"
!
@@ -959,11 +959,8 @@
okButton notNil ifTrue:[okButton turnOffWithoutRedraw].
self doAccept.
- "/ only hide, if I have been opened modal
-
- (windowGroup notNil and:[windowGroup isModal]) ifTrue:[
- self hideAndEvaluate:okAction.
- ]
+ "/ actually, only hides if I have been opened modal
+ self hideAndEvaluate:okAction.
!
abortPressed
@@ -972,6 +969,8 @@
abortButton turnOffWithoutRedraw.
acceptValue value:false.
+
+ "/ actually, only hides if I have been opened modal
self hideAndEvaluate:abortAction
!
@@ -1653,10 +1652,15 @@
!
hideAndEvaluate:aBlock
- "make myself invisible and evaluate aBlock"
+ "if I am modal, make myself invisible and evaluate aBlock.
+ If nonModal, stay up, but also evaluate the block."
- self hide.
+ (windowGroup notNil and:[windowGroup isModal]) ifTrue:[
+ self hide.
+ ].
aBlock notNil ifTrue:[aBlock value]
+
+ "Modified: 5.9.1995 / 19:06:33 / claus"
! !
!DialogBox methodsFor:'accessing-elements'!
--- a/ETxtView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ETxtView.st Thu Sep 07 14:46:28 1995 +0200
@@ -28,7 +28,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.32 1995-07-23 03:01:20 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.33 1995-09-07 12:44:35 claus Exp $
'!
!EditTextView class methodsFor:'documentation'!
@@ -49,7 +49,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.32 1995-07-23 03:01:20 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.33 1995-09-07 12:44:35 claus Exp $
"
!
@@ -1701,6 +1701,14 @@
]
!
+insertLines:aStringCollection before:lineNr
+ "insert a bunch before line lineNr"
+
+ self insertLines:aStringCollection from:1 to:aStringCollection size before:lineNr
+
+ "Modified: 6.9.1995 / 20:51:03 / claus"
+!
+
deleteSelection
"delete the selection"
--- a/EditField.st Thu Aug 31 07:01:01 1995 +0200
+++ b/EditField.st Thu Sep 07 14:46:28 1995 +0200
@@ -15,7 +15,7 @@
EditTextView subclass:#EditField
instanceVariableNames:'leaveAction enabled enableAction crAction tabAction converter
leaveKeys immediateAccept acceptOnLeave acceptOnReturn
- lengthLimit entryCompletionBlock'
+ lengthLimit entryCompletionBlock passwordCharacter'
classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
DefaultSelectionForegroundColor DefaultSelectionBackgroundColor
DefaultFont'
@@ -27,7 +27,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.27 1995-08-23 18:05:07 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.28 1995-09-07 12:44:43 claus Exp $
'!
!EditField class methodsFor:'documentation'!
@@ -48,7 +48,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.27 1995-08-23 18:05:07 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.28 1995-09-07 12:44:43 claus Exp $
"
!
@@ -523,14 +523,16 @@
A good place to add immediateAccept functionality and check for the
lengthLimit."
- |string|
+ |string c|
super textChanged.
string := self contents.
lengthLimit notNil ifTrue:[
string size > lengthLimit ifTrue:[
- self contents:(string := string copyTo:lengthLimit).
+ c := cursorCol.
+ self contents:(string copyTo:lengthLimit).
self flash.
+ self cursorCol:c.
]
].
immediateAccept ifTrue:[
@@ -567,12 +569,44 @@
^ self
!
+visibleAt:visLineNr
+ "return the string at lineNr for display.
+ If there is a password character, return a string consisting of those only."
+
+ |s|
+
+ s := super visibleAt:visLineNr.
+ passwordCharacter notNil ifTrue:[
+ ^ String new:(s size) withAll:passwordCharacter
+ ].
+ ^ s
+
+ "Modified: 6.9.1995 / 12:25:06 / claus"
+!
+
startAutoScrollDown:y
"no vertical scrolling in editfields"
^ self
! !
+!EditField methodsFor:'scrolling'!
+
+makeColVisible:col inLine:line
+ "dont scroll for the cursor, if its behond the text and a lengthLimit
+ is present."
+
+ lengthLimit notNil ifTrue:[
+ (col == cursorCol and:[col > lengthLimit]) ifTrue:[
+ ^ super makeColVisible:lengthLimit inLine:line
+ ]
+ ].
+ ^ super makeColVisible:col inLine:line
+
+ "Modified: 6.9.1995 / 13:57:53 / claus"
+!
+
+
!EditField methodsFor:'accessing'!
contents
@@ -772,6 +806,28 @@
^ converter
!
+passwordCharacter:aCharacter
+ passwordCharacter := aCharacter
+
+ "Modified: 6.9.1995 / 12:25:33 / claus"
+!
+
+passwordCharacter
+ ^ passwordCharacter
+
+ "Modified: 6.9.1995 / 12:25:39 / claus"
+!
+
+maxChars
+ "return the maximum number of characters that are allowed in
+ the field.
+ A limit of nil means: unlimited. This is the default."
+
+ ^ lengthLimit
+
+ "Modified: 6.9.1995 / 13:43:33 / claus"
+!
+
maxChars:aNumberOrNil
"set the maximum number of characters that are allowed in
the field. Additional input will be ignored by the field.
@@ -867,24 +923,42 @@
!EditField methodsFor:'queries'!
+specClass
+ self class == EditField ifTrue:[^ InputFieldSpec].
+ ^ nil
+
+ "Modified: 5.9.1995 / 17:28:27 / claus"
+!
+
preferredExtent
"return the preferred extent of this view.
That is the width of the string plus some extra,
but not wider than half of the screen"
- |string w|
+ |string w f|
string := self contents.
(string isNil or:[string isBlank]) ifTrue:[
string := ' ' "/ just any string is ok ^ super preferredExtent
].
- w := (((font on:device) widthOf:string) * 1.5) rounded.
+ f := font on:device.
+ w := ((f widthOf:string) * 1.5) rounded.
w := w min:(device width // 2).
- ^ w @ self height
+ ^ w @ (f height * 1.5) rounded
+
+ "Modified: 6.9.1995 / 19:24:06 / claus"
! !
!EditField methodsFor:'cursor drawing'!
+drawFromVisibleLine:startVisLineNr to:endVisLineNr with:fg and:bg
+ startVisLineNr to:endVisLineNr do:[:visLine |
+ self drawVisibleLine:visLine with:fg and:bg
+ ]
+
+ "Modified: 6.9.1995 / 12:24:29 / claus"
+!
+
showCursor
"make cursor visible if currently invisible - but only if this
EditField is enabled"
@@ -1011,7 +1085,7 @@
].
"
- did someone react ?
+ did someone react (i.e. has my extent changed) ?
(if not, we scroll horizontally)
"
xCol := (self xOfCol:cursorCol inVisibleLine:cursorLine) - leftOffset.
@@ -1025,9 +1099,10 @@
]
].
newOffset ~~ leftOffset ifTrue:[
- leftOffset := newOffset.
- self clear.
- self redraw
+ self scrollHorizontalTo:newOffset.
+"/ leftOffset := newOffset.
+"/ self clear.
+"/ self redraw
]
!
--- a/EditTextView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/EditTextView.st Thu Sep 07 14:46:28 1995 +0200
@@ -28,7 +28,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.32 1995-07-23 03:01:20 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.33 1995-09-07 12:44:35 claus Exp $
'!
!EditTextView class methodsFor:'documentation'!
@@ -49,7 +49,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.32 1995-07-23 03:01:20 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.33 1995-09-07 12:44:35 claus Exp $
"
!
@@ -1701,6 +1701,14 @@
]
!
+insertLines:aStringCollection before:lineNr
+ "insert a bunch before line lineNr"
+
+ self insertLines:aStringCollection from:1 to:aStringCollection size before:lineNr
+
+ "Modified: 6.9.1995 / 20:51:03 / claus"
+!
+
deleteSelection
"delete the selection"
--- a/EnterBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/EnterBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -37,7 +37,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/EnterBox.st,v 1.29 1995-08-29 16:43:43 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EnterBox.st,v 1.30 1995-09-07 12:44:49 claus Exp $
"
!
@@ -329,14 +329,14 @@
^ Array with:enterField with:abortButton with:okButton
! !
-!EnterBox methodsFor:'dependencies'!
+!EnterBox methodsFor:'change & update'!
update:something with:someArgument from:changedObject
"sent if my enterbox thinks it needs more real-estate ..."
changedObject == enterField ifTrue:[
something == #preferredExtent ifTrue:[
- shown ifTrue:[self resize].
+ shown ifTrue:[self resizeUnderPointer].
^ self
]
].
@@ -376,11 +376,14 @@
hideAndEvaluate:aBlock
"common processing for all ok-actions (see subclasses);
- shut down box, fetch entered string and evaluate the action with it"
+ if modal, shut down box.
+ Then fetch entered string and evaluate the passed action with it"
|string|
- self hide.
+ (windowGroup notNil and:[windowGroup isModal]) ifTrue:[
+ self hide.
+ ].
aBlock notNil ifTrue:[
string := self contents.
string isNil ifTrue:[
--- a/FSelBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/FSelBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/FSelBox.st,v 1.19 1995-08-29 16:43:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/FSelBox.st,v 1.20 1995-09-07 12:44:53 claus Exp $
'!
!FileSelectionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/FSelBox.st,v 1.19 1995-08-29 16:43:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/FSelBox.st,v 1.20 1995-09-07 12:44:53 claus Exp $
"
!
@@ -216,7 +216,7 @@
]
! !
-!FileSelectionBox methodsFor:'dependencies'!
+!FileSelectionBox methodsFor:'change & update'!
update:something with:argument from:changedObject
|commonName index|
--- a/FileSelectionBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/FileSelectionBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.19 1995-08-29 16:43:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.20 1995-09-07 12:44:53 claus Exp $
'!
!FileSelectionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.19 1995-08-29 16:43:51 claus Exp $
+$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.20 1995-09-07 12:44:53 claus Exp $
"
!
@@ -216,7 +216,7 @@
]
! !
-!FileSelectionBox methodsFor:'dependencies'!
+!FileSelectionBox methodsFor:'change & update'!
update:something with:argument from:changedObject
|commonName index|
--- a/FramedBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/FramedBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -24,7 +24,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.14 1995-08-11 16:07:16 claus Exp $
+$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.15 1995-09-07 12:44:58 claus Exp $
'!
!FramedBox class methodsFor:'documentation'!
@@ -45,7 +45,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.14 1995-08-11 16:07:16 claus Exp $
+$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.15 1995-09-07 12:44:58 claus Exp $
"
!
@@ -338,9 +338,15 @@
"set the frames labelstring"
(label ~= aString) ifTrue:[
- label := aString.
+ aString isEmpty ifTrue:[
+ label := nil
+ ] ifFalse:[
+ label := aString.
+ ].
self redrawIfShown
]
+
+ "Modified: 5.9.1995 / 17:20:05 / claus"
!
foregroundColor
@@ -360,11 +366,21 @@
frameShown
"return true, if frame is shown;
- if false, oly the label is shown"
+ if false, oly the label is shown.
+ OBSOLETE; use #showFrame."
^ showFrame
!
+showFrame
+ "return if the view shows its frame.
+ If false, only the label is drawn"
+
+ ^ showFrame
+
+ "Modified: 5.9.1995 / 17:21:37 / claus"
+!
+
showFrame:aBoolean
"turn on/off showing of the frame -
without a frame, only the label is shown at its position"
@@ -417,6 +433,16 @@
horizontalSpace := aNumber
!
+horizontalSpace
+ "return the number of pixels by which the frame is inset horizontally.
+ The default, nil, lets the box compute the horizontal inset from the
+ labels font height."
+
+ ^ horizontalSpace
+
+ "Modified: 5.9.1995 / 17:24:21 / claus"
+!
+
layout
"OBSOLETE compatibility interface. Will vanish"
@@ -424,11 +450,16 @@
^ labelPosition
!
-layout:aSymbol
- "OBSOLETE compatibility interface. Will vanish"
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #labelPosition:'.
- ^ self labelPosition:aSymbol
+ ^ self labelPosition:something
+
+ "Modified: 31.8.1995 / 23:07:00 / claus"
! !
!FramedBox methodsFor:'initialization'!
--- a/HPanelV.st Thu Aug 31 07:01:01 1995 +0200
+++ b/HPanelV.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.14 1995-07-23 03:01:42 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.15 1995-09-07 12:45:02 claus Exp $
'!
!HorizontalPanelView class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.14 1995-07-23 03:01:42 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/HPanelV.st,v 1.15 1995-09-07 12:45:02 claus Exp $
"
!
@@ -980,11 +980,17 @@
^ self horizontalLayout
!
-layout:aSymbol
- "leftover for historic reasons - do not use any more"
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ leftover for historic reasons - do not use any more.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #horizontalLayout:'.
- ^ self horizontalLayout:aSymbol
+ ^ self horizontalLayout:something
+
+ "Modified: 31.8.1995 / 23:07:33 / claus"
! !
@@ -1253,8 +1259,8 @@
or:[hL == #fitSpace
or:[resizeToMaxH]]) ifTrue:[
child origin:(xpos truncated @ ypos)
- corner:(xpos + wEach - (child borderWidth)) truncated
- @ (ypos + child height).
+ corner:(xpos + wEach - (child borderWidth) - 1) truncated
+ @ (ypos + child height - 1).
advance := wEach.
] ifFalse:[
child origin:(xpos @ ypos).
@@ -1266,14 +1272,16 @@
|x|
hL == #leftFit ifTrue:[
- x := width - margin.
+ x := width - margin - 1.
].
hL == #leftSpaceFit ifTrue:[
- x := width - margin - space
+ x := width - margin - 1 - space
].
x notNil ifTrue:[
- subViews last corner:(x @ (ypos + child height))
+ subViews last corner:(x @ (ypos + child height - 1))
]
]
].
+
+ "Modified: 4.9.1995 / 18:43:10 / claus"
! !
--- a/HorizontalPanelView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/HorizontalPanelView.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.14 1995-07-23 03:01:42 claus Exp $
+$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.15 1995-09-07 12:45:02 claus Exp $
'!
!HorizontalPanelView class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.14 1995-07-23 03:01:42 claus Exp $
+$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.15 1995-09-07 12:45:02 claus Exp $
"
!
@@ -980,11 +980,17 @@
^ self horizontalLayout
!
-layout:aSymbol
- "leftover for historic reasons - do not use any more"
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ leftover for historic reasons - do not use any more.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #horizontalLayout:'.
- ^ self horizontalLayout:aSymbol
+ ^ self horizontalLayout:something
+
+ "Modified: 31.8.1995 / 23:07:33 / claus"
! !
@@ -1253,8 +1259,8 @@
or:[hL == #fitSpace
or:[resizeToMaxH]]) ifTrue:[
child origin:(xpos truncated @ ypos)
- corner:(xpos + wEach - (child borderWidth)) truncated
- @ (ypos + child height).
+ corner:(xpos + wEach - (child borderWidth) - 1) truncated
+ @ (ypos + child height - 1).
advance := wEach.
] ifFalse:[
child origin:(xpos @ ypos).
@@ -1266,14 +1272,16 @@
|x|
hL == #leftFit ifTrue:[
- x := width - margin.
+ x := width - margin - 1.
].
hL == #leftSpaceFit ifTrue:[
- x := width - margin - space
+ x := width - margin - 1 - space
].
x notNil ifTrue:[
- subViews last corner:(x @ (ypos + child height))
+ subViews last corner:(x @ (ypos + child height - 1))
]
]
].
+
+ "Modified: 4.9.1995 / 18:43:10 / claus"
! !
--- a/LSelBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/LSelBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.16 1995-08-11 16:07:24 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.17 1995-09-07 12:45:09 claus Exp $
'!
!ListSelectionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.16 1995-08-11 16:07:24 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.17 1995-09-07 12:45:09 claus Exp $
"
!
@@ -70,6 +70,7 @@
box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
box showAtPointer
+
with a default:
|box|
@@ -80,6 +81,22 @@
box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
box initialText:'foo'.
box showAtPointer
+
+
+ opening the box modeless (a stand-by box):
+ (in this case, the default ok- and abortActions do not hide the box;
+ therefore, we have to set those explicitely)
+
+ |box|
+
+ box := ListSelectionBox new.
+ box title:'select something:'.
+ box list:#('foo' 'bar' 'baz').
+ box abortText:'close'.
+ box okText:'apply'.
+ box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
+ box abortAction:[:dummy | box hide].
+ box openModeless
"
! !
--- a/Label.st Thu Aug 31 07:01:01 1995 +0200
+++ b/Label.st Thu Sep 07 14:46:28 1995 +0200
@@ -25,7 +25,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Label.st,v 1.30 1995-08-27 00:34:19 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Label.st,v 1.31 1995-09-07 12:45:12 claus Exp $
'!
!Label class methodsFor:'documentation'!
@@ -46,7 +46,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Label.st,v 1.30 1995-08-27 00:34:19 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Label.st,v 1.31 1995-09-07 12:45:12 claus Exp $
"
!
@@ -939,14 +939,20 @@
^ fixSize
!
-layout:how
- "for protocol compatibility: alias for #adjust:.
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ for protocol compatibility: alias for #adjust:.
Please use #adjust:, since #layout: conflicts with a method
in VW (which has a completely different meaning).
- In future versions of ST/X, #layout: will behave the VW way."
+ In future versions of ST/X, #layout: will behave the VW way.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #adjust:'.
- self adjust:how
+ self adjust:something
+
+ "Modified: 31.8.1995 / 23:08:13 / claus"
!
layout
--- a/ListSelectionBox.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ListSelectionBox.st Thu Sep 07 14:46:28 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.16 1995-08-11 16:07:24 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.17 1995-09-07 12:45:09 claus Exp $
'!
!ListSelectionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.16 1995-08-11 16:07:24 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ListSelectionBox.st,v 1.17 1995-09-07 12:45:09 claus Exp $
"
!
@@ -70,6 +70,7 @@
box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
box showAtPointer
+
with a default:
|box|
@@ -80,6 +81,22 @@
box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
box initialText:'foo'.
box showAtPointer
+
+
+ opening the box modeless (a stand-by box):
+ (in this case, the default ok- and abortActions do not hide the box;
+ therefore, we have to set those explicitely)
+
+ |box|
+
+ box := ListSelectionBox new.
+ box title:'select something:'.
+ box list:#('foo' 'bar' 'baz').
+ box abortText:'close'.
+ box okText:'apply'.
+ box okAction:[:sel | Transcript showCr:'the selection was:' , sel].
+ box abortAction:[:dummy | box hide].
+ box openModeless
"
! !
--- a/MenuView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/MenuView.st Thu Sep 07 14:46:28 1995 +0200
@@ -32,7 +32,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.32 1995-08-08 01:07:18 claus Exp $
+$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.33 1995-09-07 12:45:21 claus Exp $
'!
!MenuView class methodsFor:'documentation'!
@@ -53,7 +53,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.32 1995-08-08 01:07:18 claus Exp $
+$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.33 1995-09-07 12:45:21 claus Exp $
"
!
@@ -1343,7 +1343,7 @@
self drawLine:line atX:w inVisible:visLineNr with:fg and:bg.
- self paint:(check ifTrue:[checkColor] ifFalse:[fg]).
+ self paint:(check ifTrue:[checkColor == bg ifTrue:[fg] ifFalse:[checkColor]] ifFalse:[fg]).
h := font ascent.
y := y + (font height - h // 2).
@@ -1370,6 +1370,8 @@
]
]
]
+
+ "Modified: 31.8.1995 / 19:27:02 / claus"
!
drawVisibleLine:visLineNr with:fg and:bg
--- a/ObjView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ObjView.st Thu Sep 07 14:46:28 1995 +0200
@@ -47,7 +47,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.25 1995-05-06 14:17:35 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.26 1995-09-07 12:45:28 claus Exp $
"
!
@@ -858,12 +858,12 @@
].
dragger transformation:oldTrans.
- dragger device synchronizeOutput.
+ dragger device flush.
] ifFalse:[
self xoring:[
self showDragging:movedObject offset:moveDelta.
].
- self device synchronizeOutput
+ self device flush
].
! !
@@ -1441,9 +1441,9 @@
|sel|
sel := selection.
- self unselect.
+ sel notNil ifTrue:[self unselect].
aBlock value.
- self select:sel
+ sel notNil ifTrue:[self select:sel]
!
select:something
@@ -2598,7 +2598,7 @@
dragger xoring:[
dragger lineWidth:0.
dragger displayLineFrom:p1 to:p2.
- dragger device synchronizeOutput
+ dragger device flush
].
! !
--- a/ObjectView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ObjectView.st Thu Sep 07 14:46:28 1995 +0200
@@ -47,7 +47,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.25 1995-05-06 14:17:35 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.26 1995-09-07 12:45:28 claus Exp $
"
!
@@ -858,12 +858,12 @@
].
dragger transformation:oldTrans.
- dragger device synchronizeOutput.
+ dragger device flush.
] ifFalse:[
self xoring:[
self showDragging:movedObject offset:moveDelta.
].
- self device synchronizeOutput
+ self device flush
].
! !
@@ -1441,9 +1441,9 @@
|sel|
sel := selection.
- self unselect.
+ sel notNil ifTrue:[self unselect].
aBlock value.
- self select:sel
+ sel notNil ifTrue:[self select:sel]
!
select:something
@@ -2598,7 +2598,7 @@
dragger xoring:[
dragger lineWidth:0.
dragger displayLineFrom:p1 to:p2.
- dragger device synchronizeOutput
+ dragger device flush
].
! !
--- a/PopUpList.st Thu Aug 31 07:01:01 1995 +0200
+++ b/PopUpList.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.17 1995-08-08 01:07:29 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.18 1995-09-07 12:45:38 claus Exp $
'!
!PopUpList class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.17 1995-08-08 01:07:29 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpList.st,v 1.18 1995-09-07 12:45:38 claus Exp $
"
!
@@ -488,6 +488,11 @@
].
self computeLabelSize.
^ super preferredExtent.
+!
+
+specClass
+ self class == PopUpList ifTrue:[^ PopUpListSpec].
+ ^ nil
! !
!PopUpList methodsFor:'accessing-mvc'!
--- a/PopUpListController.st Thu Aug 31 07:01:01 1995 +0200
+++ b/PopUpListController.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/PopUpListController.st,v 1.1 1995-08-08 01:07:33 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpListController.st,v 1.2 1995-09-07 12:45:41 claus Exp $
'!
!PopUpListController class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/PopUpListController.st,v 1.1 1995-08-08 01:07:33 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PopUpListController.st,v 1.2 1995-09-07 12:45:41 claus Exp $
"
!
@@ -60,6 +60,8 @@
"pull menu on Return and space, if I am the focusView of my group
(i.e. if I got an explicit focus)"
+ <resource: #keyboard (#CursorUp #CursorDown)>
+
view hasFocus ifTrue:[
(key == #Return) ifTrue:[
view menu shown ifTrue:[
--- a/PopUpLstC.st Thu Aug 31 07:01:01 1995 +0200
+++ b/PopUpLstC.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/PopUpLstC.st,v 1.1 1995-08-08 01:07:33 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/PopUpLstC.st,v 1.2 1995-09-07 12:45:41 claus Exp $
'!
!PopUpListController class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/PopUpLstC.st,v 1.1 1995-08-08 01:07:33 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/PopUpLstC.st,v 1.2 1995-09-07 12:45:41 claus Exp $
"
!
@@ -60,6 +60,8 @@
"pull menu on Return and space, if I am the focusView of my group
(i.e. if I got an explicit focus)"
+ <resource: #keyboard (#CursorUp #CursorDown)>
+
view hasFocus ifTrue:[
(key == #Return) ifTrue:[
view menu shown ifTrue:[
--- a/PullDMenu.st Thu Aug 31 07:01:01 1995 +0200
+++ b/PullDMenu.st Thu Sep 07 14:46:28 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.22 1995-08-27 00:34:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.23 1995-09-07 12:45:45 claus Exp $
'!
!PullDownMenu class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.22 1995-08-27 00:34:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.23 1995-09-07 12:45:45 claus Exp $
"
!
@@ -1055,6 +1055,8 @@
!
keyPress:key x:x y:y
+ <resource: #keyboard (#CursorLeft #CursorRight #MenuSelect)>
+
|index m sel|
"
--- a/PullDownMenu.st Thu Aug 31 07:01:01 1995 +0200
+++ b/PullDownMenu.st Thu Sep 07 14:46:28 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.22 1995-08-27 00:34:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.23 1995-09-07 12:45:45 claus Exp $
'!
!PullDownMenu class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.22 1995-08-27 00:34:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.23 1995-09-07 12:45:45 claus Exp $
"
!
@@ -1055,6 +1055,8 @@
!
keyPress:key x:x y:y
+ <resource: #keyboard (#CursorLeft #CursorRight #MenuSelect)>
+
|index m sel|
"
--- a/RButtGrp.st Thu Aug 31 07:01:01 1995 +0200
+++ b/RButtGrp.st Thu Sep 07 14:46:28 1995 +0200
@@ -13,7 +13,7 @@
'From Smalltalk/X, Version:2.10.5 on 14-mar-1995 at 11:06:48 am'!
OrderedCollection subclass:#RadioButtonGroup
- instanceVariableNames:'valueChannel'
+ instanceVariableNames:'valueChannel groupID'
classVariableNames:''
poolDictionaries:''
category:'Views-Support'
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.12 1995-06-27 02:23:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.13 1995-09-07 12:45:50 claus Exp $
'!
!RadioButtonGroup class methodsFor:'documentation '!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.12 1995-06-27 02:23:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.13 1995-09-07 12:45:50 claus Exp $
"
!
@@ -72,6 +72,10 @@
the index of the selected toggle. You can set/get this valueHolder
via the valueChannel:/valueChannel messages.
See the last example for how this is done.
+
+ The groupID instance variable is not required for normal operation;
+ the interface builder uses it to give a button-group some descriptive
+ (unique) name.
"
!
@@ -146,6 +150,20 @@
"
! !
+!RadioButtonGroup methodsFor:'accessing'!
+
+groupID:aSymbol
+ groupID := aSymbol
+
+ "Modified: 5.9.1995 / 16:04:28 / claus"
+!
+
+groupID
+ ^ groupID
+
+ "Modified: 5.9.1995 / 16:04:33 / claus"
+! !
+
!RadioButtonGroup methodsFor:'accessing-mvc'!
valueChannel
@@ -228,4 +246,3 @@
valueChannel value:newValue
! !
-
--- a/RadioButtonGroup.st Thu Aug 31 07:01:01 1995 +0200
+++ b/RadioButtonGroup.st Thu Sep 07 14:46:28 1995 +0200
@@ -13,7 +13,7 @@
'From Smalltalk/X, Version:2.10.5 on 14-mar-1995 at 11:06:48 am'!
OrderedCollection subclass:#RadioButtonGroup
- instanceVariableNames:'valueChannel'
+ instanceVariableNames:'valueChannel groupID'
classVariableNames:''
poolDictionaries:''
category:'Views-Support'
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.12 1995-06-27 02:23:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.13 1995-09-07 12:45:50 claus Exp $
'!
!RadioButtonGroup class methodsFor:'documentation '!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.12 1995-06-27 02:23:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/RadioButtonGroup.st,v 1.13 1995-09-07 12:45:50 claus Exp $
"
!
@@ -72,6 +72,10 @@
the index of the selected toggle. You can set/get this valueHolder
via the valueChannel:/valueChannel messages.
See the last example for how this is done.
+
+ The groupID instance variable is not required for normal operation;
+ the interface builder uses it to give a button-group some descriptive
+ (unique) name.
"
!
@@ -146,6 +150,20 @@
"
! !
+!RadioButtonGroup methodsFor:'accessing'!
+
+groupID:aSymbol
+ groupID := aSymbol
+
+ "Modified: 5.9.1995 / 16:04:28 / claus"
+!
+
+groupID
+ ^ groupID
+
+ "Modified: 5.9.1995 / 16:04:33 / claus"
+! !
+
!RadioButtonGroup methodsFor:'accessing-mvc'!
valueChannel
@@ -228,4 +246,3 @@
valueChannel value:newValue
! !
-
--- a/SelListV.st Thu Aug 31 07:01:01 1995 +0200
+++ b/SelListV.st Thu Sep 07 14:46:28 1995 +0200
@@ -36,7 +36,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.39 1995-08-30 12:53:37 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.40 1995-09-07 12:46:02 claus Exp $
'!
!SelectionInListView class methodsFor:'documentation'!
@@ -57,7 +57,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.39 1995-08-30 12:53:37 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.40 1995-09-07 12:46:02 claus Exp $
"
!
@@ -81,7 +81,8 @@
collection of numbers) as argument.
Also, to support ST-80 MVC-style use, the model (if nonNil) is notified
- by the change mechanism (performs changeMsg).
+ by the change mechanism (performs changeMsg) and vice versa, the view
+ updates if the model changes (with aspect of either #list or #selectionIndex).
Before actually adding entries to the the selection, a checkBlock (if non-nil) is evaluated
passing the number of the entry whch is about to be selected as argument.
@@ -419,6 +420,39 @@
top open
+ self changing list:
+ (selectionInListView updates itself when button changes initial selection):
+
+ |top slv model sel changeButton|
+
+ sel := 'bar'.
+ model := Plug new.
+ model respondTo:#getList with:['getList' printNL. #('foo' 'bar' 'baz' 'hello')].
+ model respondTo:#initial with:['initial' printNL. sel].
+ model respondTo:#setSelection: with:[:arg | ('model selected:', arg) printNL. sel := arg].
+
+ changeButton := Button label:'change selection'.
+ changeButton action:[sel := 'foo'. model changed:#initial].
+ changeButton open.
+
+ top := StandardSystemView new
+ label:'select';
+ minExtent:100@100;
+ maxExtent:300@400;
+ extent:200@200.
+
+ slv := SelectionInListView
+ on:model
+ aspect:#someAspect
+ change:#setSelection:
+ list:#getList
+ initialSelection:#initial.
+ slv useIndex:false.
+
+ top add:(ScrollableView forView:slv) in:(0.0@0.0 corner:1.0@1.0).
+ top open
+
+
using a SelectionInList-Model:
(see how changes in the model (via list:...) are reflected in the view)
@@ -1200,10 +1234,12 @@
level:hilightLevel.
- ^ self
- ]
+ ].
+ ^ self
].
^ super drawVisibleLine:visLineNr with:fg and:bg
+
+ "Modified: 31.8.1995 / 19:24:09 / claus"
!
redrawFromVisibleLine:startVisLineNr to:endVisLineNr
@@ -2229,6 +2265,15 @@
^ super add:aValue beforeIndex:index.
! !
+!SelectionInListView methodsFor:'queries'!
+
+specClass
+ self class == SelectionInListView ifTrue:[^ SequenceViewSpec].
+ ^ nil
+
+ "Modified: 5.9.1995 / 23:05:53 / claus"
+! !
+
!SelectionInListView methodsFor:'initialization'!
initCursor
--- a/SelectionInListView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/SelectionInListView.st Thu Sep 07 14:46:28 1995 +0200
@@ -36,7 +36,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.39 1995-08-30 12:53:37 claus Exp $
+$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.40 1995-09-07 12:46:02 claus Exp $
'!
!SelectionInListView class methodsFor:'documentation'!
@@ -57,7 +57,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.39 1995-08-30 12:53:37 claus Exp $
+$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.40 1995-09-07 12:46:02 claus Exp $
"
!
@@ -81,7 +81,8 @@
collection of numbers) as argument.
Also, to support ST-80 MVC-style use, the model (if nonNil) is notified
- by the change mechanism (performs changeMsg).
+ by the change mechanism (performs changeMsg) and vice versa, the view
+ updates if the model changes (with aspect of either #list or #selectionIndex).
Before actually adding entries to the the selection, a checkBlock (if non-nil) is evaluated
passing the number of the entry whch is about to be selected as argument.
@@ -419,6 +420,39 @@
top open
+ self changing list:
+ (selectionInListView updates itself when button changes initial selection):
+
+ |top slv model sel changeButton|
+
+ sel := 'bar'.
+ model := Plug new.
+ model respondTo:#getList with:['getList' printNL. #('foo' 'bar' 'baz' 'hello')].
+ model respondTo:#initial with:['initial' printNL. sel].
+ model respondTo:#setSelection: with:[:arg | ('model selected:', arg) printNL. sel := arg].
+
+ changeButton := Button label:'change selection'.
+ changeButton action:[sel := 'foo'. model changed:#initial].
+ changeButton open.
+
+ top := StandardSystemView new
+ label:'select';
+ minExtent:100@100;
+ maxExtent:300@400;
+ extent:200@200.
+
+ slv := SelectionInListView
+ on:model
+ aspect:#someAspect
+ change:#setSelection:
+ list:#getList
+ initialSelection:#initial.
+ slv useIndex:false.
+
+ top add:(ScrollableView forView:slv) in:(0.0@0.0 corner:1.0@1.0).
+ top open
+
+
using a SelectionInList-Model:
(see how changes in the model (via list:...) are reflected in the view)
@@ -1200,10 +1234,12 @@
level:hilightLevel.
- ^ self
- ]
+ ].
+ ^ self
].
^ super drawVisibleLine:visLineNr with:fg and:bg
+
+ "Modified: 31.8.1995 / 19:24:09 / claus"
!
redrawFromVisibleLine:startVisLineNr to:endVisLineNr
@@ -2229,6 +2265,15 @@
^ super add:aValue beforeIndex:index.
! !
+!SelectionInListView methodsFor:'queries'!
+
+specClass
+ self class == SelectionInListView ifTrue:[^ SequenceViewSpec].
+ ^ nil
+
+ "Modified: 5.9.1995 / 23:05:53 / claus"
+! !
+
!SelectionInListView methodsFor:'initialization'!
initCursor
--- a/TextColl.st Thu Aug 31 07:01:01 1995 +0200
+++ b/TextColl.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.22 1995-08-24 03:02:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.23 1995-09-07 12:46:10 claus Exp $
'!
!TextCollector class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.22 1995-08-24 03:02:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.23 1995-09-07 12:46:10 claus Exp $
"
!
@@ -290,7 +290,7 @@
].
self checkLineLimit.
inFlush := false.
- device synchronizeOutput.
+ device flush.
].
flushPending ifTrue:[
flushPending := false.
@@ -378,7 +378,7 @@
self insertStringAtCursor:(something printString).
self checkLineLimit
].
- device synchronizeOutput
+ device flush
!
nextPutAll:something
--- a/TextCollector.st Thu Aug 31 07:01:01 1995 +0200
+++ b/TextCollector.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.22 1995-08-24 03:02:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.23 1995-09-07 12:46:10 claus Exp $
'!
!TextCollector class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.22 1995-08-24 03:02:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.23 1995-09-07 12:46:10 claus Exp $
"
!
@@ -290,7 +290,7 @@
].
self checkLineLimit.
inFlush := false.
- device synchronizeOutput.
+ device flush.
].
flushPending ifTrue:[
flushPending := false.
@@ -378,7 +378,7 @@
self insertStringAtCursor:(something printString).
self checkLineLimit
].
- device synchronizeOutput
+ device flush
!
nextPutAll:something
--- a/VPanelV.st Thu Aug 31 07:01:01 1995 +0200
+++ b/VPanelV.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.13 1995-07-23 03:02:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.14 1995-09-07 12:46:16 claus Exp $
'!
!VerticalPanelView class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.13 1995-07-23 03:02:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.14 1995-09-07 12:46:16 claus Exp $
"
!
@@ -723,8 +723,8 @@
(vLayout == #fit
or:[vLayout == #fitSpace]) ifTrue:[
child origin:(xpos @ ypos rounded)
- corner:(xpos + (child width))
- @ (ypos + hEach - bwChild) rounded.
+ corner:(xpos + (child width - 1))
+ @ (ypos + hEach - bwChild - 1) rounded.
ypos := ypos + hEach + space
] ifFalse:[
child origin:(xpos@ypos).
@@ -735,16 +735,18 @@
|y|
vLayout == #topFit ifTrue:[
- y := height - margin.
+ y := height - margin - 1.
].
vLayout == #topSpaceFit ifTrue:[
- y := height - margin - space
+ y := height - margin - 1 - space
].
y notNil ifTrue:[
- subViews last corner:(xpos + child width) @ y
+ subViews last corner:(xpos + child width - 1) @ y
]
]
]
+
+ "Modified: 4.9.1995 / 18:43:29 / claus"
! !
!VerticalPanelView methodsFor:'accessing'!
@@ -839,11 +841,17 @@
]
!
-layout:aSymbol
- "leftover for historic reasons - do not use any more"
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ leftover for historic reasons - do not use any more.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #verticalLayout:'.
- ^ self verticalLayout:aSymbol
+ ^ self verticalLayout:something
+
+ "Modified: 31.8.1995 / 23:08:54 / claus"
!
layout
--- a/VerticalPanelView.st Thu Aug 31 07:01:01 1995 +0200
+++ b/VerticalPanelView.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.13 1995-07-23 03:02:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.14 1995-09-07 12:46:16 claus Exp $
'!
!VerticalPanelView class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.13 1995-07-23 03:02:58 claus Exp $
+$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.14 1995-09-07 12:46:16 claus Exp $
"
!
@@ -723,8 +723,8 @@
(vLayout == #fit
or:[vLayout == #fitSpace]) ifTrue:[
child origin:(xpos @ ypos rounded)
- corner:(xpos + (child width))
- @ (ypos + hEach - bwChild) rounded.
+ corner:(xpos + (child width - 1))
+ @ (ypos + hEach - bwChild - 1) rounded.
ypos := ypos + hEach + space
] ifFalse:[
child origin:(xpos@ypos).
@@ -735,16 +735,18 @@
|y|
vLayout == #topFit ifTrue:[
- y := height - margin.
+ y := height - margin - 1.
].
vLayout == #topSpaceFit ifTrue:[
- y := height - margin - space
+ y := height - margin - 1 - space
].
y notNil ifTrue:[
- subViews last corner:(xpos + child width) @ y
+ subViews last corner:(xpos + child width - 1) @ y
]
]
]
+
+ "Modified: 4.9.1995 / 18:43:29 / claus"
! !
!VerticalPanelView methodsFor:'accessing'!
@@ -839,11 +841,17 @@
]
!
-layout:aSymbol
- "leftover for historic reasons - do not use any more"
+layout:something
+ "OBSOLETE compatibility interface. Will vanish.
+ leftover for historic reasons - do not use any more.
+ In the meantime, try to figure out what is meant ... a kludge"
+
+ something isLayout ifTrue:[^ super layout:something].
self obsoleteMethodWarning:'use #verticalLayout:'.
- ^ self verticalLayout:aSymbol
+ ^ self verticalLayout:something
+
+ "Modified: 31.8.1995 / 23:08:54 / claus"
!
layout
--- a/Workspace.st Thu Aug 31 07:01:01 1995 +0200
+++ b/Workspace.st Thu Sep 07 14:46:28 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.26 1995-08-27 00:35:11 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.27 1995-09-07 12:46:28 claus Exp $
'!
!Workspace class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.26 1995-08-27 00:35:11 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.27 1995-09-07 12:46:28 claus Exp $
"
!
@@ -235,7 +235,7 @@
].
self makeSelectionVisible.
- device synchronizeOutput.
+ device flush.
aBlock valueNowOrOnUnwindDo:[
"