Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.447.mcz ==================== Summary ==================== Name: Morphic-ar.447 Author: ar Time: 23 June 2010, 5:15:41.848 pm UUID: 38684bfc-94bf-194b-8d35-036b3cec996e Ancestors: Morphic-cmm.446 Make windows resizable along their edges. Add preference covering the behavior. =============== Diff against Morphic-cmm.446 =============== Item was added: + ----- Method: LeftGripMorph>>ptName (in category 'accessing') ----- + ptName + ^#left! Item was added: + ----- Method: RightGripMorph>>ptName (in category 'accessing') ----- + ptName + ^#right! Item was added: + ----- Method: TopGripMorph>>resizeCursor (in category 'accessing') ----- + resizeCursor + + ^ Cursor resizeForEdge: #top! Item was added: + ----- Method: BorderGripMorph>>drawOn: (in category 'as yet unclassified') ----- + drawOn: aCanvas + + "aCanvas fillRectangle: self bounds color: Color red" "for debugging" + ! Item was added: + ----- Method: LeftGripMorph>>initialize (in category 'initialize') ----- + initialize + super initialize. + self vResizing: #spaceFill.! Item was added: + ----- Method: RightGripMorph>>initialize (in category 'initialize') ----- + initialize + super initialize. + self vResizing: #spaceFill.! Item was added: + ----- Method: BottomGripMorph>>resizeCursor (in category 'accessing') ----- + resizeCursor + + ^ Cursor resizeForEdge: #top! Item was added: + CornerGripMorph subclass: #BorderGripMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Windows'! Item was added: + ----- Method: BottomGripMorph>>ptName (in category 'accessing') ----- + ptName + ^#bottom! Item was added: + ----- Method: TopGripMorph>>ptName (in category 'accessing') ----- + ptName + ^#top! Item was added: + ----- Method: SystemWindow class>>resizeAlongEdges (in category 'preferences') ----- + resizeAlongEdges + <preference: 'Resize Windows along edges' + category: 'Morphic' + description: 'When true, windows can be resized along their edges as well as the corners' + type: #Boolean> + ^ResizeAlongEdges ifNil:[true]! Item was added: + ----- Method: BottomGripMorph>>initialize (in category 'initialize') ----- + initialize + super initialize. + self hResizing: #spaceFill.! Item was added: + ----- Method: TopGripMorph>>initialize (in category 'initialize') ----- + initialize + super initialize. + self hResizing: #spaceFill.! Item was added: + ----- Method: LeftGripMorph>>apply: (in category 'target resize') ----- + apply: delta + | oldBounds | + oldBounds := target bounds. + target + bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))! Item was added: + ----- Method: RightGripMorph>>apply: (in category 'target resize') ----- + apply: delta + | oldBounds | + oldBounds := target bounds. + target + bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))! Item was added: + BorderGripMorph subclass: #RightGripMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Windows'! Item was added: + ----- Method: BottomGripMorph>>defaultHeight (in category 'initialize') ----- + defaultHeight + + ^ 5! Item was added: + ----- Method: TopGripMorph>>defaultHeight (in category 'initialize') ----- + defaultHeight + + ^ 5! Item was added: + BorderGripMorph subclass: #BottomGripMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Windows'! Item was added: + BorderGripMorph subclass: #TopGripMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Windows'! Item was added: + ----- Method: BottomGripMorph>>apply: (in category 'target resize') ----- + apply: delta + | oldBounds | + oldBounds := target bounds. + target + bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))! Item was changed: ----- Method: ProportionalSplitterMorph>>handleSize (in category 'displaying') ----- handleSize ^ self class splitterWidth @ 30! Item was added: + ----- Method: TopGripMorph>>apply: (in category 'target resize') ----- + apply: delta + | oldBounds | + oldBounds := target bounds. + target + bounds: (oldBounds origin + (delta x @ 0) corner: oldBounds corner + (0 @ delta y))! Item was added: + ----- Method: RightGripMorph>>defaultWidth (in category 'initialize') ----- + defaultWidth + + ^ 5! Item was added: + ----- Method: LeftGripMorph>>defaultWidth (in category 'initialize') ----- + defaultWidth + + ^ 5! Item was changed: MorphicModel subclass: #SystemWindow instanceVariableNames: 'labelString stripes label closeBox collapseBox activeOnlyOnTop paneMorphs paneRects collapsedFrame fullFrame isCollapsed menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' + classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage HideExpandButton MenuBoxFrame MenuBoxImage ResizeAlongEdges ReuseWindows TopWindow' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage HideExpandButton MenuBoxFrame MenuBoxImage ReuseWindows TopWindow' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '<historical>' prior: 0! SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! Item was added: + ----- Method: BorderGripMorph>>setInverseColors (in category 'as yet unclassified') ----- + setInverseColors! Item was added: + ----- Method: SystemWindow class>>resizeAlongEdges: (in category 'preferences') ----- + resizeAlongEdges: aBool + "Preference setter" + ResizeAlongEdges := aBool! Item was added: + ----- Method: SystemWindow>>addCornerGrips (in category 'initialization') ----- + addCornerGrips + "When enabled via preference, also add edge grips" + super addCornerGrips. + self class resizeAlongEdges ifTrue:[self addEdgeGrips].! Item was added: + ----- Method: BorderedMorph>>addEdgeGrips (in category 'lookenhancements') ----- + addEdgeGrips + "Add resizers along the four edges of the receiver" + + self + addMorphBack: (TopGripMorph new target: self;position: self position). + self + addMorphBack: (BottomGripMorph new target: self;position: self position). + self + addMorphBack: (RightGripMorph new target: self;position: self position). + self + addMorphBack: (LeftGripMorph new target: self;position: self position).! Item was added: + ----- Method: LeftGripMorph>>gripLayoutFrame (in category 'accessing') ----- + gripLayoutFrame + ^ LayoutFrame + fractions: (0 @ 0 corner: 0 @ 1) + offsets: (0 @ 0 negated corner: self defaultWidth @ 0)! Item was added: + ----- Method: RightGripMorph>>gripLayoutFrame (in category 'accessing') ----- + gripLayoutFrame + ^ LayoutFrame + fractions: (1 @ 0 corner: 1 @ 1) + offsets: (self defaultWidth negated @ self defaultHeight negated corner: 0@ 0)! Item was added: + BorderGripMorph subclass: #LeftGripMorph + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Windows'! Item was added: + ----- Method: BorderGripMorph>>setDefaultColors (in category 'as yet unclassified') ----- + setDefaultColors! Item was added: + ----- Method: LeftGripMorph>>resizeCursor (in category 'accessing') ----- + resizeCursor + + ^ Cursor resizeForEdge: #left! Item was added: + ----- Method: RightGripMorph>>resizeCursor (in category 'accessing') ----- + resizeCursor + + ^ Cursor resizeForEdge: #right! Item was added: + ----- Method: BottomGripMorph>>gripLayoutFrame (in category 'accessing') ----- + gripLayoutFrame + ^ LayoutFrame + fractions: (0 @ 1 corner: 1 @ 1) + offsets: (0 @ self defaultHeight negated corner: 0@ 0)! Item was added: + ----- Method: TopGripMorph>>gripLayoutFrame (in category 'accessing') ----- + gripLayoutFrame + ^ LayoutFrame + fractions: (0 @ 0 corner: 1 @ 0) + offsets: (0 @ -40 corner: 0@ 0)! |
Free forum by Nabble | Edit this page |