gtkWidgetGetAllocatedSize        package:RGtk        R Documentation

_O_b_t_a_i_n _d_i_m_e_n_s_i_o_n_s _a_l_l_o_c_a_t_e_d _t_o _a _G_t_k _w_i_d_g_e_t

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

     Returns the width and height allocated to a Gtk widget.

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

     gtkWidgetGetAllocatedSize(w)

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

       w: the object of class '"GtkWidget"' whose allocated dimensions
          are to be queried.

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

     An integer vector with two elements: 

   width: the number of pixels the widget spans in the horizontal
          dimension

  height: the number of pixels the widget spans in the vertical
          dimension

_N_o_t_e:

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

     Luca Di Gaspero <l.digaspero@uniud.it>

_R_e_f_e_r_e_n_c_e_s:

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

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

     library(RGtk)
     win = gtkWindow(show = FALSE)
     box = gtkVBox(spacing = 10)
     win$Add(box)
     button = gtkButton("Press me to see my current size")
     button$AddCallback("pressed", function(w, ev) {
         print(gtkWidgetGetAllocatedSize(w))
       })
     box$PackStart(button, expand = TRUE)
     win$Show()

