Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
TheWorldMainDockingBar
Last updated at 8:50 pm UTC on 30 March 2017
This object creates an instance of a DockingBarMorph and fills it with menu items to implement a menu at the top of the screen.

Each MorphicProject has a project parameter which points to a TheWorldMenuDockingBar instance.
The menu font is set by Preferences chooseMenuFont.

Object subclass: #TheWorldMainDockingBar
	instanceVariableNames: ''
	classVariableNames: 'Instance TS TwentyFourHourClock'
	poolDictionaries: ''
	category: 'Morphic-Kernel'




 createDockingBar
	"Create a docking bar from the receiver's representation"
	
	| dockingBar |
	dockingBar := DockingBarMorph new
		adhereToTop;
		color: MenuMorph menuColor;
		gradientRamp: self gradientRamp;
		autoGradient: MenuMorph gradientMenu;
		borderWidth: 0.
	self fillDockingBar: dockingBar.
	self labelIfNeeded: dockingBar.
	^ dockingBar



Version 5:

 menusOn: aDockingBar

	self class showMainMenuInWorldMainDockingBar ifTrue: [
		self squeakMenuOn: aDockingBar].

	self class showProjectsMenuInWorldMainDockingBar ifTrue: [
		self projectsMenuOn: aDockingBar].

	self class showToolsMenuInWorldMainDockingBar ifTrue: [
		self toolsMenuOn: aDockingBar].

	self class showAppsMenuInWorldMainDockingBar ifTrue: [
		self appsMenuOn: aDockingBar].

	self class showExtrasMenuInWorldMainDockingBar ifTrue: [
		self extrasMenuOn: aDockingBar].

	self class showWindowsMenuInWorldMainDockingBar ifTrue: [
		self windowsMenuOn: aDockingBar].

	self class showHelpMenuInWorldMainDockingBar ifTrue: [
		self helpMenuOn: aDockingBar].


Version 5.1

 menusOn: aDockingBar

	self class showMainMenuInWorldMainDockingBar ifTrue: [
		self squeakMenuOn: aDockingBar].

	self class showProjectsMenuInWorldMainDockingBar ifTrue: [
		self projectsMenuOn: aDockingBar].

	self class showToolsMenuInWorldMainDockingBar ifTrue: [
		self toolsMenuOn: aDockingBar].

	self class showAppsMenuInWorldMainDockingBar ifTrue: [
		self appsMenuOn: aDockingBar].

	self class showDoMenuInWorldMainDockingBar ifTrue: [
		self doMenuOn: aDockingBar].

	self class showExtrasMenuInWorldMainDockingBar ifTrue: [
		self extrasMenuOn: aDockingBar].

	self class showWindowsMenuInWorldMainDockingBar ifTrue: [
		self windowsMenuOn: aDockingBar].

	self class showHelpMenuInWorldMainDockingBar ifTrue: [
		self helpMenuOn: aDockingBar].