createMainMenu {iSPlot} | R Documentation

## Creates a Main Menu for the Gtk Control Window

### Description

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).

### Usage

      createMainMenu()
      createMenuItem(labelText, ag, method, modType, accelFlag,
                     curAction = "", ...)

### Arguments

`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

### Value

A gtk menu bar is returned that contains the menu items for the main menu.

### Author(s)

Elizabeth Whalen

### See Also

`createControlWindow`, `addMenuItem`, `createKeyPressEvent`, `setKeyValToAction`

### Examples

      if (interactive())
      {
        w<-gtkWindow(show=FALSE)
        setControlEnvDefaults()
        assign("controlWin",w,controlEnv)
        mainMenu<-createMainMenu()
        w$Add(mainMenu)
        w$Show()
      }

[Package iSPlot version 1.0.7 Index]