Scribus
Open source desktop publishing at your fingertips
cmdmisc.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef CMDMISC_H
8 #define CMDMISC_H
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 //Added by qt3to4:
13 #include <QPixmap>
14 
18 PyDoc_STRVAR(scribus_setredraw__doc__,
19 QT_TR_NOOP("setRedraw(bool)\n\
20 \n\
21 Disables page redraw when bool = False, otherwise redrawing is enabled.\n\
22 This change will persist even after the script exits, so make sure to call\n\
23 setRedraw(True) in a finally: clause at the top level of your script.\n\
24 "));
26 PyObject *scribus_setredraw(PyObject * /*self*/, PyObject* args);
27 
29 PyDoc_STRVAR(scribus_fontnames__doc__,
30 QT_TR_NOOP("getFontNames() -> list\n\
31 \n\
32 Returns a list with the names of all available fonts.\n\
33 "));
35 PyObject *scribus_fontnames(PyObject * /*self*/);
36 
38 PyDoc_STRVAR(scribus_xfontnames__doc__,
39 QT_TR_NOOP("getXFontNames() -> list of tuples\n\
40 \n\
41 Returns a larger font info. It's a list of the tuples with:\n\
42 [ (Scribus name, Family, Real name, subset (1|0), embed PS (1|0), font file), (...), ... ]\n\
43 "));
48 PyObject *scribus_xfontnames(PyObject * /*self*/);
49 
51 PyDoc_STRVAR(scribus_renderfont__doc__,
52 QT_TR_NOOP("renderFont(\"name\", \"filename\", \"sample\", size, format=\"PPM\") -> bool\n\
53 \n\
54 Creates an image preview of font \"name\" with given text \"sample\" and size.\n\
55 If \"filename\" is not \"\", image is saved into \"filename\". Otherwise\n\
56 image data is returned as a string. The optional \"format\" argument\n\
57 specifies the image format to generate, and supports any format allowed\n\
58 by QPixmap.save(). Common formats are PPM, JPEG, PNG and XPM.\n\
59 \n\
60 May raise NotFoundError if the specified font can't be found.\n\
61 May raise ValueError if an empty sample or filename is passed.\n\
62 "));
64 PyObject *scribus_renderfont(PyObject* /*self*/, PyObject* args, PyObject* kw);
65 
67 PyDoc_STRVAR(scribus_getlayers__doc__,
68 QT_TR_NOOP("getLayers() -> list\n\
69 \n\
70 Returns a list with the names of all defined layers.\n\
71 "));
73 PyObject *scribus_getlayers(PyObject * /*self*/);
74 
76 PyDoc_STRVAR(scribus_setactlayer__doc__,
77 QT_TR_NOOP("setActiveLayer(\"name\")\n\
78 \n\
79 Sets the active layer to the layer named \"name\".\n\
80 \n\
81 May raise NotFoundError if the layer can't be found.\n\
82 May raise ValueError if the layer name isn't acceptable.\n\
83 "));
85 PyObject *scribus_setactlayer(PyObject * /*self*/, PyObject* args);
86 
88 PyDoc_STRVAR(scribus_getactlayer__doc__,
89 QT_TR_NOOP("getActiveLayer() -> string\n\
90 \n\
91 Returns the name of the current active layer.\n\
92 "));
94 PyObject *scribus_getactlayer(PyObject * /*self*/);
95 
97 PyDoc_STRVAR(scribus_senttolayer__doc__,
98 QT_TR_NOOP("sentToLayer(\"layer\" [, \"name\"])\n\
99 \n\
100 Sends the object \"name\" to the layer \"layer\". The layer must exist.\n\
101 If \"name\" is not given the currently selected item is used.\n\
102 \n\
103 May raise NotFoundError if the layer can't be found.\n\
104 May raise ValueError if the layer name isn't acceptable.\n\
105 "));
107 PyObject *scribus_senttolayer(PyObject * /*self*/, PyObject* args);
108 
110 PyDoc_STRVAR(scribus_layervisible__doc__,
111 QT_TR_NOOP("setLayerVisible(\"layer\", visible)\n\
112 \n\
113 Sets the layer \"layer\" to be visible or not. If is the visible set to false\n\
114 the layer is invisible.\n\
115 \n\
116 May raise NotFoundError if the layer can't be found.\n\
117 May raise ValueError if the layer name isn't acceptable.\n\
118 "));
120 PyObject *scribus_layervisible(PyObject * /*self*/, PyObject* args);
121 
123 PyDoc_STRVAR(scribus_layerprint__doc__,
124 QT_TR_NOOP("setLayerPrintable(\"layer\", printable)\n\
125 \n\
126 Sets the layer \"layer\" to be printable or not. If is the\n\
127 printable set to false the layer won't be printed.\n\
128 \n\
129 May raise NotFoundError if the layer can't be found.\n\
130 May raise ValueError if the layer name isn't acceptable.\n\
131 "));
133 PyObject *scribus_layerprint(PyObject * /*self*/, PyObject* args);
134 
136 PyDoc_STRVAR(scribus_layerlock__doc__,
137 QT_TR_NOOP("setLayerLocked(\"layer\", locked)\n\
138 \n\
139 Sets the layer \"layer\" to be locked or not. If locked is set to\n\
140 true the layer will be locked.\n\
141 \n\
142 May raise NotFoundError if the layer can't be found.\n\
143 May raise ValueError if the layer name isn't acceptable.\n\
144 "));
146 PyObject *scribus_layerlock(PyObject * /*self*/, PyObject* args);
147 
149 PyDoc_STRVAR(scribus_layeroutline__doc__,
150 QT_TR_NOOP("setLayerOutlined(\"layer\", outline)\n\
151 \n\
152 Sets the layer \"layer\" to be locked or not. If outline is set to\n\
153 true the layer will be displayed outlined.\n\
154 \n\
155 May raise NotFoundError if the layer can't be found.\n\
156 May raise ValueError if the layer name isn't acceptable.\n\
157 "));
159 PyObject *scribus_layeroutline(PyObject * /*self*/, PyObject* args);
160 
162 PyDoc_STRVAR(scribus_layerflow__doc__,
163 QT_TR_NOOP("setLayerFlow(\"layer\", flow)\n\
164 \n\
165 Sets the layers \"layer\" flowcontrol to flow. If flow is set to\n\
166 true text in layers above this one will flow around objects on this layer.\n\
167 \n\
168 May raise NotFoundError if the layer can't be found.\n\
169 May raise ValueError if the layer name isn't acceptable.\n\
170 "));
172 PyObject *scribus_layerflow(PyObject * /*self*/, PyObject* args);
173 
175 PyDoc_STRVAR(scribus_layerblend__doc__,
176 QT_TR_NOOP("setLayerBlendmode(\"layer\", blend)\n\
177 \n\
178 Sets the layers \"layer\" blendmode to blend.\n\
179 \n\
180 May raise NotFoundError if the layer can't be found.\n\
181 May raise ValueError if the layer name isn't acceptable.\n\
182 "));
184 PyObject *scribus_layerblend(PyObject * /*self*/, PyObject* args);
185 
187 PyDoc_STRVAR(scribus_layertrans__doc__,
188 QT_TR_NOOP("setLayerTransparency(\"layer\", trans)\n\
189 \n\
190 Sets the layers \"layer\" transparency to trans.\n\
191 \n\
192 May raise NotFoundError if the layer can't be found.\n\
193 May raise ValueError if the layer name isn't acceptable.\n\
194 "));
196 PyObject *scribus_layertrans(PyObject * /*self*/, PyObject* args);
197 
199 PyDoc_STRVAR(scribus_glayervisib__doc__,
200 QT_TR_NOOP("isLayerVisible(\"layer\") -> bool\n\
201 \n\
202 Returns whether the layer \"layer\" is visible or not, a value of True means\n\
203 that the layer \"layer\" is visible, a value of False means that the layer\n\
204 \"layer\" is invisible.\n\
205 \n\
206 May raise NotFoundError if the layer can't be found.\n\
207 May raise ValueError if the layer name isn't acceptable.\n\
208 "));
210 PyObject *scribus_glayervisib(PyObject * /*self*/, PyObject* args);
211 
213 PyDoc_STRVAR(scribus_glayerprint__doc__,
214 QT_TR_NOOP("isLayerPrintable(\"layer\") -> bool\n\
215 \n\
216 Returns whether the layer \"layer\" is printable or not, a value of True means\n\
217 that the layer \"layer\" can be printed, a value of False means that printing\n\
218 the layer \"layer\" is disabled.\n\
219 \n\
220 May raise NotFoundError if the layer can't be found.\n\
221 May raise ValueError if the layer name isn't acceptable.\n\
222 "));
224 PyObject *scribus_glayerprint(PyObject * /*self*/, PyObject* args);
225 
227 PyDoc_STRVAR(scribus_glayerlock__doc__,
228 QT_TR_NOOP("isLayerLocked(\"layer\") -> bool\n\
229 \n\
230 Returns whether the layer \"layer\" is locked or not, a value of True means\n\
231 that the layer \"layer\" is editable, a value of False means that the layer\n\
232 \"layer\" is locked.\n\
233 \n\
234 May raise NotFoundError if the layer can't be found.\n\
235 May raise ValueError if the layer name isn't acceptable.\n\
236 "));
238 PyObject *scribus_glayerlock(PyObject * /*self*/, PyObject* args);
239 
241 PyDoc_STRVAR(scribus_glayeroutline__doc__,
242 QT_TR_NOOP("isLayerOutlined(\"layer\") -> bool\n\
243 \n\
244 Returns whether the layer \"layer\" is outlined or not, a value of True means\n\
245 that the layer \"layer\" is outlined, a value of False means that the layer\n\
246 \"layer\" is normal.\n\
247 \n\
248 May raise NotFoundError if the layer can't be found.\n\
249 May raise ValueError if the layer name isn't acceptable.\n\
250 "));
252 PyObject *scribus_glayeroutline(PyObject * /*self*/, PyObject* args);
253 
255 PyDoc_STRVAR(scribus_glayerflow__doc__,
256 QT_TR_NOOP("isLayerFlow(\"layer\") -> bool\n\
257 \n\
258 Returns whether text flows around objects on layer \"layer\", a value of True means\n\
259 that text flows around, a value of False means that the text does not flow around.\n\
260 \n\
261 May raise NotFoundError if the layer can't be found.\n\
262 May raise ValueError if the layer name isn't acceptable.\n\
263 "));
265 PyObject *scribus_glayerflow(PyObject * /*self*/, PyObject* args);
266 
268 PyDoc_STRVAR(scribus_glayerblend__doc__,
269 QT_TR_NOOP("getLayerBlendmode(\"layer\") -> int\n\
270 \n\
271 Returns the \"layer\" layer blendmode,\n\
272 \n\
273 May raise NotFoundError if the layer can't be found.\n\
274 May raise ValueError if the layer name isn't acceptable.\n\
275 "));
277 PyObject *scribus_glayerblend(PyObject * /*self*/, PyObject* args);
278 
280 PyDoc_STRVAR(scribus_glayertrans__doc__,
281 QT_TR_NOOP("getLayerTransparency(\"layer\") -> float\n\
282 \n\
283 Returns the \"layer\" layer transparency,\n\
284 \n\
285 May raise NotFoundError if the layer can't be found.\n\
286 May raise ValueError if the layer name isn't acceptable.\n\
287 "));
289 PyObject *scribus_glayertrans(PyObject * /*self*/, PyObject* args);
290 
292 PyDoc_STRVAR(scribus_removelayer__doc__,
293 QT_TR_NOOP("deleteLayer(\"layer\")\n\
294 \n\
295 Deletes the layer with the name \"layer\". Nothing happens if the layer doesn't\n\
296 exists or if it's the only layer in the document.\n\
297 \n\
298 May raise NotFoundError if the layer can't be found.\n\
299 May raise ValueError if the layer name isn't acceptable.\n\
300 "));
302 PyObject *scribus_removelayer(PyObject * /*self*/, PyObject* args);
303 
305 PyDoc_STRVAR(scribus_createlayer__doc__,
306 QT_TR_NOOP("createLayer(layer)\n\
307 \n\
308 Creates a new layer with the name \"name\".\n\
309 \n\
310 May raise ValueError if the layer name isn't acceptable.\n\
311 "));
313 PyObject *scribus_createlayer(PyObject * /*self*/, PyObject* args);
314 
316 PyDoc_STRVAR(scribus_filequit__doc__,
317 QT_TR_NOOP("fileQuit()\n\
318 \n\
319 Quit Scribus.\n\
320 "));
322 PyObject *scribus_filequit(PyObject * /*self*/, PyObject* args);
323 
325 PyDoc_STRVAR(scribus_getlanguage__doc__,
326 QT_TR_NOOP("getGuiLanguage() -> string\n\
327 \n\
328 Returns a string with the -lang value.\n\
329 "));
331 PyObject *scribus_getlanguage(PyObject * /*self*/);
332 
334 PyDoc_STRVAR(scribus_moveselectiontofront__doc__,
335 QT_TR_NOOP("moveSelectionToFront()\n\
336 \n\
337 Moves current selection to front.\n\
338 "));
340 PyObject *scribus_moveselectiontofront(PyObject*);
341 
343 PyDoc_STRVAR(scribus_moveselectiontoback__doc__,
344 QT_TR_NOOP("moveSelectionToFront()\n\
345 \n\
346 Moves current selection to back.\n\
347 "));
349 PyObject *scribus_moveselectiontoback(PyObject*);
350 
351 PyDoc_STRVAR(scribus_savepdfoptions__doc__,
352 QT_TR_NOOP("savePDFOptions(fileName)\n\
353 \n\
354 Save PDF options to fileName.\n\
355 "));
356 PyObject *scribus_savepdfoptions(PyObject* /* self */, PyObject* args);
357 
358 PyDoc_STRVAR(scribus_readpdfoptions__doc__,
359 QT_TR_NOOP("readPDFOptions(fileName)\n\
360 \n\
361 Read PDF options from fileName.\n\
362 "));
363 PyObject *scribus_readpdfoptions(PyObject* /* self */, PyObject* args);
364 
365 #endif
366 
367