[FIX] PackageBrowser>>openAsMorphEditing:

Robert Hirschfeld hirschfeld at acm.org
Mon May 29 00:54:10 UTC 2000


"Change Set:		PackageBrowser>>openAsMorphEditing:
Date:			28 May 2000
Author:			Robert Hirschfeld

Fixes PackageBrowser>>openAsMorphEditing: to be sensitive to
Preferences for #annotationPanes and #optionalButtons."


___________________________________________
                          Robert Hirschfeld
                  mailto:hirschfeld at acm.org
   http://www.prakinf.tu-ilmenau.de/~hirsch
-------------- next part --------------
'From Squeak2.8alpha of 6 April 2000 [latest update: #2210] on 28 May 2000 at 5:52:48 pm'!
"Change Set:		PackageBrowser>>openAsMorphEditing:
Date:			28 May 2000
Author:			Robert Hirschfeld

Fixes PackageBrowser>>openAsMorphEditing: to be sensitive to
Preferences for #annotationPanes and #optionalButtons."!


!PackageBrowser methodsFor: 'initialize-release' stamp: 'rhi 5/28/2000 11:29'!
openAsMorphEditing: editString
	"Create a pluggable version of all the views for a Browser, including views and controllers."
	"PackageBrowser openBrowser"

	| listHeight buttonHeight window switches codePane aListMorph baseline aTextMorph |
	listHeight := 0.4.
	buttonHeight := 0.09.
	window _ (SystemWindow labelled: 'later') model: self.

	window addMorph: (PluggableListMorph on: self list: #packageList
			selected: #packageListIndex changeSelected: #packageListIndex:
			menu: #packageMenu: keystroke: #packageListKey:from:)
		frame: (0 at 0 extent: 0.15 at listHeight).

	window addMorph: (PluggableListMorph on: self list: #systemCategoryList
			selected: #systemCategoryListIndex changeSelected: #systemCategoryListIndex:
			menu: #systemCategoryMenu: keystroke: #systemCatListKey:from:)
		frame: (0.15 at 0 extent: 0.2 at listHeight).

	window addMorph: (PluggableListMorph on: self list: #classList
			selected: #classListIndex changeSelected: #classListIndex:
			menu: #classListMenu: keystroke: #classListKey:from:)
		frame: (0.35 at 0 extent: 0.25@(listHeight - buttonHeight)).

	switches _ self buildMorphicSwitches.
	window addMorph: switches frame: (0.35@(listHeight - buttonHeight) 
				extent: 0.25 at buttonHeight).
	switches borderWidth: 0.

	window addMorph: (PluggableListMorph on: self list: #messageCategoryList
			selected: #messageCategoryListIndex changeSelected: #messageCategoryListIndex:
			menu: #messageCategoryMenu:)
		frame: (0.6 at 0 extent: 0.15 at listHeight).
	aListMorph _ PluggableListMorph on: self list: #messageList
			selected: #messageListIndex changeSelected: #messageListIndex:
			menu: #messageListMenu:shifted:
			keystroke: #messageListKey:from:.
	aListMorph menuTitleSelector: #messageListSelectorTitle.
	window addMorph: aListMorph
		frame: (0.75 at 0 extent: 0.25 at listHeight).

	Preferences useAnnotationPanes
		ifFalse:
			[baseline _ listHeight]
		ifTrue:
			[baseline _ listHeight + 0.05.
			aTextMorph _ PluggableTextMorph on: self
					text: #annotation accept: nil
					readSelection: nil menu: nil.
			aTextMorph askBeforeDiscardingEdits: false.
			window addMorph: aTextMorph
				frame: (0 at listHeight corner: 1 at baseline)].

	Preferences optionalButtons
		ifTrue:
			[window addMorph: self optionalButtonRow
				frame: (0 at baseline corner: 1@(baseline + 0.08)).
			baseline _ baseline + 0.08].

	codePane _ PluggableTextMorph on: self text: #contents accept: #contents:notifying:
			readSelection: #contentsSelection menu: #codePaneMenu:shifted:.
	editString ifNotNil: [codePane editString: editString.
					codePane hasUnacceptedEdits: true].
	window addMorph: codePane
		frame: (0 @ baseline corner: 1 @ 1).

	window setUpdatablePanesFrom: #(systemCategoryList classList messageCategoryList messageList).
	^ window! !



More information about the Squeak-dev mailing list