[18798] | 1 | This is the examples directory inside libgnomeprintui. If you are going to be running this examples I |
---|
| 2 | recommend setting your default printer to print to file, since there isn't any gui for this yet. You |
---|
[18337] | 3 | can modify libgnomeprint/data/printers/Generic.printer and change the line that says: |
---|
| 4 | <Key Id="Backend" Value="lpr"/> |
---|
| 5 | to |
---|
| 6 | <Key Id="Backend" Value="file"/> |
---|
| 7 | |
---|
| 8 | This examples contains code for both libgnomeprint and libgnomeprintui. To compile them you |
---|
| 9 | can use "make" or "make example_0x". To debug them inside gdb you need to run them with |
---|
| 10 | "gdb .libs/example_0x". |
---|
| 11 | |
---|
| 12 | Here is a brief description of what each example does. |
---|
| 13 | |
---|
| 14 | <NON-GUI> |
---|
| 15 | |
---|
| 16 | example_01.c |
---|
| 17 | ------------ |
---|
[18798] | 18 | Smallest non-gui gnome-print application. Shows basic GnomePrintJob & GnomePrintContext usage. |
---|
[18337] | 19 | |
---|
| 20 | example_02.c |
---|
| 21 | ------------ |
---|
| 22 | Printing Images. Prints a generated image from memory, an image from disk and from a pixbuf. |
---|
| 23 | |
---|
| 24 | example_03.c (09) |
---|
| 25 | ------------ |
---|
| 26 | Using fonts, basic font usage. |
---|
| 27 | |
---|
| 28 | example_04.c |
---|
| 29 | ------------ |
---|
| 30 | Using utf-8 strings, printing non-western and acented characters. |
---|
| 31 | |
---|
| 32 | example_05.c |
---|
| 33 | ------------ |
---|
| 34 | Basic GnomePrintConfig usage, sets an option for GnomePrintConfig to change the default output |
---|
| 35 | filename and document titlem, it queries the print orientation and dumps it to the console. |
---|
| 36 | |
---|
| 37 | <GUI> |
---|
| 38 | example_06.c |
---|
| 39 | ------------ |
---|
| 40 | Basic usage of a GnomePrintDialog |
---|
| 41 | |
---|
| 42 | example_07.c (not yet implmented) |
---|
| 43 | ------------ |
---|
[20963] | 44 | GnomePrintDialog range usage |
---|
[18337] | 45 | |
---|
| 46 | example_08.c |
---|
| 47 | ------------ |
---|
| 48 | Appending custom widgets to a GnomePrintDialog. This example also dumps a GnomePrintConfig tree |
---|
[18798] | 49 | when the "Dump Tree" button is clicked (used for debugging purposes) |
---|
[18337] | 50 | |
---|
[18603] | 51 | example_09.c |
---|
[18337] | 52 | ------------ |
---|
[18603] | 53 | Serializing and de-serializing a GnomePrintConfig object. The print dialog remembers its configuration |
---|
| 54 | from the last time it was used. |
---|
[18337] | 55 | |
---|
| 56 | <GUI + GLADE> |
---|
| 57 | example_10.c |
---|
| 58 | ------------ |
---|
| 59 | Example with an app, dialog, setup and print preview |
---|
| 60 | |
---|
[20963] | 61 | example_11.c |
---|
[18337] | 62 | ------------ |
---|
[20963] | 63 | Printing with gnome_print_job_set_file. In this mode, applications generate the postscript output |
---|
| 64 | themselves and use gnome-print as a print system abstraction layer and as a print gui library. |
---|
[18337] | 65 | |
---|
[20963] | 66 | example_12.c |
---|
| 67 | ------------ |
---|
| 68 | Shows how to add app specific GnomePrintConfig nodes and how to attach widgets to configure them |
---|
| 69 | |
---|
[18337] | 70 | TODO: |
---|
| 71 | ---- |
---|
[20963] | 72 | - Add an example printable area example, with N-up printing. With marks on the margins |
---|