createMainMenu            package:iSPlot            R Documentation

_C_r_e_a_t_e_s _a _M_a_i_n _M_e_n_u _f_o_r _t_h_e _G_t_k _C_o_n_t_r_o_l _W_i_n_d_o_w

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

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

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'createControlWindow', 'addMenuItem', 'createKeyPressEvent',
     'setKeyValToAction'

_E_x_a_m_p_l_e_s:

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

