Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
buildWorldMenu
Last updated at 3:49 am UTC on 18 July 2018
When a world menu object (= an object of the class TheWorldMenu) is constructed it is done in the method #buildWorldMenu.

As the code below shows first a MenuMorph object is created ant then entries are added to it.


 buildWorldMenu
	"Build the menu that is put up when the screen-desktop is clicked on"
	| menu |
	menu := MenuMorph new defaultTarget: self.
	menu commandKeyHandler: self.
	self colorForDebugging: menu.
	menu addStayUpItem.

	self makeConvenient: menu.

	Smalltalk at: #ServiceGUI ifPresent:[:sgui|
		sgui worldMenu: menu.
		sgui onlyServices ifTrue: [^ menu].
	].

	self addProjectEntries: menu.

	myWorld addUndoItemsTo: menu.

	self addRestoreDisplay: menu.
	self addUtilities: menu.
	self addObjectsAndTools: menu.
	self addPrintAndDebug: menu.

	self addSaveAndQuit: menu.

	^ menu

Version 5.0
WorldMenu_Squeak5.png


See also