Subversion Repositories Scribus

Rev

Rev 23694 | Rev 23697 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22205 jghali 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
02.01.2008: Joachim Neu - joachim_neu@web.de - http://www.joachim-neu.de
7
*/
8
#ifndef CMDSTYLE_H
9
#define CMDSTYLE_H
10
 
11
// Pulls in <Python.h> first
12
#include "cmdvar.h"
13
//Added by qt3to4:
14
#include <QPixmap>
15
 
16
/** Style-related Commands */
17
 
18
/* PARAGRAPH STYLES */
19
 
20
/*! docstring */
21
PyDoc_STRVAR(scribus_createparagraphstyle__doc__,
22
QT_TR_NOOP("createParagraphStyle(...)\n\n\
23
Creates a paragraph style. This function takes the following keyword parameters:\n\n\
24
\"name\" [required] -> specifies the name of the paragraphstyle to create\n\n\
25
linespacingmode [optional] -> specifies the linespacing mode; possible modes are:\n\n\
26
fixed linespacing:          0\n\n\
27
automatic linespacing:      1\n\n\
28
baseline grid linespacing:  2\n\n\
29
linespacing [optional] -> specifies the linespacing if using fixed linespacing\n\n\
30
alignment [optional] -> specifies the alignment of the paragraph\n\n\
31
-> left:     0\n\n\
32
-> center:   1\n\n\
33
-> right:    2\n\n\
34
-> justify:  3\n\n\
35
-> extend:   4\n\n\
36
leftmargin [optional], rightmargin [optional] -> specify the margin\n\n\
37
gapbefore [optional], gapafter [optional] -> specify the gaps to the heading and following paragraphs\n\n\
38
firstindent [optional] -> the indent of the first line\n\n\
39
hasdropcap [optional] -> specifies if there are caps (1 = yes, 0 = no)\n\n\
40
dropcaplines [optional] -> height (in lines) of the caps if used\n\n\
41
dropcapoffset [optional] -> offset of the caps if used\n\n\
42
\"charstyle\" [optional] -> char style to use\n\n\
23168 jghali 43
\"bullet\" [optional] -> string to use as bullet\n\n\
23232 jghali 44
\"tabs\" [optional] -> a list containg tab definitions\n\n\
45
-> a tab is defined as a tuple with the following format (position,type,fillchar)\"\n\n\
46
-> position [required] -> float value for the position\n\n\
47
-> type [optional] -> left: 0 [default], right: 1, period: 2, comma: 3, center: 4\n\n\
48
-> fillchar [optional] -> the char to fill the space; default is none\n\n\
22205 jghali 49
"));
50
/*! 02.01.2007 - 05.01.2007 : Joachim Neu : Create a paragraph style.
51
                Special thanks go to avox for helping me! */
52
PyObject *scribus_createparagraphstyle(PyObject * /* self */, PyObject* args, PyObject* keywords);
53
 
54
/* CHAR STYLES */
55
 
56
/*! docstring */
57
PyDoc_STRVAR(scribus_createcharstyle__doc__,
58
QT_TR_NOOP("createCharStyle(...)\n\n\
59
Creates a character style. This function takes the following keyword parameters:\n\n\
60
\"name\" [required] -> name of the char style to create\n\n\
61
\"font\" [optional] -> name of the font to use\n\n\
62
fontsize [optional] -> font size to set (double)\n\n\
63
\"features\" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-seperated (without spaces!):\n\n\
64
-> inherit\n\n\
65
-> bold\n\n\
66
-> italic\n\n\
67
-> underline\n\n\
68
-> underlinewords\n\n\
69
-> strike\n\n\
70
-> superscript\n\n\
71
-> subscript\n\n\
72
-> outline\n\n\
73
-> shadowed\n\n\
74
-> allcaps\n\n\
75
-> smallcaps\n\n\
76
\"fillcolor\" [optional], \"fillshade\" [optional] -> specify fill options\n\n\
77
\"strokecolor\" [optional], \"strokeshade\" [optional] -> specify stroke options\n\n\
78
baselineoffset [optional] -> offset of the baseline\n\n\
79
shadowxoffset [optional], shadowyoffset [optional] -> offset of the shadow if used\n\n\
80
outlinewidth [optional] -> width of the outline if used\n\n\
81
underlineoffset [optional], underlinewidth [optional] -> underline options if used\n\n\
82
strikethruoffset [optional], strikethruwidth [optional] -> strikethru options if used\n\n\
83
scaleh [optional], scalev [optional] -> scale of the chars\n\n\
84
tracking [optional] -> tracking of the text\n\n\
85
\"language\" [optional] -> language code\n\n\
86
"));
87
/*! 03.01.2007 - 05.01.2007 : Joachim Neu : Create a char style.
88
                Special thanks go to avox for helping me! */
89
PyObject *scribus_createcharstyle(PyObject * /* self */, PyObject* args, PyObject* keywords);
90
 
91
/* LINE STYLES */
92
 
93
/*! docstring */
94
PyDoc_STRVAR(scribus_createcustomlinestyle__doc__,
95
QT_TR_NOOP("createCustomLineStyle(styleName, style)\n\n\
96
Creates the custom line style 'styleName'.\n\n\
97
styleName -> name of the custom line style to create\n\n\
98
This function takes list of dictionary\n\
99
as parameter for \"style\". Each dictionary represent\n\
100
one subline within style. Dictionary can have those keys:\n\n\
101
\tColor [optional] -> name of the color to use (string)\n\n\
102
\tDash [optional] -> type of line to use (integer)\n\n\
103
\tLineEnd [optional] -> type of LineEnd to use (integer)\n\n\
104
\tLineJoin [optional] -> type of LineJoin to use (integer)\n\n\
105
\tShade [optional] -> opacity of line (integer)\n\n\
106
\tWidth [optional] -> width of line (double)\n\
107
"));
108
PyObject *scribus_createcustomlinestyle(PyObject * /* self */, PyObject* args);
109
 
23693 jghali 110
/*! docstring */
23694 jghali 111
PyDoc_STRVAR(scribus_getparagraphstyles__doc__,
112
QT_TR_NOOP("getParagraphStyles() -> list\n\
23693 jghali 113
\n\
114
Return a list of the names of all paragraph styles in the current document.\n\
115
"));
23694 jghali 116
 
117
PyDoc_STRVAR(scribus_getallstyles__doc__,
118
QT_TR_NOOP("getAllStyles() -> list\n\
119
\n\
120
Deprecated. Use getParagraphStyles() instead.\n\
121
"));
23693 jghali 122
/**
123
 Craig Ringer, 2004-09-09
124
 Enumerate all known paragraph styles
125
*/
23694 jghali 126
PyObject *scribus_getparagraphstyles(PyObject * /*self*/);
23693 jghali 127
 
128
/*! docstring */
129
PyDoc_STRVAR(scribus_getcharstylenames__doc__,
130
QT_TR_NOOP("getCharStyles() -> list\n\
131
\n\
132
Return a list of the names of all character styles in the current document.\n\
133
"));
134
PyObject *scribus_getcharstylenames(PyObject * /*self*/);
135
 
23695 jghali 136
 
137
/*! docstring */
138
PyDoc_STRVAR(scribus_getlinestyles__doc__,
139
QT_TR_NOOP("getLineStyles() -> list\n\
140
\n\
141
Return a list of the names of all line styles in the current document.\n\
142
"));
143
PyObject *scribus_getlinestyles(PyObject * /*self*/);
144
 
22205 jghali 145
#endif
146