Tool                package:svWidgets                R Documentation

_C_o_n_v_e_n_i_e_n_t_l_y _m_a_n_i_p_u_l_a_t_e _t_o_o_l_s _a_n_d _t_o_o_l_b_a_r_s, _w_h_a_t_e_v_e_r _t_h_e _w_i_d_g_e_t_s _u_s_e_d

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

     These functions provide an unifying way of dealing with tools and
     toolbars in R. Currently, they support a little bit a
     functionnalities for tcltk2 widgets (tile) and most functions,
     except 'ToolRead' are not finished.

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

       ToolbarAdd(toolbar, ...)
       ToolbarDel(toolbar)
       ToolbarType(toolbar, warn = TRUE)
       ToolAdd(tool, ...)
       ToolDel(tool)
       ToolNames()
       ToolItems(toolbar)
       ToolType(tool, warn = TRUE)
       ToolChange(tool, action = "", image = "", accel = "", options = "")
       ToolState(tool, active = TRUE)
       ToolRead(file = "Tools.txt")
       ToolReadPackage(package, subdir = "gui", file = "Tools.txt")

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

 toolbar: Name of a toolbar 

     ...: Further options 

    warn: Do we issue a warning if the type of tool or toolbar is not
          recognized? 

    tool: The name of a tool 

  action: Action the tool triggers (R code) 

   image: Name of an image to display at left of the menu item 

   accel: Accelerator (keystroke) to use to trigger this menu item 

 options: Additional options, for instance 'state = "disable"' to
          disable the tool at creation. 

  active: Do we enable or disable the tool? 

    file: A file containing menu specifications to read 

 package: Name of a package from where to load tools and toolbars
          specifications 

  subdir: Subdirectory in the package where the tools and toolbars
          specifications are stored. By default, it is the "gui"
          subdirectory. 

_D_e_t_a_i_l_s:

     These functions care about creating, deleting and managing custom
     tools and toolbars. Informations and handles to the various tools
     created with these functions are stored in the .gui.Tools
     variable, located in the TempEnv environment.

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

     'ToolAdd()' return the handle to the newly created tool.
     'ToolNames()' return the list of all tools registered in
     .gui.Tools.

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

     Philippe Grosjean

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

     'MenuAdd'

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

       ## Not run: 
         ## These cannot be run by examples() but should be OK when pasted
         ## into an interactive R session with the tcltk or tcltk2 package loaded
             ## Run these commands one at a time and look at the toolbars being created...
             
         ### TODO: examples here!
       
     ## End(Not run)

