David T. Lewis uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-dtl.87.mcz
==================== Summary ====================
Name: ST80-dtl.87
Author: dtl
Time: 24 January 2010, 2:59:37.473 pm
UUID: 698194a9-352b-4352-b039-3a2ec8a4b078
Ancestors: ST80-ar.86
Remove all MVC BitEditor references from non-MVC packages.
Form>>bitEdit to Project class>>bitEdit:
Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:
=============== Diff against ST80-ar.86 ===============
Item was changed:
----- Method: BitEditor class>>openOnForm: (in category 'instance creation') -----
openOnForm: aForm
"Create and schedule a BitEditor on the form aForm at its top left corner.
Show the small and magnified view of aForm."
| scaleFactor |
scaleFactor := 8 @ 8.
^self openOnForm: aForm
+ at: (Rectangle locateMagnifiedView: aForm scale: scaleFactor) topLeft
- at: (self locateMagnifiedView: aForm scale: scaleFactor) topLeft
scale: scaleFactor!
Item was changed:
----- Method: FormEditor>>magnify (in category 'editing tools') -----
magnify
"Allow for bit editing of an area of the Form. The user designates a
rectangular area that is scaled by 5 to allow individual screens dots to be
modified. Red button is used to set a bit to black, and yellow button is
used to set a bit to white. Editing continues until the user depresses any
key on the keyboard."
| smallRect smallForm scaleFactor tempRect |
scaleFactor := 8@8.
smallRect := (Rectangle fromUser: grid) intersect: view insetDisplayBox.
smallRect isNil ifTrue: [^self].
smallForm := Form fromDisplay: smallRect.
"Do this computation here in order to be able to save the existing display screen."
+ tempRect := Rectangle locateMagnifiedView: smallForm scale: scaleFactor.
- tempRect := BitEditor locateMagnifiedView: smallForm scale: scaleFactor.
BitEditor
openScreenViewOnForm: smallForm
at: smallRect topLeft
magnifiedAt: tempRect topLeft
scale: scaleFactor.
tool := previousTool!
Item was added:
+ ----- Method: MVCProject>>bitEdit:at:scale: (in category 'editors') -----
+ bitEdit: aForm at: magnifiedFormLocation scale: scaleFactor
+ "Create and schedule a view whose top left corner is magnifiedLocation
+ and that contains a view of aForm magnified by scaleFactor that can be
+ modified using the Bit Editor. It also contains a view of the original form."
+
+ BitEditor openOnForm: aForm at: magnifiedFormLocation scale: scaleFactor !
Item was changed:
----- Method: BitEditor class>>magnifyOnScreen (in category 'examples') -----
magnifyOnScreen
"Bit editing of an area of the display screen. User designates a
rectangular area that is magnified by 8 to allow individual screens dots to
be modified. red button is used to set a bit to black and yellow button is
used to set a bit to white. Editor is not scheduled in a view. Original
screen location is updated immediately. This is the same as FormEditor
magnify."
| smallRect smallForm scaleFactor tempRect |
scaleFactor := 8 @ 8.
smallRect := Rectangle fromUser.
smallRect isNil ifTrue: [^self].
smallForm := Form fromDisplay: smallRect.
+ tempRect := Rectangle locateMagnifiedView: smallForm scale: scaleFactor.
- tempRect := self locateMagnifiedView: smallForm scale: scaleFactor.
"show magnified form size until mouse is depressed"
self
openScreenViewOnForm: smallForm
at: smallRect topLeft
magnifiedAt: tempRect topLeft
scale: scaleFactor
"BitEditor magnifyOnScreen."!
Item was added:
+ ----- Method: MVCProject>>bitEdit: (in category 'editors') -----
+ bitEdit: aForm
+ "Create and schedule a view located in an area designated by the user
+ that contains a view of aForm magnified by 8@8 that can be modified using
+ a bit editor. It also contains a view of the original form."
+
+ BitEditor openOnForm: aForm
+
+ "Note that using direct messages to BitEditor, fixed locations and scales can be created.
+ That is, also try:
+ BitEditor openOnForm: self at: <some point>
+ BitEditor openOnForm: self at: <some point> scale: <some point>"!
Item was added:
+ ----- Method: MVCProject>>editCharacter:ofFont: (in category 'editors') -----
+ editCharacter: character ofFont: strikeFont
+ "Open a bit editor on a character in the given strike font. Note that you must
+ do an accept (in the option menu of the bit editor) if you want this work.
+ Accepted edits will not take effect in the font until you leave or close the bit editor.
+ Also note that unaccepted edits will be lost when you leave or close."
+ "Note that BitEditor only works in MVC currently."
+
+ "(TextStyle default fontAt: 1) edit: $="
+
+ | charForm editRect scaleFactor bitEditor savedForm r |
+ charForm := strikeFont characterFormAt: character.
+ editRect := Rectangle locateMagnifiedView: charForm scale: (scaleFactor := 8 @ 8).
+ bitEditor := BitEditor
+ bitEdit: charForm
+ at: editRect topLeft
+ scale: scaleFactor
+ remoteView: nil.
+ savedForm := Form fromDisplay: (r := bitEditor displayBox
+ expandBy: (0 @ 23 corner: 0 @ 0)).
+ bitEditor controller startUp.
+ bitEditor release.
+ savedForm displayOn: Display at: r topLeft.
+ strikeFont characterFormAt: character put: charForm!
Item was removed:
- ----- Method: BitEditor class>>locateMagnifiedView:scale: (in category 'private') -----
- locateMagnifiedView: aForm scale: scaleFactor
- "Answer a rectangle at the location where the scaled view of the form,
- aForm, should be displayed."
-
- ^ Rectangle originFromUser: (aForm extent * scaleFactor + (0@50)).
- !
David T. Lewis uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-dtl.87.mcz
==================== Summary ====================
Name: ST80-dtl.87
Author: dtl
Time: 24 January 2010, 2:59:37.473 pm
UUID: 698194a9-352b-4352-b039-3a2ec8a4b078
Ancestors: ST80-ar.86
Remove all MVC BitEditor references from non-MVC packages.
Form>>bitEdit to Project class>>bitEdit:
Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:
=============== Diff against ST80-ar.86 ===============
Item was changed:
----- Method: BitEditor class>>openOnForm: (in category 'instance creation') -----
openOnForm: aForm
"Create and schedule a BitEditor on the form aForm at its top left corner.
Show the small and magnified view of aForm."
| scaleFactor |
scaleFactor := 8 @ 8.
^self openOnForm: aForm
+ at: (Rectangle locateMagnifiedView: aForm scale: scaleFactor) topLeft
- at: (self locateMagnifiedView: aForm scale: scaleFactor) topLeft
scale: scaleFactor!
Item was changed:
----- Method: FormEditor>>magnify (in category 'editing tools') -----
magnify
"Allow for bit editing of an area of the Form. The user designates a
rectangular area that is scaled by 5 to allow individual screens dots to be
modified. Red button is used to set a bit to black, and yellow button is
used to set a bit to white. Editing continues until the user depresses any
key on the keyboard."
| smallRect smallForm scaleFactor tempRect |
scaleFactor := 8@8.
smallRect := (Rectangle fromUser: grid) intersect: view insetDisplayBox.
smallRect isNil ifTrue: [^self].
smallForm := Form fromDisplay: smallRect.
"Do this computation here in order to be able to save the existing display screen."
+ tempRect := Rectangle locateMagnifiedView: smallForm scale: scaleFactor.
- tempRect := BitEditor locateMagnifiedView: smallForm scale: scaleFactor.
BitEditor
openScreenViewOnForm: smallForm
at: smallRect topLeft
magnifiedAt: tempRect topLeft
scale: scaleFactor.
tool := previousTool!
Item was added:
+ ----- Method: MVCProject>>bitEdit:at:scale: (in category 'editors') -----
+ bitEdit: aForm at: magnifiedFormLocation scale: scaleFactor
+ "Create and schedule a view whose top left corner is magnifiedLocation
+ and that contains a view of aForm magnified by scaleFactor that can be
+ modified using the Bit Editor. It also contains a view of the original form."
+
+ BitEditor openOnForm: aForm at: magnifiedFormLocation scale: scaleFactor !
Item was changed:
----- Method: BitEditor class>>magnifyOnScreen (in category 'examples') -----
magnifyOnScreen
"Bit editing of an area of the display screen. User designates a
rectangular area that is magnified by 8 to allow individual screens dots to
be modified. red button is used to set a bit to black and yellow button is
used to set a bit to white. Editor is not scheduled in a view. Original
screen location is updated immediately. This is the same as FormEditor
magnify."
| smallRect smallForm scaleFactor tempRect |
scaleFactor := 8 @ 8.
smallRect := Rectangle fromUser.
smallRect isNil ifTrue: [^self].
smallForm := Form fromDisplay: smallRect.
+ tempRect := Rectangle locateMagnifiedView: smallForm scale: scaleFactor.
- tempRect := self locateMagnifiedView: smallForm scale: scaleFactor.
"show magnified form size until mouse is depressed"
self
openScreenViewOnForm: smallForm
at: smallRect topLeft
magnifiedAt: tempRect topLeft
scale: scaleFactor
"BitEditor magnifyOnScreen."!
Item was added:
+ ----- Method: MVCProject>>bitEdit: (in category 'editors') -----
+ bitEdit: aForm
+ "Create and schedule a view located in an area designated by the user
+ that contains a view of aForm magnified by 8@8 that can be modified using
+ a bit editor. It also contains a view of the original form."
+
+ BitEditor openOnForm: aForm
+
+ "Note that using direct messages to BitEditor, fixed locations and scales can be created.
+ That is, also try:
+ BitEditor openOnForm: self at: <some point>
+ BitEditor openOnForm: self at: <some point> scale: <some point>"!
Item was added:
+ ----- Method: MVCProject>>editCharacter:ofFont: (in category 'editors') -----
+ editCharacter: character ofFont: strikeFont
+ "Open a bit editor on a character in the given strike font. Note that you must
+ do an accept (in the option menu of the bit editor) if you want this work.
+ Accepted edits will not take effect in the font until you leave or close the bit editor.
+ Also note that unaccepted edits will be lost when you leave or close."
+ "Note that BitEditor only works in MVC currently."
+
+ "(TextStyle default fontAt: 1) edit: $="
+
+ | charForm editRect scaleFactor bitEditor savedForm r |
+ charForm := strikeFont characterFormAt: character.
+ editRect := Rectangle locateMagnifiedView: charForm scale: (scaleFactor := 8 @ 8).
+ bitEditor := BitEditor
+ bitEdit: charForm
+ at: editRect topLeft
+ scale: scaleFactor
+ remoteView: nil.
+ savedForm := Form fromDisplay: (r := bitEditor displayBox
+ expandBy: (0 @ 23 corner: 0 @ 0)).
+ bitEditor controller startUp.
+ bitEditor release.
+ savedForm displayOn: Display at: r topLeft.
+ strikeFont characterFormAt: character put: charForm!
Item was removed:
- ----- Method: BitEditor class>>locateMagnifiedView:scale: (in category 'private') -----
- locateMagnifiedView: aForm scale: scaleFactor
- "Answer a rectangle at the location where the scaled view of the form,
- aForm, should be displayed."
-
- ^ Rectangle originFromUser: (aForm extent * scaleFactor + (0@50)).
- !
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.312.mcz
==================== Summary ====================
Name: Morphic-dtl.312
Author: dtl
Time: 24 January 2010, 2:55:45.458 pm
UUID: f5977ce2-8b97-401f-a0e5-18b2e8ac60d1
Ancestors: Morphic-ar.311
Remove all MVC BitEditor references from non-MVC packages.
Form>>bitEdit to Project class>>bitEdit:
Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:
Note: StrikeFont>>edit: now notifies user to edit strike fonts from an MVC project.
Help needed: There is no Morphic editor for strike fonts, see implementors of #editCharacter:ofFont:
=============== Diff against Morphic-ar.311 ===============
Item was added:
+ ----- Method: MorphicProject>>editCharacter:ofFont: (in category 'editors') -----
+ editCharacter: character ofFont: strikeFont
+ "Open a bit editor on a character in the given strike font."
+ "Note that BitEditor only works in MVC currently."
+
+ "(TextStyle default fontAt: 1) edit: $="
+
+ self inform: 'A Morphic editor has not been implemented. Enter an MVC project to edit this font.'!
Item was added:
+ ----- Method: MorphicProject>>bitEdit:at:scale: (in category 'editors') -----
+ bitEdit: aForm at: magnifiedFormLocation scale: scaleFactor
+ "Create and schedule a view whose top left corner is magnifiedLocation
+ and that contains a view of aForm magnified by scaleFactor that can be
+ modified using the Bit Editor. It also contains a view of the original form."
+
+ self notYetImplemented!
Item was added:
+ ----- Method: MorphicProject>>bitEdit: (in category 'editors') -----
+ bitEdit: aForm
+ "Create and schedule a view located in an area designated by the user
+ that contains a view of the receiver magnified by 8@8 that can be
+ modified using the Bit Editor. It also contains a view of the original
+ form."
+
+ aForm currentHand attachMorph: (FatBitsPaint new editForm: aForm;
+ magnification: 8;
+ brushColor: Color black;
+ penSize: 1;
+ yourself)
+ !
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.312.mcz
==================== Summary ====================
Name: Morphic-dtl.312
Author: dtl
Time: 24 January 2010, 2:55:45.458 pm
UUID: f5977ce2-8b97-401f-a0e5-18b2e8ac60d1
Ancestors: Morphic-ar.311
Remove all MVC BitEditor references from non-MVC packages.
Form>>bitEdit to Project class>>bitEdit:
Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:
Note: StrikeFont>>edit: now notifies user to edit strike fonts from an MVC project.
Help needed: There is no Morphic editor for strike fonts, see implementors of #editCharacter:ofFont:
=============== Diff against Morphic-ar.311 ===============
Item was added:
+ ----- Method: MorphicProject>>editCharacter:ofFont: (in category 'editors') -----
+ editCharacter: character ofFont: strikeFont
+ "Open a bit editor on a character in the given strike font."
+ "Note that BitEditor only works in MVC currently."
+
+ "(TextStyle default fontAt: 1) edit: $="
+
+ self inform: 'A Morphic editor has not been implemented. Enter an MVC project to edit this font.'!
Item was added:
+ ----- Method: MorphicProject>>bitEdit:at:scale: (in category 'editors') -----
+ bitEdit: aForm at: magnifiedFormLocation scale: scaleFactor
+ "Create and schedule a view whose top left corner is magnifiedLocation
+ and that contains a view of aForm magnified by scaleFactor that can be
+ modified using the Bit Editor. It also contains a view of the original form."
+
+ self notYetImplemented!
Item was added:
+ ----- Method: MorphicProject>>bitEdit: (in category 'editors') -----
+ bitEdit: aForm
+ "Create and schedule a view located in an area designated by the user
+ that contains a view of the receiver magnified by 8@8 that can be
+ modified using the Bit Editor. It also contains a view of the original
+ form."
+
+ aForm currentHand attachMorph: (FatBitsPaint new editForm: aForm;
+ magnification: 8;
+ brushColor: Color black;
+ penSize: 1;
+ yourself)
+ !
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.312.mcz
==================== Summary ====================
Name: Morphic-dtl.312
Author: dtl
Time: 24 January 2010, 2:55:45.458 pm
UUID: f5977ce2-8b97-401f-a0e5-18b2e8ac60d1
Ancestors: Morphic-ar.311
Remove all MVC BitEditor references from non-MVC packages.
Form>>bitEdit to Project class>>bitEdit:
Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:
Note: StrikeFont>>edit: now notifies user to edit strike fonts from an MVC project.
Help needed: There is no Morphic editor for strike fonts, see implementors of #editCharacter:ofFont:
=============== Diff against Morphic-ar.311 ===============
Item was added:
+ ----- Method: MorphicProject>>editCharacter:ofFont: (in category 'editors') -----
+ editCharacter: character ofFont: strikeFont
+ "Open a bit editor on a character in the given strike font."
+ "Note that BitEditor only works in MVC currently."
+
+ "(TextStyle default fontAt: 1) edit: $="
+
+ self inform: 'A Morphic editor has not been implemented. Enter an MVC project to edit this font.'!
Item was added:
+ ----- Method: MorphicProject>>bitEdit:at:scale: (in category 'editors') -----
+ bitEdit: aForm at: magnifiedFormLocation scale: scaleFactor
+ "Create and schedule a view whose top left corner is magnifiedLocation
+ and that contains a view of aForm magnified by scaleFactor that can be
+ modified using the Bit Editor. It also contains a view of the original form."
+
+ self notYetImplemented!
Item was added:
+ ----- Method: MorphicProject>>bitEdit: (in category 'editors') -----
+ bitEdit: aForm
+ "Create and schedule a view located in an area designated by the user
+ that contains a view of the receiver magnified by 8@8 that can be
+ modified using the Bit Editor. It also contains a view of the original
+ form."
+
+ aForm currentHand attachMorph: (FatBitsPaint new editForm: aForm;
+ magnification: 8;
+ brushColor: Color black;
+ penSize: 1;
+ yourself)
+ !
Andreas Raab uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-ar.86.mcz
==================== Summary ====================
Name: ST80-ar.86
Author: ar
Time: 23 January 2010, 2:51:15.768 pm
UUID: f6be286b-4c61-1444-b8a0-7e205b369609
Ancestors: ST80-ar.85, ST80-nice.80
Merging ST80-nice.80:
Experimental: let a Rectangle merge in place (I called this swallow:)
This has two advantages:
- avoid repeated Object creation when we just want the gross result
- avoid closures writing to outer temps
IMHO, generalizing this kind of policy could have a measurable impact on GUI speed.
However, this is against current policy to never change a Point nor rectangle in place, so I let gurus judge if worth or not.
=============== Diff against ST80-ar.85 ===============
Item was changed:
----- Method: View>>defaultWindow (in category 'window access') -----
defaultWindow
"Build the minimum Rectangle that encloses all the windows of the
receiver's subViews. The answer is a Rectangle obtained by expanding
this minimal Rectangle by the borderWidth of the receiver. If the
receiver has no subViews, then a Rectangle enclosing the entire display
screen is answered. It is used internally by View methods if no window
has been specified for the View. Specialized subclasses of View should
redefine View|defaultWindow to handle the default case for instances
that have no subViews."
| aRectangle |
subViews isEmpty ifTrue: [^DisplayScreen boundingBox].
+ aRectangle := self firstSubView viewport copy.
+ subViews do: [:aView | aRectangle swallow: aView viewport].
- aRectangle := self firstSubView viewport.
- subViews do: [:aView | aRectangle := aRectangle merge: aView viewport].
^aRectangle expandBy: borderWidth!
Item was changed:
----- Method: View>>computeBoundingBox (in category 'display box access') -----
computeBoundingBox
"Answer the minimum Rectangle that encloses the bounding boxes of the
receiver's subViews. If the receiver has no subViews, then the bounding
box is the receiver's window. Subclasses should redefine
View|boundingBox if a more suitable default for the case of no subViews
is available."
| aRectangle |
subViews isEmpty ifTrue: [^self getWindow].
+ aRectangle := (self firstSubView transform: self firstSubView boundingBox) copy.
- aRectangle := self firstSubView transform: self firstSubView boundingBox.
subViews do:
[:aView |
+ aRectangle swallow: (aView transform: aView boundingBox).].
- aRectangle := aRectangle merge: (aView transform: aView boundingBox).].
^aRectangle expandBy: borderWidth!
Item was changed:
----- Method: Path>>computeBoundingBox (in category 'display box access') -----
computeBoundingBox
"Refer to the comment in DisplayObject|computeBoundingBox."
| box |
box := Rectangle origin: (self at: 1) extent: 0 @ 0.
collectionOfPoints do:
+ [:aPoint | box swallow: (Rectangle origin: aPoint extent: 0 @ 0)].
- [:aPoint | box := box merge: (Rectangle origin: aPoint extent: 0 @ 0)].
^box!
Andreas Raab uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-ar.86.mcz
==================== Summary ====================
Name: ST80-ar.86
Author: ar
Time: 23 January 2010, 2:51:15.768 pm
UUID: f6be286b-4c61-1444-b8a0-7e205b369609
Ancestors: ST80-ar.85, ST80-nice.80
Merging ST80-nice.80:
Experimental: let a Rectangle merge in place (I called this swallow:)
This has two advantages:
- avoid repeated Object creation when we just want the gross result
- avoid closures writing to outer temps
IMHO, generalizing this kind of policy could have a measurable impact on GUI speed.
However, this is against current policy to never change a Point nor rectangle in place, so I let gurus judge if worth or not.
=============== Diff against ST80-ar.85 ===============
Item was changed:
----- Method: View>>defaultWindow (in category 'window access') -----
defaultWindow
"Build the minimum Rectangle that encloses all the windows of the
receiver's subViews. The answer is a Rectangle obtained by expanding
this minimal Rectangle by the borderWidth of the receiver. If the
receiver has no subViews, then a Rectangle enclosing the entire display
screen is answered. It is used internally by View methods if no window
has been specified for the View. Specialized subclasses of View should
redefine View|defaultWindow to handle the default case for instances
that have no subViews."
| aRectangle |
subViews isEmpty ifTrue: [^DisplayScreen boundingBox].
+ aRectangle := self firstSubView viewport copy.
+ subViews do: [:aView | aRectangle swallow: aView viewport].
- aRectangle := self firstSubView viewport.
- subViews do: [:aView | aRectangle := aRectangle merge: aView viewport].
^aRectangle expandBy: borderWidth!
Item was changed:
----- Method: View>>computeBoundingBox (in category 'display box access') -----
computeBoundingBox
"Answer the minimum Rectangle that encloses the bounding boxes of the
receiver's subViews. If the receiver has no subViews, then the bounding
box is the receiver's window. Subclasses should redefine
View|boundingBox if a more suitable default for the case of no subViews
is available."
| aRectangle |
subViews isEmpty ifTrue: [^self getWindow].
+ aRectangle := (self firstSubView transform: self firstSubView boundingBox) copy.
- aRectangle := self firstSubView transform: self firstSubView boundingBox.
subViews do:
[:aView |
+ aRectangle swallow: (aView transform: aView boundingBox).].
- aRectangle := aRectangle merge: (aView transform: aView boundingBox).].
^aRectangle expandBy: borderWidth!
Item was changed:
----- Method: Path>>computeBoundingBox (in category 'display box access') -----
computeBoundingBox
"Refer to the comment in DisplayObject|computeBoundingBox."
| box |
box := Rectangle origin: (self at: 1) extent: 0 @ 0.
collectionOfPoints do:
+ [:aPoint | box swallow: (Rectangle origin: aPoint extent: 0 @ 0)].
- [:aPoint | box := box merge: (Rectangle origin: aPoint extent: 0 @ 0)].
^box!