Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmdobj.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef CMDOBJ_H
00008 #define CMDOBJ_H
00009 
00010 // Pulls in <Python.h> first
00011 #include "cmdvar.h"
00012 
00016 PyDoc_STRVAR(scribus_newrect__doc__,
00017 QT_TR_NOOP("createRect(x, y, width, height, [\"name\"]) -> string\n\
00018 \n\
00019 Creates a new rectangle on the current page and returns its name. The\n\
00020 coordinates are given in the current measurement units of the document\n\
00021 (see UNIT constants). \"name\" should be a unique identifier for the object\n\
00022 because you need this name to reference that object in future. If \"name\"\n\
00023 is not given Scribus will create one for you.\n\
00024 \n\
00025 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00026 "));
00030 PyObject *scribus_newrect(PyObject */*self*/, PyObject* args);
00031 
00033 PyDoc_STRVAR(scribus_newellipse__doc__,
00034 QT_TR_NOOP("createEllipse(x, y, width, height, [\"name\"]) -> string\n\
00035 \n\
00036 Creates a new ellipse on the current page and returns its name.\n\
00037 The coordinates are given in the current measurement units of the document\n\
00038 (see UNIT constants). \"name\" should be a unique identifier for the object\n\
00039 because you need this name for further referencing of that object. If \"name\"\n\
00040 is not given Scribus will create one for you.\n\
00041 \n\
00042 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00043 "));
00047 PyObject *scribus_newellipse(PyObject */*self*/, PyObject* args);
00048 
00050 PyDoc_STRVAR(scribus_newimage__doc__,
00051 QT_TR_NOOP("createImage(x, y, width, height, [\"name\"]) -> string\n\
00052 \n\
00053 Creates a new picture frame on the current page and returns its name. The\n\
00054 coordinates are given in the current measurement units of the document.\n\
00055 \"name\" should be a unique identifier for the object because you need this\n\
00056 name for further access to that object. If \"name\" is not given Scribus will\n\
00057 create one for you.\n\
00058 \n\
00059 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00060 "));
00062 PyObject *scribus_newimage(PyObject */*self*/, PyObject* args);
00063 
00065 PyDoc_STRVAR(scribus_newtext__doc__,
00066 QT_TR_NOOP("createText(x, y, width, height, [\"name\"]) -> string\n\
00067 \n\
00068 Creates a new text frame on the actual page and returns its name.\n\
00069 The coordinates are given in the actual measurement unit of the document (see\n\
00070 UNIT constants). \"name\" should be a unique identifier for the object because\n\
00071 you need this name for further referencing of that object. If \"name\" is not\n\
00072 given Scribus will create one for you.\n\
00073 \n\
00074 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00075 "));
00077 PyObject *scribus_newtext(PyObject */*self*/, PyObject* args);
00078 
00080 PyDoc_STRVAR(scribus_newline__doc__,
00081 QT_TR_NOOP("createLine(x1, y1, x2, y2, [\"name\"]) -> string\n\
00082 \n\
00083 Creates a new line from the point(x1, y1) to the point(x2, y2) and returns\n\
00084 its name. The coordinates are given in the current measurement unit of the\n\
00085 document (see UNIT constants). \"name\" should be a unique identifier for the\n\
00086 object because you need this name for further access to that object. If\n\
00087 \"name\" is not given Scribus will create one for you.\n\
00088 \n\
00089 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00090 "));
00092 PyObject *scribus_newline(PyObject */*self*/, PyObject* args);
00093 
00095 PyDoc_STRVAR(scribus_polyline__doc__,
00096 QT_TR_NOOP("createPolyLine(list, [\"name\"]) -> string\n\
00097 \n\
00098 Creates a new polyline and returns its name. The points for the polyline are\n\
00099 stored in the list \"list\" in the following order: [x1, y1, x2, y2...xn. yn].\n\
00100 The coordinates are given in the current measurement units of the document (see\n\
00101 UNIT constants). \"name\" should be a unique identifier for the object because\n\
00102 you need this name for further access to that object. If \"name\" is not given\n\
00103 Scribus will create one for you.\n\
00104 \n\
00105 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00106 May raise ValueError if an insufficient number of points is passed or if\n\
00107 the number of values passed don't group into points without leftovers.\n\
00108 "));
00110 PyObject *scribus_polyline(PyObject */*self*/, PyObject* args);
00111 
00113 PyDoc_STRVAR(scribus_polygon__doc__,
00114 QT_TR_NOOP("createPolygon(list, [\"name\"]) -> string\n\
00115 \n\
00116 Creates a new polygon and returns its name. The points for the polygon are\n\
00117 stored in the list \"list\" in the following order: [x1, y1, x2, y2...xn. yn].\n\
00118 At least three points are required. There is no need to repeat the first point\n\
00119 to close the polygon. The polygon is automatically closed by connecting the\n\
00120 first and the last point.  The coordinates are given in the current measurement\n\
00121 units of the document (see UNIT constants).  \"name\" should be a unique\n\
00122 identifier for the object because you need this name for further access to that\n\
00123 object. If \"name\" is not given Scribus will create one for you.\n\
00124 \n\
00125 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00126 May raise ValueError if an insufficient number of points is passed or if\n\
00127 the number of values passed don't group into points without leftovers.\n\
00128 "));
00130 PyObject *scribus_polygon(PyObject */*self*/, PyObject* args);
00131 
00133 PyDoc_STRVAR(scribus_bezierline__doc__,
00134 QT_TR_NOOP("createBezierLine(list, [\"name\"]) -> string\n\
00135 \n\
00136 Creates a new bezier curve and returns its name. The points for the bezier\n\
00137 curve are stored in the list \"list\" in the following order:\n\
00138 [x1, y1, kx1, ky1, x2, y2, kx2, ky2...xn. yn, kxn. kyn]\n\
00139 In the points list, x and y mean the x and y coordinates of the point and kx\n\
00140 and ky meaning the control point for the curve.  The coordinates are given in\n\
00141 the current measurement units of the document (see UNIT constants). \"name\"\n\
00142 should be a unique identifier for the object because you need this name for\n\
00143 further access to that object. If \"name\" is not given Scribus will create one\n\
00144 for you.\n\
00145 \n\
00146 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00147 May raise ValueError if an insufficient number of points is passed or if\n\
00148 the number of values passed don't group into points without leftovers.\n\
00149 "));
00151 PyObject *scribus_bezierline(PyObject */*self*/, PyObject* args);
00152 
00154 PyDoc_STRVAR(scribus_pathtext__doc__,
00155 QT_TR_NOOP("createPathText(x, y, \"textbox\", \"beziercurve\", [\"name\"]) -> string\n\
00156 \n\
00157 Creates a new pathText by merging the two objects \"textbox\" and\n\
00158 \"beziercurve\" and returns its name. The coordinates are given in the current\n\
00159 measurement unit of the document (see UNIT constants). \"name\" should be a\n\
00160 unique identifier for the object because you need this name for further access\n\
00161 to that object. If \"name\" is not given Scribus will create one for you.\n\
00162 \n\
00163 May raise NameExistsError if you explicitly pass a name that's already used.\n\
00164 May raise NotFoundError if one or both of the named base object don't exist.\n\
00165 "));
00169 PyObject *scribus_pathtext(PyObject */*self*/, PyObject* args);
00170 
00172 PyDoc_STRVAR(scribus_deleteobj__doc__,
00173 QT_TR_NOOP("deleteObject([\"name\"])\n\
00174 \n\
00175 Deletes the item with the name \"name\". If \"name\" is not given the currently\n\
00176 selected item is deleted.\n\
00177 "));
00180 PyObject *scribus_deleteobj(PyObject */*self*/, PyObject* args);
00181 
00183 PyDoc_STRVAR(scribus_textflow__doc__,
00184 QT_TR_NOOP("textFlowMode(\"name\" [, state])\n\
00185 \n\
00186 Enables/disables \"Text Flows Around Frame\" feature for object \"name\".\n\
00187 Called with parameters string name and optional int \"state\" (0 <= state <= 3).\n\
00188 Setting \"state\" to 0 will disable text flow.\n\
00189 Setting \"state\" to 1 will make text flow around object frame.\n\
00190 Setting \"state\" to 2 will make text flow around bounding box.\n\
00191 Setting \"state\" to 3 will make text flow around contour line.\n\
00192 If \"state\" is not passed, text flow is toggled.\n\
00193 "));
00202 PyObject *scribus_textflow(PyObject */*self*/, PyObject* args);
00203 
00205 PyDoc_STRVAR(scribus_objectexists__doc__,
00206 QT_TR_NOOP("objectExists([\"name\"]) -> bool\n\
00207 \n\
00208 Test if an object with specified name really exists in the document.\n\
00209 The optional parameter is the object name. When no object name is given,\n\
00210 returns True if there is something selected.\n\
00211 "));
00219 PyObject *scribus_objectexists(PyObject */*self*/, PyObject* args);
00220 
00222 PyDoc_STRVAR(scribus_setstyle__doc__,
00223 QT_TR_NOOP("setStyle(\"style\" [, \"name\"])\n\
00224 \n\
00225 Apply the named \"style\" to the object named \"name\". If is no object name\n\
00226 given, it's applied on the selected object.\n\
00227 "));
00233 PyObject *scribus_setstyle(PyObject */*self*/, PyObject* args);
00234 
00236 PyDoc_STRVAR(scribus_getstylenames__doc__,
00237 QT_TR_NOOP("getAllStyles() -> list\n\
00238 \n\
00239 Return a list of the names of all paragraph styles in the current document.\n\
00240 "));
00245 PyObject *scribus_getstylenames(PyObject */*self*/);
00246 
00248 PyDoc_STRVAR(scribus_duplicateobject__doc__,
00249 QT_TR_NOOP("duplicateObject([\"name\"]) -> string\n\
00250 \n\
00251 creates a Duplicate of the selected Object (or Selection Group).\n\
00252 "));
00257 PyObject *scribus_duplicateobject(PyObject * /* self */, PyObject *args);
00258 
00259 /* Internal function not intended for general use; no docstring */
00260 PyObject* scribus_getframetype(PyObject* self, PyObject* args, PyObject* kw);
00261 
00262 #endif
00263