gwindow               package:gWidgets               R Documentation

_C_o_n_s_t_r_u_c_t_o_r _f_o_r _b_a_s_e _c_o_n_t_a_i_n_e_r

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

     Widgets are packed inside containers which may in turn be packed
     inside other containers. The base container is known as a window.
     Only one container may be packed inside a window.

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

     gwindow(title = "Window", visible = TRUE, name=title,
       width = NULL, height= NULL, location=NULL,
     handler = NULL, action = NULL,
      ..., toolkit = guiToolkit())

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

   title: Title of window

 visible: If 'TRUE' window is drawn when constructed. Otherwise, window
          can be drawn latter using 'visible<-'.

    name: Name for registry of windows

   width: Default width for window at creation

  height: Default height for window at creation

location: If non-NULL, can be used to suggest default location of
          window. This can be a coordinate pair (x,y) with (0,0) the
          upper left corner, or a gwindow instance. In the latter case
          the location is suggested by the location of the current
          window. This is useful for placing dialogs near the parent
          window.

 handler: Handler for unrealize event (when window manager closes
          window). Use addHandlerDestroy to get destroy event.

  action: Passed to handler

     ...: Not used

 toolkit: Which GUI toolkit to use

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

     A base window can also be created using the argument
     'container=TRUE' when constructing a widget.

     The 'svalue' method refers to the window title. Use 'svalue<-' to
     change the title.

     The 'add' method is used to add a widget or container to the base
     window. Only one may be added, so usually it would be another
     container.

     The 'dispose' method destroys the window.

     The 'size' method sets the minimum size. Use the 'width' and
     'height' arguments to set the default size when the window is
     constructed.

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

     ## Not run: 
       win = gwindow("Window example", handler=function(h,...) print("See
       ya"))
       add(win,gbutton("Cancel", handler = function(h,...) dispose(win)))
     ## End(Not run)

