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 CMDTEXT_H
8 #define CMDTEXT_H
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 
13 /*! Text frame handling */
14 
15 /*! docstring */
16 PyDoc_STRVAR(scribus_getfontsize__doc__,
17 QT_TR_NOOP("getFontSize([\"name\"]) -> float\n\
18 \n\
19 Returns the font size in points for the text frame \"name\". If this text\n\
20 frame has some text selected the value assigned to the first character of\n\
21 the selection is returned.\n\
22 If \"name\" is not given the currently selected item is used.\n\
23 "));
24 /*! Get font size */
25 PyObject *scribus_getfontsize(PyObject * /*self*/, PyObject* args);
26 
27 /*! docstring */
28 PyDoc_STRVAR(scribus_getfont__doc__,
29 QT_TR_NOOP("getFont([\"name\"]) -> string\n\
30 \n\
31 Returns the font name for the text frame \"name\". If this text frame\n\
32 has some text selected the value assigned to the first character\n\
33 of the selection is returned. If \"name\" is not given the currently\n\
34 selected item is used.\n\
35 "));
36 /*! Get font */
37 PyObject *scribus_getfont(PyObject * /*self*/, PyObject* args);
38 
39 /*! docstring */
40 PyDoc_STRVAR(scribus_getfontfeatures__doc__,
41 QT_TR_NOOP("getFontFeatures([\"name\"]) -> string\n\
42 \n\
43 Returns the font features for the text frame \"name\". If this text frame\n\
44 has some text selected the value assigned to the first character\n\
45 of the selection is returned. If \"name\" is not given the currently\n\
46 selected item is used.\n\
47 "));
48 /*! Get fontfeatures */
49 PyObject *scribus_getfontfeatures(PyObject * /*self*/, PyObject* args);
50 
51 /*! docstring */
52 PyDoc_STRVAR(scribus_getfirstlinkedframe__doc__,
53 QT_TR_NOOP("getFirstLinkedFrame(item: str = None) -> str\n\
54 \n\
55 Return the first text frame in the chain.\n\
56 \n\
57 If \"name\" is not given the currently selected item is used.\n\
58 "));
59 /*!  Get the name of the first text frame in the chain */
60 PyObject *scribus_getfirstlinkedframe(PyObject * /*self*/, PyObject* args);
61 
62 /*! docstring */
63 PyDoc_STRVAR(scribus_getlastlinkedframe__doc__,
64 QT_TR_NOOP("getLastLinkedFrame(item: str = None) -> str\n\
65 \n\
66 Return the last text frame in the chain.\n\
67 \n\
68 If \"name\" is not given the currently selected item is used.\n\
69 "));
70 /*!  Get the name of the last text frame in the chain */
71 PyObject *scribus_getlastlinkedframe(PyObject * /*self*/, PyObject* args);
72 
73 /*! docstring */
74 PyDoc_STRVAR(scribus_getnextlinkedframe__doc__,
75 QT_TR_NOOP("getNextLinkedFrame(item: str = None) -> str\n\
76 \n\
77 Return the next text frame in the chain or None\n\
78 if specified frame is the last frame in the chain.\n\
79 \n\
80 If \"name\" is not given the currently selected item is used.\n\
81 "));
82 /*!  Get the name of the next frame in the chain */
83 PyObject *scribus_getnextlinkedframe(PyObject * /*self*/, PyObject* args);
84 
85 /*! docstring */
86 PyDoc_STRVAR(scribus_getprevlinkedframe__doc__,
87 QT_TR_NOOP("getPrevLinkedFrame(item: str = None) -> str\n\
88 \n\
89 Return the previous text frame in the chain or None\n\
90 if specified frame is the first frame in the chain.\n\
91 \n\
92 If \"name\" is not given the currently selected item is used.\n\
93 "));
94 /*!  Get the name of the previous frame in the chain */
95 PyObject *scribus_getprevlinkedframe(PyObject * /*self*/, PyObject* args);
96 
97 /*! docstring */
98 PyDoc_STRVAR(scribus_gettextcolor__doc__,
99 	QT_TR_NOOP("getTextColor([\"name\"]) -> string\n\
100 \n\
101 Returns the name of the text color used for text frame \"name\".\n\
102 If this text frame has some text selected the value assigned\n\
103 to the first character of the selection is returned.\n\
104 If \"name\" is not given the currently selected item is used.\n\
105 "));
106 /*! Returns color of the line */
107 PyObject *scribus_gettextcolor(PyObject * /*self*/, PyObject* args);
108 
109 /*! docstring */
110 PyDoc_STRVAR(scribus_gettextshade__doc__,
111 	QT_TR_NOOP("getTextShade([\"name\"]) -> integer\n\
112 \n\
113 Returns the shade of text color used for text frame \"name\".\n\
114 If this text frame has some text selected the value assigned\n\
115 to the first character of the selection is returned.\n\
116 If \"name\" is not given the currently selected item is used.\n\
117 "));
118 /*! Returns color of the line */
119 PyObject *scribus_gettextshade(PyObject * /*self*/, PyObject* args);
120 
121 /*! docstring */
122 PyDoc_STRVAR(scribus_gettextlength__doc__,
123 QT_TR_NOOP("getTextLength([\"name\"]) -> integer\n\
124 \n\
125 Returns the length of the text in the text frame \"name\".\n\
126 If \"name\" is not given the currently selected item is used.\n\
127 "));
128 /*! Get text size */
129 PyObject *scribus_gettextlength(PyObject * /*self*/, PyObject* args);
130 
131 /*! docstring */
132 PyDoc_STRVAR(scribus_gettextlines__doc__,
133 QT_TR_NOOP("getTextLines([\"name\"]) -> integer\n\
134 \n\
135 Returns the number of lines of the text in the text frame \"name\".\n\
136 If \"name\" is not given the currently selected item is used.\n\
137 \n\
138 As this function depends on text layout being up-to-date, you may need to call \n\
139 layoutText() or layoutTextChain() before calling this function in order to get \n\
140 expected result.\n\
141 "));
142 /*! Get text lines */
143 PyObject *scribus_gettextlines(PyObject * /*self*/, PyObject* args);
144 
145 /*! docstring */
146 PyDoc_STRVAR(scribus_getframetext__doc__,
147 QT_TR_NOOP("getFrameText([\"name\"]) -> string\n\
148 \n\
149 Returns the text visible in text frame \"name\". If this text frame has some text\n\
150 selected, the selected text is returned. If \"name\" is not given the currently\n\
151 selected item is used.\n\
152 \n\
153 This function returns only the text visible in specified frame. If you need to \n\
154 retrieve the text contained in a text chain, use getAllText() instead.\n\
155 \n\
156 As this function depends on text layout being up-to-date, you may need to call \n\
157 layoutText() or layoutTextChain() before calling this function in order to get \n\
158 expected result.\n\
159 "));
160 PyDoc_STRVAR(scribus_gettext__doc__,
161 QT_TR_NOOP("getText([\"name\"]) -> string\n\
162 \n\
163 Deprecated. Use getFrameText() instead.\n\
164 "));
165 /*! Get frame text */
166 PyObject *scribus_getframetext(PyObject * /*self*/, PyObject* args);
167 
168 /*! docstring */
169 PyDoc_STRVAR(scribus_getalltext__doc__,
170 QT_TR_NOOP("getAllText([\"name\"]) -> string\n\
171 \n\
172 Returns the text of the text frame \"name\" and of all text frames which are\n\
173 linked with this frame. If this textframe has some text selected, the selected\n\
174 text is returned. If \"name\" is not given the currently selected item is\n\
175 used.\n\
176 "));
177 /*! Get all text */
178 PyObject *scribus_getalltext(PyObject * /*self*/, PyObject* args);
179 
180 /*! docstring */
181 PyDoc_STRVAR(scribus_getfirstlineoffset__doc__,
182 	QT_TR_NOOP("getFirstLineOffset([\"name\"]) -> integer\n\
183 \n\
184 Gets the offset of the first line of text inside text frame \"name\".\n\
185 If \"name\" is not given the currently selected item is used.\n\
186 "));
187 /*! Get columns */
188 PyObject *scribus_getfirstlineoffset(PyObject * /*self*/, PyObject* args);
189 
190 /*! docstring */
191 PyDoc_STRVAR(scribus_getlinespacing__doc__,
192 QT_TR_NOOP("getLineSpacing([\"name\"]) -> float\n\
193 \n\
194 Returns the line spacing (\"leading\") of the text frame \"name\" expressed in\n\
195 points. If \"name\" is not given the currently selected item is used.\n\
196 "));
197 /*! Get line space */
198 PyObject *scribus_getlinespacing(PyObject * /*self*/, PyObject* args);
199 
200 /*! docstring */
201 PyDoc_STRVAR(scribus_gettextdistances__doc__,
202 QT_TR_NOOP("getTextDistances([\"name\"]) -> tuple\n\
203 \n\
204 Returns the text distances of the text frame \"name\" expressed in points. The\n\
205 distances are returned as a tuple like (left, right, top, bottom). If \"name\"\n\
206 is not given the currently selected item is used.\n\
207 "));
208 /*! Get text distances */
209 PyObject *scribus_gettextdistances(PyObject */*self*/, PyObject* args);
210 
211 /*! docstring */
212 PyDoc_STRVAR(scribus_gettextverticalalignment__doc__,
213 	QT_TR_NOOP("getTextVerticalAlignment([\"name\"]) -> integer\n\
214 \n\
215 Gets the vertical alignment of text inside text frame \"name\". If \"name\" is not\n\
216 given the currently selected item is used.\n\
217 "));
218 /*! Get columns */
219 PyObject *scribus_gettextverticalalignment(PyObject * /*self*/, PyObject* args);
220 
221 /*! docstring */
222 PyDoc_STRVAR(scribus_getcolumngap__doc__,
223 QT_TR_NOOP("getColumnGap([\"name\"]) -> float\n\
224 \n\
225 Returns the column gap size of the text frame \"name\" expressed in points. If\n\
226 \"name\" is not given the currently selected item is used.\n\
227 "));
228 /*! Get column gap */
229 PyObject *scribus_getcolumngap(PyObject * /*self*/, PyObject* args);
230 
231 /*! docstring */
232 PyDoc_STRVAR(scribus_getcolumns__doc__,
233 QT_TR_NOOP("getColumns([\"name\"]) -> integer\n\
234 \n\
235 Gets the number of columns of the text frame \"name\". If \"name\" is not\n\
236 given the currently selected item is used.\n\
237 "));
238 /*! Get columns */
239 PyObject *scribus_getcolumns(PyObject * /*self*/, PyObject* args);
240 
241 /*! docstring */
242 PyDoc_STRVAR(scribus_settext__doc__,
243 QT_TR_NOOP("setText(\"text\", [\"name\"])\n\
244 \n\
245 Sets the text of the text frame \"name\" to the text of the string \"text\".\n\
246 Text must be UTF8 encoded - use e.g. unicode(text, 'iso-8859-2'). See the FAQ\n\
247 for more details. If \"name\" is not given the currently selected item is\n\
248 used.\n\
249 "));
250 /*! Set text */
251 PyObject *scribus_settext(PyObject * /*self*/, PyObject* args);
252 
253 /*! docstring */
254 PyDoc_STRVAR(scribus_inserttext__doc__,
255 QT_TR_NOOP("insertText(\"text\", pos, [\"name\"])\n\
256 \n\
257 Inserts the text \"text\" at the position \"pos\" into the text frame \"name\".\n\
258 Text must be UTF encoded (see setText() as reference) The first character has an\n\
259 index of 0. Inserting text at position -1 appends it to the frame. If \"name\" is\n\
260 not given the currently selected item is used.\n\
261 \n\
262 For performance reason, this function does not update text layout in any way. \n\
263 As a consequence, you may need to call layoutText() or layoutTextChain() at appropriate \n\
264 times after calling this function and before calling functions such as getFrameText() \n\
265 or getTextLines().\n\
266 \n\
267 May throw IndexError for an insertion out of bounds.\n\
268 "));
269 /*! Insert text */
270 PyObject *scribus_inserttext(PyObject * /*self*/, PyObject* args);
271 
272 /*! docstring */
273 PyDoc_STRVAR(scribus_inserthtmltext__doc__,
274 QT_TR_NOOP("insertHTMLText(\"file\", [\"name\"])\n\
275 \n\
276 Inserts the text from \"file\" into the text frame \"name\".\n\
277 Text must be UTF encoded (see setText() as reference). If \"name\" is\n\
278 not given the currently selected Item is used.\n\
279 "));
280 /*! Insert HTML text */
281 PyObject *scribus_inserthtmltext(PyObject * /*self*/, PyObject* args);
282 
283 /*! docstring */
284 PyDoc_STRVAR(scribus_layouttext__doc__,
285 QT_TR_NOOP("layoutText([\"name\"])\n\
286 \n\
287 Relayout text in the text frame \"name\". If \"name\" is not given the currently\n\
288 selected item is used.\n\
289 "));
290 /*! Delete text */
291 PyObject *scribus_layouttext(PyObject * /*self*/, PyObject* args);
292 
293 /*! docstring */
294 PyDoc_STRVAR(scribus_layouttextchain__doc__,
295 QT_TR_NOOP("layoutTextChain([\"name\"])\n\
296 \n\
297 Relayout the whole text chain whom the text frame \"name\" belongs.\n\
298 If \"name\" is not given the currently selected item is used.\n\
299 "));
300 /*! Delete text */
301 PyObject *scribus_layouttextchain(PyObject * /*self*/, PyObject* args);
302 
303 /*! docstring */
304 PyDoc_STRVAR(scribus_setfont__doc__,
305 QT_TR_NOOP("setFont(\"font\", [\"name\"])\n\
306 \n\
307 Sets the font of the text frame \"name\" to \"font\". If there is some text\n\
308 selected only the selected text is changed.  If \"name\" is not given the\n\
309 currently selected item is used.\n\
310 \n\
311 May throw ValueError if the font cannot be found.\n\
312 "));
313 /*! Set font */
314 PyObject *scribus_setfont(PyObject * /*self*/, PyObject* args);
315 
316 /*! docstring */
317 PyDoc_STRVAR(scribus_setfontfeatures__doc__,
318 QT_TR_NOOP("setFontFeatures(\"fontfeature\", [\"name\"])\n\
319 \n\
320 Sets the font features of the text frame \"name\" to \"fontfeature\". If there is some text\n\
321 selected only the selected text is changed.  If \"name\" is not given the\n\
322 currently selected item is used.\n\
323 \n\
324 May throw ValueError if the font cannot be found.\n\
325 "));
326 /*! Set font features */
327 PyObject *scribus_setfontfeatures(PyObject * /*self*/, PyObject* args);
328 
329 /*! docstring */
330 PyDoc_STRVAR(scribus_setfontsize__doc__,
331 QT_TR_NOOP("setFontSize(size, [\"name\"])\n\
332 \n\
333 Sets the font size of the text frame \"name\" to \"size\". \"size\" is treated\n\
334 as a value in points. If there is some text selected only the selected text is\n\
335 changed. \"size\" must be in the range 1 to 512. If \"name\" is not given the\n\
336 currently selected item is used.\n\
337 \n\
338 May throw ValueError for a font size that's out of bounds.\n\
339 "));
340 /*! Set font size */
341 PyObject *scribus_setfontsize(PyObject * /*self*/, PyObject* args);
342 
343 /*! docstring */
344 PyDoc_STRVAR(scribus_setfirstlineoffset__doc__,
345 	QT_TR_NOOP("setFirstLineOffset(offset, [\"name\"])\n\
346 \n\
347 Sets the offset of the first line of text inside text frame \"name\" to the specified\n\
348 offset policy. If \"name\" is not given the currently selected item is used. \"offset\" \n\
349 should be one of the FLOP_* constants defined in this module - see dir(scribus).\n\
350 \n\
351 May throw ValueError for an invalid offset constant.\n\
352 "));
353 /*! Set vertical alignment */
354 PyObject *scribus_setfirstlineoffset(PyObject * /*self*/, PyObject* args);
355 
356 /*! docstring */
357 PyDoc_STRVAR(scribus_setlinespacing__doc__,
358 QT_TR_NOOP("setLineSpacing(size, [\"name\"])\n\
359 \n\
360 Sets the line spacing (\"leading\") of the text frame \"name\" to \"size\".\n\
361 \"size\" is a value in points. If \"name\" is not given the currently selected\n\
362 item is used.\n\
363 \n\
364 May throw ValueError if the line spacing is out of bounds.\n\
365 "));
366 /*! Set line space */
367 PyObject *scribus_setlinespacing(PyObject * /*self*/, PyObject* args);
368 
369 /*! docstring */
370 PyDoc_STRVAR(scribus_setlinespacingmode__doc__,
371 QT_TR_NOOP("setLineSpacingMode(mode, [\"name\"])\n\
372 \n\
373 Sets the line spacing mode of the text frame \"name\" to \"mode\".\n\
374 If \"name\" is not given the currently selected\n\
375 item is used.\n\
376 Mode values are the same as in createParagraphStyle.\n\
377 \n\
378 May throw ValueError if the mode is out of bounds.\n\
379 "));
380 /*! Set line space mode */
381 PyObject *scribus_setlinespacingmode(PyObject * /*self*/, PyObject* args);
382 
383 /*! docstring */
384 PyDoc_STRVAR(scribus_settextdistances__doc__,
385 QT_TR_NOOP("setTextDistances(left, right, top, bottom, [\"name\"])\n\
386 \n\
387 Sets the text distances of the text frame \"name\" to the values \"left\"\n\
388 \"right\", \"top\" and \"bottom\". If \"name\" is not given the currently\n\
389 selected item is used.\n\
390 \n\
391 May throw ValueError if any of the distances are out of bounds (must be positive).\n\
392 "));
393 /*! Set text distances */
394 PyObject *scribus_settextdistances(PyObject */*self*/, PyObject* args);
395 
396 /*! docstring */
397 PyDoc_STRVAR(scribus_setcolumngap__doc__,
398 QT_TR_NOOP("setColumnGap(size, [\"name\"])\n\
399 \n\
400 Sets the column gap of the text frame \"name\" to the value \"size\". If\n\
401 \"name\" is not given the currently selected item is used.\n\
402 \n\
403 May throw ValueError if the column gap is out of bounds (must be positive).\n\
404 "));
405 /*! Set column gap */
406 PyObject *scribus_setcolumngap(PyObject * /*self*/, PyObject* args);
407 
408 /*! docstring */
409 PyDoc_STRVAR(scribus_setcolumns__doc__,
410 QT_TR_NOOP("setColumns(nr, [\"name\"])\n\
411 \n\
412 Sets the number of columns of the text frame \"name\" to the integer \"nr\".\n\
413 If \"name\" is not given the currently selected item is used.\n\
414 \n\
415 May throw ValueError if number of columns is not at least one.\n\
416 "));
417 /*! Set columns */
418 PyObject *scribus_setcolumns(PyObject * /*self*/, PyObject* args);
419 
420 /*! docstring */
421 PyDoc_STRVAR(scribus_settextalignment__doc__,
422 QT_TR_NOOP("setTextAlignment(align, [\"name\"])\n\
423 \n\
424 Sets the text alignment of the text frame \"name\" to the specified alignment.\n\
425 If \"name\" is not given the currently selected item is used. \"align\" should\n\
426 be one of the ALIGN_ constants defined in this module - see dir(scribus).\n\
427 \n\
428 May throw ValueError for an invalid alignment constant.\n\
429 "));
430 /*! Set alignt */
431 PyObject *scribus_settextalignment(PyObject * /*self*/, PyObject* args);
432 
433 /*! docstring */
434 PyDoc_STRVAR(scribus_settextverticalalignment__doc__,
435 	QT_TR_NOOP("setTextVerticalAlignment(align, [\"name\"])\n\
436 \n\
437 Sets the vertical alignment of text inside text frame \"name\" to the specified\n\
438 alignment. If \"name\" is not given the currently selected item is used. \"align\" \n\
439 should be one of the ALIGNV constants defined in this module - see dir(scribus).\n\
440 \n\
441 May throw ValueError for an invalid alignment constant.\n\
442 "));
443 /*! Set vertical alignment */
444 PyObject *scribus_settextverticalalignment(PyObject * /*self*/, PyObject* args);
445 
446 /*! docstring */
447 PyDoc_STRVAR(scribus_setdirection__doc__,
448 QT_TR_NOOP("setTextDirection(direction, [\"name\"])\n\
449 \n\
450 Sets the text direction of the text frame \"name\" to the specified direction.\n\
451 If \"name\" is not given the currently selected item is used. \"direction\" should\n\
452 be one of the DIRECTION_ constants defined in this module - see dir(scribus).\n\
453 \n\
454 May throw ValueError for an invalid direction constant.\n\
455 "));
456 /*! Set direction */
457 PyObject *scribus_setdirection(PyObject * /*self*/, PyObject* args);
458 
459 /*! docstring */
460 PyDoc_STRVAR(scribus_selectframetext__doc__,
461 QT_TR_NOOP("selectFrameText(start, count, [\"name\"])\n\
462 \n\
463 Selects \"count\" characters of text in the text frame \"name\" starting from the\n\
464 character \"start\". Character counting starts at 0.\n\
465 If \"count\" is zero, any text selection will be cleared.\n\
466 If \"count\" is -1, the selection will extend to the end of the frame.\n\
467 If \"name\" is not given the currently selected item is used.\n\
468 \n\
469 This function only acts on the text visible in the specified frame. If you need to \n\
470 work on the text contained in a text chain, use selectText() instead.\n\
471 As this function depends on text layout being up-to-date, you may need to call \n\
472 layoutText() or layoutTextChain() before calling this function in order to get \n\
473 expected result.\n\
474 \n\
475 May throw IndexError if the selection is outside the bounds of the text.\n\
476 "));
477 /*! Select frame text */
478 PyObject *scribus_selectframetext(PyObject * /*self*/, PyObject* args);
479 
480 /*! docstring */
481 PyDoc_STRVAR(scribus_selecttext__doc__,
482 QT_TR_NOOP("selectText(start, count, [\"name\"])\n\
483 \n\
484 Selects \"count\" characters of text in the story of the text frame \"name\" starting from the\n\
485 character \"start\". Character counting starts at 0. If \"count\" is zero, any\n\
486 text selection will be cleared.  If \"name\" is not given the currently\n\
487 selected item is used.\n\
488 \n\
489 May throw IndexError if the selection is outside the bounds of the text.\n\
490 "));
491 /*! Select text */
492 PyObject *scribus_selecttext(PyObject * /*self*/, PyObject* args);
493 
494 /*! docstring */
495 PyDoc_STRVAR(scribus_deletetext__doc__,
496 QT_TR_NOOP("deleteText([\"name\"])\n\
497 \n\
498 Deletes any text in the text frame \"name\". If there is some text selected,\n\
499 only the selected text will be deleted. If \"name\" is not given the currently\n\
500 selected item is used.\n\
501 "));
502 /*! Delete text */
503 PyObject *scribus_deletetext(PyObject * /*self*/, PyObject* args);
504 
505 /*! docstring */
506 PyDoc_STRVAR(scribus_settextfill__doc__,
507 QT_TR_NOOP("setTextColor(\"color\", [\"name\"])\n\
508 \n\
509 Sets the text color of the text frame \"name\" to the color \"color\". If there\n\
510 is some text selected only the selected text is changed. If \"name\" is not\n\
511 given the currently selected item is used.\n\
512 "));
513 /*! Set text fill */
514 PyObject *scribus_settextfill(PyObject * /*self*/, PyObject* args);
515 
516 /*! docstring */
517 PyDoc_STRVAR(scribus_settextstroke__doc__,
518 QT_TR_NOOP("setTextStroke(\"color\", [\"name\"])\n\
519 \n\
520 Set \"color\" of the text stroke. If \"name\" is not given the currently\n\
521 selected item is used.\n\
522 "));
523 /*! Set text stroke */
524 PyObject *scribus_settextstroke(PyObject * /*self*/, PyObject* args);
525 
526 /*! docstring */
527 PyDoc_STRVAR(scribus_settextscalingv__doc__,
528 QT_TR_NOOP("setTextScalingV(scale, [\"name\"])\n\
529 \n\
530 Sets the vertical character scaling of the object \"name\" to \"scale\" in percent.\n\
531 If \"name\" is not given the currently selected item is used.\n\
532 "));
533 /*! Set text shde */
534 PyObject *scribus_settextscalingv(PyObject * /*self*/, PyObject* args);
535 
536 /*! docstring */
537 PyDoc_STRVAR(scribus_settextscalingh__doc__,
538 QT_TR_NOOP("setTextScalingH(scale, [\"name\"])\n\
539 \n\
540 Sets the horizontal character scaling of the object \"name\" to \"scale\" in percent.\n\
541 If \"name\" is not given the currently selected item is used.\n\
542 "));
543 /*! Set text shde */
544 PyObject *scribus_settextscalingh(PyObject * /*self*/, PyObject* args);
545 
546 /*! docstring */
547 PyDoc_STRVAR(scribus_settextshade__doc__,
548 QT_TR_NOOP("setTextShade(shade, [\"name\"])\n\
549 \n\
550 Sets the shading of the text color of the object \"name\" to \"shade\". If\n\
551 there is some text selected only the selected text is changed. \"shade\" must\n\
552 be an integer value in the range from 0 (lightest) to 100 (full color\n\
553 intensity). If \"name\" is not given the currently selected item is\n\
554 used.\n\
555 "));
556 /*! Set text shde */
557 PyObject *scribus_settextshade(PyObject * /*self*/, PyObject* args);
558 
559 /*! docstring */
560 PyDoc_STRVAR(scribus_linktextframes__doc__,
561 QT_TR_NOOP("linkTextFrames(\"fromname\", \"toname\")\n\
562 \n\
563 Link two text frames. The frame named \"fromname\" is linked to the\n\
564 frame named \"toname\". The target frame must be an empty text frame\n\
565 and must not link to or be linked from any other frames already.\n\
566 \n\
567 May throw ScribusException if linking rules are violated.\n\
568 "));
569 /**
570  Link text frames via Scripter.
571  02/22/04 (petr vanek)
572  TODO: PDF bookmarks handling
573  */
574 PyObject *scribus_linktextframes(PyObject * /*self*/, PyObject* args);
575 
576 /*! docstring */
577 PyDoc_STRVAR(scribus_unlinktextframes__doc__,
578 QT_TR_NOOP("unlinkTextFrames(\"name\")\n\
579 \n\
580 Remove the specified (named) object from the text frame flow/linkage. If the\n\
581 frame was in the middle of a chain, the previous and next frames will be\n\
582 connected, eg 'a->b->c' becomes 'a->c' when you unlinkTextFrames(b)'\n\
583 \n\
584 May throw ScribusException if linking rules are violated.\n\
585 "));
586 /**
587  (Un)Link text frames via Scripter.
588  02/22/04 (petr vanek)
589  TODO: PDF bookmarks handling
590  */
591 PyObject *scribus_unlinktextframes(PyObject * self, PyObject* args);
592 
593 /*! docstring */
594 PyDoc_STRVAR(scribus_outlinetext__doc__,
595 QT_TR_NOOP("traceText([\"name\"])\n\
596 \n\
597 Convert the text frame \"name\" to outlines. If \"name\" is not given the\n\
598 currently selected item is used."));
599 PyDoc_STRVAR(scribus_tracetext__doc__,
600 QT_TR_NOOP("traceText([\"name\"])\n\
601 \n\
602 Deprecated, use outlineText() instead."));
603 /**
604  Trace text frames via Scripter.
605  2004-09-07 (Craig Ringer)
606 */
607 PyObject *scribus_outlinetext(PyObject * self, PyObject* args);
608 
609 PyDoc_STRVAR(scribus_istextoverflowing__doc__,
610 QT_TR_NOOP("textOverflows([\"name\", nolinks]) -> integer\n\
611 \n\
612 Returns 1 if there are overflowing characters in text frame \"name\", 0 if not.\n\
613 If is nolinks set to non zero value it takes only one frame - it doesn't\n\
614 use text frame linking. Without this parameter it search all linking chain.\n\
615 \n\
616 May raise WrongFrameTypeError if the target frame is not an text frame\n"));
617 /** Check if is the text frame overflowind or not
618  2005-02-04 petr vanek
619  */
620 PyObject *scribus_istextoverflowing(PyObject * self, PyObject* args, PyObject* kw);
621 
622 PyDoc_STRVAR(scribus_hyphenatetext__doc__,
623 QT_TR_NOOP("hyphenateText([\"name\"]) -> bool\n\
624 \n\
625 Does hyphenation on text frame \"name\".\n\
626 If \"name\" is not given the currently selected item is used.\n\
627 \n\
628 May raise WrongFrameTypeError if the target frame is not a text frame\n\
629 "));
630 /*
631 	Does hyphenation on the given text frame
632 	08.12.2007: Joachim Neu
633 */
634 PyObject *scribus_hyphenatetext(PyObject *, PyObject* args);
635 
636 PyDoc_STRVAR(scribus_dehyphenatetext__doc__,
637 QT_TR_NOOP("dehyphenateText([\"name\"]) -> bool\n\
638 \n\
639 Does dehyphenation on text frame \"name\".\n\
640 If \"name\" is not given the currently selected item is used.\n\
641 \n\
642 May raise WrongFrameTypeError if the target frame is not a text frame\n\
643 "));
644 /*
645 	Does dehyphenation on the given text frame
646 	13.12.2007: Joachim Neu
647 */
648 PyObject *scribus_dehyphenatetext(PyObject *, PyObject* args);
649 
650 /*! docstring */
651 PyDoc_STRVAR(scribus_setpdfbookmark__doc__,
652 QT_TR_NOOP("setPDFBookmark(\"toggle\", [\"name\"])\n\
653 \n\
654 Sets whether (toggle = 1) the text frame \"name\" is a bookmark nor not.\n\
655 If \"name\" is not given the currently selected item is used.\n\
656 \n\
657 May raise WrongFrameTypeError if the target frame is not a text frame\n\
658 "));
659 /*! Set PDF bookmark */
660 PyObject *scribus_setpdfbookmark(PyObject * /*self*/, PyObject* args);
661 
662 /*! docstring */
663 PyDoc_STRVAR(scribus_ispdfbookmark__doc__,
664  QT_TR_NOOP("isPDFBookmark([\"name\"]) -> bool\n\
665 \n\
666 Returns true if the text frame \"name\" is a PDF bookmark.\n\
667 If \"name\" is not given the currently selected item is used.\n\
668 \n\
669 May raise WrongFrameTypeError if the target frame is not a text frame\n\
670 "));
671 /*! Is PDF bookmark? */
672 PyObject *scribus_ispdfbookmark(PyObject * /*self*/, PyObject* args);
673 
674 #endif
675