1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
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
|