Branch: Tag:

2006-08-03

2006-08-03 16:47:20 by Lance Dillon <riffraff169@yahoo.com>

added new widgets for GTK 2.10
conditionally removed obselete widgets
made changes so inherited widgets get returned properlly

Rev: src/post_modules/GTK2/source/constants.pre:1.5
Rev: src/post_modules/GTK2/source/ginitiallyunowned.pre:1.1
Rev: src/post_modules/GTK2/source/gladexml.pre:1.10
Rev: src/post_modules/GTK2/source/gnomedruid.pre:1.4
Rev: src/post_modules/GTK2/source/gnomedruidpage.pre:1.4
Rev: src/post_modules/GTK2/source/gnomedruidpageedge.pre:1.8
Rev: src/post_modules/GTK2/source/gnomedruidpagestandard.pre:1.8
Rev: src/post_modules/GTK2/source/gtkaboutdialog.pre:1.7
Rev: src/post_modules/GTK2/source/gtkaccellabel.pre:1.5
Rev: src/post_modules/GTK2/source/gtkaction.pre:1.7
Rev: src/post_modules/GTK2/source/gtkactiongroup.pre:1.6
Rev: src/post_modules/GTK2/source/gtkassistant.pre:1.1
Rev: src/post_modules/GTK2/source/gtkbin.pre:1.3
Rev: src/post_modules/GTK2/source/gtkbutton.pre:1.11
Rev: src/post_modules/GTK2/source/gtkcelllayout.pre:1.2
Rev: src/post_modules/GTK2/source/gtkcellrendereraccel.pre:1.1
Rev: src/post_modules/GTK2/source/gtkcellrendererspin.pre:1.1
Rev: src/post_modules/GTK2/source/gtkcellrenderertext.pre:1.5
Rev: src/post_modules/GTK2/source/gtkcellrenderertoggle.pre:1.5
Rev: src/post_modules/GTK2/source/gtkcellview.pre:1.10
Rev: src/post_modules/GTK2/source/gtkclipboard.pre:1.4
Rev: src/post_modules/GTK2/source/gtkcolorbutton.pre:1.9
Rev: src/post_modules/GTK2/source/gtkcombobox.pre:1.7
Rev: src/post_modules/GTK2/source/gtkcontainer.pre:1.5
Rev: src/post_modules/GTK2/source/gtkdialog.pre:1.5
Rev: src/post_modules/GTK2/source/gtkentry.pre:1.8
Rev: src/post_modules/GTK2/source/gtkentrycompletion.pre:1.8
Rev: src/post_modules/GTK2/source/gtkexpander.pre:1.7
Rev: src/post_modules/GTK2/source/gtkfilechooser.pre:1.4
Rev: src/post_modules/GTK2/source/gtkfilechooserbutton.pre:1.8
Rev: src/post_modules/GTK2/source/gtkframe.pre:1.8
Rev: src/post_modules/GTK2/source/gtkiconview.pre:1.6
Rev: src/post_modules/GTK2/source/gtkimage.pre:1.8
Rev: src/post_modules/GTK2/source/gtkimagemenuitem.pre:1.7
Rev: src/post_modules/GTK2/source/gtkinvisible.pre:1.5
Rev: src/post_modules/GTK2/source/gtklabel.pre:1.8
Rev: src/post_modules/GTK2/source/gtklayout.pre:1.6
Rev: src/post_modules/GTK2/source/gtklinkbutton.pre:1.1
Rev: src/post_modules/GTK2/source/gtkliststore.pre:1.14
Rev: src/post_modules/GTK2/source/gtkmenu.pre:1.4
Rev: src/post_modules/GTK2/source/gtkmenuitem.pre:1.8
Rev: src/post_modules/GTK2/source/gtkmenutoolbutton.pre:1.6
Rev: src/post_modules/GTK2/source/gtkmessagedialog.pre:1.3
Rev: src/post_modules/GTK2/source/gtknotebook.pre:1.6
Rev: src/post_modules/GTK2/source/gtkobject.pre:1.3
Rev: src/post_modules/GTK2/source/gtkpagesetup.pre:1.1
Rev: src/post_modules/GTK2/source/gtkpagesetupunixdialog.pre:1.1
Rev: src/post_modules/GTK2/source/gtkpaned.pre:1.3
Rev: src/post_modules/GTK2/source/gtkpapersize.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintbackend.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintcontext.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprinter.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintjob.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintoperation.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintoperationpreview.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintsettings.pre:1.1
Rev: src/post_modules/GTK2/source/gtkprintunixdialog.pre:1.1
Rev: src/post_modules/GTK2/source/gtkradioaction.pre:1.8
Rev: src/post_modules/GTK2/source/gtkradiobutton.pre:1.9
Rev: src/post_modules/GTK2/source/gtkradiomenuitem.pre:1.6
Rev: src/post_modules/GTK2/source/gtkrange.pre:1.3
Rev: src/post_modules/GTK2/source/gtkrecentchooser.pre:1.1
Rev: src/post_modules/GTK2/source/gtkrecentchooserdialog.pre:1.1
Rev: src/post_modules/GTK2/source/gtkrecentchoosermenu.pre:1.1
Rev: src/post_modules/GTK2/source/gtkrecentchooserwidget.pre:1.1
Rev: src/post_modules/GTK2/source/gtkrecentfilter.pre:1.1
Rev: src/post_modules/GTK2/source/gtkrecentmanager.pre:1.1
Rev: src/post_modules/GTK2/source/gtkscale.pre:1.5
Rev: src/post_modules/GTK2/source/gtkscrolledwindow.pre:1.8
Rev: src/post_modules/GTK2/source/gtksettings.pre:1.5
Rev: src/post_modules/GTK2/source/gtksizegroup.pre:1.6
Rev: src/post_modules/GTK2/source/gtkstatusicon.pre:1.1
Rev: src/post_modules/GTK2/source/gtktextattributes.pre:1.6
Rev: src/post_modules/GTK2/source/gtktextbuffer.pre:1.10
Rev: src/post_modules/GTK2/source/gtktextchildanchor.pre:1.4
Rev: src/post_modules/GTK2/source/gtktextiter.pre:1.9
Rev: src/post_modules/GTK2/source/gtktexttagtable.pre:1.3
Rev: src/post_modules/GTK2/source/gtktextview.pre:1.8
Rev: src/post_modules/GTK2/source/gtktoggleaction.pre:1.5
Rev: src/post_modules/GTK2/source/gtktoolbar.pre:1.6
Rev: src/post_modules/GTK2/source/gtktoolbutton.pre:1.6
Rev: src/post_modules/GTK2/source/gtktoolitem.pre:1.5
Rev: src/post_modules/GTK2/source/gtktreedragsource.pre:1.3
Rev: src/post_modules/GTK2/source/gtktreemodel.pre:1.5
Rev: src/post_modules/GTK2/source/gtktreemodelfilter.pre:1.1
Rev: src/post_modules/GTK2/source/gtktreemodelsort.pre:1.1
Rev: src/post_modules/GTK2/source/gtktreeselection.pre:1.8
Rev: src/post_modules/GTK2/source/gtktreesortable.pre:1.3
Rev: src/post_modules/GTK2/source/gtktreestore.pre:1.13
Rev: src/post_modules/GTK2/source/gtktreeview.pre:1.8
Rev: src/post_modules/GTK2/source/gtktreeviewcolumn.pre:1.9
Rev: src/post_modules/GTK2/source/gtkuimanager.pre:1.6
Rev: src/post_modules/GTK2/source/gtkviewport.pre:1.6
Rev: src/post_modules/GTK2/source/gtkwidget.pre:1.12
Rev: src/post_modules/GTK2/source/gtkwindow.pre:1.8

1: + require gtk210; + /* -*-C -*- */ + class GTK2.PrintOperation; + inherit G.Object; + inherit GTK2.PrintOperationPreview;    -  + //! GTK2.PrintOperation is the high-level, portable printing API. It looks a + //! bit different than other GTK+ dialogs such as the GTK2.FileChooser, since + //! some platforms don't expose enough infrastructure to implement a good print + //! dialog. On such platforms, GTK2.PrintOperation uses the native print + //! dialog. On platforms which do not provide a native print dialog, GTK+ uses + //! its own, see GTK2.PrintUnixDialog. +  + //! Properties: + //! int allow-async + //! int current-page + //! GTK2.PageSetup default-page-setup + //! string export-filename + //! string job-name + //! int n-pages + //! GTK2.PrintSettings print-settings + //! int show-progress + //! GTK2.PrintStatus status + //! string status-string + //! int track-print-status + //! int unit + //! int use-full-page +  + signal begin_print; + signal create_custom_widget; + signal custom_width_apply; + signal done; + signal draw_page; + signal end_print; + signal paginate; + signal preview; + signal request_page_setup; + signal status_changed; +  + void create(?mapping(string:mixed) props) + //! Create a new GTK2.PrintOperation. + { +  pgtk2_verify_not_inited(); +  pgtk2_verify_setup(); +  if (args) { +  INIT_WITH_PROPS(GTK_TYPE_PRINT_OPERATION); +  pgtk2_pop_n_elems(args); +  } else { +  GtkPrintOperation *gpo; +  gpo=gtk_print_operation_new(); +  THIS->obj=G_OBJECT(gpo); +  } +  pgtk2__init_this_object(); + } +  + void set_allow_async(int allow_async); + //! Sets whether run() may return before the print operation is completed. + //! Note that some platforms may not allow asynchronous operation. +  + string get_error() + //! Call this when the result of a print operation is + //! GTK2.PRINT_OPERATION_RESULT_ERROR, either as returned by run(), or in + //! the ::done signal handler. + { +  pgtk2_verify_inited(); +  pgtk2_pop_n_elems(args); +  { +  GError *error=NULL; +  gtk_print_operation_get_error(GTK_PRINT_OPERATION(THIS->obj),&error); +  push_string(make_shared_binary_string(error->message,strlen(error->message))); +  } + } +  + void set_default_page_setup(GTK2.PageSetup def); + //! Makes def the default page setup. +  + +GTK2.PageSetup get_default_page_setup(); + //! Returns the default page setup. +  + void set_print_settings(GTK2.PrintSettings settings); + //! Sets the print settings. +  + +GTK2.PrintSettings get_print_settings(); + //! Returns the current print settings; +  + void set_job_name(string name); + //! Sets the name of the print job. The name is used to identify the job. + //! <p> + //! If you don't set a job name, GTK+ picks a default on by numbering + //! successive print jobs. +  + void set_n_pages(int n_pages); + //! Sets the number of pages in the documnent. + //! <p> + //! This must be set to a positive nubmer before the rendering starts. +  + void set_current_page(int cur_page); + //! Sets the current page. + //! <p> + //! If this is called before run(), the user will be able to select to print + //! only the current page. +  + void set_use_full_page(int full_page); + //! If full_page is true, the transformation for the cairo context obtained + //! from GTK2.PrintContext puts the origin at the top left corner of the page + //! (which may not be the top left corner of the sheet, depending on page + //! orientation and the number of pages per sheet). Otherwise, the origin + //! is at the top left corner of the imageable area (i.e. inside the margin). +  + void set_unit(int unit); + //! Sets up the transformation for the cairo context obtained from + //! GTK2.PrintContext in such a way that distances are measured in units of + //! unit. +  + void set_export_filename(string filename); + //! Sets up the operation to generate a file instead of showing the print + //! dialog. The intended use of this function is for implementing + //! "Export to PDF" actions. Currently, PDF is the only supported format. + //! <p> + //! "Print to PDF" support is independent of this and is done by letting the + //! user pick the "Print to PDF" item from the list of printers in the print + //! dialog. +  + void set_show_progress(int show_progress); + //! If true, the print operation will show a progress dialog during the + //! print operation. +  + void set_track_print_status(int track_status); + //! If track_status is TRUE, the print operation will try to continue report + //! on the status of the print job in the printer queues and printer. This + //! can allow your application to show things like "out of paper" issues, + //! and when the print job actually reaches the printer. + //! <p> + //! This function is often implemented using some form of polling, so it + //! should not be enabled unless needed. +  + void set_custom_tab_label(string label); + //! Sets the label for the tab holding custom widgets. +  + int run(int action, GTK2.Window parent) + //! Runs the print operation, by first letting the user modify print settings + //! in the print dialog, and then print the document. + //! <p> + //! Normally that this function does not return until the rendering of all + //! pages is complete. You can connect to the ::status-changed signal to + //! obtain some information about the progress of the print operation. + //! Furthermore, it may use a recursive mainloop to show the print dialog. + { +  pgtk2_verify_inited(); +  { +  struct object *o1; +  INT_TYPE action; +  GError *null; +  GtkPrintOperationResult res; +  +  get_all_args("run",args,"%i%o",&action,&o1); +  res=gtk_print_operation_run(GTK_PRINT_OPERATION(THIS->obj), +  action,GTK_WINDOW(get_gobject(o1)),&error); +  pgtk2_pop_n_elems(args); +  push_int(res); +  } + } +  + void cancel(); + //! Cancels a running print operation. This function may be called from a + //! begin-print, paginate or draw-page signal handler to stop the currently + //! running print operation. +  + int get_status(); + //! Returns the status of the print operation. +  + string get_status_string(); + //! Returns a string representation of the status of the print operation. +  + int is_finished(); + //! A convenience function to find out if the print operation is finished, + //! either successfully (GTK2.PRINT_STATUS_FINISHED) or unsuccessfully + //! (GTK2.PRINT_STATUS_FINISHED_ABORTED). +  +  + endrequire;   Newline at end of file added.