Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmdpage.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 CMDPAGE_H
00008 #define CMDPAGE_H
00009 
00010 // Pulls in <Python.h> first
00011 #include "cmdvar.h"
00012 
00016 PyDoc_STRVAR(scribus_newpage__doc__,
00017 QT_TR_NOOP("newPage(where [,\"masterpage\"])\n\
00018 \n\
00019 Creates a new page. If \"where\" is -1 the new Page is appended to the\n\
00020 document, otherwise the new page is inserted before \"where\". Page numbers are\n\
00021 counted from 1 upwards, no matter what the displayed first page number of your\n\
00022 document is. The optional parameter \"masterpage\" specifies the name of the\n\
00023 master page for the new page.\n\
00024 \n\
00025 May raise IndexError if the page number is out of range\n\
00026 "));
00028 PyObject *scribus_newpage(PyObject */*self*/, PyObject* args);
00029 
00031 PyDoc_STRVAR(scribus_actualpage__doc__,
00032 QT_TR_NOOP("currentPage() -> integer\n\
00033 \n\
00034 Returns the number of the current working page. Page numbers are counted from 1\n\
00035 upwards, no matter what the displayed first page number of your document is.\n\
00036 "));
00038 PyObject *scribus_actualpage(PyObject */*self*/);
00039 
00041 PyDoc_STRVAR(scribus_redraw__doc__,
00042 QT_TR_NOOP("redrawAll()\n\
00043 \n\
00044 Redraws all pages.\n\
00045 "));
00047 PyObject *scribus_redraw(PyObject */*self*/);
00048 
00050 PyDoc_STRVAR(scribus_pageposition__doc__,
00051 QT_TR_NOOP("getPageType() -> integer\n\
00052 \n\
00053 Returns the type of the Page, 0 means left Page, 1 is a middle Page and 2 is a right Page\n\
00054 "));
00056 PyObject *scribus_pageposition(PyObject */*self*/, PyObject* args);
00057 
00059 PyDoc_STRVAR(scribus_savepageeps__doc__,
00060 QT_TR_NOOP("savePageAsEPS(\"name\")\n\
00061 \n\
00062 Saves the current page as an EPS to the file \"name\".\n\
00063 \n\
00064 May raise ScribusError if the save failed.\n\
00065 "));
00067 PyObject *scribus_savepageeps(PyObject */*self*/, PyObject* args);
00068 
00070 PyDoc_STRVAR(scribus_deletepage__doc__,
00071 QT_TR_NOOP("deletePage(nr)\n\
00072 \n\
00073 Deletes the given page. Does nothing if the document contains only one page.\n\
00074 Page numbers are counted from 1 upwards, no matter what the displayed first\n\
00075 page number is.\n\
00076 \n\
00077 May raise IndexError if the page number is out of range\n\
00078 "));
00080 PyObject *scribus_deletepage(PyObject */*self*/, PyObject* args);
00081 
00083 PyDoc_STRVAR(scribus_gotopage__doc__,
00084 QT_TR_NOOP("gotoPage(nr)\n\
00085 \n\
00086 Moves to the page \"nr\" (that is, makes the current page \"nr\"). Note that\n\
00087 gotoPage doesn't (curently) change the page the user's view is displaying, it\n\
00088 just sets the page that script commands will operates on.\n\
00089 \n\
00090 May raise IndexError if the page number is out of range.\n\
00091 "));
00093 PyObject *scribus_gotopage(PyObject */*self*/, PyObject* args);
00094 
00096 PyDoc_STRVAR(scribus_pagecount__doc__,
00097 QT_TR_NOOP("pageCount() -> integer\n\
00098 \n\
00099 Returns the number of pages in the document.\n\
00100 "));
00102 PyObject *scribus_pagecount(PyObject */*self*/);
00103 
00105 PyDoc_STRVAR(scribus_getHguides__doc__,
00106 QT_TR_NOOP("getHGuides() -> list\n\
00107 \n\
00108 Returns a list containing positions of the horizontal guides. Values are in the\n\
00109 document's current units - see UNIT_<type> constants.\n\
00110 "));
00112 PyObject *scribus_getHguides(PyObject */*self*/);
00113 
00115 PyDoc_STRVAR(scribus_setHguides__doc__,
00116 QT_TR_NOOP("setHGuides(list)\n\
00117 \n\
00118 Sets horizontal guides. Input parameter must be a list of guide positions\n\
00119 measured in the current document units - see UNIT_<type> constants.\n\
00120 \n\
00121 Example: setHGuides(getHGuides() + [200.0, 210.0] # add new guides without any lost\n\
00122          setHGuides([90,250]) # replace current guides entirely\n\
00123 "));
00125 PyObject *scribus_setHguides(PyObject */*self*/, PyObject* args);
00126 
00128 PyDoc_STRVAR(scribus_getVguides__doc__,
00129 QT_TR_NOOP("getVGuides()\n\
00130 \n\
00131 See getHGuides.\n\
00132 "));
00134 PyObject *scribus_getVguides(PyObject */*self*/);
00135 
00137 PyDoc_STRVAR(scribus_setVguides__doc__,
00138 QT_TR_NOOP("setVGuides()\n\
00139 \n\
00140 See setHGuides.\n\
00141 "));
00143 PyObject *scribus_setVguides(PyObject */*self*/, PyObject* args);
00144 
00146 PyDoc_STRVAR(scribus_pagedimension__doc__,
00147 QT_TR_NOOP("getPageSize() -> tuple\n\
00148 \n\
00149 Returns a tuple with page dimensions measured in the document's current units.\n\
00150 See UNIT_<type> constants and getPageMargins()\n\
00151 "));
00157 PyObject *scribus_pagedimension(PyObject */*self*/);
00158 
00160 PyDoc_STRVAR(scribus_getpageitems__doc__,
00161 QT_TR_NOOP("getPageItems() -> list\n\
00162 \n\
00163 Returns a list of tuples with items on the current page. The tuple is:\n\
00164 (name, objectType, order) E.g. [('Text1', 4, 0), ('Image1', 2, 1)]\n\
00165 means that object named 'Text1' is a text frame (type 4) and is the first at\n\
00166 the page...\n\
00167 "));
00173 PyObject *scribus_getpageitems(PyObject */*self*/);
00174 
00176 PyDoc_STRVAR(scribus_getpagemargins__doc__,
00177 QT_TR_NOOP("getPageMargins()\n\
00178 \n\
00179 Returns the page margins as a (top, left, right, bottom) tuple in the current\n\
00180 units. See UNIT_<type> constants and getPageSize().\n\
00181 "));
00186 PyObject *scribus_getpagemargins(PyObject */*self*/);
00187 
00188 #endif
00189