Class XbpPrinter() Foundation
Class function of the XbpPrinter class.
Objects of the XbpPrinter() class are used to output graphics that are created using functions of the GRA engine. To allow this, a printer driver (printer object) must be installed that controls the physical printer. If several printer drivers, or printer objects, respectively, are installed, the default printer can be set using the context menu of the printer object. For each installed printer object a separate XbpPrinter object can be created that is then used to perform output using the applicable print driver.
Generally print output is asynchronous in GUI applications. This means that data for the printer is stored in a file or "spooled". The actual task of printing is handled by the spooler. The spooler takes each print job and sends it to the printer as soon as it is ready to process. This means that the program does not need to wait until everything is printed, but can continue as soon as the print job is handed to the spooler. The spooler is automatically managed by the operating system.
Graphic output in an Xbase++ program is performed in a presentation space that must be linked with a device context (an output device). An XbpPrinter object represents the device context for a presentation space whose graphic output will be printed. To allow this, the name of a printer object installed on the desktop must be specified to the XbpPrinter object. This XbpPrinter object must also be linked with the presentation space where the graphic output occurs (see example).
The start of print output is signalled by the :startDoc() method of the XbpPrinter object. All subsequent calls to Gra...() functions in the print job are combined and spooled together. The end of the print output (more precisely: the end of spooling) is indicated using the :endDoc() method. Data from the spooler is sent on to the printer only after the :endDoc() method is executed.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.