haiku-website/static/legacy-docs/bebook/BPrintJob.html

228 lines
27 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Classes And Methods - The Interface Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheInterfaceKit.html" title="The Interface Kit" /><link rel="prev" href="BPopUpMenu.html" title="BPopUpMenu" /><link rel="next" href="BRadioButton.html" title="BRadioButton" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BPopUpMenu.html" title="BPopUpMenu"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheInterfaceKit.html" title="The Interface Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BRadioButton.html" title="BRadioButton"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Classes And Methods - The Interface Kit</div></div><div id="headerB">Prev: <a href="BPopUpMenu.html">BPopUpMenu</a>  Up: <a href="TheInterfaceKit.html">The Interface Kit</a>  Next: <a href="BRadioButton.html">BRadioButton</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob"></a>BPrintJob</h2></div></div></div><a id="id1015078" class="indexterm"></a><div class="classheader"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td><table width="100%" border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Derived From:</td><td></td></tr><tr><td>Mix-in Classes:</td><td></td></tr><tr><td>Declared In:</td><td><code class="filename">interface/PrintJob.h</code></td></tr><tr><td>Library:</td><td><code class="filename">libbe.so</code></td></tr><tr><td>Allocation:</td><td></td></tr></tbody></table></td><td>
<a class="link overview" href="BPrintJob_Overview.html" title="BPrintJob">Class Overview</a>
<div class="toc"><ul><li><span class="section"><a href="BPrintJob.html#BPrintJob_ConstructorDestructor">Constructor and Destructor</a></span></li><li><span class="section"><a href="BPrintJob.html#BPrintJob_MemberFunctions">Member Functions</a></span></li></ul></div>
</td></tr></tbody></table></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_ConstructorDestructor"></a>Constructor and Destructor</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_Constructor"></a>BPrintJob()</h4></div></div></div><code class="constructorsynopsis cpp"><span class="methodname">BPrintJob</span>(<span class="methodparam"><span class="modifier">const </span><span class="type">char* </span><span class="parameter">name</span></span>);</code><p>
Initializes the <code class="classname">BPrintJob</code> object and assigns the job a <code class="parameter">name</code>.
The <span class="application">Print Server</span> isn't contacted until
<a class="link" href="BPrintJob.html#BPrintJob_ConfigPage" title="ConfigPage(), ConfigJob()"><code class="methodname">ConfigPage()</code></a> or
<a class="link" href="BPrintJob.html#BPrintJob_ConfigJob"><code class="methodname">ConfigJob()</code></a> is called. The
spool file isn't created until
<a class="link" href="BPrintJob.html#BPrintJob_BeginJob" title="BeginJob()"><code class="methodname">BeginJob()</code></a>
prepares for the production of pages.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_Destructor"></a>~BPrintJob()</h4></div></div></div><code class="destructorsynopsis cpp"><span class="modifier">virtual </span><span class="methodname">~BPrintJob</span>();</code><p>
Frees all memory allocated by the object.
</p></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_MemberFunctions"></a>Member Functions</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_BeginJob"></a>BeginJob()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">BeginJob</span>();</code><p>
Opens a spool file for the job and prepares for the production of a
series of pages. Call this function only once per printing
session—just after initializing the job and just before drawing the
first page.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_CommitJob" title="CommitJob()"><code class="methodname">CommitJob()</code></a>,
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_TheSpoolFile" title="The Spool File">The Spool File</a>" in the class overview
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_CancelJob"></a>CancelJob()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">CancelJob</span>();</code><p>
Cancels the print job programmatically and gets rid of the spool file.
The job cannot be restarted; you must destroy the <code class="classname">BPrintJob</code> object.
Create a new object to renew printing.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_CanContinue"></a>CanContinue()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">bool </span><span class="methodname">CanContinue</span>();</code><p>
Returns <code class="constant">true</code> if there's no impediment to continuing with the print job,
and <code class="constant">false</code> if the user has canceled the job, the spool file has grown too
big, or something else has happened to terminate printing. It's a good
idea to liberally sprinkle <code class="methodname">CanContinue()</code> queries throughout your printing
code to make sure that the work you're about to do won't be wasted.
</p><p>
See also:
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_Cancellation" title="Cancellation">Cancellation</a>"
in the class overview
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_CommitJob"></a>CommitJob()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">CommitJob</span>();</code><p>
Commits all spooled pages to the printer. This ends the print job; when
<code class="methodname">CommitJob()</code> returns, the <code class="classname">BPrintJob</code>
object can be deleted. <code class="methodname">CommitJob()</code> can
be called only once per job.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_BeginJob" title="BeginJob()"><code class="methodname">BeginJob()</code></a>,
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_TheSpoolFile" title="The Spool File">The Spool File</a>"
in the class overview
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_ConfigPage"></a><a id="BPrintJob_ConfigJob"></a>
ConfigPage(), ConfigJob()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">status_t </span><span class="methodname">ConfigPage</span>();</code><code class="methodsynopsis cpp"><span class="type">status_t </span><span class="methodname">ConfigJob</span>();</code><p>
These functions contact the <span class="application">Print Server</span> and have the server interact
with the user to lay out the document on a page (in the case of
<code class="methodname">ConfigPage()</code>) or to define a print job
(in the case of <code class="methodname">ConfigJob()</code>). The
page layout includes such things as the orientation of the image
(portrait or landscape), the dimensions of the paper on which the
document will be printed, and the size of the margins. The job definition
includes such things as which pages are to be printed and the number of
copies.
</p><p>
Both functions record the user's choices in a
<a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a> object that
<a class="link" href="BPrintJob.html#BPrintJob_Settings"><code class="methodname">Settings()</code></a> returns.
</p><p>
If <a class="link" href="BPrintJob.html#BPrintJob_SetSettings" title="SetSettings(), Settings(), IsSettingsMessageValid()"><code class="methodname">SetSettings()</code></a>
has been called to establish a default configuration for
the page layout or the job, these functions will pass it to the <span class="application">Print
Server</span> so the server can present it to the user. Otherwise, the server
will choose a default configuration to show the user.
</p><p>
These two functions return <span class="type">status_t</span> error codes, despite having return
values that are declared <span class="type">int32</span>. They return <code class="constant">B_ERROR</code> if they have trouble
communicating with the server or if the job can't be established for any
reason. They return <code class="constant">B_OK</code> if all goes well.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_SetSettings" title="SetSettings(), Settings(), IsSettingsMessageValid()"><code class="methodname">SetSettings()</code></a>,
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_SettingUpThePageLayout" title="Setting Up the Page Layout">Setting Up the Page Layout</a>" and
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_SettingUpAPrintJob" title="Setting Up a Print Job">Setting Up a Print Job</a>"
in the class overview
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_DrawView"></a><a id="BPrintJob_SpoolPage"></a>
DrawView() , SpoolPage()</h4></div></div></div><code class="methodsynopsis cpp"><span class="modifier">virtual </span><span class="void">void </span><span class="methodname">DrawView</span>(<span class="methodparam"><span class="type"><a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>* </span><span class="parameter">view</span></span>,<br />                      <span class="methodparam"><span class="type"><a class="link" href="BRect.html" title="BRect"><code class="classname">BRect</code></a> </span><span class="parameter">rect</span></span>,<br />                      <span class="methodparam"><span class="type"><a class="link" href="BPoint.html" title="BPoint"><code class="classname">BPoint</code></a> </span><span class="parameter">point</span></span>);</code><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">SpoolPage</span>();</code><p>
<code class="methodname">DrawView()</code> calls upon a <code class="parameter">view</code> to draw the
<code class="parameter">rect</code> portion of its display at
the location specified by <code class="parameter">point</code> on the page. As a result, the <code class="parameter">view</code>'s
<a class="link" href="BView.html#BView_Draw" title="Draw()"><code class="methodname">Draw()</code></a>
function will be called with <code class="parameter">rect</code> passed as the update rectangle.
The rectangle should be stated in the
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>'s coordinate system. The
<code class="parameter">point</code> should be stated in a coordinate system that has the origin at the
top left corner of the printable rectangle. Together the
<code class="parameter">rect</code> and <code class="parameter">point</code>
should be fashioned so that the entire rectangle lies within the
boundaries of the page's printable area.
</p><p>
The <code class="parameter">view</code> must be attached to a window; that is, it must be known to the
<span class="application">Application Server</span>. However, when printing, a
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a> can be asked to draw
portions of its display that are not visible on-screen. Its drawing is
not limited by the clipping region, its bounds rectangle, or the frame
rectangles of ancestor views.
</p><p>
Any number of <a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>s
can draw on a page if they are subjects of separate
<code class="methodname">DrawView()</code> calls.
</p><p>
<code class="methodname">DrawView()</code> renders the entire hierarchy of
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>s attached to the
specified <a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>.
</p><p>
Note the following bugs (which will be fixed in subsequent releases):
</p><ul class="itemizedlist"><li><p>
BeOS 5 (and earlier) renders only the first two hierarchy levels
correctly.
</p></li><li><p>
Hidden <a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>s
(and views without <code class="constant">B_WILL_DRAW</code> specified) are rendered.
</p></li><li><p>
<a class="link" href="BScrollBar.html" title="BScrollBar"><code class="classname">BScrollBar</code></a> and derived
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>s
aren't rendered.
</p></li><li><p>
View background and overlay bitmaps are ignored; instead, the view
color is printed.
</p></li></ul><p>
After all views have drawn and the page is complete,
<code class="methodname">SpoolPage()</code> adds it
to the spool file. <code class="methodname">SpoolPage()</code>
must be called once to terminate each page.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_PrintableRect"><code class="methodname">PrintableRect()</code></a>,
<a class="link" href="BView.html#BView_Draw" title="Draw()"><code class="methodname">BView::Draw()</code></a>,
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_DrawingOnThePage" title="Drawing on the Page">Drawing on the Page</a>" in the
class overview
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_FirstPage"></a><a id="BPrintJob_LastPage"></a>
FirstPage(), LastPage()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">int32 </span><span class="methodname">FirstPage</span>();</code><code class="methodsynopsis cpp"><span class="type">int32 </span><span class="methodname">LastPage</span>();</code><p>
These functions return the first and last pages that should be printed as
part of the current job. If the pages are not set (for example, if the
current job has been canceled), <code class="methodname">FirstPage()</code>
returns 0 and <code class="methodname">LastPage()</code>
returns a very large number (<code class="constant">LONG_MAX</code>).
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_GetResolution"></a>GetResolution()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">GetResolution</span>(<span class="methodparam"><span class="type">int32* </span><span class="parameter">xdpi</span></span>,<br />                   <span class="methodparam"><span class="type">int32* </span><span class="parameter">ydpi</span></span>);</code><p>
Fills the <code class="parameter">xdpi</code> and <code class="parameter">ydpi</code>
variables with the X and Y resolution of the
printer, in dots per inch.
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_PaperRect"></a><a id="BPrintJob_PrintableRect"></a>
PaperRect() , PrintableRect()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type"><a class="link" href="BRect.html" title="BRect"><code class="classname">BRect</code></a> </span><span class="methodname">PaperRect</span>();</code><code class="methodsynopsis cpp"><span class="type"><a class="link" href="BRect.html" title="BRect"><code class="classname">BRect</code></a> </span><span class="methodname">PrintableRect</span>();</code><p>
<code class="methodname">PaperRect()</code> returns a rectangle that records the presumed size of the
paper that the printer will use. Its <code class="varname">left</code> and <code class="varname">top</code> sides are at 0.0, so
its <code class="varname">right</code> and <code class="varname">bottom</code> coordinates reflect the size of a sheet of paper.
The size depends on choices made by the user when setting up the page
layout.
</p><p>
<code class="methodname">PrintableRect()</code> returns a rectangle that encloses the portion of a page
where printing can appear. It's stated in the same coordinate system as
the rectangle returned by <code class="methodname">PaperRect()</code>, but excludes the margins around
the edge of the paper. When drawing on the printed page, the <code class="varname">left</code> <code class="varname">top</code>
corner of this rectangle is taken to be the coordinate origin, (0.0, 0.0).
</p><p>
The "<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_DrawingCoordinates" title="Drawing Coordinates">Drawing Coordinates</a>"
section in the class overview illustrates these
rectangles and their coordinate systems.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_DrawView" title="DrawView() , SpoolPage()"><code class="methodname">DrawView()</code></a>
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_PrinterType"></a>PrinterType()</h4></div></div></div><code class="methodsynopsis cpp"><span class="type">int32 </span><span class="methodname">PrinterType</span>(<span class="methodparam"><span class="type">void* </span><span class="parameter">type</span><span class="initializer"> = <span class="constant">NULL</span></span></span>);</code><p>
Returns a code identifying whether the printer is color or black and
white. The argument is currently not used.
</p><p>
The return value will be either <code class="constant">B_BW_PRINTER</code>
or <code class="constant">B_COLOR_PRINTER</code>.
</p><div class="admonition note"><div class="title">Note</div><div class="graphic"><img class="icon" alt="Note" width="32" src="./images/admonitions/Info_32.png" /><div class="text"><p>In the current release of BeOS, this function always returns
<code class="constant">B_COLOR_PRINTER</code>, since there's no printer driver API for determining the
printer type yet.</p></div></div></div><p>
If an error occurs, this function will return an appropriate error code
(for example, if the Print Server isn't running).
</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BPrintJob_SetSettings"></a><a id="BPrintJob_Settings"></a>
<a id="BPrintJob_IsSettingsMessageValid"></a>
SetSettings(), Settings(), IsSettingsMessageValid()</h4></div></div></div><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">SetSettings</span>(<span class="methodparam"><span class="type"><a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>* </span><span class="parameter">configuration</span></span>);</code><code class="methodsynopsis cpp"><span class="type"><a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>* </span><span class="methodname">Settings</span>();</code><code class="methodsynopsis cpp"><span class="void">void </span><span class="methodname">IsSettingsMessageValid</span>(<span class="methodparam"><span class="type"><a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>* </span><span class="parameter">configuration</span></span>) <span class="modifier">const</span>;</code><p>
These functions set and return the group of parameters that define how a
document should be printed. The parameters include some that capture the
page layout of the document and some that define the current job. They're
recorded in a <a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>
object that can be regarded as a black box; the
data in the message are interpreted by the <span class="application">Print Server</span> and will be
documented where the print driver API is documented.
</p><p>
Instead of looking in the <code class="methodname">Settings()</code>
<a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>, rely on <code class="classname">BPrintJob</code>
functions to provide specific information about the layout and the print
job. Currently, there are only two functions
<a class="link" href="BPrintJob.html#BPrintJob_FirstPage" title="FirstPage(), LastPage()"><code class="methodname">FirstPage()</code></a> and
<a class="link" href="BPrintJob.html#BPrintJob_LastPage"><code class="methodname">LastPage()</code></a>,
which return the first and last pages that need to be printed.
</p><p>
<code class="methodname">Settings()</code> can be called to get the current configuration message, which
can then be flattened and stored with the document. You can retrieve it
later and pass it to <code class="methodname">SetSettings()</code> to set initial configuration values
the next time the document is printed, as discussed in the
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_SettingUpThePageLayout" title="Setting Up the Page Layout">Setting Up the Page Layout</a>" and
"<a class="xref" href="BPrintJob_Overview.html#BPrintJob_Overview_SettingUpAPrintJob" title="Setting Up a Print Job">Setting Up a Print Job</a>"
sections of the class overview.
</p><p>
If the message passed to settings doesn't contain all the information
needed to properly configure the print job, the printer add-on being used
will either determine appropriate default values or present a
configuration dialog box.
</p><p>
<code class="methodname">SetSettings()</code> assumes ownership of the object it's passed. If your
application needs to retain the object, pass a copy to
<code class="methodname">SetSettings()</code>:
</p><pre class="programlisting example cpp"><code class="varname">print_job_object</code>.<code class="methodname">SetSettings</code>(new <a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>(<code class="varname">settings_message</code>));</pre><p>
On the other hand, <code class="methodname">Settings()</code> transfers ownership of the object it
returns to the caller; you don't need to make a copy.
</p><p>
<code class="methodname">IsMessageSettingsValid()</code> returns
<code class="constant">true</code> if the specified message is a valid
settings message; otherwise it returns <code class="constant">false</code>.
</p><p>
See also:
<a class="link" href="BPrintJob.html#BPrintJob_ConfigPage" title="ConfigPage(), ConfigJob()"><code class="methodname">ConfigPage()</code></a>
</p></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BPopUpMenu.html">BPopUpMenu</a>  Up: <a href="TheInterfaceKit.html">The Interface Kit</a>  Next: <a href="BRadioButton.html">BRadioButton</a> </div><div id="footerB"><div id="footerBL"><a href="BPopUpMenu.html" title="BPopUpMenu"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheInterfaceKit.html" title="The Interface Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BRadioButton.html" title="BRadioButton"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>