Scribus
Open source desktop publishing at your fingertips
cmdmani.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 CMDMANI_H
8 #define CMDMANI_H
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 
16 PyDoc_STRVAR(scribus_moveobjrel__doc__,
17 QT_TR_NOOP("moveObject(dx, dy [, \"name\"])\n\
18 \n\
19 Moves the object \"name\" by dx and dy relative to its current position. The\n\
20 distances are expressed in the current measurement unit of the document (see\n\
21 UNIT constants). If \"name\" is not given the currently selected item is used.\n\
22 If the object \"name\" belongs to a group, the whole group is moved.\n\
23 "));
25 PyObject *scribus_moveobjrel(PyObject * /*self*/, PyObject* args);
26 
28 PyDoc_STRVAR(scribus_moveobjabs__doc__,
29 QT_TR_NOOP("moveObjectAbs(x, y [, \"name\"])\n\
30 \n\
31 Moves the object \"name\" to a new location. The coordinates are expressed in\n\
32 the current measurement unit of the document (see UNIT constants). If \"name\"\n\
33 is not given the currently selected item is used. If the object \"name\"\n\
34 belongs to a group, the whole group is moved.\n\
35 "));
37 PyObject *scribus_moveobjabs(PyObject * /*self*/, PyObject* args);
38 
40 PyDoc_STRVAR(scribus_rotobjrel__doc__,
41 QT_TR_NOOP("rotateObject(rot [, \"name\"])\n\
42 \n\
43 Rotates the object \"name\" by \"rot\" degrees relatively. The object is\n\
44 rotated by the vertex that is currently selected as the rotation point - by\n\
45 default, the top left vertex at zero rotation. Positive values mean counter\n\
46 clockwise rotation when the default rotation point is used. If \"name\" is not\n\
47 given the currently selected item is used.\n\
48 "));
50 PyObject *scribus_rotobjrel(PyObject * /*self*/, PyObject* args);
51 
53 PyDoc_STRVAR(scribus_rotobjabs__doc__,
54 QT_TR_NOOP("rotateObjectAbs(rot [, \"name\"])\n\
55 \n\
56 Sets the rotation of the object \"name\" to \"rot\". Positive values\n\
57 mean counter clockwise rotation. If \"name\" is not given the currently\n\
58 selected item is used.\n\
59 "));
61 PyObject *scribus_rotobjabs(PyObject * /*self*/, PyObject* args);
62 
64 PyDoc_STRVAR(scribus_sizeobjabs__doc__,
65 QT_TR_NOOP("sizeObject(width, height [, \"name\"])\n\
66 \n\
67 Resizes the object \"name\" to the given width and height. If \"name\"\n\
68 is not given the currently selected item is used.\n\
69 "));
71 PyObject *scribus_sizeobjabs(PyObject * /*self*/, PyObject* args);
72 
74 PyDoc_STRVAR(scribus_getselobjnam__doc__,
75 QT_TR_NOOP("getSelectedObject([nr]) -> string\n\
76 \n\
77 Returns the name of the selected object. \"nr\" if given indicates the number\n\
78 of the selected object, e.g. 0 means the first selected object, 1 means the\n\
79 second selected Object and so on.\n\
80 "));
82 PyObject *scribus_getselobjnam(PyObject * /*self*/, PyObject* args);
83 
85 PyDoc_STRVAR(scribus_selcount__doc__,
86 QT_TR_NOOP("selectionCount() -> integer\n\
87 \n\
88 Returns the number of selected objects.\n\
89 "));
91 PyObject *scribus_selcount(PyObject * /*self*/);
92 
94 PyDoc_STRVAR(scribus_selectobj__doc__,
95 QT_TR_NOOP("selectObject(\"name\")\n\
96 \n\
97 Selects the object with the given \"name\".\n\
98 "));
100 PyObject *scribus_selectobj(PyObject * /*self*/, PyObject* args);
101 
103 PyDoc_STRVAR(scribus_deselect__doc__,
104 QT_TR_NOOP("deselectAll()\n\
105 \n\
106 Deselects all objects in the whole document.\n\
107 "));
109 PyObject *scribus_deselect(PyObject * /*self*/);
110 
112 PyDoc_STRVAR(scribus_groupobj__doc__,
113 QT_TR_NOOP("groupObjects(list) -> string\n\
114 \n\
115 Groups the objects named in \"list\" together. \"list\" must contain the names\n\
116 of the objects to be grouped. If \"list\" is not given the currently selected\n\
117 items are used. Returns the group name for further referencing.\n\
118 "));
120 PyObject *scribus_groupobj(PyObject * /*self*/, PyObject* args);
121 
123 PyDoc_STRVAR(scribus_ungroupobj__doc__,
124 QT_TR_NOOP("unGroupObjects(\"name\")\n\n\
125 Destructs the group the object \"name\" belongs to.\
126 If \"name\" is not given the currently selected item is used."));
128 PyObject *scribus_ungroupobj(PyObject * /*self*/, PyObject* args);
129 
131 PyDoc_STRVAR(scribus_scalegroup__doc__,
132 QT_TR_NOOP("scaleGroup(factor [,\"name\"])\n\
133 \n\
134 Scales the group the object \"name\" belongs to. Values greater than 1 enlarge\n\
135 the group, values smaller than 1 make the group smaller e.g a value of 0.5\n\
136 scales the group to 50 % of its original size, a value of 1.5 scales the group\n\
137 to 150 % of its original size. The value for \"factor\" must be greater than\n\
138 0. If \"name\" is not given the currently selected item is used.\n\
139 \n\
140 May raise ValueError if an invalid scale factor is passed.\n\
141 "));
143 PyObject *scribus_scalegroup(PyObject * /*self*/, PyObject* args);
144 
146 PyDoc_STRVAR(scribus_loadimage__doc__,
147 QT_TR_NOOP("loadImage(\"filename\" [, \"name\"])\n\
148 \n\
149 Loads the picture \"picture\" into the image frame \"name\". If \"name\" is\n\
150 not given the currently selected item is used.\n\
151 \n\
152 May raise WrongFrameTypeError if the target frame is not an image frame\n\
153 "));
155 PyObject *scribus_loadimage(PyObject * /*self*/, PyObject* args);
156 
158 PyDoc_STRVAR(scribus_scaleimage__doc__,
159 QT_TR_NOOP("scaleImage(x, y [, \"name\"])\n\
160 \n\
161 Sets the internal scaling factors of the picture in the image frame \"name\".\n\
162 If \"name\" is not given the currently selected item is used. A number of 1\n\
163 means 100 %. Internal scaling factors are different from the values shown on \n\
164 properties palette. Note : deprecated, use setImageScale() instead.\n\
165 \n\
166 May raise WrongFrameTypeError if the target frame is not an image frame\n\
167 "));
169 PyObject *scribus_scaleimage(PyObject * /*self*/, PyObject* args);
170 
172 PyDoc_STRVAR(scribus_setimageoffset__doc__,
173 QT_TR_NOOP("setImageOffset(x, y [, \"name\"])\n\
174 \n\
175 Sets the position of the picture in the image frame \"name\".\n\
176 If \"name\" is not given the currently selected item is used.\n\
177 The specified offset values are equal to the values shown on \n\
178 properties palette when point unit is used.\n\
179 \n\
180 May raise WrongFrameTypeError if the target frame is not an image frame\n\
181 "));
183 PyObject *scribus_setimageoffset(PyObject * /*self*/, PyObject* args);
184 
186 PyDoc_STRVAR(scribus_setimagescale__doc__,
187 QT_TR_NOOP("setImageScale(x, y [, \"name\"])\n\
188 \n\
189 Sets the scaling factors of the picture in the image frame \"name\".\n\
190 If \"name\" is not given the currently selected item is used. A number of 1\n\
191 means 100 %. Scaling factors are equal to the values shown on properties palette.\n\
192 \n\
193 May raise WrongFrameTypeError if the target frame is not an image frame\n\
194 "));
196 PyObject *scribus_setimagescale(PyObject * /*self*/, PyObject* args);
197 
199 PyDoc_STRVAR(scribus_setimagebrightness__doc__,
200 QT_TR_NOOP("setImageBrightness(n [, \"name\"])\n\
201 \n\
202 Set image brightness effect of the picture in the image frame \"name\".\n\
203 If \"name\" is not given the currently selected item is used. A number of 1\n\
204 means 100 %. Brightness factor is equal to the value shown on properties palette.\n\
205 \n\
206 May raise WrongFrameTypeError if the target frame is not an image frame\n\
207 "));
209 PyObject *scribus_setimagebrightness(PyObject * /*self*/, PyObject* args);
210 
212 PyDoc_STRVAR(scribus_setimagegrayscale__doc__,
213 QT_TR_NOOP("setImageGrayscale([\"name\"])\n\
214 \n\
215 Set image grayscale effect of the picture in the image frame \"name\".\n\
216 If \"name\" is not given the currently selected item is used.\n\
217 \n\
218 May raise WrongFrameTypeError if the target frame is not an image frame\n\
219 "));
221 PyObject *scribus_setimagegrayscale(PyObject * /*self*/, PyObject* args);
222 
224 PyDoc_STRVAR(scribus_lockobject__doc__,
225 QT_TR_NOOP("lockObject([\"name\"]) -> bool\n\
226 \n\
227 Locks the object \"name\" if it's unlocked or unlock it if it's locked.\n\
228 If \"name\" is not given the currently selected item is used. Returns true\n\
229 if locked.\n\
230 "));
232 PyObject *scribus_lockobject(PyObject * /*self*/, PyObject* args);
233 
235 PyDoc_STRVAR(scribus_islocked__doc__,
236 QT_TR_NOOP("isLocked([\"name\"]) -> bool\n\
237 \n\
238 Returns true if is the object \"name\" locked. If \"name\" is not given the\n\
239 currently selected item is used.\n\
240 "));
242 PyObject *scribus_islocked(PyObject * /*self*/, PyObject* args);
243 
244 PyDoc_STRVAR(scribus_setscaleimagetoframe__doc__,
245 QT_TR_NOOP("setScaleImageToFrame(scaletoframe, proportional=None, name=<selection>)\n\
246 \n\
247 Sets the scale to frame on the selected or specified image frame to `scaletoframe'.\n\
248 If `proportional' is specified, set fixed aspect ratio scaling to `proportional'.\n\
249 Both `scaletoframe' and `proportional' are boolean.\n\
250 \n\
251 May raise WrongFrameTypeError.\n\
252 "));
253 PyObject *scribus_setscaleimagetoframe(PyObject * /*self*/, PyObject* args, PyObject* kwargs);
254 
256 PyDoc_STRVAR(scribus_flipobject__doc__,
257 QT_TR_NOOP("flipObject(H,V,[\"name\"])\n\
258 \n\
259 Toggle the object \"name\" horizontal and/or vertical flip.\n\
260 If \"name\" is not given the currently selected item is used.\n\
261 "));
263 PyObject *scribus_flipobject(PyObject * /*self*/, PyObject* args);
264 
265 #endif