Scribus
Open source desktop publishing at your fingertips
cmdtable.h
1 /*
2  * Copyright (C) 2011 Elvis Stansvik <elvstone@gmail.com>
3  *
4  * For general Scribus (>=1.3.2) copyright and licensing information please refer
5  * to the COPYING file provided with the program. Following this notice may exist
6  * a copyright and/or license notice that predates the release of Scribus 1.3.2
7  * for which a new license (GPL+exception) is in place.
8  */
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 
15 #ifndef CMDTABLE_H
16 #define CMDTABLE_H
17 
19 PyDoc_STRVAR(scribus_gettablerows__doc__,
20 QT_TR_NOOP("getTableRows([\"name\"]) -> integer\n\
21 \n\
22 Gets the number of rows in the table \"name\". If \"name\" is not\n\
23 given the currently selected item is used.\n\
24 "));
26 PyObject *scribus_gettablerows(PyObject * /*self*/, PyObject* args);
27 
29 PyDoc_STRVAR(scribus_gettablecolumns__doc__,
30 QT_TR_NOOP("getTableColumns([\"name\"]) -> integer\n\
31 \n\
32 Gets the number of columns in the table \"name\". If \"name\" is not\n\
33 given the currently selected item is used.\n\
34 "));
36 PyObject *scribus_gettablecolumns(PyObject * /*self*/, PyObject* args);
37 
39 PyDoc_STRVAR(scribus_inserttablerows__doc__,
40 QT_TR_NOOP("insertTableRows(index, numRows, [\"name\"])\n\
41 \n\
42 Inserts \"numRows\" rows before the row at \"index\" in the table \"name\".\n\
43 If \"name\" is not given the currently selected item is used.\n\
44 \n\
45 May throw ValueError if number of rows is not at least one or index is out of bounds.\n\
46 "));
48 PyObject *scribus_inserttablerows(PyObject * /*self*/, PyObject* args);
49 
51 PyDoc_STRVAR(scribus_removetablerows__doc__,
52 QT_TR_NOOP("removeTableRows(index, numRows, [\"name\"])\n\
53 \n\
54 Removes \"numRows\" rows from the table \"name\" starting with the row at \"index\".\n\
55 If \"name\" is not given the currently selected item is used.\n\
56 \n\
57 May throw ValueError if number of rows is not at least one or the range to be deleted is out of bounds.\n\
58 "));
60 PyObject *scribus_removetablerows(PyObject * /*self*/, PyObject* args);
61 
63 PyDoc_STRVAR(scribus_gettablerowheight__doc__,
64 QT_TR_NOOP("getTableRowHeight(row, [\"name\"]) -> float\n\
65 \n\
66 Returns the row height of \"row\" in the table \"name\" expressed in\n\
67 points, or 0.0 if the row does not exist. If \"name\" is not given the currently\n\
68 selected item is used.\n\
69 "));
71 PyObject *scribus_gettablerowheight(PyObject * /*self*/, PyObject* args);
72 
74 PyDoc_STRVAR(scribus_resizetablerow__doc__,
75 QT_TR_NOOP("resizeTableRow(row, height, [\"name\"])\n\
76 \n\
77 Resizes \"row\" to \"height\" in the table \"name\".\n\
78 If \"name\" is not given the currently selected item is used.\n\
79 \n\
80 May throw ValueError if the height is less than 0 or the row does not exist.\n\
81 "));
83 PyObject *scribus_resizetablerow(PyObject * /*self*/, PyObject* args);
84 
86 PyDoc_STRVAR(scribus_inserttablecolumns__doc__,
87 QT_TR_NOOP("insertTableColumns(index, numColumns, [\"name\"])\n\
88 \n\
89 Inserts \"numColumns\" columns before the column at \"index\" in the table \"name\".\n\
90 If \"name\" is not given the currently selected item is used.\n\
91 \n\
92 May throw ValueError if number of columns is not at least one or index is out of bounds.\n\
93 "));
95 PyObject *scribus_inserttablecolumns(PyObject * /*self*/, PyObject* args);
96 
98 PyDoc_STRVAR(scribus_removetablecolumns__doc__,
99 QT_TR_NOOP("removeTableColumns(index, numColumns, [\"name\"])\n\
100 \n\
101 Removes \"numColumns\" columns from the table \"name\" starting with the column at \"index\".\n\
102 If \"name\" is not given the currently selected item is used.\n\
103 \n\
104 May throw ValueError if number of columns is not at least one or the range to be deleted is out of bounds.\n\
105 "));
107 PyObject *scribus_removetablecolumns(PyObject * /*self*/, PyObject* args);
108 
110 PyDoc_STRVAR(scribus_gettablecolumnwidth__doc__,
111 QT_TR_NOOP("getTableColumnWidth(column, [\"name\"]) -> float\n\
112 \n\
113 Returns the column width of \"column\" in the table \"name\" expressed in\n\
114 points, or 0.0 if the column does not exist. If \"name\" is not given the currently\n\
115 selected item is used.\n\
116 "));
118 PyObject *scribus_gettablecolumnwidth(PyObject * /*self*/, PyObject* args);
119 
121 PyDoc_STRVAR(scribus_resizetablecolumn__doc__,
122 QT_TR_NOOP("resizeTableColumn(column, width, [\"name\"])\n\
123 \n\
124 Resizes \"column\" to \"width\" in the table \"name\".\n\
125 If \"name\" is not given the currently selected item is used.\n\
126 \n\
127 May throw ValueError if the width is less than 0 or the column does not exist.\n\
128 "));
130 PyObject *scribus_resizetablecolumn(PyObject * /*self*/, PyObject* args);
131 
133 PyDoc_STRVAR(scribus_mergetablecells__doc__,
134 QT_TR_NOOP("mergeTableCells(row, column, numRows, numColumns, [\"name\"])\n\
135 \n\
136 Merges the cell at the specified \"row\" and \"column\" with the adjacent cells into one cell.\n\
137 \n\
138 May throw ValueError if number if numRows or numColumns is less than 1 or the specified area is out of bounds.\n\
139 "));
141 PyObject *scribus_mergetablecells(PyObject * /*self*/, PyObject* args);
142 
144 PyDoc_STRVAR(scribus_gettablestyle__doc__,
145 QT_TR_NOOP("getTableStyle([\"name\"]) -> string\n\
146 \n\
147 Returns the named style of the table \"name\".\n\
148 If \"name\" is not given the currently selected item is used.\n\
149 "));
151 PyObject *scribus_gettablestyle(PyObject * /*self*/, PyObject* args);
152 
154 PyDoc_STRVAR(scribus_settablestyle__doc__,
155 QT_TR_NOOP("setTableStyle(style, [\"name\"])\n\
156 \n\
157 Sets the named style of the table \"name\" to \"style\".\n\
158 If \"name\" is not given the currently selected item is used.\n\
159 "));
161 PyObject *scribus_settablestyle(PyObject * /*self*/, PyObject* args);
162 
164 PyDoc_STRVAR(scribus_gettablefillcolor__doc__,
165 QT_TR_NOOP("getTableFillColor([\"name\"]) -> string\n\
166 \n\
167 Returns the fill color of the table \"name\".\n\
168 If \"name\" is not given the currently selected item is used.\n\
169 "));
171 PyObject *scribus_gettablefillcolor(PyObject * /*self*/, PyObject* args);
172 
174 PyDoc_STRVAR(scribus_settablefillcolor__doc__,
175 QT_TR_NOOP("setTableFillColor(color, [\"name\"])\n\
176 \n\
177 Sets the fill color of the table \"name\" to \"color\".\n\
178 If \"name\" is not given the currently selected item is used.\n\
179 \n\
180 May throw ValueError the table does not exist.\n\
181 "));
183 PyObject *scribus_settablefillcolor(PyObject * /*self*/, PyObject* args);
184 
186 PyDoc_STRVAR(scribus_settableleftborder__doc__,
187 QT_TR_NOOP("setTableLeftBorder(borderLines, [\"name\"])\n\
188 \n\
189 Sets the left border of the table \"name\".\n\
190 The border is specified as a list of \"(width, style, color)\" tuples.\n\
191 \"style\" is one of the LINE_* constants. If \"name\" is not given\n\
192 the currently selected item is used.\n\
193 \n\
194 May throw ValueError if \"borderLines\" is of the wrong format.\n\
195 "));
197 PyObject *scribus_settableleftborder(PyObject * /*self*/, PyObject* args);
198 
200 PyDoc_STRVAR(scribus_settablerightborder__doc__,
201 QT_TR_NOOP("setTableRightBorder(borderLines, [\"name\"])\n\
202 \n\
203 Sets the right border of the table \"name\".\n\
204 The border is specified as a list of \"(width, style, color)\" tuples.\n\
205 \"style\" is one of the LINE_* constants. If \"name\" is not given\n\
206 the currently selected item is used.\n\
207 \n\
208 May throw ValueError if \"borderLines\" is of the wrong format.\n\
209 "));
211 PyObject *scribus_settablerightborder(PyObject * /*self*/, PyObject* args);
212 
214 PyDoc_STRVAR(scribus_settabletopborder__doc__,
215 QT_TR_NOOP("setTableTopBorder(borderLines, [\"name\"])\n\
216 \n\
217 Sets the top border of the table \"name\".\n\
218 The border is specified as a list of \"(width, style, color)\" tuples.\n\
219 \"style\" is one of the LINE_* constants. If \"name\" is not given\n\
220 the currently selected item is used.\n\
221 \n\
222 May throw ValueError if \"borderLines\" is of the wrong format.\n\
223 "));
225 PyObject *scribus_settabletopborder(PyObject * /*self*/, PyObject* args);
226 
228 PyDoc_STRVAR(scribus_settablebottomborder__doc__,
229 QT_TR_NOOP("setTableBottomBorder(borderLines, [\"name\"])\n\
230 \n\
231 Sets the bottom border of the table \"name\".\n\
232 The border is specified as a list of \"(width, style, color)\" tuples.\n\
233 \"style\" is one of the LINE_* constants. If \"name\" is not given\n\
234 the currently selected item is used.\n\
235 \n\
236 May throw ValueError if \"borderLines\" is of the wrong format.\n\
237 "));
239 PyObject *scribus_settablebottomborder(PyObject * /*self*/, PyObject* args);
240 
241 #endif // CMDTABLE_H