createMainMenu {iSPlot} | R Documentation |
createMainMenu creates a top level menu for the control window, which is created in the function, createControlWindow. createMainMenu is meant to be called from createControlWindow. To create the individual menu items along with the accelerators, createMainMenu calls createMenuItem. createMenuItem also stores the key values of the accelerators in the controlEnv variable, keyVals, so that they can be added to any gtk window created later (see createKeyPressEvent).
createMainMenu() createMenuItem(labelText, ag, method, modType, accelFlag, curAction = "", ...)
labelText |
the text for the menu item |
ag |
the gtk accelerator group |
method |
the gtk method, which occurs in response to accelerator keys |
modType |
the GdkModifierType |
accelFlag |
the GdkAccelFlags |
curAction |
the current action to set curAction in controlEnv |
... |
extra parameters that will be passed to updateCurAction and thus, passed on to updateControlWindow |
A gtk menu bar is returned that contains the menu items for the main menu.
Elizabeth Whalen
createControlWindow
,
addMenuItem
,
createKeyPressEvent
,
setKeyValToAction
if (interactive()) { w<-gtkWindow(show=FALSE) setControlEnvDefaults() assign("controlWin",w,controlEnv) mainMenu<-createMainMenu() w$Add(mainMenu) w$Show() }