/*******************************************************************************
 * OulipoMachine licenses this file to you under the Apache License, Version 2.0
 * (the "License");  you may not use this file except in compliance with the License.  
 *
 * You may obtain a copy of the License at
 *   
 *       http://www.apache.org/licenses/LICENSE-2.0
 *    
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. See the NOTICE file distributed with this work for 
 * additional information regarding copyright ownership. 
 *******************************************************************************/
package org.oulipo.browser.framework;

import javafx.scene.control.Menu;
import javafx.scene.control.TabPane;

/**
 * Allows access to system level browser Menus.
 */
public final class MenuContext {

	private final Menu bookmarkMenu;

	private final Menu fileMenu;

	private final Menu historyMenu;

	private final Menu managerMenu;

	private final TabPane tabs;
	
	private final Menu toolsMenu;

	public MenuContext(Menu managerMenu, Menu toolsMenu, Menu fileMenu, Menu bookmarkMenu, Menu historyMenu, TabPane tabs) {
		this.managerMenu = managerMenu;
		this.toolsMenu = toolsMenu;
		this.fileMenu = fileMenu;
		this.bookmarkMenu = bookmarkMenu;
		this.historyMenu = historyMenu;
		this.tabs = tabs;
	}

	public Menu getBookmarkMenu() {
		return bookmarkMenu;
	}

	public Menu getFileMenu() {
		return fileMenu;
	}

	public Menu getHistoryMenu() {
		return historyMenu;
	}

	public Menu getManagerMenu() {
		return managerMenu;
	}

	public TabPane getTabs() {
		return tabs;
	}

	public Menu getToolsMenu() {
		return toolsMenu;
	}
}

@@ -1068,16 +1068,90 @@
 text %7B%0A%0A
+%09public enum Type %7B%0A%09%09BOOKMARK, FILE, HISTORY, MANAGER, PEOPLE, TOOLS%0A%09%7D%0A%0A
 %09private
@@ -1172,24 +1172,24 @@
 okmarkMenu;%0A
-
 %0A%09private fi
@@ -1309,10 +1309,9 @@
 bs;%0A
-%09
 %0A
+
 %09pri
@@ -1338,16 +1338,43 @@
 sMenu;%0A%0A
+%09private Menu peopleMenu;%0A%0A
 %09public 
@@ -1386,24 +1386,41 @@
 ontext(Menu 
+peopleMenu, Menu 
 managerMenu,
@@ -1487,17 +1487,20 @@
 oryMenu,
- 
+%0A%09%09%09
 TabPane 
@@ -1507,16 +1507,48 @@
 tabs) %7B%0A
+%09%09this.peopleMenu = peopleMenu;%0A
 %09%09this.m
@@ -1919,32 +1919,32 @@
 ManagerMenu() %7B%0A
-
 %09%09return manager
@@ -1943,32 +1943,456 @@
  managerMenu;%0A%09%7D
+%0A%09%0A%09public Menu getPeopleMenu() %7B%0A%09%09return peopleMenu;%0A%09%7D%0A%0A%09public Menu getMenu(Type type) %7B%0A%09%09if (Type.BOOKMARK.equals(type)) %7B%0A%09%09%09return bookmarkMenu;%0A%09%09%7D else if (Type.FILE.equals(type)) %7B%0A%09%09%09return fileMenu;%0A%09%09%7D else if (Type.HISTORY.equals(type)) %7B%0A%09%09%09return historyMenu;%0A%09%09%7D else if (Type.MANAGER.equals(type)) %7B%0A%09%09%09return managerMenu;%0A%09%09%7D else if (Type.TOOLS.equals(type)) %7B%0A%09%09%09return toolsMenu;%0A%09%09%7D%0A%09%09return null;%0A%09%7D
 %0A%0A%09public TabPan

Add menu enum types