[squeak-dev] The Trunk: ToolBuilder-Morphic-mt.324.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 20 17:49:45 UTC 2023
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.324.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.324
Author: mt
Time: 20 January 2023, 6:49:45.023382 pm
UUID: e0f58c03-a2e9-7e41-be5a-6d358b029d59
Ancestors: ToolBuilder-Morphic-tpr.323
Complements System-mt.1385
=============== Diff against ToolBuilder-Morphic-tpr.323 ===============
Item was changed:
----- Method: MorphicToolBuilder>>buildPluggableWindow: (in category 'widgets required') -----
buildPluggableWindow: aSpec
+ | widget initialExtent |
- | widget |
aSpec layout == #proportional ifFalse:[
"This needs to be implemented - probably by adding a single pane and then the rest"
^self error: 'Not implemented'.
].
widget := (self windowClassFor: aSpec) new.
self register: widget id: aSpec name.
widget model: aSpec model.
"Set child dependent layout properties."
MorphicProject worldGridEnabled ifTrue: [
"Snap both #position and #extent to grid."
aSpec horizontalResizing ifNil: [aSpec horizontalResizing: #spaceFill].
aSpec verticalResizing ifNil: [aSpec verticalResizing: #spaceFill]].
self setLayoutHintsFor: widget spec: aSpec.
widget layoutInset: (aSpec padding ifNil: [self windowPadding]).
widget morphicLayerNumber: widget class windowLayer.
self flag: #todo. "ct: Below, there is a lot of duplication with #buildPluggablePanel:. Can we factor out some of this, or even just collect all children in a PluggablePanelMorph?"
widget cellGap: (aSpec spacing ifNil: [self windowSpacing]).
widget wantsGrips: true.
widget wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).
"Now create the children."
panes := OrderedCollection new.
aSpec children isSymbol
ifTrue: [
widget getChildrenSelector: aSpec children.
widget update: aSpec children]
ifFalse: [
widget rebuildPaneAfter: [
self buildAll: aSpec children in: widget]].
widget setUpdatablePanesFrom: panes.
aSpec defaultFocus ifNotNil: [:name |
widget defaultFocusMorph: name].
aSpec label ifNotNil: [:label|
label isSymbol
ifTrue:[widget getLabelSelector: label]
ifFalse:[widget setLabel: label]].
aSpec multiWindowStyle notNil ifTrue:
[widget savedMultiWindowState: (SavedMultiWindowState on: aSpec model)].
widget closeWindowSelector: aSpec closeAction.
self buildHelpFor: widget spec: aSpec.
+ initialExtent := (RealEstateAgent savedExtentFor: aSpec model)
+ ifNil: [aSpec extent ifNil: [widget initialExtent]].
widget bounds: (RealEstateAgent
initialFrameFor: widget
+ initialExtent: (initialExtent * RealEstateAgent windowScaleFactor * RealEstateAgent scaleFactor) rounded
- initialExtent: ((aSpec extent ifNil:[widget initialExtent]) * RealEstateAgent windowScaleFactor * RealEstateAgent scaleFactor) rounded
world: self currentWorld).
widget refreshWindowColor.
^ widget!
More information about the Squeak-dev
mailing list
|