Sophie

Sophie

distrib > Mageia > 1 > x86_64 > by-pkgid > 76fa6b929598269f81acfaf552b5af8c > files > 9

gnome-python-gnomeprint-2.32.0-6.mga1.x86_64.rpm

This is the examples directory inside libgnomeprintui. If you are going to be running this examples I
recommend setting your default printer to print to file, since there isn't any gui for this yet. You
can modify libgnomeprint/data/printers/Generic.printer and change the line that says:
  <Key Id="Backend" Value="lpr"/>
to
  <Key Id="Backend" Value="file"/>

This examples contains code for both libgnomeprint and libgnomeprintui. To compile them you
can use "make" or "make example_0x". To debug them inside gdb you need to run them with
"gdb .libs/example_0x".

Here is a brief description of what each example does.

<NON-GUI>

example_01.c
------------
Smallest non-gui gnome-print application. Shows basic GnomePrintJob & GnomePrintContext usage.

example_02.c
------------
Printing Images. Prints a generated image from memory, an image from disk and from a pixbuf.

example_03.c (09)
------------
Using fonts, basic font usage.

example_04.c
------------
Using utf-8 strings, printing non-western and acented characters.

example_05.c
------------
Basic GnomePrintConfig usage, sets an option for GnomePrintConfig to change the default output
filename and document titlem, it queries the print orientation and dumps it to the console.

<GUI>
example_06.c
------------
Basic usage of a GnomePrintDialog

example_07.c (not yet implmented)
------------
GnomePrintDialog range usage

example_08.c
------------
Appending custom widgets to a GnomePrintDialog. This example also dumps a GnomePrintConfig tree
when the "Dump Tree" button is clicked (used for debugging purposes)

example_09.c
------------
Serializing and de-serializing a GnomePrintConfig object. The print dialog remembers its configuration
from the last time it was used.

<GUI + GLADE>
example_10.c
------------
Example with an app, dialog, setup and print preview

example_11.c
------------
Printing with gnome_print_job_set_file. In this mode, applications generate the postscript output
themselves and use gnome-print as a print system abstraction layer and as a print gui library.

example_12.c
------------
Shows how to add app specific GnomePrintConfig nodes and how to attach widgets to configure them

TODO:
----
- Add an example printable area example, with N-up printing. With marks on the margins