# Some Rcmdr menus for the orloca package
# When the plug-in is loaded, these menus are merged with the standard Rcmdr menus

# last modified: Oct 2017 by Munoz-Marquez

#   type    menu/item      operation/parent  label                               command/menu                activation   install?
item    topMenu          cascade         "Orloca"                                orlocaMenu                  ""           "packageAvailable('orloca')"
menu    orlocaMenu       topMenu         ""                                      ""                          ""           "" 

# Planar location menu
item    orlocaMenu       cascade         "Planar location"                       orlocapMenu                 ""           ""
menu    orlocapMenu      orlocaMenu      ""                                      ""                          ""           ""

item    orlocapMenu      command         "New loca.p"				 Rcmdr.new.loca.p            ""                      "packageAvailable('orloca')"
item    orlocapMenu      command         "New loca.p Random Instance"         	 Rcmdr.rloca.p               ""                      "packageAvailable('orloca')"
item    orlocapMenu      command         "Summary"          			 Rcmdr.summary.loca.p        "activeDataSetLocaP()"  "packageAvailable('orloca')"
item    orlocapMenu      command         "Evaluation of Objective Function for weighted sum Location Problem" Rcmdr.distsum "activeDataSetLocaP()" "packageAvailable('orloca')"
item    orlocapMenu      command         "Solve weighted sum Location Problem"        Rcmdr.distsummin               "activeDataSetLocaP()"  "packageAvailable('orloca')"

# Planar location menu: graphics
item    orlocapMenu       cascade         "Graphics"                              orlocagMenu "" ""
menu    orlocagMenu      orlocapMenu      "" "" "" ""
item    orlocagMenu       command         "Demands Points Plot"           	 Rcmdr.plot.loca.p           "activeDataSetLocaP()"  "packageAvailable('orloca')"
item    orlocagMenu       command         "Contour Plot of distsum"		 Rcmdr.contour.distsum          "activeDataSetLocaP()"  "packageAvailable('orloca')"
item    orlocagMenu       command         "Demand & Contour Plot"           	 Rcmdr.plot.contour.loca.p   "activeDataSetLocaP()"  "packageAvailable('orloca')"
item    orlocagMenu       command         "3D Plot of distsum"        		 Rcmdr.persp.distsum            "activeDataSetLocaP()"  "packageAvailable('orloca')"

# Planar location menu: options
item    orlocapMenu       cascade         "Options"                               oorlocaMenu                 ""                      "packageAvailable('orloca')"
menu    oorlocaMenu      orlocapMenu      ""                                      ""                          ""                      "" 
item    oorlocaMenu      command         "Show/Set norm"			 Rcmdr.orloca.norm             ""                      "packageAvailable('orloca')"

# uplp location menu
#item    orlocaMenu       cascade         "Uncapacitated plan location problem"   orlocauplpMenu              ""                      ""
#menu    orlocauplpMenu   orlocaMenu      ""                                      ""                          ""                      ""

# General orloca menu items
item    orlocaMenu       cascade         "Help"                                  orlocahelpMenu                   ""                      "packageAvailable('orloca')"
menu    orlocahelpMenu   orlocaMenu      ""                                      ""                          ""                      "" 
item    orlocahelpMenu   command         "Help about orloca"	 		 Rcmdr.help.orloca           ""                      "packageAvailable('orloca')"
item    orlocahelpMenu   command         "Help about RcmdrPlugin.orloca"	 Rcmdr.help.RcmdrPlugin.orloca           ""     "packageAvailable('orloca')"
item    orlocahelpMenu	 command	 "Planar Location with orloca" Rcmdr.help.orloca.vignettes		 ""	"packageAvailable('orloca')"
item    orlocahelpMenu	 command	 "Planar Location with Rcmdr" Rcmdr.help.RcmdrPlugin.orloca.vignettes		 ""	""
