Пример #1
0
class IListItem(stylesheet.IMinimalListStyle, flowable.IFlow):
    """A list item in an ordered or unordered list."""

    style = attr.Style(
        title='Style',
        description='The list style that is applied to the list.',
        required=False)
Пример #2
0
class IPreformatted(IMinimalParagraphBase):
    """A preformatted text, similar to the <pre> tag in HTML."""

    style = attr.Style(
        title=u'Style',
        description=(u'The paragraph style that is applied to the paragraph. '
                     u'See the ``paraStyle`` tag for creating a paragraph '
                     u'style.'),
        default=SampleStyleSheet['Code'],
        required=False)

    text = attr.RawXMLContent(
        title=u'Text',
        description=(u'The text that will be layed out.'),
        required=True)

    maxLineLength = attr.Integer(
        title=u'Max Line Length',
        description=(u'The maximum number of characters on one line.'),
        required=False)

    newLineChars = attr.Text(
        title=u'New Line Characters',
        description=u'The characters placed at the beginning of a wrapped line',
        required=False)
Пример #3
0
class IBlockTable(interfaces.IRMLDirectiveSignature):
    """A typical block table."""
    occurence.containing(
        occurence.ZeroOrMore('tr', ITableRow),
        occurence.ZeroOrOne('bulkData', ITableBulkData),
        occurence.ZeroOrMore('blockTableStyle', stylesheet.IBlockTableStyle),
    )

    style = attr.Style(
        title=u'Style',
        description=(u'The table style that is applied to the table. '),
        required=False)

    rowHeights = attr.Sequence(
        title=u'Row Heights',
        description=u'A list of row heights in the table.',
        value_type=attr.Measurement(),
        required=False)

    colWidths = attr.Sequence(
        title=u'Column Widths',
        description=u'A list of column widths in the table.',
        value_type=attr.Measurement(allowPercentage=True, allowStar=True),
        required=False)

    repeatRows = attr.Integer(
        title=u'Repeat Rows',
        description=u'A flag to repeat rows upon table splits.',
        required=False)

    alignment = attr.Choice(title=u'Alignment',
                            description=u'The alignment of whole table.',
                            choices=interfaces.ALIGN_TEXT_CHOICES,
                            required=False)
Пример #4
0
class ISpanStyle(interfaces.IRMLDirectiveSignature):
    """Defines a span style and gives it a name."""

    name = attr.String(title=u'Name',
                       description=u'The name of the style.',
                       required=True)

    alias = attr.String(
        title=u'Alias',
        description=u'An alias under which the style will also be known as.',
        required=False)

    parent = attr.Style(
        title=u'Parent',
        description=(u'The apragraph style that will be used as a base for '
                     u'this one.'),
        required=False)

    fontName = attr.String(title=u'Font Name',
                           description=u'The name of the font for the span.',
                           required=False)

    fontSize = attr.Measurement(
        title=u'Font Size',
        description=u'The font size for the text of the span.',
        required=False)

    textColor = attr.Color(
        title=u'Text Color',
        description=u'The color in which the text will appear.',
        required=False)

    backColor = attr.Color(title=u'Background Color',
                           description=u'The background color of the span.',
                           required=False)
Пример #5
0
class IAlias(interfaces.IRMLDirectiveSignature):
    """Defines an alias for a given style."""

    id = attr.Text(title='Id',
                   description='The id as which the style will be known.',
                   required=True)

    value = attr.Style(title='Value',
                       description='The style that is represented.',
                       required=True)
Пример #6
0
class IHeading3(IParagraph):
    """Heading 3 is a simple paragraph with a special heading 3 style."""

    style = attr.Style(
        title=u'Style',
        description=(u'The paragraph style that is applied to the paragraph. '
                     u'See the ``paraStyle`` tag for creating a paragraph '
                     u'style.'),
        default=reportlab.lib.styles.getSampleStyleSheet()['Heading3'],
        required=True)
Пример #7
0
class IListStyle(IBaseListStyle):
    """Defines a list style and gives it a name."""

    name = attr.String(title=u'Name',
                       description=u'The name of the style.',
                       required=True)

    parent = attr.Style(
        title=u'Parent',
        description=(u'The list style that will be used as a base for '
                     u'this one.'),
        required=False)
Пример #8
0
class IShowIndex(interfaces.IRMLDirectiveSignature):
    """Creates an index in the document."""

    name = attr.String(title=u'Name',
                       description=u'The name of the index.',
                       default='index',
                       required=False)

    dot = attr.String(title=u'Dot',
                      description=u'The character to use as a dot.',
                      required=False)

    style = attr.Style(
        title=u'Style',
        description=u'The paragraph style that is applied to the index. ',
        required=False)

    tableStyle = attr.Style(
        title=u'Table Style',
        description=u'The table style that is applied to the index layout. ',
        required=False)
Пример #9
0
class ICodeSnippet(IXPreformatted):
    """A code snippet with text highlighting."""

    style = attr.Style(
        title=u'Style',
        description=(u'The paragraph style that is applied to the paragraph. '
                     u'See the ``paraStyle`` tag for creating a paragraph '
                     u'style.'),
        required=False)

    language = attr.String(
        title=u'Language',
        description=u'The language the code snippet is written in.',
        required=False)
Пример #10
0
class IXPreformatted(IParagraphBase):
    """A preformatted text that allows paragraph markup."""

    style = attr.Style(
        title=u'Style',
        description=(u'The paragraph style that is applied to the paragraph. '
                     u'See the ``paraStyle`` tag for creating a paragraph '
                     u'style.'),
        default=SampleStyleSheet['Normal'],
        required=False)

    text = attr.RawXMLContent(
        title=u'Text',
        description=(u'The text that will be layed out.'),
        required=True)
Пример #11
0
class IParagraphStyle(IBaseParagraphStyle):
    """Defines a paragraph style and gives it a name."""

    name = attr.String(title=u'Name',
                       description=u'The name of the style.',
                       required=True)

    alias = attr.String(
        title=u'Alias',
        description=u'An alias under which the style will also be known as.',
        required=False)

    parent = attr.Style(
        title=u'Parent',
        description=(u'The apragraph style that will be used as a base for '
                     u'this one.'),
        required=False)
Пример #12
0
class IDocPara(interfaces.IRMLDirectiveSignature):
    """Create a paragraph with the value returned from the expression."""

    expr = attr.String(title=u'Expression',
                       description=u'The expression to be executed.',
                       required=True)

    format = attr.String(
        title=u'Format',
        description=u'The format used to render the expression value.',
        required=False)

    style = attr.Style(title=u'Style',
                       description=u'The style of the paragraph.',
                       required=False)

    escape = attr.Boolean(
        title=u'Escape Text',
        description=u'When set (default) the expression value is escaped.',
        required=False)
Пример #13
0
class IMinimalParagraphBase(interfaces.IRMLDirectiveSignature):

    style = attr.Style(
        title=u'Style',
        description=(u'The paragraph style that is applied to the paragraph. '
                     u'See the ``paraStyle`` tag for creating a paragraph '
                     u'style.'),
        required=False)

    bulletText = attr.String(
        title=u'Bullet Character',
        description=(u'The bullet character is the ASCII representation of '
                     u'the symbol making up the bullet in a listing.'),
        required=False)

    dedent = attr.Integer(
        title=u'Dedent',
        description=(u'Number of characters to be removed in front of every '
                     u'line of the text.'),
        required=False)
Пример #14
0
class ISpanStyle(interfaces.IRMLDirectiveSignature):
    """Defines a span style and gives it a name."""

    name = attr.String(title=u'Name',
                       description=u'The name of the style.',
                       required=True)

    alias = attr.String(
        title=u'Alias',
        description=u'An alias under which the style will also be known as.',
        required=False)

    parent = attr.Style(
        title=u'Parent',
        description=(u'The apragraph style that will be used as a base for '
                     u'this one.'),
        required=False)

    fontName = attr.String(title=u'Font Name',
                           description=u'The name of the font for the span.',
                           required=False)

    fontSize = attr.Measurement(
        title=u'Font Size',
        description=u'The font size for the text of the span.',
        required=False)

    textTransform = attr.Choice(title=u'Text Transform',
                                description=u'Text transformation.',
                                choices=interfaces.TEXT_TRANSFORM_CHOICES,
                                required=False)

    underline = attr.Boolean(
        title=u'Underline Text',
        description=u'A flag, when set, causes text to be underlined.',
        required=False)

    underlineColor = attr.Color(
        title=u'Underline Color',
        description=u'The color in which the underline will appear.',
        required=False)

    underlineWidth = attr.FontSizeRelativeMeasurement(
        title=u'Underline Width',
        description=(u'The width/thickness of the underline.'),
        required=False)

    underlineOffset = attr.FontSizeRelativeMeasurement(
        title=u'Underline Offset',
        description=(
            u'The offset of the underline with respect to the baseline.'),
        required=False)

    underlineGap = attr.FontSizeRelativeMeasurement(
        title=u'Underline Gap',
        description=(
            u'The gap between lines for double and triple underlines.'),
        required=False)

    underlineKind = attr.Choice(
        title=u'Underline Kind',
        description=(u'The kind of the underline to use.'),
        choices=interfaces.UNDERLINE_KIND_CHOICES,
        default='single',
        required=False)

    strike = attr.Boolean(
        title=u'Strike-through Text',
        description=u'A flag, when set, causes text to be struck out.',
        required=False)

    strikeColor = attr.Color(
        title=u'Strike Color',
        description=u'The color in which the strike line will appear.',
        required=False)

    strikeWidth = attr.FontSizeRelativeMeasurement(
        title=u'Strike Width',
        description=(u'The width of the strike line.'),
        required=False)

    strikeOffset = attr.FontSizeRelativeMeasurement(
        title=u'Strike Offset',
        description=(
            u'The offset of the strike line with respect to the baseline.'),
        required=False)

    strikeGap = attr.FontSizeRelativeMeasurement(
        title=u'Strike Gap',
        description=(
            u'The gap between lines for double and triple strike lines.'),
        required=False)

    strikeKind = attr.Choice(title=u'Strike Kind',
                             description=(u'The kind of the strike to use.'),
                             choices=interfaces.STRIKE_KIND_CHOICES,
                             default='single',
                             required=False)

    textColor = attr.Color(
        title=u'Text Color',
        description=u'The color in which the text will appear.',
        required=False)

    backColor = attr.Color(title=u'Background Color',
                           description=u'The background color of the span.',
                           required=False)

    linkUnderline = attr.Boolean(
        title=u'Underline Links',
        description=(u'A flag, when set indicating that all links should be '
                     u'underlined.'),
        default=False,
        required=False)
Пример #15
0
class IListBase(stylesheet.IBaseListStyle):

    style = attr.Style(
        title='Style',
        description='The list style that is applied to the list.',
        required=False)