[squeak-dev] The Trunk: Morphic-eem.451.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 1 18:43:35 UTC 2010


Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.451.mcz

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

Name: Morphic-eem.451
Author: eem
Time: 1 July 2010, 11:42:04.096 am
UUID: 45cb6a21-abc6-44eb-8014-8f333bfe6359
Ancestors: Morphic-eem.450

Morphic support for browser multi-windows.
1 of 4 (Morphic, ToolBuilder-Kernel, ToolBuilder-Morphic, Tools).

Also fix docking bar's Help menu for unload all packages images

=============== Diff against Morphic-bf.449 ===============

Item was added:
+ ----- Method: PluggableSystemWindowWithLabelButton>>savedMultiWindowState: (in category 'accessing') -----
+ savedMultiWindowState: aSavedMultiWindowState
+ 	labelButton := MultiWindowLabelButtonMorph
+ 						on: aSavedMultiWindowState
+ 						getState: nil
+ 						action: #selectWindowsMenu.
+ 	labelButton
+ 		triggerOnMouseDown: true;
+ 		savedMultiWindowState: aSavedMultiWindowState.
+ 	labelButton
+ 		layoutFrame: (LayoutFrame "i.e. in the left 40% of the title bar"
+ 						fractions: (0 at 0 corner: 0.4 at 0)
+ 						offsets: (20@ -20 corner: 0 at 0));
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill.
+ 	self addMorphFront: labelButton.
+ 	self adjustExtraButton!

Item was changed:
  ----- Method: SystemWindow>>delete (in category 'open/close') -----
  delete
  	| thisWorld sketchEditor aPaintBox |
+ 	self mustNotClose ifTrue: [^self].
+ 	model okToClose ifFalse: [^self].
- 	self mustNotClose ifTrue: [^ self].
- 	model okToChange ifFalse: [^ self].
  	thisWorld := self world.
  	sketchEditor := self extantSketchEditor.
  	self isFlexed
  		ifTrue: [owner delete]
  		ifFalse: [super delete].
  	model windowIsClosing; release.
  	model := nil.
  	sketchEditor ifNotNil:
  		[sketchEditor deleteSelfAndSubordinates.
+ 		 (thisWorld notNil 
+ 		  and: [(aPaintBox := thisWorld paintBoxOrNil) notNil]) ifTrue:
+ 			[aPaintBox delete]].
- 		thisWorld notNil ifTrue:
- 			[(aPaintBox := thisWorld paintBoxOrNil) ifNotNil: [aPaintBox delete]]].
  		
+ 	SystemWindow noteTopWindowIn: thisWorld!
- 	SystemWindow noteTopWindowIn: thisWorld.
- !

Item was added:
+ ----- Method: MultiWindowLabelButtonMorph>>savedMultiWindowState: (in category 'accessing') -----
+ savedMultiWindowState: anObject
+ 	"Set the value of savedMultiWindowState"
+ 
+ 	savedMultiWindowState := anObject!

Item was added:
+ PluggableSystemWindow subclass: #PluggableSystemWindowWithLabelButton
+ 	instanceVariableNames: 'labelButton'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Morphic-Windows'!
+ 
+ !PluggableSystemWindowWithLabelButton commentStamp: 'eem 6/29/2010 19:02' prior: 0!
+ A PluggableSystemWindowWithLabelButton provides the pull-down menu of browser panes in the multi-pane browser.
+ 
+ Instance Variables
+ 	labelButton:		<BrowserPaneButtonMorph>
+ 
+ labelButton
+ 	- the labelButton is a hack to hold onto the panes of a multi-paned browser so that an inst var doesn't have to be added to the Browser hierarchy.
+ !

Item was added:
+ ----- Method: PluggableSystemWindowWithLabelButton>>passivate (in category 'top window') -----
+ passivate
+ 	super passivate.
+ 	self removeProperty: #clickPoint!

Item was added:
+ ----- Method: PluggableSystemWindowWithLabelButton>>adjustExtraButton (in category 'resize/collapse') -----
+ adjustExtraButton
+ 	labelButton ifNil: [^self].
+ 	labelButton
+ 		position: self innerBounds topLeft + (20 @ -3);
+ 		extent: self innerBounds extent * (0.4 at 1)!

Item was added:
+ ----- Method: MultiWindowLabelButtonMorph>>drawOn: (in category 'drawing') -----
+ drawOn: aCanvas 
+ 	"Be invisible."!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>helpMenuOn: (in category 'submenu - help') -----
  helpMenuOn: aDockingBar
  
  	aDockingBar addItem: [ :it |
  		it	contents: 'Help' translated;
  			addSubMenu: [ :menu |  'Todo'.
  				menu addItem:[:item|
  					item
  						contents: 'Online Resources' translated;
  						help: 'Online resources for Squeak' translated;
  						target: self;
  						icon: MenuIcons smallHelpIcon;
  						selector: #showWelcomeText:label:in:;
  						arguments: {
  							#squeakOnlineResources. 
  							'Squeak Online Resources'. 
  							(140 at 140 extent: 560 at 360)
  						}].
  				menu addItem:[:item|
  					item
  						contents: 'Keyboard Shortcuts' translated;
  						help: 'Keyboard bindings used in Squeak' translated;
  						target: Utilities;
  						selector: #openCommandKeyHelp ].
  				menu addItem:[:item|
  					item
  						contents: 'Font Size Summary' translated;
  						help: 'Font size summary from the old Squeak 3.10.2 help menu.' translated;
  						target: TextStyle;
  						selector: #fontSizeSummary ].
  				menu addItem:[:item|
  					item
  						contents: 'Useful Expressions' translated;
  						help: 'Useful expressions from the old Squeak 3.10.2 help menu.' translated;
  						target: Utilities;
  						selector: #openStandardWorkspace ].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Extending the system' translated;
  						help: 'Includes code snippets to evaluate for extending the system' translated;
  						target: self;
  						icon: MenuIcons smallHelpIcon;
  						selector: #showWelcomeText:label:in:;
  						arguments: {
  							#extendingTheSystem. 
  							'How to extend the system'. 
  							(140 at 140 extent: 560 at 360)
  						}].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Welcome Workspaces' translated;
  						help: 'The Welcome Workspaces' translated;
  						addSubMenu:[:submenu| self welcomeWorkspacesOn: submenu]].
+ 				(Smalltalk classNamed: #HelpBrowser) ifNotNil: 
+ 					[:classHelpBrowser|
- 				(Smalltalk at: #HelpBrowser) ifNotNil: [
  					menu addLine.
  					menu addItem: [ :item |
  						item
  							contents: 'Help Browser' translated;
  							help: 'Integrated Help System' translated;
+ 							target: classHelpBrowser;
- 							target: (Smalltalk at: #HelpBrowser);
  							selector: #open ] ].
  			]].!

Item was added:
+ ----- Method: PluggableSystemWindowWithLabelButton>>mouseDown: (in category 'events') -----
+ mouseDown: evt
+ 	| wasInactive |
+ 	wasInactive := TopWindow ~~ self.
+ 	self valueOfProperty: #clickPoint ifPresentDo: 
+ 		[:firstClick |
+ 		(labelButton containsPoint: evt cursorPoint) ifTrue:
+ 			[^labelButton mouseDown: evt]].
+ 	super mouseDown: evt.
+ 	(wasInactive
+ 	 and: [model windowActiveOnFirstClick not
+ 	 and: [labelButton containsPoint: evt cursorPoint]]) ifTrue:
+ 		[^labelButton mouseDown: evt]!

Item was added:
+ ----- Method: MultiWindowLabelButtonMorph>>savedMultiWindowState (in category 'accessing') -----
+ savedMultiWindowState
+ 	"Answer the value of savedMultiWindowState"
+ 
+ 	^ savedMultiWindowState!

Item was added:
+ ----- Method: PluggableSystemWindowWithLabelButton>>extent: (in category 'geometry') -----
+ extent: newExtent
+ 	super extent: newExtent.
+ 	self adjustExtraButton!

Item was added:
+ PluggableButtonMorph subclass: #MultiWindowLabelButtonMorph
+ 	instanceVariableNames: 'savedMultiWindowState'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Morphic-Windows'!
+ 
+ !MultiWindowLabelButtonMorph commentStamp: 'eem 6/30/2010 16:13' prior: 0!
+ A MultiWindowLabelButtonMorph is  a means of implementing tabbed windows.  It cooperates with PluggableSystemWindowWithButton to provide a drop-down menu of windows when clicking in the window label.  It requires the model to create a suitable sub-instance of SavedMultiWindowState for inactive windows.  To specify multi-windows use the multiWindowStyle: setter to customize a PluggableWindowSpec.
+ 
+ Instance Variables
+ 	savedMultiWindowState:		<SavedMultiWindowState>
+ 
+ savedMultiWindowState
+ 	- the sequence of models in a multi-window.!

Item was added:
+ ----- Method: MultiWindowLabelButtonMorph>>performAction (in category 'accessing') -----
+ performAction
+ 	"Override to interpret the actionSelector as a menu accessor and to activate that menu."
+ 	actionSelector ifNotNil:
+ 		[(model perform: actionSelector) ifNotNil:
+ 			[:menu|
+ 			menu
+ 				invokeModalAt: self position - (0 at 5)
+ 				in: ActiveWorld
+ 				allowKeyboard: Preferences menuKeyboardControl]]!




More information about the Squeak-dev mailing list