Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmdmisc.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 CMDMISC_H
00008 #define CMDMISC_H
00009 
00010 // Pulls in <Python.h> first
00011 #include "cmdvar.h"
00012 
00016 PyDoc_STRVAR(scribus_setredraw__doc__,
00017 QT_TR_NOOP("setRedraw(bool)\n\
00018 \n\
00019 Disables page redraw when bool = False, otherwise redrawing is enabled.\n\
00020 This change will persist even after the script exits, so make sure to call\n\
00021 setRedraw(True) in a finally: clause at the top level of your script.\n\
00022 "));
00024 PyObject *scribus_setredraw(PyObject */*self*/, PyObject* args);
00025 
00027 PyDoc_STRVAR(scribus_fontnames__doc__,
00028 QT_TR_NOOP("getFontNames() -> list\n\
00029 \n\
00030 Returns a list with the names of all available fonts.\n\
00031 "));
00033 PyObject *scribus_fontnames(PyObject */*self*/);
00034 
00036 PyDoc_STRVAR(scribus_xfontnames__doc__,
00037 QT_TR_NOOP("getXFontNames() -> list of tuples\n\
00038 \n\
00039 Returns a larger font info. It's a list of the tuples with:\n\
00040 [ (Scribus name, Family, Real name, subset (1|0), embed PS (1|0), font file), (...), ... ]\n\
00041 "));
00046 PyObject *scribus_xfontnames(PyObject */*self*/);
00047 
00049 PyDoc_STRVAR(scribus_renderfont__doc__,
00050 QT_TR_NOOP("renderFont(\"name\", \"filename\", \"sample\", size, format=\"PPM\") -> bool\n\
00051 \n\
00052 Creates an image preview of font \"name\" with given text \"sample\" and size.\n\
00053 If \"filename\" is not \"\", image is saved into \"filename\". Otherwise\n\
00054 image data is returned as a string. The optional \"format\" argument\n\
00055 specifies the image format to generate, and supports any format allowed\n\
00056 by QPixmap.save(). Common formats are PPM, JPEG, PNG and XPM.\n\
00057 \n\
00058 May raise NotFoundError if the specified font can't be found.\n\
00059 May raise ValueError if an empty sample or filename is passed.\n\
00060 "));
00062 PyObject *scribus_renderfont(PyObject* /*self*/, PyObject* args, PyObject* kw);
00063 
00065 PyDoc_STRVAR(scribus_getlayers__doc__,
00066 QT_TR_NOOP("getLayers() -> list\n\
00067 \n\
00068 Returns a list with the names of all defined layers.\n\
00069 "));
00071 PyObject *scribus_getlayers(PyObject */*self*/);
00072 
00074 PyDoc_STRVAR(scribus_setactlayer__doc__,
00075 QT_TR_NOOP("setActiveLayer(\"name\")\n\
00076 \n\
00077 Sets the active layer to the layer named \"name\".\n\
00078 \n\
00079 May raise NotFoundError if the layer can't be found.\n\
00080 May raise ValueError if the layer name isn't acceptable.\n\
00081 "));
00083 PyObject *scribus_setactlayer(PyObject */*self*/, PyObject* args);
00084 
00086 PyDoc_STRVAR(scribus_getactlayer__doc__,
00087 QT_TR_NOOP("getActiveLayer() -> string\n\
00088 \n\
00089 Returns the name of the current active layer.\n\
00090 "));
00092 PyObject *scribus_getactlayer(PyObject */*self*/);
00093 
00095 PyDoc_STRVAR(scribus_senttolayer__doc__,
00096 QT_TR_NOOP("sentToLayer(\"layer\" [, \"name\"])\n\
00097 \n\
00098 Sends the object \"name\" to the layer \"layer\". The layer must exist.\n\
00099 If \"name\" is not given the currently selected item is used.\n\
00100 \n\
00101 May raise NotFoundError if the layer can't be found.\n\
00102 May raise ValueError if the layer name isn't acceptable.\n\
00103 "));
00105 PyObject *scribus_senttolayer(PyObject */*self*/, PyObject* args);
00106 
00108 PyDoc_STRVAR(scribus_layervisible__doc__,
00109 QT_TR_NOOP("setLayerVisible(\"layer\", visible)\n\
00110 \n\
00111 Sets the layer \"layer\" to be visible or not. If is the visible set to false\n\
00112 the layer is invisible.\n\
00113 \n\
00114 May raise NotFoundError if the layer can't be found.\n\
00115 May raise ValueError if the layer name isn't acceptable.\n\
00116 "));
00118 PyObject *scribus_layervisible(PyObject */*self*/, PyObject* args);
00119 
00121 PyDoc_STRVAR(scribus_layerprint__doc__,
00122 QT_TR_NOOP("setLayerPrintable(\"layer\", printable)\n\
00123 \n\
00124 Sets the layer \"layer\" to be printable or not. If is the\n\
00125 printable set to false the layer won't be printed.\n\
00126 \n\
00127 May raise NotFoundError if the layer can't be found.\n\
00128 May raise ValueError if the layer name isn't acceptable.\n\
00129 "));
00131 PyObject *scribus_layerprint(PyObject */*self*/, PyObject* args);
00132 
00134 PyDoc_STRVAR(scribus_layerlock__doc__,
00135 QT_TR_NOOP("setLayerLocked(\"layer\", locked)\n\
00136 \n\
00137 Sets the layer \"layer\" to be locked or not. If locked is set to\n\
00138 true the layer will be locked.\n\
00139 \n\
00140 May raise NotFoundError if the layer can't be found.\n\
00141 May raise ValueError if the layer name isn't acceptable.\n\
00142 "));
00144 PyObject *scribus_layerlock(PyObject */*self*/, PyObject* args);
00145 
00147 PyDoc_STRVAR(scribus_layeroutline__doc__,
00148 QT_TR_NOOP("setLayerOutlined(\"layer\", outline)\n\
00149 \n\
00150 Sets the layer \"layer\" to be locked or not. If outline is set to\n\
00151 true the layer will be displayed outlined.\n\
00152 \n\
00153 May raise NotFoundError if the layer can't be found.\n\
00154 May raise ValueError if the layer name isn't acceptable.\n\
00155 "));
00157 PyObject *scribus_layeroutline(PyObject */*self*/, PyObject* args);
00158 
00160 PyDoc_STRVAR(scribus_layerflow__doc__,
00161 QT_TR_NOOP("setLayerFlow(\"layer\", flow)\n\
00162 \n\
00163 Sets the layers \"layer\"  flowcontrol to flow. If flow is set to\n\
00164 true text in layers above this one will flow around objects on this layer.\n\
00165 \n\
00166 May raise NotFoundError if the layer can't be found.\n\
00167 May raise ValueError if the layer name isn't acceptable.\n\
00168 "));
00170 PyObject *scribus_layerflow(PyObject */*self*/, PyObject* args);
00171 
00173 PyDoc_STRVAR(scribus_layerblend__doc__,
00174 QT_TR_NOOP("setLayerBlendmode(\"layer\", blend)\n\
00175 \n\
00176 Sets the layers \"layer\"  blendmode to blend.\n\
00177 \n\
00178 May raise NotFoundError if the layer can't be found.\n\
00179 May raise ValueError if the layer name isn't acceptable.\n\
00180 "));
00182 PyObject *scribus_layerblend(PyObject */*self*/, PyObject* args);
00183 
00185 PyDoc_STRVAR(scribus_layertrans__doc__,
00186 QT_TR_NOOP("setLayerTransparency(\"layer\", trans)\n\
00187 \n\
00188 Sets the layers \"layer\"  transparency to trans.\n\
00189 \n\
00190 May raise NotFoundError if the layer can't be found.\n\
00191 May raise ValueError if the layer name isn't acceptable.\n\
00192 "));
00194 PyObject *scribus_layertrans(PyObject */*self*/, PyObject* args);
00195 
00197 PyDoc_STRVAR(scribus_glayervisib__doc__,
00198 QT_TR_NOOP("isLayerVisible(\"layer\") -> bool\n\
00199 \n\
00200 Returns whether the layer \"layer\" is visible or not, a value of True means\n\
00201 that the layer \"layer\" is visible, a value of False means that the layer\n\
00202 \"layer\" is invisible.\n\
00203 \n\
00204 May raise NotFoundError if the layer can't be found.\n\
00205 May raise ValueError if the layer name isn't acceptable.\n\
00206 "));
00208 PyObject *scribus_glayervisib(PyObject */*self*/, PyObject* args);
00209 
00211 PyDoc_STRVAR(scribus_glayerprint__doc__,
00212 QT_TR_NOOP("isLayerPrintable(\"layer\") -> bool\n\
00213 \n\
00214 Returns whether the layer \"layer\" is printable or not, a value of True means\n\
00215 that the layer \"layer\" can be printed, a value of False means that printing\n\
00216 the layer \"layer\" is disabled.\n\
00217 \n\
00218 May raise NotFoundError if the layer can't be found.\n\
00219 May raise ValueError if the layer name isn't acceptable.\n\
00220 "));
00222 PyObject *scribus_glayerprint(PyObject */*self*/, PyObject* args);
00223 
00225 PyDoc_STRVAR(scribus_glayerlock__doc__,
00226 QT_TR_NOOP("isLayerLocked(\"layer\") -> bool\n\
00227 \n\
00228 Returns whether the layer \"layer\" is locked or not, a value of True means\n\
00229 that the layer \"layer\" is editable, a value of False means that the layer\n\
00230 \"layer\" is locked.\n\
00231 \n\
00232 May raise NotFoundError if the layer can't be found.\n\
00233 May raise ValueError if the layer name isn't acceptable.\n\
00234 "));
00236 PyObject *scribus_glayerlock(PyObject */*self*/, PyObject* args);
00237 
00239 PyDoc_STRVAR(scribus_glayeroutline__doc__,
00240 QT_TR_NOOP("isLayerOutlined(\"layer\") -> bool\n\
00241 \n\
00242 Returns whether the layer \"layer\" is outlined or not, a value of True means\n\
00243 that the layer \"layer\" is outlined, a value of False means that the layer\n\
00244 \"layer\" is normal.\n\
00245 \n\
00246 May raise NotFoundError if the layer can't be found.\n\
00247 May raise ValueError if the layer name isn't acceptable.\n\
00248 "));
00250 PyObject *scribus_glayeroutline(PyObject */*self*/, PyObject* args);
00251 
00253 PyDoc_STRVAR(scribus_glayerflow__doc__,
00254 QT_TR_NOOP("isLayerFlow(\"layer\") -> bool\n\
00255 \n\
00256 Returns whether text flows around objects on layer \"layer\", a value of True means\n\
00257 that text flows around, a value of False means that the text does not flow around.\n\
00258 \n\
00259 May raise NotFoundError if the layer can't be found.\n\
00260 May raise ValueError if the layer name isn't acceptable.\n\
00261 "));
00263 PyObject *scribus_glayerflow(PyObject */*self*/, PyObject* args);
00264 
00266 PyDoc_STRVAR(scribus_glayerblend__doc__,
00267 QT_TR_NOOP("getLayerBlendmode(\"layer\") -> int\n\
00268 \n\
00269 Returns the \"layer\" layer blendmode,\n\
00270 \n\
00271 May raise NotFoundError if the layer can't be found.\n\
00272 May raise ValueError if the layer name isn't acceptable.\n\
00273 "));
00275 PyObject *scribus_glayerblend(PyObject */*self*/, PyObject* args);
00276 
00278 PyDoc_STRVAR(scribus_glayertrans__doc__,
00279 QT_TR_NOOP("getLayerTransparency(\"layer\") -> float\n\
00280 \n\
00281 Returns the \"layer\" layer transparency,\n\
00282 \n\
00283 May raise NotFoundError if the layer can't be found.\n\
00284 May raise ValueError if the layer name isn't acceptable.\n\
00285 "));
00287 PyObject *scribus_glayertrans(PyObject */*self*/, PyObject* args);
00288 
00290 PyDoc_STRVAR(scribus_removelayer__doc__,
00291 QT_TR_NOOP("deleteLayer(\"layer\")\n\
00292 \n\
00293 Deletes the layer with the name \"layer\". Nothing happens if the layer doesn't\n\
00294 exists or if it's the only layer in the document.\n\
00295 \n\
00296 May raise NotFoundError if the layer can't be found.\n\
00297 May raise ValueError if the layer name isn't acceptable.\n\
00298 "));
00300 PyObject *scribus_removelayer(PyObject */*self*/, PyObject* args);
00301 
00303 PyDoc_STRVAR(scribus_createlayer__doc__,
00304 QT_TR_NOOP("createLayer(layer)\n\
00305 \n\
00306 Creates a new layer with the name \"name\".\n\
00307 \n\
00308 May raise ValueError if the layer name isn't acceptable.\n\
00309 "));
00311 PyObject *scribus_createlayer(PyObject */*self*/, PyObject* args);
00312 
00314 PyDoc_STRVAR(scribus_getlanguage__doc__,
00315 QT_TR_NOOP("getGuiLanguage() -> string\n\
00316 \n\
00317 Returns a string with the -lang value.\n\
00318 "));
00320 PyObject *scribus_getlanguage(PyObject */*self*/);
00321 
00322 #endif
00323