gWidgets-methods          package:gWidgets          R Documentation

_M_e_t_h_o_d_s _f_o_r _g_W_i_d_g_e_t_s _i_n_s_t_a_n_c_e_s

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

     Methods introduced by the gWidgets API.

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

     The base class for this gWidgets implentation are 'gWidget' and
     its subclass  'gComponent' and 'gContainer'. However, it is
     expected that the toolkit implementations have several classes of
     their own. The following methods defined in gWidgets simply
     dispatch to a similarly named widget in the toolkit. For instance,
     the method svalue is defined like

     'svalue(obj,...) = .svalue(obj@widget, obj@toolkit, ...)' where
     '.svalue()' and  'obj@widget' are in toolkit, and 'obj@toolkit' is
     used for dispatching in the appropriate toolkit.

     The gComponent methods are:

     '_s_v_a_l_u_e(_o_b_j, _i_n_d_e_x=_N_U_L_L, _d_r_o_p=_N_U_L_L, ...)': This method returns the
          "selected" value in a widget. Selection varies from widget to
          widget, but should generally is what can be added to the
          widget by mouse click or typing. For some widgets, the extra
          argument 'index=TRUE' will return the index of the selected
          value, not the value. For some widget, the argument 'drop' is
          given to either prevent or encourage dropping of information. 


       '_s_v_a_l_u_e<-(_o_b_j, _i_n_d_e_x=_N_U_L_L,  ... ,_v_a_l_u_e)': This method is used to
          set the selected value in a widget programaticaly. The
          'index' argument is used when the value is set by index.


      '[(_x,_i,_j,...,_d_r_o_p=_T_R_U_E)': For widgets where selection is a choice
          from a collection of items, the 'svalue' method refers to the
          choice and the square bracket notation refers to the items. 
          For instance, in a radio button ('gradio') the svalue method
          returns the selected value, the '"["' method refers to the
          vector of possible values. Whereas in a notebook
          ('gnotebook'), the 'svalue' method refers to the currently
          opened page and the '"["' refers to all the pages.


       '"[<-"(_x, _i, _j, ..., _v_a_l_u_e) ': In those cases where it makes
          sense assignment to pieces of the widget can be made with the
          square bracket notation. For instance, for the radio widget,
          this can be used to change the labels.  

       '_s_i_z_e(_o_b_j, ...)' _o_r '_s_i_z_e<-(_o_b_j, ..., _v_a_l_u_e)': Returns or sets
          the size of the object.  For setting the size, the value is
          given in terms of width and height of widget in pixels.


      '_v_i_s_i_b_l_e(_o_b_j ...)' _o_r '_v_i_s_i_b_l_e<-(_o_b_j,..., _v_a_l_u_e)': Used to check
          if widget is visible or not. When setting the visibility,
          'value' should be a logical. "Visibility" differs from widget
          to widget. For 'gwindow' it refers to whether the base
          container is shown or not. For the dataframe-like widgets
          'gdf' and 'gtable' visibility refers to which rows are shown.

      '_v_i_s_i_b_l_e(_o_b_j ...)'  Used to check if a gwindow object is extant
          (not been destroyed). An R object can point to a window that
          can no longer be shown, as it may have been closed by the
          window manager.


      '_e_n_a_b_l_e_d(_o_b_j,...)' _o_r '_e_n_a_b_l_e_d<-(_o_b_j,..., _v_a_l_u_e)'  When a widget
          is disabled, the toolkit makes it unresponsive to user input
          and changes the color of it, usually by graying it out, to
          indicate it is disabled. This method is used to change the
          state.


      '_f_o_c_u_s(_o_b_j,...)' _o_r '_f_o_c_u_s<-(_o_b_j,...,_v_a_l_u_e)':  method to check if
          a widget has focus, or to force focus on a widget.


     '_f_o_n_t(_o_b_j, ...)' _o_r '_f_o_n_t<-(_o_b_j,...,_v_a_l_u_e)': Can be used to check
          or set font attributes in a widget. In gWidgetsRGtk, the font
          attributes are given as a named vector. The available names
          are 'family' with a value of "normal","sans","serif",or
          "monospace"; 'style' with a value of "normal","oblique", or
          "italic"; 'weight' with a value of
          "ultra-light","light","normal","bold","ultra-bold", or
          "heavy"; and 'color' which for gWidgetsRGtk is limited to
          "black","blue","red","green","brown","yellow", or "pink".
          [Prior to version 0.0-22 the weight and style were switched.
          Old code should run as before.]


       '_t_a_g(_o_b_j,_i, _d_r_o_p=_T_R_U_E, ...)' _o_r '_t_a_g<-(_o_b_j,_i, _r_e_p_l_a_c_e=_T_R_U_E, ...,_v_a_l_u_e)': 
          These functions work like the 'attr' function - they set
          values within an object. In RGtk, these are carried with the
          pointer which is passed into functions - not a copy. This
          allows values to be set without worrying about the scope of
          the assignment.

          When setting a tag, the argument 'replace' can be set to
          'FALSE' so that the value appends.

          The tags are stored internally in a list. Calling 'tag(obj)'
          will return this list.


       '_i_d(_o_b_j,...)' _o_r '_i_d<-(_o_b_j,..., _v_a_l_u_e)': An id is a name for a
          widget. This is primarily used with a the spread-sheet like
          widgets so that columns can have values - the data in the
          column, and an id - the column name.  Objects can be given an
          id like a name. For non-widget items, the id is an attribute.


       '_u_p_d_a_t_e(_o_b_j_e_c_t,...)': Some classes use this method to update the
          state of the widget 

       ' _a_d_d(_o_b_j, _v_a_l_u_e,  ...)':  This widget is used to add something
          to a widget. What "adding" means varies from widget to
          widget.

          _  For this method, there are several different arguments
          that can be passed in via the '"..."' argument. When the API
          is cleaned up this should change._

          For the containers ('gwindow', 'ggroup', ...) adding adds a
          widget to be packed in. For the parent container produced by
          'gwindow' only one item can be added. For groups, this is not
          the case. For 'ggroup', 'gframe' and 'gexpandgroup' the extra
          argument 'expand=TRUE' will cause the widget to take up all
          possible space within the container.

          For the components, 'add' has different meanings. For
          notebooks ('gnotebook', ...) 'add' is used to add pages. In
          this case the extra arguments are: \description{

     '_l_a_b_e_l' to  assign the label.  This may be a text string or a
          gWidget

     '_o_v_e_r_r_i_d_e._c_l_o_s_e_b_u_t_t_o_n' To override the placing of a close button }

          For the text buffer widget ('gtext') 'add' is used to append
          text to the buffer. In this case, extra arguments  available:
           \description{

      '_f_o_n_t._a_t_t_r' can be used to specify font attributes for the text

     _d_o._n_e_w_l_i_n_e a logical indicating if a newline should be added after
          the text

     _w_h_e_r_e An indicator of where to place the text: "beginning",
          "ending", or "at.cursor" } 

     '_d_e_l_e_t_e(_o_b_j, _w_i_d_g_e_t,...)': For gContainers this method is used to
          delete a widget that has been added with 'add'. In RGtk, the
          widget is actually detached and can be added at a later time.
          Any handler assigned by 'addhandlerunrealize' is called when
          the widget is detached

          For notebooks, the 'delete' method removes a page in the
          notebook.


     '_d_i_s_p_o_s_e(_o_b_j,...)': This method is used to remove an object.

          For top-level windows it destroys the window.

          For notebooks, it removes the current page.

          In RGtk2, for other objects it will destroy the top-level
          window.


     ' _a_d_d_S_p_a_c_e(_o_b_j, _v_a_l_u_e, _h_o_r_i_z_o_n_t_a_l=_T_R_U_E,...)': Used to add space
          between widgets in a container


       '_a_d_d_S_p_r_i_n_g(_o_b_j, ...)': When packing widgets into a group the
          widget abut each other filling in from left to right or top
          to bottom. This puts a "spring" between two widgets forcing
          the ones to the right of (or below) the spring to be pushed
          as far as possible to the right (or bottom).

_N_o_t_e:

     See package vignette for more examples

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

     'gWidgets-handlers' for methods related to handlers.

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

