The Trunk: ToolBuilder-Morphic-mt.273.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ToolBuilder-Morphic-mt.273.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.273.mcz

==================== Summary ====================

Name: ToolBuilder-Morphic-mt.273
Author: mt
Time: 26 February 2021, 3:48:03.094955 pm
UUID: 85920c43-33dc-0844-8f7b-2a6f21f1d548
Ancestors: ToolBuilder-Morphic-mt.272

Complements Morphic-mt.1726

=============== Diff against ToolBuilder-Morphic-mt.272 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableDialog: (in category 'widgets optional') -----
  buildPluggableDialog: aSpec
 
  | widget |
 
  widget := self dialogClass new.
  self register: widget id: aSpec name.
 
  widget model: aSpec model.
 
  "Set child dependent layout properties. The pane morph holds the special contents."
  widget paneMorph wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).
  self setLayoutHintsFor: widget paneMorph spec: aSpec.
  widget paneMorph layoutInset: (aSpec padding ifNil: [ProportionalSplitterMorph gripThickness]).
  widget paneMorph cellGap: (aSpec spacing ifNil: [ProportionalSplitterMorph gripThickness]).
+ widget morphicLayerNumber: widget class dialogLayer.
  widget paneMorph wantsPaneSplitters ifTrue: [
  widget paneMorph addCornerGrips"addEdgeGrips".
  widget paneMorph grips do: [:ea | ea showHandle: true]].
 
  "Now create the children."
  panes := OrderedCollection new.
  aSpec children isSymbol
  ifTrue: [
  widget getChildrenSelector: aSpec children.
  widget update: aSpec children]
  ifFalse: [
  self buildAll: aSpec children in: widget paneMorph].
 
  "Now create the buttons."
  aSpec buttons isSymbol
  ifTrue: [
  widget getButtonsSelector: aSpec buttons.
  widget update: aSpec buttons]
  ifFalse: [
  self buildAll: aSpec buttons in: widget buttonRowMorph.
  widget updateButtonProperties].
 
  aSpec title ifNotNil: [:label |
  label isSymbol
  ifTrue:[widget getTitleSelector: label; update: label]
  ifFalse:[widget title: label]].
  aSpec message ifNotNil: [:label |
  label isSymbol
  ifTrue:[widget getMessageSelector: label; update: label]
  ifFalse:[widget message: label]].
 
  "Interaction behavior."
  aSpec autoCancel ifNotNil: [:b | widget autoCancel: b].
  aSpec exclusive ifNotNil: [:b | widget exclusive: b].
 
  widget closeDialogSelector: aSpec closeAction.
  self buildHelpFor: widget spec: aSpec.
 
  "Everything is shrink-wrapped around the pane morph."
  widget paneMorph extent: (aSpec extent ifNil:[widget initialExtent])
  + (widget paneMorph layoutInset * 2) asPoint.
 
  ^ widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableWindow: (in category 'widgets required') -----
  buildPluggableWindow: aSpec
  | 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."
  widget wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]).
  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: [ProportionalSplitterMorph gripThickness]).
  widget cellGap: (aSpec spacing ifNil: [ProportionalSplitterMorph gripThickness]).
+ widget morphicLayerNumber: widget class windowLayer.
 
  "Now create the children."
  panes := OrderedCollection new.
  aSpec children isSymbol
  ifTrue: [
  widget getChildrenSelector: aSpec children.
  widget update: aSpec children]
  ifFalse: [
  self buildAll: aSpec children in: widget].
  widget setUpdatablePanesFrom: panes.
 
  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.
 
  widget bounds: (RealEstateAgent
  initialFrameFor: widget
  initialExtent: (aSpec extent ifNil:[widget initialExtent])
  world: self currentWorld).
 
  widget refreshWindowColor.
 
  ^ widget!

Item was changed:
+ ----- Method: PluggableDialogWindow>>delete (in category 'submorphs - add/remove') -----
- ----- Method: PluggableDialogWindow>>delete (in category 'submorphs-add/remove') -----
  delete
 
  self model okToClose ifFalse: [^ self].
 
  self closeDialogSelector ifNotNil: [:sel | self model perform: sel].
 
  self model
  windowIsClosing;
  release.
  self model: nil.
 
  super delete.!