File: scripterapi-page.html

package info (click to toggle)
scribus-doc 1.2.1-2
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 2,920 kB
  • ctags: 374
  • sloc: makefile: 387; xml: 110
file content (83 lines) | stat: -rw-r--r-- 5,472 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<qt>
<title>Page related Commands</title>
<h2>Page related Commands</h2>

<dl>

<dt><a name="-currentPage"><strong>currentPage</strong></a>(...)</dt>
<dd><code><a href="#-currentPage">currentPage</a>() -&gt; integer</code>
<p>Returns the number of the current working page. Page numbers are counted from 1 upwards, no matter what the displayed first page number of your document is.</p></dd>
	
<dt><a name="-deletePage"><strong>deletePage</strong></a>(...)</dt>
<dd><code><a href="#-deletePage">deletePage</a>(nr)</code>
<p>Deletes the given page. Does nothing if the document contains only one page. Page numbers are counted from 1 upwards, no matter what the displayed first page number is.</p>
<p>May raise IndexError if the page number is out of range</p></dd>

<dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
<dd><code><a href="#-getAllObjects">getAllObjects</a>() -&gt; list</code>
<p>Returns a list containing the names of all objects on the current page.</p></dd>

<dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
<dd><code><a href="#-getHGuides">getHGuides</a>() -&gt; list</code>
<p>Returns a list containing positions of the horizontal guides. Values are in the
document's current units - see UNIT_&lt;type&gt; constants.</p></dd>

<dt><a name="-getVGuides"><strong>getVGuides</strong></a>(...)</dt>
<dd><code><a href="#-getVGuides">getVGuides</a>()</code>
<p>See <a href="#-getHGuides">getHGuides</a>.</p></dd>

<dt><a name="-getPageItems"><strong>getPageItems</strong></a>(...)</dt>
<dd><code><a href="#-getPageItems">getPageItems</a>() -&gt; list</code>
<p>Returns a list of tuples with items on the current page. The tuple is: (name, objectType, order) E.g. [('Text1', 4, 0), ('Image1', 2, 1)] means that object named 'Text1' is a text frame (type 4) and is the first at the page...</p></dd>

<dt><a name="-getPageMargins"><strong>getPageMargins</strong></a>(...)</dt>
<dd><code><a href="#-getPageMargins">getPageMargins</a>()</code>
<p>Returns the page margins as a (left, right, top, bottom) tuple in the current units. See UNIT_&lt;type&gt; constants and <a href="#-getPageSize">getPageSize</a>().</p></dd>

<dt><a name="-getPageSize"><strong>getPageSize</strong></a>(...)</dt>
<dd><code><a href="#-getPageSize">getPageSize</a>() -&gt; tuple</code>
<p>Returns a tuple with page dimensions measured in the document's current units. See UNIT_&lt;type&gt; constants and <a href="#-getPageMargins">getPageMargins</a>()</p></dd>

<dt><a name="-gotoPage"><strong>gotoPage</strong></a>(...)</dt>
<dd><code><a href="#-gotoPage">gotoPage</a>(nr)</code>
<p>Moves to the page "nr" (that is, makes the current page "nr"). Note that gotoPage doesn't (curently) change the page the user's view is displaying, it just sets the page that script commands will operates on.</p>
<p>May raise IndexError if the page number is out of range.</p></dd>
	
<dt><a name="-newPage"><strong>newPage</strong></a>(...)</dt>
<dd><code><a href="#-newPage">newPage</a>(where [,"template"])</code>
<p>Creates a new page. If "where" is -1 the new Page is appended to the document, otherwise the new page is inserted before "where". Page numbers are counted from 1 upwards, no matter what the displayed first page number of your document is. The optional parameter "template" specifies the name of the template page for the new page.</p>
<p>May raise IndexError if the page number is out of range</p></dd>
	
<dt><a name="-pageCount"><strong>pageCount</strong></a>(...)</dt>
<dd><code><a href="#-pageCount">pageCount</a>() -&gt; integer</code>
<p>Returns the number of pages in the document.</p></dd>

<dt><a name="-pageDimension"><strong>pageDimension</strong></a>(...)</dt>
<dd><code><a href="#-getPageSize">getPageSize</a>() -&gt; tuple</code>
<p>Alias. Returns a tuple with page dimensions measured in the document's current units. See UNIT_&lt;type&gt; constants and <a href="#-getPageMargins">getPageMargins</a>()</p></dd>
	
<dt><a name="-redrawAll"><strong>redrawAll</strong></a>(...)</dt>
<dd><code><a href="#-redrawAll">redrawAll</a>()</code>
<p>Redraws all pages.</p></dd>

<dt><a name="-savePageAsEPS"><strong>savePageAsEPS</strong></a>(...)</dt>
<dd><code><a href="#-savePageAsEPS">savePageAsEPS</a>("name")</code>
<p>Saves the current page as an EPS to the file "name".</p>
<p>May raise ScribusError if the save failed.</p></dd>

<dt><a name="-setHGuides"><strong>setHGuides</strong></a>(...)</dt>
<dd><code><a href="#-setHGuides">setHGuides</a>(list)</code>
<p>Sets horizontal guides. Input parameter must be a list of guide positions measured in the current document units - see UNIT_&lt;type&gt; constants.</p>
<p>Example: <a href="#-setHGuides">setHGuides</a>(<a href="#-getHGuides">getHGuides</a>() + [200.0, 210.0] # add new guides without any lost<br>
<a href="#-setHGuides">setHGuides</a>([90,250]) # replace current guides entirely</p></dd>
         
<dt><a name="-setRedraw"><strong>setRedraw</strong></a>(...)</dt>
<dd><code><a href="#-setRedraw">setRedraw</a>(bool)</code>
<p>Disables page redraw when bool = False, otherwise redrawing is enabled. This change will persist even after the script exits, so make sure to call <a href="#-setRedraw">setRedraw</a>(True) in a finally: clause at the top level of your script.</p></dd>

<dt><a name="-setVGuides"><strong>setVGuides</strong></a>(...)</dt>
<dd><code><a href="#-setVGuides">setVGuides</a>()</code>
<p>See <a href="#-setHGuides">setHGuides</a>.</p></dd>

</dl>
</qt>