Subversion Repositories Scribus

Rev

Rev 1044 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1006 cbradney 1
<qt>
2
<title>Python: module scribus</title>
3
<h2>Python: module scribus</h2>
1003 subik 4
 
5
<h1>Scribus Python interface module</h1>
1006 cbradney 6
<p>This module is the Python interface for Scribus. It provides functions to control scribus and to manipulate objects on the canvas. Each function is documented individually below. A few things are common across most of the interface. Most functions operate on frames. Frames are identified by their name, a string - they are not real Python objects. Many functions take an optional (non-keyword) parameter, a frame name. Many exceptions are also common across most functions. These are not currently documented in the docstring for each function. </p>
1003 subik 7
<ul>
1006 cbradney 8
        <li> Many functions will raise a NoDocOpenError if you try to use them without a document to operate on.</li>
9
        <li> If you do not pass a frame name to a function that requires one, the function will use the currently selected frame, if any, or raise a NoValidObjectError if it can't find anything to operate on.</li>
10
        <li> Many functions will raise WrongFrameTypeError if you try to use them on a frame type that they do not make sense with. For example, setting the text colour on a graphics frame doesn't make sense, and will result in this exception being raised.</li>
11
        <li> Errors resulting from calls to the underlying Python API will be passed through unaltered. As such, the list of exceptions thrown by any function as provided here and in its docstring is incomplete.</li>
1003 subik 12
</ul>
1006 cbradney 13
<p>Details of what exceptions each function may throw are provided on the function's documentation.</p>
1003 subik 14
 
1006 cbradney 15
<hr />
16
<h3>Modules</h3>
1003 subik 17
 
1006 cbradney 18
<h4>Classes</h4>
1003 subik 19
 
1006 cbradney 20
<ul>
21
        <li>exceptions.Exception
22
        <ul>
23
                <li>ScribusException</li>
24
                <li>NameExistsError</li>
25
                <li>NoDocOpenError</li>
26
                <li>NoValidObjectError</li>
27
                <li>NotFoundError</li>
28
                <li>WrongFrameTypeError</li>
29
        </ul>
30
        </li>
31
</ul>
32
<hr />
33
<table>
34
        <tr>
35
                <td>
36
                        <a name="NameExistsError">class <strong>NameExistsError</strong></a>(<a href="scribus.html#ScribusException">ScribusException</a>)
37
                </td>
38
        </tr>
39
        <tr>
40
                <td>
41
                        <dl>
42
                                <dt>Method resolution order:</dt>
43
                                <dd><a href="scribus.html#NameExistsError">NameExistsError</a></dd>
44
                                <dd><a href="scribus.html#ScribusException">ScribusException</a></dd>
45
                                <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
46
                        </dl>
47
                </td>
48
        </tr>
49
        <tr>
50
                <td>
51
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
52
                        <dl>
53
                                <dt><a name="NameExistsError-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
54
                                <dt><a name="NameExistsError-__init__"><strong>__init__</strong></a>(...)</dt>
55
                                <dt><a name="NameExistsError-__str__"><strong>__str__</strong></a>(...)</dt>
56
                        </dl>
57
                </td>
58
        </tr>
1044 subik 59
</table>
1006 cbradney 60
<hr />
1003 subik 61
 
1006 cbradney 62
<table>
63
        <tr>
64
                <td>
65
                        <a name="NoDocOpenError">class <strong>NoDocOpenError</strong></a>(<a href="scribus.html#ScribusException">ScribusException</a>)
66
                </td>
67
        </tr>
68
        <tr>
69
                <td width="100%">
70
                        <dl>
71
                                <dt>Method resolution order:</dt>
72
                                <dd><a href="scribus.html#NoDocOpenError">NoDocOpenError</a></dd>
73
                                <dd><a href="scribus.html#ScribusException">ScribusException</a></dd>
74
                                <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
75
                        </dl>
76
                </td>
77
        </tr>
78
        <tr>
79
                <td>
80
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
81
                        <dl>
82
                                <dt><a name="NoDocOpenError-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
83
                                <dt><a name="NoDocOpenError-__init__"><strong>__init__</strong></a>(...)</dt>
84
                                <dt><a name="NoDocOpenError-__str__"><strong>__str__</strong></a>(...)</dt>
85
                        </dl>
86
                </td>
87
        </tr>
88
</table>
89
<hr />
1003 subik 90
 
1006 cbradney 91
<table>
92
        <tr>
93
                <td>
94
                        <a name="NoValidObjectError">class <strong>NoValidObjectError</strong></a>(<a href="scribus.html#ScribusException">ScribusException</a>)
95
                </td>
96
        </tr>
97
        <tr>
98
                <td>
99
                        <dl>
100
                                <dt>Method resolution order:</dt>
101
                                <dd><a href="scribus.html#NoValidObjectError">NoValidObjectError</a></dd>
102
                                <dd><a href="scribus.html#ScribusException">ScribusException</a></dd>
103
                                <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
104
                        </dl>
105
                </td>
106
        </tr>
107
        <tr>
108
                <td>
109
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
110
                        <dl>
111
                                <dt><a name="NoValidObjectError-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
112
                                <dt><a name="NoValidObjectError-__init__"><strong>__init__</strong></a>(...)</dt>
113
                                <dt><a name="NoValidObjectError-__str__"><strong>__str__</strong></a>(...)</dt>
114
                        </dl>
115
                </td>
116
        </tr>
1044 subik 117
</table>
1006 cbradney 118
<hr />
1003 subik 119
 
1006 cbradney 120
<table>
121
        <tr>
122
                <td>
123
                        <a name="NotFoundError">class <strong>NotFoundError</strong></a>(<a href="scribus.html#ScribusException">ScribusException</a>)
124
                </td>
125
        </tr>
126
        <tr>
127
                <td>
128
                        <dl>
129
                                <dt>Method resolution order:</dt>
130
                                <dd><a href="scribus.html#NotFoundError">NotFoundError</a></dd>
131
                                <dd><a href="scribus.html#ScribusException">ScribusException</a></dd>
132
                                <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
133
                        </dl>
134
                </td>
135
        </tr>
136
        <tr>
137
                <td>
138
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
139
                        <dl>
140
                                <dt><a name="NotFoundError-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
141
                                <dt><a name="NotFoundError-__init__"><strong>__init__</strong></a>(...)</dt>
142
                                <dt><a name="NotFoundError-__str__"><strong>__str__</strong></a>(...)</dt>
143
                        </dl>
144
                </td>
145
        </tr>
146
</table>
1044 subik 147
 
1006 cbradney 148
<hr />
1003 subik 149
 
1006 cbradney 150
<table>
151
        <tr>
152
                <td>
153
                        <a name="ScribusException">class <strong>ScribusException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
154
                </td>
155
        </tr>
156
        <tr>
157
                <td>
158
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
159
                        <dl>
160
                                <dt><a name="ScribusException-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
161
                                <dt><a name="ScribusException-__init__"><strong>__init__</strong></a>(...)</dt>
162
                                <dt><a name="ScribusException-__str__"><strong>__str__</strong></a>(...)</dt>
163
                        </dl>
164
                </td>
165
        </tr>
166
</table>
1003 subik 167
 
1006 cbradney 168
<hr />
1003 subik 169
 
1006 cbradney 170
<table>
171
        <tr>
172
                <td>
173
                        <a name="WrongFrameTypeError">class <strong>WrongFrameTypeError</strong></a>(<a href="scribus.html#ScribusException">ScribusException</a>)
174
                </td>
175
        </tr>
176
        <tr>
177
                <td>
178
                        <dl>
179
                                <dt>Method resolution order:</dt>
180
                                <dd><a href="scribus.html#WrongFrameTypeError">WrongFrameTypeError</a></dd>
181
                                <dd><a href="scribus.html#ScribusException">ScribusException</a></dd>
182
                                <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
183
                        </dl>
184
                </td>
185
        </tr>
186
        <tr>
187
                <td>
188
                        Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
189
                        <dl>
190
                                <dt><a name="WrongFrameTypeError-__getitem__"><strong>__getitem__</strong></a>(...)</dt>
191
                                <dt><a name="WrongFrameTypeError-__init__"><strong>__init__</strong></a>(...)</dt>
192
                                <dt><a name="WrongFrameTypeError-__str__"><strong>__str__</strong></a>(...)</dt>
193
                        </dl>
194
                </td>
195
        </tr>
196
</table>
1003 subik 197
 
1006 cbradney 198
<hr />
199
<h3>Functions</h3>
1003 subik 200
 
1006 cbradney 201
<dl>
202
        <dt><a name="-changeColor"><strong>changeColor</strong></a>(...)</dt>
203
        <dd><code><a href="#-changeColor">changeColor</a>("name", c, m, y, k)<br><br>Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.<br /><br>May raise <a href="#NotFoundError">NotFoundError</a> if the named color wasn't found.<br>May raise ValueError if an invalid color name is specified.</code></dd>
1003 subik 204
 
1006 cbradney 205
        <dt><a name="-closeDoc"><strong>closeDoc</strong></a>(...)</dt>
206
        <dd><code><a href="#-closeDoc">closeDoc</a>()<br><br>Closes the current document without prompting to save.<br><br>May throw <a href="#NoDocOpenError">NoDocOpenError</a> if there is no document to close</code></dd>
1044 subik 207
 
1006 cbradney 208
        <dt><a name="-createBezierLine"><strong>createBezierLine</strong></a>(...)</dt>
209
        <dd><code><a href="#-createBezierLine">createBezierLine</a>(list, ["name"]) -&gt; string<br><br>Creates a new bezier curve and returns its name. The points for the bezier curve are stored in the list "list" in the following order:<br>[x1, y1, kx1, ky1, x2, y2, kx2, ky2...xn. yn, kxn. kyn]<br>In the points list, x and y mean the x and y coordinates of the point and kx and ky meaning the control point for the curve.  The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br /><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.<br>May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers.</code></dd>
1003 subik 210
 
1044 subik 211
 
1006 cbradney 212
        <dt><a name="-createEllipse"><strong>createEllipse</strong></a>(...)</dt>
213
        <dd><code><a href="#-createEllipse">createEllipse</a>(x, y, width, height, ["name"]) -&gt; string<br><br>Creates a new ellipse on the current page and returns its name. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</code></dd>
1044 subik 214
 
1006 cbradney 215
        <dt><a name="-createImage"><strong>createImage</strong></a>(...)</dt>
216
        <dd><code><a href="#-createImage">createImage</a>(x, y, width, height, ["name"]) -&gt; string<br><br>Creates a new picture frame on the current page and returns its name. The coordinates are given in the current measurement units of the document. "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</code></dd>
1044 subik 217
 
1006 cbradney 218
        <dt><a name="-createLayer"><strong>createLayer</strong></a>(...)</dt>
219
        <dd><code><a href="#-createLayer">createLayer</a>(layer)<br><br>Creates a new layer with the name "name".<br><br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 220
 
1006 cbradney 221
        <dt><a name="-createLine"><strong>createLine</strong></a>(...)</dt>
222
        <dd><code><a href="#-createLine">createLine</a>(x1, y1, x2, y2, ["name"]) -&gt; string<br><br>Creates a new line from the point(x1, y1) to the point(x2, y2) and returns its name. The coordinates are given in the current measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</code></dd>
1044 subik 223
 
1006 cbradney 224
        <dt><a name="-createPathText"><strong>createPathText</strong></a>(...)</dt>
225
        <dd><code><a href="#-createPathText">createPathText</a>(x, y, "textbox", "beziercurve", ["name"]) -&gt; string<br><br>Creates a new pathText by merging the two objects "textbox" and "beziercurve" and returns its name. The coordinates are given in the current measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.<br>May raise <a href="#NotFoundError">NotFoundError</a> if one or both of the named base object don't exist.</code></dd>
1044 subik 226
 
1006 cbradney 227
        <dt><a name="-createPolyLine"><strong>createPolyLine</strong></a>(...)</dt>
228
        <dd><code><a href="#-createPolyLine">createPolyLine</a>(list, ["name"]) -&gt; string<br> <br>Creates a new polyline and returns its name. The points for the polyline are stored in the list "list" in the following order: [x1, y1, x2, y2...xn. yn]. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.<br>May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers.</code></dd>
1044 subik 229
 
1006 cbradney 230
        <dt><a name="-createPolygon"><strong>createPolygon</strong></a>(...)</dt>
231
        <dd><code><a href="#-createPolygon">createPolygon</a>(list, ["name"]) -&gt; string<br><br>Creates a new polygon and returns its name. The points for the polygon are stored in the list "list" in the following order: [x1, y1, x2, y2...xn. yn]. At least three points are required. There is no need to repeat the first point to close the polygon. The polygon is automatically closed by connecting the first and the last point.  The coordinates are given in the current measurement units of the document (see UNIT constants).  "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.<br /><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.<br>May raise ValueError if an insufficient number of points is passed or if<br>the number of values passed don't group into points without leftovers.</code></dd>
1044 subik 232
 
1006 cbradney 233
        <dt><a name="-createRect"><strong>createRect</strong></a>(...)</dt>
234
        <dd><code><a href="#-createRect">createRect</a>(x, y, width, height, ["name"]) -&gt; string<br><br>Creates a new rectangle on the current page and returns its name. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name to reference that object in future. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</code></dd>
1044 subik 235
 
1006 cbradney 236
        <dt><a name="-createText"><strong>createText</strong></a>(...)</dt><dd><code><a href="#-createText">createText</a>(x, y, width, height, ["name"]) -&gt; string<br><br>Creates a new text frame on the actual page and returns its name. The coordinates are given in the actual measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.<br><br>May raise <a href="#NameExistsError">NameExistsError</a> if you explicitly pass a name that's already used.</code></dd>
1044 subik 237
 
1006 cbradney 238
        <dt><a name="-currentPage"><strong>currentPage</strong></a>(...)</dt>
239
        <dd><code><a href="#-currentPage">currentPage</a>() -&gt; integer<br><br>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.</code></dd>
1044 subik 240
 
1006 cbradney 241
        <dt><a name="-defineColor"><strong>defineColor</strong></a>(...)</dt>
242
        <dd><code><a href="#-defineColor">defineColor</a>("name", c, m, y, k)<br><br>Defines a new color "name". The color Value is defined via four components:<br>c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.<br><br>May raise ValueError if an invalid color name is specified.</code></dd>
1044 subik 243
 
1006 cbradney 244
        <dt><a name="-deleteColor"><strong>deleteColor</strong></a>(...)</dt>
245
        <dd><code><a href="#-deleteColor">deleteColor</a>("name", "replace")<br><br>Deletes the color "name". Every occurence of that color is replaced by the color "replace". If not specified, "replace" defaults to the color "None" - transparent.<br><br>deleteColor works on the default document colors if there is no document open. In that case, "replace", if specified, has no effect.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if a named color wasn't found.<br>May raise ValueError if an invalid color name is specified.</code></dd>
1044 subik 246
 
1006 cbradney 247
        <dt><a name="-deleteLayer"><strong>deleteLayer</strong></a>(...)</dt>
248
        <dd><code><a href="#-deleteLayer">deleteLayer</a>("layer")<br><br>Deletes the layer with the name "layer". Nothing happens if the layer doesn't exists or if it's the only layer in the document.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 249
 
1006 cbradney 250
        <dt><a name="-deleteObject"><strong>deleteObject</strong></a>(...)</dt>
251
        <dd><code><a href="#-deleteObject">deleteObject</a>(["name"])<br><br>Deletes the item with the name "name". If "name" is not given the currently selected item is deleted.</code></dd>
1044 subik 252
 
1006 cbradney 253
        <dt><a name="-deletePage"><strong>deletePage</strong></a>(...)</dt>
254
        <dd><code><a href="#-deletePage">deletePage</a>(nr)<br><br>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.<br><br>May raise IndexError if the page number is out of range</code></dd>
1044 subik 255
 
1006 cbradney 256
        <dt><a name="-deleteText"><strong>deleteText</strong></a>(...)</dt>
257
        <dd><code><a href="#-deleteText">deleteText</a>(["name"])<br><br>Deletes any text in the text frame "name". If there is some text selected, only the selected text will be deleted. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 258
 
1006 cbradney 259
        <dt><a name="-deselectAll"><strong>deselectAll</strong></a>(...)</dt>
260
        <dd><code><a href="#-deselectAll">deselectAll</a>()<br><br>Deselects all objects in the whole document.</code></dd>
1044 subik 261
 
1006 cbradney 262
        <dt><a name="-docChanged"><strong>docChanged</strong></a>(...)</dt>
263
        <dd><code><a href="#-docChanged">docChanged</a>(bool)<br><br>Enable/disable save icon in the Scribus icon bar and the Save menu item. It's useful to call this procedure when you're changing the document, because Scribus won't automatically notice when you change the document using a script.</code></dd>
1044 subik 264
 
1006 cbradney 265
        <dt><a name="-fileDialog"><strong>fileDialog</strong></a>(...)</dt><dd><code><a href="#-fileDialog">fileDialog</a>("caption", ["filter", "defaultname" ,haspreview, issave]) -&gt; string with filename<br><br>Shows a File Open dialog box with the caption "caption". Files are filtered with the filter string "filter". A default filename or file path can also supplied, leave this string empty when you don't want to use it. A value of True for haspreview enables a small preview widget in the FileSelect box. When the issave parameter is set to True the dialog acts like a "Save As" dialog otherwise it acts like a "File Open Dialog". The default for both of the opional parameters is False.<br><br>The filter, if specified, takes the form 'comment (*.type *.type2 ...)'.<br>For example 'Images (*.png *.xpm *.jpg)'.<br><br>Refer to the Qt-Documentation for QFileDialog for details on filters.<br><br>Example: <a href="#-fileDialog">fileDialog</a>('Open input', 'CSV files (*.csv)')<br>Example: <a href="#-fileDialog">fileDialog</a>('Save report', defaultname='report.txt', issave=True)</code></dd>
1044 subik 266
 
1006 cbradney 267
        <dt><a name="-getActiveLayer"><strong>getActiveLayer</strong></a>(...)</dt>
268
        <dd><code><a href="#-getActiveLayer">getActiveLayer</a>() -&gt; string<br><br>Returns the name of the current active layer.</code></dd>
1003 subik 269
 
1006 cbradney 270
        <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
271
        <dd><code><a href="#-getAllObjects">getAllObjects</a>() -&gt; list<br><br>Returns a list containing the names of all objects on the current page.</code></dd>
1044 subik 272
 
1006 cbradney 273
        <dt><a name="-getAllStyles"><strong>getAllStyles</strong></a>(...)</dt>
274
        <dd><code><a href="#-getAllStyles">getAllStyles</a>() -&gt; list<br><br>Return a list of the names of all paragraph styles in the current document.</code></dd>
1003 subik 275
 
1006 cbradney 276
        <dt><a name="-getAllText"><strong>getAllText</strong></a>(...)</dt>
277
        <dd><code><a href="#-getAllText">getAllText</a>(["name"]) -&gt; string<br><br>Returns the text of the text frame "name" and of all text frames which are linked with this frame. If this textframe has some text selected, the selected text is returned. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 278
 
1006 cbradney 279
        <dt><a name="-getColor"><strong>getColor</strong></a>(...)</dt>
280
        <dd><code><a href="#-getColor">getColor</a>("name") -&gt; tuple<br><br>Returns a tuple (C, M, Y, K) containing the four color components of the color "name" from the current document. If no document is open, returns the value of the named color from the default document colors.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the named color wasn't found.<br>May raise ValueError if an invalid color name is specified.</code></dd>
1044 subik 281
 
1006 cbradney 282
        <dt><a name="-getColorNames"><strong>getColorNames</strong></a>(...)</dt>
283
        <dd><code><a href="#-getColorNames">getColorNames</a>() -&gt; list<br><br>Returns a list containing the names of all defined colors in the document. If no document is open, returns a list of the default document colors.</code></dd>
1003 subik 284
 
1006 cbradney 285
        <dt><a name="-getColumnGap"><strong>getColumnGap</strong></a>(...)</dt>
286
        <dd><code><a href="#-getColumnGap">getColumnGap</a>(["name"]) -&gt; float<br><br>Returns the column gap size of the text frame "name" expressed in points. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 287
 
1006 cbradney 288
        <dt><a name="-getColumns"><strong>getColumns</strong></a>(...)</dt>
289
        <dd><code><a href="#-getColumns">getColumns</a>(["name"]) -&gt; integer<br><br>Gets the number of columns of the text frame "name". If "name" is not given the currently selected item is used.</code></dd>
1003 subik 290
 
1006 cbradney 291
        <dt><a name="-getCornerRadius"><strong>getCornerRadius</strong></a>(...)</dt>
292
        <dd><code><a href="#-getCornerRadius">getCornerRadius</a>(["name"]) -&gt; integer<br><br>Returns the corner radius of the object "name". The radius is expressed in points. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 293
 
1006 cbradney 294
        <dt><a name="-getFillColor"><strong>getFillColor</strong></a>(...)</dt>
295
        <dd><code><a href="#-getFillColor">getFillColor</a>(["name"]) -&gt; string<br><br>Returns the name of the fill color of the object "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 296
 
1006 cbradney 297
        <dt><a name="-getFillShade"><strong>getFillShade</strong></a>(...)</dt>
298
        <dd><code><a href="#-getFillShade">getFillShade</a>(["name"]) -&gt; integer<br><br>Returns the shading value of the fill color of the object "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 299
 
1006 cbradney 300
        <dt><a name="-getFont"><strong>getFont</strong></a>(...)</dt>
301
        <dd><code><a href="#-getFont">getFont</a>(["name"]) -&gt; string<br><br>Returns the font name for the text frame "name". If this text frame has some text selected the value assigned to the first character of the selection is returned. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 302
 
1006 cbradney 303
        <dt><a name="-getFontNames"><strong>getFontNames</strong></a>(...)</dt>
304
        <dd><code><a href="#-getFontNames">getFontNames</a>() -&gt; list<br /><br>Returns a list with the names of all available fonts.</code></dd>
1044 subik 305
 
1006 cbradney 306
        <dt><a name="-getFontSize"><strong>getFontSize</strong></a>(...)</dt>
307
        <dd><code><a href="#-getFontSize">getFontSize</a>(["name"]) -&gt; float<br><br>Returns the font size in points for the text frame "name". If this text frame has some text selected the value assigned to the first character of the selection is returned. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 308
 
1006 cbradney 309
        <dt><a name="-getGuiLanguage"><strong>getGuiLanguage</strong></a>(...)</dt>
310
        <dd><code><a href="#-getGuiLanguage">getGuiLanguage</a>() -&gt; string<br><br>Returns a string with the -lang value.</code></dd>
1044 subik 311
 
1006 cbradney 312
        <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
313
        <dd><code><a href="#-getHGuides">getHGuides</a>() -&gt; list<br><br>Returns a list containing positions of the horizontal guides. Values are in the document's current units - see UNIT_&lt;type&gt; constants.</code></dd>
1003 subik 314
 
1006 cbradney 315
        <dt><a name="-getImageFile"><strong>getImageFile</strong></a>(...)</dt>
316
        <dd><code>getImageName(["name"]) -&gt; string<br><br>Returns the filename for the image in the image frame. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 317
 
1006 cbradney 318
        <dt><a name="-getImageScale"><strong>getImageScale</strong></a>(...)</dt>
319
        <dd><code><a href="#-getImageScale">getImageScale</a>(["name"]) -&gt; (x,y)<br><br>Returns a (x, y) tuple containing the scaling values of the image frame "name".  If "name" is not given the currently selected item is used.</code></dd>
1044 subik 320
 
1006 cbradney 321
        <dt><a name="-getLayers"><strong>getLayers</strong></a>(...)</dt>
322
        <dd><code><a href="#-getLayers">getLayers</a>() -&gt; list<br><br>Returns a list with the names of all defined layers.</code></dd>
1044 subik 323
 
1006 cbradney 324
        <dt><a name="-getLineCap"><strong>getLineCap</strong></a>(...)</dt>
325
        <dd><code>getLineEnd(["name"]) -&gt; integer (see constants)<br><br>Returns the line cap style of the object "name". If "name" is not given the currently selected item is used. The cap types are:<br>CAP_FLAT, CAP_ROUND, CAP_SQUARE</code></dd>
1003 subik 326
 
1006 cbradney 327
        <dt><a name="-getLineColor"><strong>getLineColor</strong></a>(...)</dt>
328
        <dd><code><a href="#-getLineColor">getLineColor</a>(["name"]) -&gt; string<br><br>Returns the name of the line color of the object "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 329
 
1006 cbradney 330
        <dt><a name="-getLineJoin"><strong>getLineJoin</strong></a>(...)</dt>
331
        <dd><code><a href="#-getLineJoin">getLineJoin</a>(["name"]) -&gt; integer (see contants)<br><br>Returns the line join style of the object "name". If "name" is not given the currently selected item is used.  The join types are:<br>JOIN_BEVEL, JOIN_MITTER, JOIN_ROUND</code></dd>
1003 subik 332
 
1006 cbradney 333
        <dt><a name="-getLineShade"><strong>getLineShade</strong></a>(...)</dt>
334
        <dd><code><a href="#-getLineShade">getLineShade</a>(["name"]) -&gt; integer<br><br>Returns the shading value of the line color of the object "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 335
 
1006 cbradney 336
        <dt><a name="-getLineSpacing"><strong>getLineSpacing</strong></a>(...)</dt>
337
        <dd><code><a href="#-getLineSpacing">getLineSpacing</a>(["name"]) -&gt; float<br><br>Returns the line spacing ("leading") of the text frame "name" expressed in points. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 338
 
1006 cbradney 339
        <dt><a name="-getLineStyle"><strong>getLineStyle</strong></a>(...)</dt>
340
        <dd><code><a href="#-getLineStyle">getLineStyle</a>(["name"]) -&gt; integer (see constants)<br><br>Returns the line style of the object "name". If "name" is not given the currently selected item is used. Line style constants are:<br />LINE_DASH, LINE_DASHDOT, LINE_DASHDOTDOT, LINE_DOT, LINE_SOLID</code></dd>
1044 subik 341
 
1006 cbradney 342
        <dt><a name="-getLineWidth"><strong>getLineWidth</strong></a>(...)</dt>
343
        <dd><code><a href="#-getLineWidth">getLineWidth</a>(["name"]) -&gt; integer<br><br>Returns the line width of the object "name". If "name" is not given the currently selected Item is used.</code></dd>
1044 subik 344
 
1006 cbradney 345
        <dt><a name="-getPageItems"><strong>getPageItems</strong></a>(...)</dt>
346
        <dd><code><a href="#-getPageItems">getPageItems</a>() -&gt; list<br><br>Returns a list of tuples with items on the current page. The tuple is:<br>(name, objectType, order) E.g. [('Text1', 4, 0), ('Image1', 2, 1)]<br>means that object named 'Text1' is a text frame (type 4) and is the first at<br>the page...</code></dd>
1044 subik 347
 
1006 cbradney 348
        <dt><a name="-getPageMargins"><strong>getPageMargins</strong></a>(...)</dt>
349
        <dd><code><a href="#-getPageMargins">getPageMargins</a>()<br><br>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>().</code></dd>
1003 subik 350
 
1006 cbradney 351
        <dt><a name="-getPageSize"><strong>getPageSize</strong></a>(...)</dt>
352
        <dd><code><a href="#-getPageSize">getPageSize</a>() -&gt; tuple<br><br>Returns a tuple with page dimensions measured in the document's current units.<br>See UNIT_&lt;type&gt; constants and <a href="#-getPageMargins">getPageMargins</a>()</code></dd>
1044 subik 353
 
1006 cbradney 354
        <dt><a name="-getPosition"><strong>getPosition</strong></a>(...)</dt>
355
        <dd><code><a href="#-getPosition">getPosition</a>(["name"]) -&gt; (x,y)<br><br>Returns a (x, y) tuple with the position of the object "name". If "name" is not given the currently selected item is used. The position is expressed in the actual measurement unit of the document - see UNIT_&lt;type&gt; for reference.</code></dd>
1044 subik 356
 
1006 cbradney 357
        <dt><a name="-getRotation"><strong>getRotation</strong></a>(...)</dt>
358
        <dd><code><a href="#-getRotation">getRotation</a>(["name"]) -&gt; integer<br><br>Returns the rotation of the object "name". The value is expressed in degrees, and clockwise is positive. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 359
 
1006 cbradney 360
        <dt><a name="-getSelectedObject"><strong>getSelectedObject</strong></a>(...)</dt>
361
        <dd><code><a href="#-getSelectedObject">getSelectedObject</a>([nr]) -&gt; string<br><br>Returns the name of the selected object. "nr" if given indicates the number of the selected object, e.g. 0 means the first selected object, 1 means the second selected Object and so on.</code></br></dd>
1044 subik 362
 
1006 cbradney 363
        <dt><a name="-getSize"><strong>getSize</strong></a>(...)</dt>
364
        <dd><code><a href="#-getSize">getSize</a>(["name"]) -&gt; (width,height)<br><br>Returns a (width, height) tuple with the size of the object "name". If "name" is not given the currently selected item is used. The size is expressed in the current measurement unit of the document - see UNIT_&lt;type&gt; for reference.</code></dd>
1044 subik 365
 
1006 cbradney 366
        <dt><a name="-getText"><strong>getText</strong></a>(...)</dt>
367
        <dd><code><a href="#-getText">getText</a>(["name"]) -&gt; string<br><br>Returns the text of the text frame "name". If this text frame has some text selected, the selected text is returned. All text in the frame, not just currently visible text, is returned. If "name" is not given the currently selected item is used.</code></dd>
1003 subik 368
 
1006 cbradney 369
        <dt><a name="-getTextColor"><strong>getTextColor</strong></a>(...)</dt>
370
        <dd><code><a href="#-getLineColor">getLineColor</a>(["name"]) -&gt; string<br><br>Returns the name of the line color of the object "name".If "name" is not given the currently selected item is used.</code></dd>
1044 subik 371
 
1006 cbradney 372
        <dt><a name="-getTextLength"><strong>getTextLength</strong></a>(...)</dt>
373
        <dd><code><a href="#-getTextLength">getTextLength</a>(["name"]) -&gt; integer<br><br>Returns the length of the text in the text frame "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 374
 
1006 cbradney 375
        <dt><a name="-getTextShade"><strong>getTextShade</strong></a>(...)</dt>
376
        <dd><code><a href="#-getLineShade">getLineShade</a>(["name"]) -&gt; integer<br><br>Returns the shading value of the line color of the object "name". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 377
 
1006 cbradney 378
        <dt><a name="-getUnit"><strong>getUnit</strong></a>(...)</dt>
379
        <dd><code><a href="#-getUnit">getUnit</a>() -&gt; integer (Scribus unit constant)<br><br>Returns the measurement units of the document. The returned value will be one of the UNIT_* constants:<br>UNIT_INCHES, UNIT_MILLIMETERS, UNIT_PICAS, UNIT_POINTS.</code></dd>
1044 subik 380
 
1006 cbradney 381
        <dt><a name="-getVGuides"><strong>getVGuides</strong></a>(...)</dt>
382
        <dd><code><a href="#-getVGuides">getVGuides</a>()<br><br>See getHGuides.</code></dd>
1044 subik 383
 
1006 cbradney 384
        <dt><a name="-getXFontNames"><strong>getXFontNames</strong></a>(...)</dt>
385
        <dd><code><a href="#-getXFontNames">getXFontNames</a>() -&gt; list of tuples<br><br>Returns a larger font info. It's a list of the tuples with:<br>[ (Scribus name, Family, Real name, subset (1|0), embed PS (1|0), font file), (...), ... ]</code></dd>
1044 subik 386
 
1006 cbradney 387
        <dt><a name="-getval"><strong>getval</strong></a>(...)</dt>
388
        <dd><code>Scribus internal.</code></dd>
1044 subik 389
 
1006 cbradney 390
        <dt><a name="-gotoPage"><strong>gotoPage</strong></a>(...)</dt>
391
        <dd><code><a href="#-gotoPage">gotoPage</a>(nr)<br><br>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.<br><br>May raise IndexError if the page number is out of range.</code></dd>
1044 subik 392
 
1006 cbradney 393
        <dt><a name="-groupObjects"><strong>groupObjects</strong></a>(...)</dt>
394
        <dd><code><a href="#-groupObjects">groupObjects</a>(list)<br><br>Groups the objects named in "list" together. "list" must contain the names of the objects to be grouped. If "list" is not given the currently selected items are used.</code></dd>
1044 subik 395
 
1006 cbradney 396
        <dt><a name="-haveDoc"><strong>haveDoc</strong></a>(...)</dt>
397
        <dd><code><a href="#-haveDoc">haveDoc</a>() -&gt; bool<br><br>Returns true if there is a document open.</code></dd>
1044 subik 398
 
1006 cbradney 399
        <dt><a name="-insertText"><strong>insertText</strong></a>(...)</dt>
400
        <dd><code><a href="#-insertText">insertText</a>("text", pos, ["name"])<br><br>Inserts the text "text" at the position "pos" into the text frame. Text must be UTF encoded (see <a href="#-setText">setText</a>() as reference) The first character has an index of 0. "name" If "name" is not given the currently selected Item is used.<br><br>May throw IndexError for an insertion out of bounds.</code></dd>
1044 subik 401
 
1006 cbradney 402
        <dt><a name="-isLayerPrintable"><strong>isLayerPrintable</strong></a>(...)</dt>
403
        <dd><code><a href="#-isLayerPrintable">isLayerPrintable</a>("layer") -&gt; bool<br><br>Returns whether the layer "layer" is printable or not, a value of True means that the layer "layer" can be printed, a value of False means that printing the layer "layer" is disabled.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 404
 
1006 cbradney 405
        <dt><a name="-isLayerVisible"><strong>isLayerVisible</strong></a>(...)</dt>
406
        <dd><code><a href="#-isLayerPrintable">isLayerPrintable</a>("layer") -&gt; bool<br><br>Returns whether the Layer "layer" is visible or not, a value of True means that the layer "layer" is visible, a value of False means that the layer "layer" is invisible.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 407
 
1006 cbradney 408
        <dt><a name="-isLocked"><strong>isLocked</strong></a>(...)</dt>
409
        <dd><code><a href="#-isLocked">isLocked</a>(["name"]) -&gt; bool<br><br>Returns true if is the object "name" locked.  If "name" is not given the currently selected item is used.</code></dd>
1044 subik 410
 
1006 cbradney 411
        <dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
412
        <dd><code><a href="#-linkTextFrames">linkTextFrames</a>("fromname", "toname")<br><br>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.<br /><br>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</code></dd>
1044 subik 413
 
1006 cbradney 414
        <dt><a name="-loadImage"><strong>loadImage</strong></a>(...)</dt>
415
        <dd><code><a href="#-loadImage">loadImage</a>("filename" [, "name"])<br><br>Loads the picture "picture" into the image frame "name". If "name" is not given the currently selected item is used.<br /><br>May raise <a href="#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not an image frame</br></dd>
1044 subik 416
 
1006 cbradney 417
        <dt><a name="-loadStylesFromFile"><strong>loadStylesFromFile</strong></a>(...)</dt>
418
        <dd><code><a href="#-loadStylesFromFile">loadStylesFromFile</a>("filename")<br><br>Loads paragraph styles from the Scribus document at "filename" into the current document.</code></dd>
1044 subik 419
 
1006 cbradney 420
        <dt><a name="-lockObject"><strong>lockObject</strong></a>(...)</dt>
421
        <dd><code><a href="#-lockObject">lockObject</a>(["name"]) -&gt; bool<br><br>Locks the object "name" if it's unlocked or unlock it if it's locked. If "name" is not given the currently selected item is used. Returns true if locked.</code></dd>
1044 subik 422
 
1006 cbradney 423
        <dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
424
        <dd><code><a href="#-messageBox">messageBox</a>("caption", "message", icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT, button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer<br><br>Displays a message box with the title "caption", the message "message", and an icon "icon" and up to 3 buttons. By default no icon is used and a single button, OK, is displayed. Only the caption and message arguments are required, though setting an icon and appropriate button(s) is strongly recommended. The message text may contain simple HTML-like markup.<br /> <br>Returns the number of the button the user pressed. Button numbers start at 1.<br><br>For the icon and the button parameters there are predefined constants available with the same names as in the Qt Documentation. These are the BUTTON_* and ICON_* constants defined in the module. There are also two extra constants that can be binary-ORed with button constants:<br>
1003 subik 425
    BUTTONOPT_DEFAULT   Pressing enter presses this button.<br>
426
    BUTTONOPT_ESCAPE    Pressing escape presses this button.<br>
427
 <br>
428
Usage examples:<br>
429
result = <a href="#-messageBox">messageBox</a>('Script failed',<br>
430
                    'This script only works when you have a text frame selected.',<br>
431
                    ICON_ERROR)<br>
432
result = <a href="#-messageBox">messageBox</a>('Monkeys!', 'Something went ook! &lt;i&gt;Was it a monkey?&lt;/i&gt;',<br>
433
                    ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,<br>
434
                    BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)<br>
435
 <br>
436
Defined button and icon constants:<br>
437
BUTTON_NONE, BUTTON_ABORT, BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO,<br>
438
BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, BUTTON_YES, BUTTON_YESALL,<br>
1006 cbradney 439
ICON_NONE, ICON_INFORMATION, ICON_WARNING, ICON_CRITICAL.</code></dd>
440
 
441
        <dt><a name="-messagebarText"><strong>messagebarText</strong></a>(...)</dt><dd><code><a href="#-messagebarText">messagebarText</a>("string")<br>
1003 subik 442
 <br>
443
Writes the "string" into the Scribus message bar (status line). The text<br>
1006 cbradney 444
must be UTF8 encoded or 'unicode' string(recommended).</code></dd></dl>
445
<dt><a name="-moveObject"><strong>moveObject</strong></a>(...)</dt><dd><code><a href="#-moveObject">moveObject</a>(dx, dy [, "name"])<br>
1003 subik 446
 <br>
447
Moves the object "name" by dx and dy relative to its current position. The<br>
448
distances are expressed in the current measurement unit of the document (see<br>
449
UNIT constants). If "name" is not given the currently selected item is used.<br>
1006 cbradney 450
If the object "name" belongs to a group, the whole group is moved.</code></dd></dl>
451
<dt><a name="-moveObjectAbs"><strong>moveObjectAbs</strong></a>(...)</dt><dd><code><a href="#-moveObjectAbs">moveObjectAbs</a>(x, y [, "name"])<br>
1003 subik 452
 <br>
453
Moves the object "name" to a new location. The coordinates are expressed in<br>
454
the current measurement unit of the document (see UNIT constants).  If "name"<br>
455
is not given the currently selected item is used.  If the object "name"<br>
1006 cbradney 456
belongs to a group, the whole group is moved.</code></dd></dl>
457
<dt><a name="-newDoc"><strong>newDoc</strong></a>(...)</dt><dd><code><a href="#-newDoc">newDoc</a>(size, margins, orientation, firstPageNumber,<br>
1003 subik 458
                   unit, facingPages, firstSideLeft) -&gt; bool<br>
459
 <br>
460
Creates a new document and returns true if successful. The parameters have the<br>
461
following meaning:<br>
462
 <br>
463
    size = A tuple (width, height) describing the size of the document. You can<br>
464
    use predefined constants named PAPER_&lt;paper_type&gt; e.g. PAPER_A4 etc.<br>
465
 <br>
466
    margins = A tuple (left, right, top, bottom) describing the document<br>
467
    margins<br>
468
 <br>
469
    orientation = the page orientation - constants PORTRAIT, LANDSCAPE<br>
470
 <br>
471
    firstPageNumber = is the number of the first page in the document used for<br>
472
    pagenumbering. While you'll usually want 1, it's useful to have higher<br>
473
    numbers if you're creating a document in several parts.<br>
474
 <br>
475
    unit: this value sets the measurement units used by the document. Use a<br>
476
    predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS,<br>
477
    UNIT_PICAS, UNIT_POINTS.<br>
478
 <br>
479
    facingPages = FACINGPAGES, NOFACINGPAGES<br>
480
 <br>
481
    firstSideLeft = FIRSTPAGELEFT, FIRSTPAGERIGHT<br>
482
 <br>
483
The values for width, height and the margins are expressed in the given unit<br>
484
for the document. PAPER_* constants are expressed in points. If your document<br>
485
is not in points, make sure to account for this.<br>
486
 <br>
487
example: <a href="#-newDoc">newDoc</a>(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 1, UNIT_POINTS,<br>
1006 cbradney 488
                FACINGPAGES, FIRSTPAGERIGHT)</code></dd></dl>
489
<dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt><dd><code><a href="#-newDocDialog">newDocDialog</a>() -&gt; bool<br>
1003 subik 490
 <br>
1006 cbradney 491
Displays the "New Document" dialog box. Creates a new document if the user accepts the settings. Does not create a document if the user presses cancel. Returns true if a new document was created.</code></dd>
492
 
493
        <dt><a name="-newPage"><strong>newPage</strong></a>(...)</dt>
494
        <dd><code><a href="#-newPage">newPage</a>(where [,"template"])<br><br>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.<br><br>May raise IndexError if the page number is out of range</code></dd>
495
 
496
        <dt><a name="-objectExists"><strong>objectExists</strong></a>(...)</dt>
497
        <dd><code><a href="#-objectExists">objectExists</a>(["name"]) -&gt; bool<br><br>Test if an object with specified name really exists in the document. The optional parameter is the object name. When no object name is given, returns True if there is something selected.</code></dd>
1044 subik 498
 
1006 cbradney 499
        <dt><a name="-openDoc"><strong>openDoc</strong></a>(...)</dt>
500
        <dd><code><a href="#-openDoc">openDoc</a>("name")<br><br>Opens the document "name".<br> <br>May raise ScribusError if the document could not be opened.</code></dd>
1044 subik 501
 
1006 cbradney 502
        <dt><a name="-pageCount"><strong>pageCount</strong></a>(...)</dt>
503
        <dd><code><a href="#-pageCount">pageCount</a>() -&gt; integer<br><br>Returns the number of pages in the document.</code></dd>
1044 subik 504
 
1006 cbradney 505
        <dt><a name="-pageDimension"><strong>pageDimension</strong></a>(...)</dt>
506
        <dd><code><a href="#-getPageSize">getPageSize</a>() -&gt; tuple<br><br>Returns a tuple with page dimensions measured in the document's current units.<br>See UNIT_&lt;type&gt; constants and <a href="#-getPageMargins">getPageMargins</a>()</code></dd>
1044 subik 507
 
1006 cbradney 508
        <dt><a name="-progressReset"><strong>progressReset</strong></a>(...)</dt>
509
        <dd><code><a href="#-progressReset">progressReset</a>()<br><br>Cleans up the Scribus progress bar previous settings. It is called before the new progress bar use. See progressSet.</code></dd>
1044 subik 510
 
1006 cbradney 511
        <dt><a name="-progressSet"><strong>progressSet</strong></a>(...)</dt>
512
        <dd><code><a href="#-progressSet">progressSet</a>(nr)<br><br>Set the progress bar position to "nr", a value relative to the previously set progressTotal. The progress bar uses the concept of steps; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps with <a href="#-progressTotal">progressTotal</a>(). The current number of steps is set with <a href="#-progressSet">progressSet</a>(). The progress bar can be rewound to the beginning with <a href="#-progressReset">progressReset</a>(). [based on info taken from Trolltech's Qt docs]</code></dd>
1044 subik 513
 
1006 cbradney 514
        <dt><a name="-progressTotal"><strong>progressTotal</strong></a>(...)</dt>
515
        <dd><code><a href="#-progressTotal">progressTotal</a>(max)<br><br>Sets the progress bar's maximum steps value to the specified number. See progressSet.</code></dd>
1044 subik 516
 
1006 cbradney 517
        <dt><a name="-redrawAll"><strong>redrawAll</strong></a>(...)</dt>
518
        <dd><code><a href="#-redrawAll">redrawAll</a>()<br><br>Redraws all pages.</code></dd>
1044 subik 519
 
1006 cbradney 520
        <dt><a name="-renderFont"><strong>renderFont</strong></a>(...)</dt><dd><code>rendeFont("name", "filename", "sample", size) -&gt; bool<br><br>Creates an image preview of font "name" with given text "sample" and size. Image is saved into "filename". Returns true when success.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the specified font can't be found.<br>May raise ValueError if an empty sample or filename is passed.</code></dd>
1044 subik 521
 
1006 cbradney 522
        <dt><a name="-replaceColor"><strong>replaceColor</strong></a>(...)</dt>
523
        <dd><code><a href="#-replaceColor">replaceColor</a>("name", "replace")<br><br>Every occurence of the color "name" is replaced by the color "replace".<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if a named color wasn't found.<br>May raise ValueError if an invalid color name is specified.</code></dd>
1044 subik 524
 
1006 cbradney 525
        <dt><a name="-retval"><strong>retval</strong></a>(...)</dt>
526
        <dd><code>Scribus internal.</code></dd>
1044 subik 527
 
1006 cbradney 528
        <dt><a name="-rotateObject"><strong>rotateObject</strong></a>(...)</dt>
529
        <dd><code><a href="#-rotateObject">rotateObject</a>(rot [, "name"])<br><br>Rotates the object "name" by "rot" degrees relatively. The object is rotated by the vertex that is currently selected as the rotation point - by default, the top left vertext at zero rotation. Positive values mean counter clockwise rotation when the default rotation point is used. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 530
 
1006 cbradney 531
        <dt><a name="-rotateObjectAbs"><strong>rotateObjectAbs</strong></a>(...)</dt>
532
        <dd><code><a href="#-rotateObjectAbs">rotateObjectAbs</a>(rot [, "name"])<br><br>Sets the rotation of the object "name" to "rot". Positive values mean counter clockwise rotation. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 533
 
1006 cbradney 534
        <dt><a name="-saveDoc"><strong>saveDoc</strong></a>(...)</dt>
535
        <dd><code><a href="#-saveDoc">saveDoc</a>()<br><br>Saves the current document with its current name, returns true if successful. If the document has not already been saved, this may bring up an interactive save file dialog.<br><br>If the save fails, there is currently no way to tell.</code></dd>
1044 subik 536
 
1006 cbradney 537
        <dt><a name="-saveDocAs"><strong>saveDocAs</strong></a>(...)</dt><dd><code><a href="#-saveDocAs">saveDocAs</a>("name")<br><br>Saves the current document under the new name "name" (which may be a full or relative path).<br><br>May raise ScribusError if the save fails.</code></dd>
1044 subik 538
 
1006 cbradney 539
        <dt><a name="-savePageAsEPS"><strong>savePageAsEPS</strong></a>(...)</dt>
540
        <dd><code><a href="#-savePageAsEPS">savePageAsEPS</a>("name")<br><br>Saves the current page as an EPS to the file "name".<br><br>May raise ScribusError if the save failed.</code></dd>
1044 subik 541
 
1006 cbradney 542
        <dt><a name="-scaleGroup"><strong>scaleGroup</strong></a>(...)</dt>
543
        <dd><code><a href="#-scaleGroup">scaleGroup</a>(factor [,"name"])<br><br>Scales the group the object "name" belongs to. Values greater than 1 enlarge the group, values smaller than 1 make the group smaller e.g a value of 0.5 scales the group to 50 % of its original size, a value of 1.5 scales the group to 150 % of its original size.  The value for "factor" must be greater than 0. If "name" is not given the currently selected item is used.<br><br>May raise ValueError if an invalid scale factor is passed.</code></dd>
544
 
545
        <dt><a name="-scaleImage"><strong>scaleImage</strong></a>(...)</dt>
546
        <dd><code><a href="#-scaleImage">scaleImage</a>(x, y [, "name"])<br><br>Sets the scaling factors of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %.<br><br>May raise <a href="#WrongFrameTypeError">WrongFrameTypeError</a> if the target frame is not an image frame</code></dd>
1044 subik 547
 
1006 cbradney 548
        <dt><a name="-selectObject"><strong>selectObject</strong></a>(...)</dt><dd><code><a href="#-selectObject">selectObject</a>("name")<br><br>Selects the object with the given "name".</code></dd>
1044 subik 549
 
1006 cbradney 550
        <dt><a name="-selectText"><strong>selectText</strong></a>(...)</dt>
551
        <dd><code><a href="#-selectText">selectText</a>(start, count, ["name"])<br><br>Selects "count" characters of text in the text frame "name" starting from the character "start". Character counting starts at 0. If "count" is zero, any text selection will be cleared.  If "name" is not given the currently selected item is used.<br><br>May throw IndexError if the selection is outside the bounds of the text.</code></dd>
1044 subik 552
 
1006 cbradney 553
        <dt><a name="-selectionCount"><strong>selectionCount</strong></a>(...)</dt>
554
        <dd><code><a href="#-selectionCount">selectionCount</a>() -&gt; integer<br><br>Returns the number of selected objects.</code></dd>
1044 subik 555
 
1006 cbradney 556
        <dt><a name="-sentToLayer"><strong>sentToLayer</strong></a>(...)</dt>
557
        <dd><code><a href="#-sentToLayer">sentToLayer</a>("layer" [, "name"])<br><br>Sends the object "name" to the layer "layer". The layer must exist. If "name" is not given the currently selected item is used.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 558
 
1006 cbradney 559
        <dt><a name="-setActiveLayer"><strong>setActiveLayer</strong></a>(...)</dt>
560
        <dd><code><a href="#-setActiveLayer">setActiveLayer</a>("name")<br><br>Sets the active layer to the layer named "name".<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 561
 
1006 cbradney 562
        <dt><a name="-setColumnGap"><strong>setColumnGap</strong></a>(...)</dt>
563
        <dd><code><a href="#-setColumnGap">setColumnGap</a>(size, ["name"])<br><br>Sets the column gap of the text frame "name" to the value "size". If "name" is not given the currently selected item is used.<br><br>May throw ValueError if the column gap is out of bounds (must be positive).</code></dd>
1044 subik 564
 
1006 cbradney 565
        <dt><a name="-setColumns"><strong>setColumns</strong></a>(...)</dt>
566
        <dd><code><a href="#-setColumns">setColumns</a>(nr, ["name"])<br><br>Sets the number of columns of the text frame "name" to the integer "nr". If "name" is not given the currently selected item is used.<br><br>May throw ValueError if number of columns is not at least one.</code></dd>
1044 subik 567
 
1006 cbradney 568
        <dt><a name="-setCornerRadius"><strong>setCornerRadius</strong></a>(...)</dt>
569
        <dd><code><a href="#-setCornerRadius">setCornerRadius</a>(radius, ["name"])<br><br>Sets the corner radius of the object "name". The radius is expressed in points. If "name" is not given the currently selected item is used.<br><br>May raise ValueError if the corner radius is negative.</code></dd>
1044 subik 570
 
1006 cbradney 571
        <dt><a name="-setCursor"><strong>setCursor</strong></a>(...)</dt>
572
        <dd><code><a href="#-setCursor">setCursor</a>()<br><br>[UNSUPPORTED!] This might break things, so steer clear for now.</code></dd>
573
 
574
        <dt><a name="-setDocType"><strong>setDocType</strong></a>(...)</dt><dd><code><a href="#-setDocType">setDocType</a>(facingPages, firstPageLeft)<br>
1028 subik 575
 <br>Sets the document type. To get facing pages set the first parameter to FACINGPAGES, to switch facingPages off use NOFACINGPAGES instead.  If you want to be the first page a left side set the second parameter to FIRSTPAGELEFT, for a right page use FIRSTPAGERIGHT.</code></dd>
1003 subik 576
 
1006 cbradney 577
        <dt><a name="-setFillColor"><strong>setFillColor</strong></a>(...)</dt>
578
        <dd><code><a href="#-setFillColor">setFillColor</a>("color", ["name"])<br><br>Sets the fill color of the object "name" to the color "color". "color" is the name of one of the defined colors. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 579
 
1006 cbradney 580
        <dt><a name="-setFillShade"><strong>setFillShade</strong></a>(...)</dt>
581
        <dd><code><a href="#-setFillShade">setFillShade</a>(shade, ["name"])<br><br>Sets the shading of the fill color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full Color intensity). If "name" is not given the currently selected Item is used. May raise ValueError if the fill shade is out of bounds.</code></dd>
1044 subik 582
 
1006 cbradney 583
        <dt><a name="-setFont"><strong>setFont</strong></a>(...)</dt>
584
        <dd><code><a href="#-setFont">setFont</a>("font", ["name"])<br><br>Sets the font of the text frame "name" to "font". If there is some text selected only the selected text is changed.  If "name" is not given the currently selected item is used.<br><br>May throw ValueError if the font cannot be found.</code></dd>
1044 subik 585
 
1006 cbradney 586
        <dt><a name="-setFontSize"><strong>setFontSize</strong></a>(...)</dt>
587
        <dd><code><a href="#-setFontSize">setFontSize</a>(size, ["name"])<br><br>Sets the font size of the text frame "name" to "size". "size" is treated as a value in points. If there is some text selected only the selected text is changed. "size" must be in the range 1 to 512. If "name" is not given the currently selected item is used.<br><br>May throw ValueError for a font size that's out of bounds.</code></dd>
588
        <dt><a name="-setGradientFill"><strong>setGradientFill</strong></a>(...)</dt><dd><code><a href="#-setGradientFill">setGradientFill</a>(type, "color1", shade1, "color2", shade2, ["name"])<br><br>Sets the gradient fill of the object "name" to type. Color descriptions are the same as for <a href="#-setFillColor">setFillColor</a>() and <a href="#-setFillShade">setFillShade</a>(). See the constants for available types (FILL_&lt;type&gt;).</code></dd>
1044 subik 589
 
1006 cbradney 590
        <dt><a name="-setHGuides"><strong>setHGuides</strong></a>(...)</dt>
591
        <dd><code><a href="#-setHGuides">setHGuides</a>(list)<br><br>Sets horizontal guides. Input parameter must be a list of guide positions measured in the current document units - see UNIT_&lt;type&gt; constants.<br><br>Example: <a href="#-setHGuides">setHGuides</a>(<a href="#-getHGuides">getHGuides</a>() + [200.0, 210.0] # add new guides without any lost<br>
592
         <a href="#-setHGuides">setHGuides</a>([90,250]) # replace current guides entirely</code></dd>
1044 subik 593
 
1006 cbradney 594
        <dt><a name="-setInfo"><strong>setInfo</strong></a>(...)</dt>
595
        <dd><code><a href="#-saveDocAs">saveDocAs</a>("author", "info", "description") -&gt; bool<br><br>Sets the document information. "Author", "Info", "Description" are strings.</code></dd>
1044 subik 596
 
1006 cbradney 597
        <dt><a name="-setLayerPrintable"><strong>setLayerPrintable</strong></a>(...)</dt><dd><code><a href="#-setLayerPrintable">setLayerPrintable</a>("layer", printable)<br><br>Sets the layer "layer" to be printable or not. If is the printable set to false the layer won't be printed.<br><br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 598
 
1006 cbradney 599
        <dt><a name="-setLayerVisible"><strong>setLayerVisible</strong></a>(...)</dt><dd><code><a href="#-setLayerVisible">setLayerVisible</a>("layer", visible)<br><br>Sets the layer "layer" to be visible or not. If is the visible set to false the layer is invisible.<br> <br>May raise <a href="#NotFoundError">NotFoundError</a> if the layer can't be found.<br>May raise ValueError if the layer name isn't acceptable.</code></dd>
1044 subik 600
 
1006 cbradney 601
        <dt><a name="-setLineCap"><strong>setLineCap</strong></a>(...)</dt>
602
        <dd><code>setLineEnd(endtype, ["name"])<br><br>Sets the line cap style of the object "name" to the style "cap".<br>If "name" is not given the currently selected item is used. There are predefined constants for "cap" - CAP_&lt;type&gt;.</code></dd>
1044 subik 603
 
1006 cbradney 604
        <dt><a name="-setLineColor"><strong>setLineColor</strong></a>(...)</dt>
605
        <dd><code><a href="#-setLineColor">setLineColor</a>("color", ["name"])<br><br>Sets the line color of the object "name" to the color "color". If "name" is not given the currently selected item is used.</code></dd>
1044 subik 606
 
1006 cbradney 607
        <dt><a name="-setLineJoin"><strong>setLineJoin</strong></a>(...)</dt>
608
        <dd><code><a href="#-setLineJoin">setLineJoin</a>(join, ["name"])<br><br>Sets the line join style of the object "name" to the style "join". If "name" is not given the currently selected item is used. There are predefined constants for join - JOIN_&lt;type&gt;.</code></dd>
1044 subik 609
 
1006 cbradney 610
        <dt><a name="-setLineShade"><strong>setLineShade</strong></a>(...)</dt>
611
        <dd><code><a href="#-setLineShade">setLineShade</a>(shade, ["name"])<br><br>Sets the shading of the line color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full color intensity). If "name" is not given the currently selected item is used.<br><br>May raise ValueError if the line shade is out of bounds.</code></dd>
1044 subik 612
 
1006 cbradney 613
        <dt><a name="-setLineSpacing"><strong>setLineSpacing</strong></a>(...)</dt><dd><code><a href="#-setLineSpacing">setLineSpacing</a>(size, ["name"])<br><br>Sets the line spacing ("leading") of the text frame "name" to "size". "size" is a value in points. If "name" is not given the currently selected item is used.<br><br>May throw ValueError if the line spacing is out of bounds.</code></dd>
1044 subik 614
 
1006 cbradney 615
        <dt><a name="-setLineStyle"><strong>setLineStyle</strong></a>(...)</dt>
616
        <dd><code><a href="#-setLineStyle">setLineStyle</a>(style, ["name"])<br><br>Sets the line style of the object "name" to the style "style". If "name" is not given the currently selected item is used. There are predefined constants for "style" - LINE_&lt;style&gt;.</code></dd>
1044 subik 617
 
1006 cbradney 618
        <dt><a name="-setLineWidth"><strong>setLineWidth</strong></a>(...)</dt>
619
        <dd><code><a href="#-setLineWidth">setLineWidth</a>(width, ["name"])<br><br>Sets line width of the object "name" to "width". "width" must be in the range from 0.0 to 12.0 inclusive, and is measured in points. If "name" is not given the currently selected item is used.<br><br>May raise ValueError if the line width is out of bounds.</code></dd>
1044 subik 620
 
1006 cbradney 621
        <dt><a name="-setMargins"><strong>setMargins</strong></a>(...)</dt>
622
        <dd><code><a href="#-setMargins">setMargins</a>(lr, rr, tr, br)<br><br>Sets the margins of the document, Left(lr), Right(rr), Top(tr) and Bottom(br) margins are given in the measurement units of the document - see UNIT_&lt;type&gt; constants.</code></dd>
1044 subik 623
 
1006 cbradney 624
        <dt><a name="-setMultiLine"><strong>setMultiLine</strong></a>(...)</dt>
625
        <dd><code><a href="#-setMultiLine">setMultiLine</a>("namedStyle", ["name"])<br><br>Sets the line style of the object "name" to the named style "namedStyle". If "name" is not given the currently selected item is used.<br/><br/>May raise <a href="#NotFoundError">NotFoundError</a> if the line style doesn't exist.</code></dd>
1044 subik 626
 
1006 cbradney 627
        <dt><a name="-setRedraw"><strong>setRedraw</strong></a>(...)</dt>
628
        <dd><code><a href="#-setRedraw">setRedraw</a>(bool)<br><br>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.</code></dd>
1044 subik 629
 
1388 subik 630
        <dt><a name="-setScaleImageToFrame"><strong>setScaleImageToFrame</strong></a>(...)</dt>
631
        <dd><code><a href="#-setScaleImageToFrame">setScaleImageToFrame</a>(scaletoframe, proportional=None, name=<selection>)</code>
632
        <p>Sets the scale to frame on the selected or specified image frame to `scaletoframe'. If `proportional' is specified, set fixed aspect ratio scaling to `proportional'. Both `scaletoframe' and `proportional' are boolean.</p>
633
        <p>May raise WrongFrameTypeError.</p></dd>
634
 
1006 cbradney 635
        <dt><a name="-setStyle"><strong>setStyle</strong></a>(...)</dt>
636
        <dd><code><a href="#-setStyle">setStyle</a>("style" [, "name"])<br><br>Apply the named "style" to the object named "name". If is no object name given, it's applied on the selected object.</code></dd>
1044 subik 637
 
1006 cbradney 638
        <dt><a name="-setText"><strong>setText</strong></a>(...)</dt>
639
        <dd><code><a href="#-setText">setText</a>("text", ["name"])<br><br>Sets the text of the text frame "name" to the text of the string "text". Text must be UTF8 encoded - use e.g. unicode(text, 'iso-8859-2'). See the FAQ for more details. If "name" is not given the currently selected item is used.</code></dd>
640
 
641
        <dt><a name="-setTextAlignment"><strong>setTextAlignment</strong></a>(...)</dt>
642
        <dd><code><a href="#-setTextAlignment">setTextAlignment</a>(align, ["name"])<br><br>Sets the text alignment of the text frame "name" to the specified alignment. If "name" is not given the currently selected item is used. "align" should be one of the ALIGN_ constants defined in this module - see dir(scribus).<br><br>May throw ValueError for an invalid alignment constant.</code></dd>
1044 subik 643
 
1006 cbradney 644
        <dt><a name="-setTextColor"><strong>setTextColor</strong></a>(...)</dt>
645
        <dd><code><a href="#-setTextColor">setTextColor</a>("color", ["name"])<br /><br>Sets the text color of the text frame "name" to the color "color". If there is some text selected only the selected text is changed. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 646
 
1006 cbradney 647
        <dt><a name="-setTextShade"><strong>setTextShade</strong></a>(...)</dt>
648
        <dd><code><a href="#-setTextShade">setTextShade</a>(shade, ["name"])<br><br>Sets the shading of the text color of the object "name" to "shade". If there is some text selected only the selected text is changed. "shade" must be an integer value in the range from 0 (lightest) to 100 (full color intensity). If "name" is not given the currently selected item is used.</code></dd>
1044 subik 649
 
1006 cbradney 650
        <dt><a name="-setTextStroke"><strong>setTextStroke</strong></a>(...)</dt>
651
        <dd><code><a href="#-setTextStroke">setTextStroke</a>("color", ["name"])<br><br>Set "color" of the text stroke. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 652
 
1006 cbradney 653
        <dt><a name="-setUnit"><strong>setUnit</strong></a>(...)</dt>
654
        <dd><code><a href="#-setUnit">setUnit</a>(type)<br><br>Changes the measurement unit of the document. Possible values for "unit" are defined as constants UNIT_&lt;type&gt;.<br> <br>May raise ValueError if an invalid unit is passed.</code></dd>
1044 subik 655
 
1006 cbradney 656
        <dt><a name="-setVGuides"><strong>setVGuides</strong></a>(...)</dt>
657
        <dd><code><a href="#-setVGuides">setVGuides</a>()<br><br>See setHGuides.</code></dd>
1044 subik 658
 
1006 cbradney 659
        <dt><a name="-sizeObject"><strong>sizeObject</strong></a>(...)</dt>
660
        <dd><code><a href="#-sizeObject">sizeObject</a>(width, height [, "name"])<br><br>Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 661
 
1006 cbradney 662
        <dt><a name="-statusMessage"><strong>statusMessage</strong></a>(...)</dt>
663
        <dd><code><a href="#-messagebarText">messagebarText</a>("string")<br><br>Writes the "string" into the Scribus message bar (status line). The text must be UTF8 encoded or 'unicode' string(recommended).</code></dd>
1044 subik 664
 
1006 cbradney 665
        <dt><a name="-textFlowsAroundFrame"><strong>textFlowsAroundFrame</strong></a>(...)</dt>
666
        <dd><code><a href="#-textFlowsAroundFrame">textFlowsAroundFrame</a>("name" [, state])<br> <br>Enables/disables "Text Flows Around Frame" feature for object "name". Called with parameters string name and optional boolean "state". If "state" is not passed, text flow is toggled.</code></dd>
1044 subik 667
 
1006 cbradney 668
        <dt><a name="-traceText"><strong>traceText</strong></a>(...)</dt>
669
        <dd><code><a href="#-traceText">traceText</a>(["name"])<br><br>Convert the text frame "name" to outlines. If "name" is not given the currently selected item is used.</code></dd>
1044 subik 670
 
1006 cbradney 671
        <dt><a name="-unGroupObject"><strong>unGroupObject</strong></a>(...)</dt>
672
        <dd><code>unGroupObjects("name")<br><br>Destructs the group the object "name" belongs to.If "name" is not given the currently selected item is used.</code></dd>
1044 subik 673
 
1006 cbradney 674
        <dt><a name="-unlinkTextFrames"><strong>unlinkTextFrames</strong></a>(...)</dt><dd>
675
        <code><a href="#-unlinkTextFrames">unlinkTextFrames</a>("name")<br><br>Remove the specified (named) object from the text frame flow/linkage. If the frame was in the middle of a chain, the previous and next frames will be connected, eg 'a-&gt;b-&gt;c' becomes 'a-&gt;c' when you <a href="#-unlinkTextFrames">unlinkTextFrames</a>(b)'<br><br>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</code></dd>
1044 subik 676
 
1006 cbradney 677
        <dt><a name="-valueDialog"><strong>valueDialog</strong></a>(...)</dt><dd><code><a href="#-valueDialog">valueDialog</a>(caption, message [,defaultvalue]) -&gt; string<br> <br>Shows the common 'Ask for string' dialog and returns its value as a string<br>Parameters: window title, text in the window and optional 'default' value.<br> <br>Example: <a href="#-valueDialog">valueDialog</a>('title', 'text in the window', 'optional')</code></dd>
678
</dl>
679
 
680
<hr />
681
<h3>Data</h3>
682
 
683
<strong>ALIGN_BLOCK</strong> = 4<br>
1003 subik 684
<strong>ALIGN_CENTERED</strong> = 1<br>
685
<strong>ALIGN_FORCED</strong> = 4<br>
686
<strong>ALIGN_LEFT</strong> = 0<br>
687
<strong>ALIGN_RIGHT</strong> = 2<br>
688
<strong>Abort</strong> = 5<br>
689
<strong>BUTTON_ABORT</strong> = 5<br>
690
<strong>BUTTON_CANCEL</strong> = 2<br>
691
<strong>BUTTON_IGNORE</strong> = 7<br>
692
<strong>BUTTON_NO</strong> = 4<br>
693
<strong>BUTTON_NONE</strong> = 0<br>
694
<strong>BUTTON_OK</strong> = 1<br>
695
<strong>BUTTON_RETRY</strong> = 6<br>
696
<strong>BUTTON_YES</strong> = 3<br>
697
<strong>BevelJoin</strong> = 64<br>
698
<strong>CAP_FLAT</strong> = 0<br>
699
<strong>CAP_ROUND</strong> = 32<br>
700
<strong>CAP_SQUARE</strong> = 16<br>
701
<strong>Cancel</strong> = 2<br>
702
<strong>Centered</strong> = 1<br>
703
<strong>Critical</strong> = 3<br>
704
<strong>CrossDiagonalGradient</strong> = 4<br>
705
<strong>DashDotDotLine</strong> = 5<br>
706
<strong>DashDotLine</strong> = 4<br>
707
<strong>DashLine</strong> = 2<br>
708
<strong>DiagonalGradient</strong> = 3<br>
709
<strong>DotLine</strong> = 3<br>
710
<strong>FACINGPAGES</strong> = 1<br>
711
<strong>FILL_CROSSDIAGONALG</strong> = 4<br>
712
<strong>FILL_DIAGONALG</strong> = 3<br>
713
<strong>FILL_HORIZONTALG</strong> = 1<br>
714
<strong>FILL_NOG</strong> = 0<br>
715
<strong>FILL_RADIALG</strong> = 5<br>
716
<strong>FILL_VERTICALG</strong> = 2<br>
717
<strong>FIRSTPAGELEFT</strong> = 1<br>
718
<strong>FIRSTPAGERIGHT</strong> = 0<br>
719
<strong>FacingPages</strong> = 1<br>
720
<strong>FirstPageLeft</strong> = 1<br>
721
<strong>FirstPageRight</strong> = 0<br>
722
<strong>FlatCap</strong> = 0<br>
723
<strong>Forced</strong> = 4<br>
724
<strong>HorizontalGradient</strong> = 1<br>
725
<strong>ICON_CRITICAL</strong> = 3<br>
726
<strong>ICON_INFORMATION</strong> = 1<br>
727
<strong>ICON_NONE</strong> = 0<br>
728
<strong>ICON_WARNING</strong> = 2<br>
729
<strong>Ignore</strong> = 7<br>
730
<strong>Inches</strong> = 2<br>
731
<strong>Information</strong> = 1<br>
732
<strong>JOIN_BEVEL</strong> = 64<br>
733
<strong>JOIN_MITTER</strong> = 0<br>
734
<strong>JOIN_ROUND</strong> = 128<br>
735
<strong>LANDSCAPE</strong> = 1<br>
736
<strong>LINE_DASH</strong> = 2<br>
737
<strong>LINE_DASHDOT</strong> = 4<br>
738
<strong>LINE_DASHDOTDOT</strong> = 5<br>
739
<strong>LINE_DOT</strong> = 3<br>
740
<strong>LINE_SOLID</strong> = 1<br>
741
<strong>Landscape</strong> = 1<br>
742
<strong>LeftAlign</strong> = 0<br>
743
<strong>Millimeters</strong> = 1<br>
744
<strong>MiterJoin</strong> = 0<br>
745
<strong>NOFACINGPAGES</strong> = 0<br>
746
<strong>No</strong> = 4<br>
747
<strong>NoButton</strong> = 0<br>
748
<strong>NoFacingPages</strong> = 0<br>
749
<strong>NoGradient</strong> = 0<br>
750
<strong>NoIcon</strong> = 0<br>
751
<strong>Ok</strong> = 1<br>
752
<strong>PAPER_A0</strong> = (2380.0, 3368.0)<br>
753
<strong>PAPER_A1</strong> = (1684.0, 2380.0)<br>
754
<strong>PAPER_A2</strong> = (1190.0, 1684.0)<br>
755
<strong>PAPER_A3</strong> = (842.0, 1190.0)<br>
756
<strong>PAPER_A4</strong> = (595.0, 842.0)<br>
757
<strong>PAPER_A5</strong> = (421.0, 595.0)<br>
758
<strong>PAPER_A6</strong> = (297.0, 421.0)<br>
759
<strong>PAPER_A7</strong> = (210.0, 297.0)<br>
760
<strong>PAPER_A8</strong> = (148.0, 210.0)<br>
761
<strong>PAPER_A9</strong> = (105.0, 148.0)<br>
762
<strong>PAPER_B0</strong> = (2836.0, 4008.0)<br>
763
<strong>PAPER_B1</strong> = (2004.0, 2836.0)<br>
764
<strong>PAPER_B10</strong> = (89.0, 125.0)<br>
765
<strong>PAPER_B2</strong> = (1418.0, 2004.0)<br>
766
<strong>PAPER_B3</strong> = (1002.0, 1418.0)<br>
767
<strong>PAPER_B4</strong> = (709.0, 1002.0)<br>
768
<strong>PAPER_B5</strong> = (501.0, 709.0)<br>
769
<strong>PAPER_B6</strong> = (355.0, 501.0)<br>
770
<strong>PAPER_B7</strong> = (250.0, 355.0)<br>
771
<strong>PAPER_B8</strong> = (178.0, 250.0)<br>
772
<strong>PAPER_B9</strong> = (125.0, 178.0)<br>
773
<strong>PAPER_C5E</strong> = (462.0, 649.0)<br>
774
<strong>PAPER_COMM10E</strong> = (298.0, 683.0)<br>
775
<strong>PAPER_DLE</strong> = (312.0, 624.0)<br>
776
<strong>PAPER_EXECUTIVE</strong> = (542.0, 720.0)<br>
777
<strong>PAPER_FOLIO</strong> = (595.0, 935.0)<br>
778
<strong>PAPER_LEDGER</strong> = (1224.0, 792.0)<br>
779
<strong>PAPER_LEGAL</strong> = (612.0, 1008.0)<br>
780
<strong>PAPER_LETTER</strong> = (612.0, 792.0)<br>
781
<strong>PAPER_TABLOID</strong> = (792.0, 1224.0)<br>
782
<strong>PORTRAIT</strong> = 0<br>
783
<strong>Paper_A0</strong> = (2380.0, 3368.0)<br>
784
<strong>Paper_A1</strong> = (1684.0, 2380.0)<br>
785
<strong>Paper_A2</strong> = (1190.0, 1684.0)<br>
786
<strong>Paper_A3</strong> = (842.0, 1190.0)<br>
787
<strong>Paper_A4</strong> = (595.0, 842.0)<br>
788
<strong>Paper_A5</strong> = (421.0, 595.0)<br>
789
<strong>Paper_A6</strong> = (297.0, 421.0)<br>
790
<strong>Paper_A7</strong> = (210.0, 297.0)<br>
791
<strong>Paper_A8</strong> = (148.0, 210.0)<br>
792
<strong>Paper_A9</strong> = (105.0, 148.0)<br>
793
<strong>Paper_B0</strong> = (2836.0, 4008.0)<br>
794
<strong>Paper_B1</strong> = (2004.0, 2836.0)<br>
795
<strong>Paper_B10</strong> = (89.0, 125.0)<br>
796
<strong>Paper_B2</strong> = (1418.0, 2004.0)<br>
797
<strong>Paper_B3</strong> = (1002.0, 1418.0)<br>
798
<strong>Paper_B4</strong> = (709.0, 1002.0)<br>
799
<strong>Paper_B5</strong> = (501.0, 709.0)<br>
800
<strong>Paper_B6</strong> = (355.0, 501.0)<br>
801
<strong>Paper_B7</strong> = (250.0, 355.0)<br>
802
<strong>Paper_B8</strong> = (178.0, 250.0)<br>
803
<strong>Paper_B9</strong> = (125.0, 178.0)<br>
804
<strong>Paper_C5E</strong> = (462.0, 649.0)<br>
805
<strong>Paper_Comm10E</strong> = (298.0, 683.0)<br>
806
<strong>Paper_DLE</strong> = (312.0, 624.0)<br>
807
<strong>Paper_Executive</strong> = (542.0, 720.0)<br>
808
<strong>Paper_Folio</strong> = (595.0, 935.0)<br>
809
<strong>Paper_Ledger</strong> = (1224.0, 792.0)<br>
810
<strong>Paper_Legal</strong> = (612.0, 1008.0)<br>
811
<strong>Paper_Letter</strong> = (612.0, 792.0)<br>
812
<strong>Paper_Tabloid</strong> = (792.0, 1224.0)<br>
813
<strong>Picas</strong> = 3<br>
814
<strong>Points</strong> = 0<br>
815
<strong>Portrait</strong> = 0<br>
816
<strong>RadialGradient</strong> = 5<br>
817
<strong>Retry</strong> = 6<br>
818
<strong>RightAlign</strong> = 2<br>
819
<strong>RoundCap</strong> = 32<br>
820
<strong>RoundJoin</strong> = 128<br>
821
<strong>SolidLine</strong> = 1<br>
822
<strong>SquareCap</strong> = 16<br>
823
<strong>UNIT_INCHES</strong> = 2<br>
824
<strong>UNIT_MILLIMETERS</strong> = 1<br>
825
<strong>UNIT_PICAS</strong> = 3<br>
826
<strong>UNIT_POINTS</strong> = 0<br>
827
<strong>VerticalGradient</strong> = 2<br>
828
<strong>Warning</strong> = 2<br>
1006 cbradney 829
<strong>Yes</strong> = 3<br>
1044 subik 830
<br>
831
<strong>scribus_version</strong> = '1.2.1'<br>
832
<strong>scribus_version_info</strong> = (1, 2, 1, '', 0)<br>
1028 subik 833
</qt>