This interfaces is implemented by an embeddable ( compound document item ).
It exposes a simple render method that allows its child to print itself.
The component renders itself ( or a sub-window of itself ) with the
specified dimensions to the provided GnomePrintContext.
In addition to proxying the render request, the context also converts the
scribbled on context to a meta file, and returns a stream to the callee
such that the information can be transfered to the caller. A nice wrapper
interface is available in BonoboPrintClient that makes this very simple
to use.
First of course, the interface has to be constructed add associated
with the BonoboEmbeddable 's BonoboObject using the
bonobo_object_add_interface method.
Example 1. Aggregating a new BonoboPrint interface
Having aggregated the print interface to the embeddable, and passed
in the 'embeddable' itself as the user_data, we can then implement
the BonoboPrintRenderFn method and make the interface actually
useful, in this case we extract the text from the embeddable->text
pointer, and print 'Value:' with the text under it, and some
miscellaneous lines:
In the above example the Scissor context is not used. In many
applications it will not, however the scissor context specifies
how the printed item will be cropped inside the container application,
this allows the component to adjust its printed output to best fit
this situation if neccessary.