addWindowMenu             package:iSPlot             R Documentation

_A_d_d _a _M_e_n_u _f_o_r _W_i_n_d_o_w_s _t_o _t_h_e _C_o_n_t_r_o_l _W_i_n_d_o_w

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

     addWindowMenu adds a Window menu to the menu bar on the control
     window. addWindowMenu is called when the menu bar is initially
     placed on the  control window and it is called whenever an old
     window is removed.   By calling addWindowMenu whenever a window is
     removed, the Window menu  on the control window will always be in
     synch with the windows that  are open.

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

     addWindowMenu()

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

     Elizabeth Whalen

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

     'createMainMenu', 'addSubMenuItem', 'setDeleteEvents',
     'createView'

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

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # plotting the data should occur through Plot Data under 
         # the Display menu
         createView(type = "plotView", dataName = "USArrests", 
                    plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
                    dfColumns = 1:2)  
         # now look at the Window menu on the control window - should
         # have 2 elements: Control Window and Window 1

         # now close the gtk window that has the scatterplot in it
         # closing the window will cause setDeleteEvents, and thus,
         # addWindowMenu to be called

         # now the Window menu on the control window should only have
         # 1 element, the Control Window
       }

