'From Squeak5.3alpha of 3 January 2019 [latest update: #18341] on 4 January 2019 at 12:33:51 pm'! Morph subclass: #AbstractResizerMorph instanceVariableNames: 'dotColor handleColor handleInset lastMouse showHandle ' classVariableNames: 'HandleLength GripThickness ' poolDictionaries: '' category: 'Morphic-Windows'! AbstractResizerMorph subclass: #CornerGripMorph instanceVariableNames: 'target ' classVariableNames: 'ActiveForm DrawCornerResizeHandles PassiveForm DrawEdgeResizeHandles ' poolDictionaries: '' category: 'Morphic-Windows'! AbstractResizerMorph subclass: #ProportionalSplitterMorph instanceVariableNames: 'leftOrTop rightOrBottom splitsTopAndBottom oldColor traceMorph handle movements ' classVariableNames: 'SmartHorizontalSplitters SmartVerticalSplitters ' poolDictionaries: '' category: 'Morphic-Windows'! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:42'! handleColor "Either use my handle color if set up or derive the handle color from my owner's color if I have an owner." ^ (handleColor notNil or: [self owner isNil]) ifTrue: [handleColor ifNil: [Color black]] ifFalse: [(self userInterfaceTheme resizerColorModifier ifNil: [ [:c | c muchDarker] ]) value: (self owner color isTransparent ifTrue: [Color white] ifFalse: [self owner color]) ]! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:00'! handleColor: aColor handleColor := aColor. self changed.! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:07'! handleInset ^ handleInset ifNil: [1]! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:08'! handleInset: anInteger handleInset := anInteger. self changed.! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:51'! referencePoint ^ lastMouse! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:02'! resizeCursor "The cursor shape I will set to the hand on hovering." self subclassResponsibility.! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 09:49'! showHandle ^ showHandle ifNil: [false]! ! !AbstractResizerMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 09:49'! showHandle: aBoolean showHandle := aBoolean. self changed.! ! !AbstractResizerMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 11:51'! mouseDown: anEvent self referencePoint: anEvent position.! ! !AbstractResizerMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 11:51'! mouseEnter: anEvent anEvent hand showTemporaryCursor: self resizeCursor.! ! !AbstractResizerMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 11:51'! mouseLeave: anEvent anEvent hand showTemporaryCursor: nil.! ! !AbstractResizerMorph methodsFor: 'initialization' stamp: 'mt 1/4/2019 10:04'! setDefaultColors "handleColor := Color lightGray lighter lighter. dotColor := Color gray lighter"! ! !AbstractResizerMorph methodsFor: 'initialization' stamp: 'mt 1/4/2019 10:04'! setInverseColors "handleColor := Color lightGray. dotColor := Color white"! ! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:27'! gripThickness "A number in pixels that encodes the area were the user can target splitters or edge grips." ^ GripThickness ifNil: [4]! ! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:31'! gripThickness: anInteger GripThickness := anInteger. Project current restoreDisplay. self flag: #todo. "mt: Update existing grips. This is challenging because it interferes with ProportionalLayoutPolicy, which is tricky to refresh from here for arbitrary morphs."! ! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:28'! handleLength ^ HandleLength ifNil: [25]! ! !AbstractResizerMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:31'! handleLength: anInteger HandleLength := anInteger. Project current restoreDisplay. self flag: #todo. "mt: Update existing grips. This is challenging because it interferes with ProportionalLayoutPolicy, which is tricky to refresh from here for arbitrary morphs."! ! !CornerGripMorph methodsFor: '*60Deprecated' stamp: 'mt 1/4/2019 09:52'! drawCornerResizeHandles self deprecated: 'Use the more generic #showHandle property.'. ^ self showHandle! ! !CornerGripMorph methodsFor: '*60Deprecated' stamp: 'mt 1/4/2019 09:53'! drawCornerResizeHandles: aBoolean self deprecated: 'Use the more generic #showHandle property.'. self showHandle: aBoolean.! ! !CornerGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:59'! defaultHeight ^ self class handleLength! ! !CornerGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:59'! defaultWidth ^ self class handleLength! ! !CornerGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 10:44'! handleInset ^ (handleInset notNil or: [self owner isNil]) ifTrue: [handleInset ifNil: [1]] ifFalse: [self owner borderWidth max: 1]! ! !CornerGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 09:50'! showHandle ^ showHandle ifNil: [self class drawCornerResizeHandles]! ! !CornerGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 12:00'! target ^ target! ! !CornerGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:14'! drawOn: aCanvas "self showHandle ifTrue: [ bounds := self bounds. aCanvas translucentImage: self alphaHandle at: self topLeft sourceRect: (self handleOrigin + (1@1) extent: self extent)]"! ! !CornerGripMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 12:03'! mouseDown: anEvent "Disable drop shadow to improve performance while resizing." super mouseDown: anEvent. self target ifNil: [^ self]. self target fastFramingOn ifFalse: [ self setProperty: #targetHadDropShadow toValue: target hasDropShadow. self target hasDropShadow: false].! ! !CornerGripMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 12:01'! mouseMove: anEvent | delta | self target ifNil: [^ self]. self target fastFramingOn ifTrue: [delta := self target doFastWindowReframe: self ptName] ifFalse: [ delta := self referencePoint ifNil: [0@0] ifNotNil: [anEvent position - self referencePoint]. self referencePoint: anEvent position. self apply: delta. self bounds: (self bounds origin + delta extent: self bounds extent)].! ! !CornerGripMorph methodsFor: 'event handling' stamp: 'mt 1/4/2019 12:03'! mouseUp: anEvent "Restore target drop shadow if there was one. See #mouseDown:." self target ifNil: [^ self]. self target fastFramingOn ifFalse: [ (self valueOfProperty: #targetHadDropShadow ifAbsent: [false]) ifTrue: [self target hasDropShadow: true]. self removeProperty: #targetHadDropShadow].! ! !CornerGripMorph methodsFor: 'initialization' stamp: 'mt 1/4/2019 12:01'! initialize super initialize. self extent: self defaultWidth @ self defaultHeight. self layoutFrame: self gripLayoutFrame.! ! !BorderGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 11:15'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ self orientation = #vertical ifTrue: [ aCanvas fillRoundRect: (((self width @ (self height * 0.25 min: self class handleLength)) center: self center) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor)]. self orientation = #horizontal ifTrue: [ aCanvas fillRoundRect: ((((self width * 0.25 min: self class handleLength) @ self height) center: self center) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor)] ].! ! !BorderGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:20'! handleInset ^ (handleInset notNil or: [self owner isNil]) ifTrue: [handleInset ifNil: [2]] ifFalse: [(self owner borderWidth max: 1) * 2]! ! !BorderGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:01'! orientation "#vertical or #horizontal" self subclassResponsibility.! ! !BorderGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 12:33'! showHandle ^ showHandle ifNil: [ self flag: #migration. "mt: Can be simplified with a later update." (self class respondsTo: #drawEdgeResizeHandles) ifTrue: [self class drawEdgeResizeHandles] ifFalse: [false]]! ! !BorderGripMorph methodsFor: 'layout' stamp: 'mt 1/4/2019 11:19'! layoutProportionallyIn: cellBounds super layoutProportionallyIn: cellBounds. self flag: #workaround. "mt: We cannot know that our owner has always the correct properties at this time." self orientation = #vertical ifTrue: [ self width: self class gripThickness + (self owner borderWidth * 2)]. self orientation = #horizontal ifTrue: [ self height: self class gripThickness + (self owner borderWidth * 2)]. ! ! !BottomGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:07'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin corner: oldBounds corner + (0 @ delta y))! ! !BottomGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:40'! layoutProportionallyIn: cellBounds super layoutProportionallyIn: cellBounds. self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self bottom: owner bottom.! ! !BottomGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:35'! gripLayoutFrame ^ LayoutFrame fractions: (0 @ 1 corner: 1 @ 1) offsets: (0 @ 0 corner: 0 @ 0)! ! !BottomGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:01'! orientation ^ #horizontal! ! !BottomLeftGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:55'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ aCanvas fillRoundRect: ((self topLeft + (self handleInset @ self handleInset negated) extent: self class gripThickness @ self height) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor). aCanvas fillRoundRect: ((self bottomLeft + (self handleInset @ (self handleInset negated + self class gripThickness negated)) extent: self width @ self class gripThickness) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor).]! ! !BottomLeftGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))! ! !BottomLeftGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:33'! gripLayoutFrame ^ LayoutFrame fractions: (0 @ 1 corner: 0 @ 1) offsets: (0 @ 0 corner: 0 @ 0)! ! !BottomLeftGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:31'! layoutProportionallyIn: cellBounds self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self bottomLeft: owner bottomLeft.! ! !BottomRightGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:31'! layoutProportionallyIn: cellBounds self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self bottomRight: owner bottomRight.! ! !BottomRightGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:53'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ aCanvas fillRoundRect: ((self topRight + ((self handleInset negated + self class gripThickness negated) @ self handleInset negated) extent: self class gripThickness @ self height) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor). aCanvas fillRoundRect: ((self bottomLeft + (self handleInset negated @ (self handleInset negated + self class gripThickness negated)) extent: self width @ self class gripThickness) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor).]! ! !BottomRightGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin corner: oldBounds corner + delta)! ! !BottomRightGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:33'! gripLayoutFrame ^ LayoutFrame fractions: (1 @ 1 corner: 1 @ 1) offsets: (0 @ 0 corner: 0 @ 0)! ! !CornerGripMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:22'! drawEdgeResizeHandles ^ DrawEdgeResizeHandles ifNil: [ false ]! ! !CornerGripMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:23'! drawEdgeResizeHandles: aBoolean DrawEdgeResizeHandles := aBoolean. Project current restoreDisplay.! ! !FillInTheBlankMorph methodsFor: 'initialization' stamp: 'mt 1/4/2019 09:53'! setQuery: queryString initialAnswer: initialAnswer answerExtent: answerExtent acceptOnCR: acceptBoolean | text | result := initialAnswer. done := false. self paneMorph removeAllMorphs. self title: 'Input Requested' translated. self message: queryString. text := self createTextPaneAcceptOnCR: acceptBoolean. self paneMorph addMorphBack: text. self paneMorph wantsPaneSplitters: true; addCornerGrips. self paneMorph grips do: [:ea | ea showHandle: true]. self paneMorph extent: ((initialAnswer asText asMorph extent + (20@10) max: answerExtent) min: 500@500). self setDefaultParameters.! ! !LeftGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:41'! layoutProportionallyIn: cellBounds super layoutProportionallyIn: cellBounds. self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self left: owner left. self top: owner top. self height: owner height.! ! !LeftGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:07'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner)! ! !LeftGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:38'! gripLayoutFrame ^ LayoutFrame fractions: (0 @ 0 corner: 0 @ 1) offsets: (0 @ 0 corner: 0 @ 0)! ! !LeftGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:01'! orientation ^ #vertical! ! !MorphicToolBuilder methodsFor: 'widgets optional' stamp: 'mt 1/4/2019 09:53'! 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 cellInset: (aSpec spacing ifNil: [ProportionalSplitterMorph gripThickness]). 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! ! !ProportionalSplitterMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 09:54'! showHandle ^ showHandle ifNil: [self class showSplitterHandles]! ! !ProportionalSplitterMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:59'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ self splitsLeftAndRight ifTrue: [ aCanvas fillRoundRect: (((self width - (self handleInset * 2) max: 1) @ (self height * 0.25 min: self class handleLength)) center: self center) radius: 3 fillStyle: (SolidFillStyle color: self handleColor)]. self splitsTopAndBottom ifTrue: [ aCanvas fillRoundRect: (((self width * 0.25 min: self class handleLength) @ (self height - (self handleInset * 2) max: 1)) center: self center) radius: 3 fillStyle: (SolidFillStyle color: self handleColor)] ].! ! !ProportionalSplitterMorph methodsFor: 'initialization' stamp: 'mt 1/4/2019 09:42'! initialize super initialize. self beSplitsLeftAndRight. leftOrTop := OrderedCollection new. rightOrBottom := OrderedCollection new. self initializeMovements.! ! !ProportionalSplitterMorph methodsFor: 'events' stamp: 'mt 1/4/2019 11:50'! mouseDown: anEvent "If the user manually drags me, don't override him with auto positioning." self setProperty: #fullDelta toValue: 0@0. anEvent redButtonChanged ifTrue: [ self withSiblingSplittersDo: [ : each | each stopStepping ] ] ifFalse: [ anEvent shiftPressed ifTrue: [ self startStepping ] ifFalse: [ self startStepping. self withSiblingSplittersDo: [ : each | each startStepping ] ] ]. ^ super mouseDown: anEvent! ! !ProportionalSplitterMorph methodsFor: 'events' stamp: 'mt 1/4/2019 12:07'! mouseUp: anEvent (self bounds containsPoint: anEvent cursorPoint) ifFalse: [ anEvent hand showTemporaryCursor: nil ]. self class fastSplitterResize ifTrue: [ self updateFromEvent: anEvent ]. traceMorph ifNotNil: [ traceMorph delete. traceMorph := nil ]. "balanceOffsets currently disrupts Smart Splitter behavior." (ProportionalSplitterMorph smartVerticalSplitters or: [ ProportionalSplitterMorph smartHorizontalSplitters ]) ifFalse: [ self balanceOffsets ]! ! !ProportionalSplitterMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:55'! fastSplitterResize ^ Preferences fastDragWindowForMorphic! ! !ProportionalSplitterMorph class methodsFor: 'preferences' stamp: 'mt 1/4/2019 11:53'! showSplitterHandles: aBoolean Preferences setPreference: #showSplitterHandles toValue: aBoolean. Project current restoreDisplay.! ! !ReleaseBuilder class methodsFor: 'scripts' stamp: 'mt 1/4/2019 12:18'! setPreferences "Preferences class defaultValueTableForCurrentRelease" " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; enable: #swapMouseButtons; disable: #mouseOverForKeyboardFocus. Morph indicateKeyboardFocus: true. Project uiManager openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. HandMorph sendMouseWheelToKeyboardFocus: false. HandMorph synthesizeMouseWheelEvents: true. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; encloseSelection: false ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. PluggableTextMorph simpleFrameAdornments: false. TextMorphForEditView draggableTextSelection: true. "Windows" SystemWindow reuseWindows: false. SystemWindow windowsRaiseOnClick: true. SystemWindow windowTitleActiveOnFirstClick: true. Model windowActiveOnFirstClick: false. "Not good for little screen real estate." Model useColorfulWindows: false. Preferences disable: #fastDragWindowForMorphic. AbstractResizerMorph gripThickness: 4; handleLength: 25. CornerGripMorph drawCornerResizeHandles: false; drawEdgeResizeHandles: false. ProportionalSplitterMorph showSplitterHandles: false; smartHorizontalSplitters: false; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; enable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 8. SystemWindow roundedWindowCorners: false. DialogWindow roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. PluggableButtonMorph roundedButtonCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." SystemWindow gradientWindow: false. DialogWindow gradientDialog: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. ScrollBar gradientScrollBar: false. "Shadows" Preferences enable: #menuAppearance3d. Morph useSoftDropShadow: true. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. "Standard Tools" TheWorldMainDockingBar showWorldMainDockingBar: true; showSecondsInClock: true; twentyFourHourClock: true. SearchBar useSmartSearch: true. Workspace shouldStyle: false. TranscriptStream forceUpdate: true; redirectToStdOut: false; characterLimit: 20000. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. MessageSet useUnifiedMessageLabels: true. Preferences enable: #annotationPanes; enable: #optionalButtons; disable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook; disable: #showDirectionHandles. Morph haloForAll: true; metaMenuForAll: true. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. Deprecation showDeprecationWarnings: true "that's all, folks"! ! !RightGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:41'! layoutProportionallyIn: cellBounds super layoutProportionallyIn: cellBounds. self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self right: owner right. self top: owner top. self height: owner height.! ! !RightGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin corner: oldBounds corner + (delta x @ 0))! ! !RightGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:37'! gripLayoutFrame ^ LayoutFrame fractions: (1 @ 0 corner: 1 @ 1) offsets: (0 @ 0 corner: 0 @ 0)! ! !RightGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:02'! orientation ^ #vertical! ! !TopGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:40'! layoutProportionallyIn: cellBounds super layoutProportionallyIn: cellBounds. self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self top: owner top.! ! !TopGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin + (0 @ delta y) corner: oldBounds corner)! ! !TopGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:35'! gripLayoutFrame ^ LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0 @ 0 corner: 0@ 0)! ! !TopGripMorph methodsFor: 'accessing' stamp: 'mt 1/4/2019 11:01'! orientation ^ #horizontal! ! !TopLeftGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:40'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ aCanvas fillRoundRect: ((self topLeft + self handleInset asPoint extent: self class gripThickness @ self height) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor). aCanvas fillRoundRect: ((self topLeft + self handleInset asPoint extent: self width @ self class gripThickness) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor). ].! ! !TopLeftGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin + delta corner: oldBounds corner)! ! !TopLeftGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:31'! layoutProportionallyIn: cellBounds self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self topLeft: owner topLeft.! ! !TopRightGripMorph methodsFor: 'target resize' stamp: 'mt 1/4/2019 12:06'! apply: delta | oldBounds | oldBounds := self target bounds. self target bounds: (oldBounds origin + (0@delta y) corner: oldBounds corner + (delta x @ 0))! ! !TopRightGripMorph methodsFor: 'accessing' stamp: 'mt 1/3/2019 14:33'! gripLayoutFrame ^ LayoutFrame fractions: (1 @ 0 corner: 1 @ 0) offsets: (0 @ 0 corner: 0 @ 0)! ! !TopRightGripMorph methodsFor: 'drawing' stamp: 'mt 1/4/2019 10:51'! drawOn: aCanvas super drawOn: aCanvas. self showHandle ifTrue: [ aCanvas fillRoundRect: ((self topRight + ((self handleInset negated + self class gripThickness negated) @ self handleInset) extent: self class gripThickness @ self height) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor). aCanvas fillRoundRect: ((self topLeft + (self handleInset negated @ self handleInset) extent: self width @ self class gripThickness) insetBy: self handleInset) radius: 3 fillStyle: (SolidFillStyle color: self handleColor).]! ! !TopRightGripMorph methodsFor: 'layout' stamp: 'mt 1/3/2019 14:31'! layoutProportionallyIn: cellBounds self flag: #workaround. "mt: We cannot know that our owner has always the correct new bounds at this time." self topRight: owner topRight.! ! !UserInterfaceTheme class methodsFor: 'initialize-release' stamp: 'mt 1/4/2019 12:17'! cleanUpAndReset "Rebuild all themes and re-apply the current one by name." | nameToReset | nameToReset := UserInterfaceTheme current name. self cleanUp: true. (self named: nameToReset) apply.! ! !SqueakTheme class methodsFor: 'instance creation' stamp: 'mt 1/4/2019 09:29'! addWindowColors: theme theme set: #titleFont for: #SystemWindow to: [Preferences windowTitleFont]; set: #borderColorModifier for: #SystemWindow to: [ [:c | c adjustBrightness: -0.3] ]; set: #borderColorModifier for: #ScrollPane to: [ [:c | c adjustBrightness: -0.3] ]; set: #borderWidth for: #SystemWindow to: 1; derive: #resizerColorModifier for: #AbstractResizerMorph from: #SystemWindow at: #borderColorModifier; set: #uniformWindowColor for: #Model to: Color veryVeryLightGray; derive: #uniformWindowColor for: #TranscriptStream from: #Model; derive: #color for: #SystemWindow from: #Model at: #uniformWindowColor; "Fall back for windows without models." set: #unfocusedWindowColorModifier for: #SystemWindow to: [ [:color | color darker] ]; set: #unfocusedLabelColor for: #SystemWindow to: Color darkGray; set: #focusedLabelColor for: #SystemWindow to: Color black; set: #customWindowColor for: #Browser to: (Color r: 0.764 g: 0.9 b: 0.63); set: #customWindowColor for: #ChangeList to: (Color r: 0.719 g: 0.9 b: 0.9); set: #customWindowColor for: #ChangeSorter to: (Color r: 0.719 g: 0.9 b: 0.9); set: #customWindowColor for: #ChatNotes to: (Color r: 1.0 g: 0.7 b: 0.8); set: #customWindowColor for: #ClassCommentVersionsBrowser to: (Color r: 0.753 g: 0.677 b: 0.9); set: #customWindowColor for: #Debugger to: (Color r: 0.9 g: 0.719 b: 0.719); set: #customWindowColor for: #DualChangeSorter to: (Color r: 0.719 g: 0.9 b: 0.9); set: #customWindowColor for: #FileContentsBrowser to: (Color r: 0.7 g: 0.7 b: 0.508); set: #customWindowColor for: #FileList to: (Color r: 0.65 g: 0.65 b: 0.65); set: #customWindowColor for: #InstanceBrowser to: (Color r: 0.726 g: 0.9 b: 0.9); set: #customWindowColor for: #Lexicon to: (Color r: 0.79 g: 0.9 b: 0.79); set: #customWindowColor for: #MCTool to: (Color r: 0.65 g: 0.691 b: 0.876); set: #customWindowColor for: #MessageNames to: (Color r: 0.639 g: 0.9 b: 0.497); set: #customWindowColor for: #MessageSet to: (Color r: 0.719 g: 0.9 b: 0.9); set: #customWindowColor for: #PackagePaneBrowser to: (Color r: 0.9 g: 0.9 b: 0.63); set: #customWindowColor for: #PluggableFileList to: Color lightYellow; set: #customWindowColor for: #PreferenceBrowser to: (Color r: 0.671 g: 0.9 b: 0.9); set: #customWindowColor for: #SMLoader to: (Color r: 0.801 g: 0.801 b: 0.614); set: #customWindowColor for: #SMLoaderPlus to: (Color r: 0.801 g: 0.801 b: 0.614); set: #customWindowColor for: #SMReleaseBrowser to: (Color r: 0.801 g: 0.801 b: 0.614); set: #customWindowColor for: #ScriptingDomain to: (Color r: 0.91 g: 0.91 b: 0.91); set: #customWindowColor for: #SelectorBrowser to: (Color r: 0.45 g: 0.9 b: 0.9); set: #customWindowColor for: #StringHolder to: (Color r: 0.9 g: 0.9 b: 0.719); set: #customWindowColor for: #TestRunner to: (Color r: 0.9 g: 0.576 b: 0.09); set: #customWindowColor for: #TranscriptStream to: (Color r: 0.9 g: 0.75 b: 0.45); set: #customWindowColor for: #VersionsBrowser to: (Color r: 0.782 g: 0.677 b: 0.9).! ! TopRightGripMorph removeSelector: #borderOffset! TopRightGripMorph removeSelector: #handleOrigin! !TopRightGripMorph reorganize! ('target resize' apply:) ('accessing' gripLayoutFrame ptName resizeCursor) ('drawing' drawOn:) ('layout' layoutProportionallyIn:) ! TopLeftGripMorph removeSelector: #borderOffset! TopLeftGripMorph removeSelector: #handleOrigin! !TopLeftGripMorph reorganize! ('drawing' drawOn:) ('target resize' apply:) ('accessing' gripLayoutFrame ptName resizeCursor) ('layout' layoutProportionallyIn:) ! ProportionalSplitterMorph removeSelector: #getOldColor! ProportionalSplitterMorph removeSelector: #handleRect! ProportionalSplitterMorph removeSelector: #handleSize! ProportionalSplitterMorph removeSelector: #isCursorOverHandle! ProportionalSplitterMorph removeSelector: #layoutChanged! ProportionalSplitterMorph removeSelector: #showSplitterHandles! AbstractResizerMorph subclass: #ProportionalSplitterMorph instanceVariableNames: 'leftOrTop rightOrBottom splitsTopAndBottom traceMorph movements' classVariableNames: 'SmartHorizontalSplitters SmartVerticalSplitters' poolDictionaries: '' category: 'Morphic-Windows'! !ProportionalSplitterMorph reorganize! ('queries - controlled morphs' bordersOn: commonNeighbours:with:) ('testing' splitsLeftAndRight splitsTopAndBottom) ('queries - geometry' bottomBoundary leftBoundary minimumHeightOf: minimumWidthOf: normalizedX: normalizedY: rightBoundary topBoundary) ('accessing' resizeCursor showHandle) ('drawing' drawOn:) ('initialization' addLeftOrTop: addRightOrBottom: beSplitsLeftAndRight beSplitsTopAndBottom initialize) ('smart splitters - stepping' step stepTime stopStepping wantsSteps) ('events' balanceOffsets mouseDown: mouseMove: mouseUp: repositionBy: updateFromEvent:) ('queries - adjacent splitters' siblingSplittersDo: splitterAbove splitterBelow splitterLeft splitterRight splittersAboveDo: splittersBelowDo: splittersLeftDo: splittersRightDo: withSiblingSplittersDo:) ('smart splitters - queries' canEncroachWhiteSpaceOf: charactersOccludedIn: leftRightImbalance occlusionDifference proposedCorrectionWouldCauseFocusChange: topBottomCorrection) ('smart splitters' initializeMovements movements reduceLeftRightImbalance reduceTopBottomImbalance) ! CornerGripMorph class removeSelector: #activeColor! CornerGripMorph class removeSelector: #activeColor:! CornerGripMorph class removeSelector: #activeForm! CornerGripMorph class removeSelector: #defaultForm! CornerGripMorph class removeSelector: #defaultFormFromFileNamed:! CornerGripMorph class removeSelector: #initialize! CornerGripMorph class removeSelector: #initializeActiveForm! CornerGripMorph class removeSelector: #initializePassiveForm! CornerGripMorph class removeSelector: #passiveColor! CornerGripMorph class removeSelector: #passiveColor:! CornerGripMorph class removeSelector: #passiveForm! !CornerGripMorph class reorganize! ('preferences' drawCornerResizeHandles drawCornerResizeHandles: drawEdgeResizeHandles drawEdgeResizeHandles:) ! BottomRightGripMorph removeSelector: #borderOffset! BottomRightGripMorph removeSelector: #handleOrigin! !BottomRightGripMorph reorganize! ('layout' layoutProportionallyIn:) ('drawing' drawOn:) ('target resize' apply:) ('accessing' gripLayoutFrame ptName resizeCursor) ! BottomLeftGripMorph removeSelector: #borderOffset! BottomLeftGripMorph removeSelector: #handleOrigin! !BottomLeftGripMorph reorganize! ('drawing' drawOn:) ('target resize' apply:) ('accessing' gripLayoutFrame ptName resizeCursor) ('layout' layoutProportionallyIn:) ! BorderGripMorph removeSelector: #setDefaultColors! BorderGripMorph removeSelector: #setInverseColors! !BorderGripMorph reorganize! ('drawing' drawOn:) ('accessing' handleInset orientation showHandle) ('layout' layoutProportionallyIn:) ! CornerGripMorph removeSelector: #activeForm! CornerGripMorph removeSelector: #alphaHandle! CornerGripMorph removeSelector: #borderOffset! CornerGripMorph removeSelector: #clipForm:! CornerGripMorph removeSelector: #handleOrigin! CornerGripMorph removeSelector: #passiveForm! CornerGripMorph removeSelector: #setDefaultColors! CornerGripMorph removeSelector: #setInverseColors! CornerGripMorph removeSelector: #transparentRectangle! AbstractResizerMorph subclass: #CornerGripMorph instanceVariableNames: 'target' classVariableNames: 'DrawCornerResizeHandles DrawEdgeResizeHandles' poolDictionaries: '' category: 'Morphic-Windows'! !CornerGripMorph reorganize! ('*60Deprecated' drawCornerResizeHandles drawCornerResizeHandles:) ('accessing' defaultHeight defaultWidth handleInset showHandle target target:) ('drawing' drawOn:) ('event handling' handlesMouseDown: handlesMouseOver: mouseDown: mouseMove: mouseUp:) ('initialization' initialize) ! AbstractResizerMorph class removeSelector: #handleSize! AbstractResizerMorph removeSelector: #dotColor! AbstractResizerMorph removeSelector: #isCursorOverHandle! Morph subclass: #AbstractResizerMorph instanceVariableNames: 'handleColor handleInset lastMouse showHandle' classVariableNames: 'GripThickness HandleLength' poolDictionaries: '' category: 'Morphic-Windows'! !AbstractResizerMorph reorganize! ('accessing' handleColor handleColor: handleInset handleInset: referencePoint referencePoint: resizeCursor showHandle showHandle:) ('event handling' handlesMouseDown: handlesMouseOver: mouseDown: mouseEnter: mouseLeave:) ('initialization' initialize setDefaultColors setInverseColors) ! "Postscript: Leave the line above, and replace the rest of this comment by a useful one. Executable statements should follow this comment, and should be separated by periods, with no exclamation points (!!). Be sure to put any further comments in double-quotes, like this one." "Migrate all open resizers." AbstractResizerMorph allSubInstancesDo: [:ea | ea handleColor isColor ifFalse: [ea handleColor: nil]. ea removeAllMorphs]. "Update user interface themes." UserInterfaceTheme cleanUpAndReset.!