Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22256 → Rev 22257

120,6 → 120,7
<submenuitem text="Scripter API" file="scripterapi.html">
<submenuitem text="Document Commands" file="scripterapi-doc.html"/>
<submenuitem text="Page Commands" file="scripterapi-page.html"/>
<submenuitem text="Commands for Master Pages" file="scripterapi-masterpages.html"/>
<submenuitem text="Creating &amp; Destroying Objects" file="scripterapi-object.html"/>
<submenuitem text="Selecting Objects" file="scripterapi-select.html"/>
<submenuitem text="Setting Object Properties" file="scripterapi-setobjprop.html"/>
0,0 → 1,44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Commands for Master Pages</title>
@import "manual.css";
<h2>Commands for Master Pages</h2>
<p><i>Please see the comments at the bottom of the page.</i></p>
<dt><a name="-masterPageNames"><strong>masterPageNames</strong>(...)</a></dt>
<p>Returns a list of the names of all master pages in the document.</p></dd>
<dt><a name="-applyMasterPage"><strong>applyMasterPage</strong>(...)</a></dt>
<dd><code>applyMasterPage(Master Page name, page nr)</code>
<p>Applies the named master page to the indicated page. Some examples of usage are on the wiki.</a>.</p></dd>
<dt><a name="-closeMasterPage"><strong>closeMasterPage</strong>(...)</a></dt>
<p>Closes the currently active master page, if any, and returns editing
to normal. Begin editing with <a href="#-editMasterPage">editMasterPage()</a>.</p></dd>
<dt><a name="-createMasterPage"><strong>createMasterPage</strong>(...)</a></dt>
<p>Creates a new master page named pageName. Begin editing with <a href="#-editMasterPage">editMasterPage()</a>.</p></dd>
<dt><a name="-deleteMasterPage"><strong>deleteMasterPage</strong>(...)</a></dt>
<p>Delete the named master page.</p></dd>
<dt><a name="-editMasterPage"><strong>editMasterPage</strong>(...)</a></dt>
<p>Enables master page editing and opens the named master page
for editing. Finish editing with <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
<p>It's important to consider how you may wish to approach working with Master Pages with Scripter. It's conceivable you may want to work with existing Master Pages, in which case you will need a list of them from <strong>masterPageNames()</strong>, after which you might present these to the user in a dialog so that one can be selected. It's more likely perhaps that you will be creating a Master Page, editing it, then applying it to one or more pages of the Document.</p>
<p>With this latter method, you would first use <strong>createMasterPage()</strong>, then <strong>editMasterPage</strong>. At this point you would proceed as if you were editing any page of the Document you are working on. Once finished, you must then <strong>closeMasterPage()</strong> to continue. <strong><i>Note that this command takes no arguments.</i></strong> You may then wish some time later to <strong>applyMasterPage()</strong> in whatever fashion you choose, necessarily being careful to only choose valid page numbers &ndash; recall that pages are numbered starting with <strong>1</strong>.</p>
<p>If you need to continue to edit the Document in some other fashion, it is important to realize that you must select a page to work with, using the <strong>gotoPage()</strong> command.</p>
114,6 → 114,10
<li>"charstyle" [optional] -> char style to use</li>
<p>If you wish to skip a number of settings, unfortunately, this command will not accept null values, i.e., a series of commas. You <i>must</i> put some integer value for each of the potential parameters. For example, imagine you wish to only specify a name for the Paragraph Style, and the Character Style. Your command should be something like:</p>
<p>On the other hand, if you only wanted to specify a name and linespacing mode, you can quit whenever after you finished with non-zero data:</p>
<dt><a name="-createPathText"><strong>createPathText</strong></a>(...)</dt>