gtkPrintOperationRun          package:RGtk2          R Documentation

_g_t_k_P_r_i_n_t_O_p_e_r_a_t_i_o_n_R_u_n

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

     Runs the print operation, by first letting the user modify print
     settings in the print dialog, and then print the document.

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

     gtkPrintOperationRun(object, action, parent = NULL, .errwarn = TRUE)

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

'object': ['GtkPrintOperation']  a 'GtkPrintOperation'

'action': ['GtkPrintOperationAction']  the action to start

'parent': ['GtkWindow']  Transient parent of the dialog, or 'NULL'

.errwarn: Whether to issue a warning on error or fail silently

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

     Normally that this function does not return until the rendering of
     all  pages is complete. You can connect to the  '"status-changed"'
     signal on 'op' to obtain some  information about the progress of
     the print operation.  Furthermore, it may use a recursive mainloop
     to show the print dialog.

     If you call 'gtkPrintOperationSetAllowAsync' or set the
     allow-async property the operation will run asyncronously if this
     is supported on the platform. The '"done"' signal will be emitted
     with the  operation results when the operation is done (i.e. when
     the dialog is  canceled, or when the print succeeds or fails).


     if (!is.null(settings))
       op$setPrintSettings(settings)

     if (!is.null(page_setup))
       op$setDefaultPageSetup(page_setup)

     gSignalConnect(op, "begin-print", begin_print)
     gSignalConnect(op, "draw-page", draw_page)

     res <- op$run("print-dialog", parent)

     if (res[[1]] == "error") {
       error_dialog = gtkMessageDialog(parent, "destroy-with-parent",
     "error",
         "close", "Error printing file: ", res$error$message)
       gSignalConnect(error_dialog, "response", gtkWidgetDestroy)
       error_dialog$show()
     } else if (res[[1]] == "apply")
       settings = op$getPrintSettings()
      Note that 'gtkPrintOperationRun' can only be called once on a
     given 'GtkPrintOperation'.  

     Since  2.10

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

     A list containing the following elements: 

  retval: ['GtkPrintOperationResult']  the result of the print
          operation. A return value of 
          'GTK_PRINT_OPERATION_RESULT_APPLY' indicates that the
          printing was completed successfully. In this case, it is a
          good idea to obtain  the used print settings with
          'gtkPrintOperationGetPrintSettings'  and store them for reuse
          with the next print operation. A value of
          'GTK_PRINT_OPERATION_RESULT_IN_PROGRESS' means the operation
          is running asynchronously, and will emit the ::done signal
          when done.

 'error': ['GError']  Return location for errors, or 'NULL'

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

     Derived by RGtkGen from GTK+ documentation

