class IShape(interfaces.IRMLDirectiveSignature): """A shape to be drawn on the canvas.""" x = attr.Measurement( title=u'X-Coordinate', description=(u'The X-coordinate of the lower-left position of the ' u'shape.'), required=True) y = attr.Measurement( title=u'Y-Coordinate', description=(u'The Y-coordinate of the lower-left position of the ' u'shape.'), required=True) fill = attr.Boolean( title=u'Fill', description=u'A flag to specify whether the shape should be filled.', required=False) stroke = attr.Boolean( title=u'Stroke', description=(u"A flag to specify whether the shape's outline should " u"be drawn."), required=False)
class ILinePlot(IChart): """A line plot.""" occurence.containing(occurence.One('data', IData2D), occurence.ZeroOrOne('lines', ILines), occurence.ZeroOrOne('xValueAxis', IXValueAxis), occurence.ZeroOrOne('yValueAxis', IYValueAxis), occurence.ZeroOrOne('lineLabels', ILineLabels), *IChart.queryTaggedValue('directives', ())) reversePlotOrder = attr.Boolean( title='Reverse Plot Order', description='When true, the coordinate system is reversed.', required=False) lineLabelNudge = attr.Measurement( title='Line Label Nudge', description='The distance between the data point and its label.', required=False) lineLabelFormat = attr.Text( title='Line Label Format', description='Formatting string for data point labels.', required=False) joinedLines = attr.Boolean( title='Joined Lines', description='When true, connect all data points with lines.', required=False) inFill = attr.Boolean( title='Name', description=('Flag indicating whether the line plot should be filled, ' 'in other words converted to an area chart.'), required=False)
class ILinePlot(IChart): """A line plot.""" occurence.containing(occurence.One('data', IData2D), occurence.ZeroOrOne('lines', ILines), occurence.ZeroOrOne('xValueAxis', IXValueAxis), occurence.ZeroOrOne('yValueAxis', IYValueAxis), occurence.ZeroOrOne('lineLabels', ILineLabels), *IChart.queryTaggedValue('directives', ())) reversePlotOrder = attr.Boolean( title=u'Reverse Plot Order', description=u'When true, the coordinate system is reversed.', required=False) lineLabelNudge = attr.Measurement( title=u'Line Label Nudge', description=u'The distance between the data point and its label.', required=False) lineLabelFormat = attr.String( title=u'Line Label Format', description=u'Formatting string for data point labels.', required=False) joinedLines = attr.Boolean( title=u'Joined Lines', description=u'When true, connect all data points with lines.', required=False)
class IPath(IShape): """Create a line path.""" occurence.containing( occurence.ZeroOrMore('moveto', IMoveTo), occurence.ZeroOrMore('curveto', ICurveTo), occurence.ZeroOrMore('curvesto', ICurvesTo), ) points = attr.TextNodeGrid( title=u'Points', description=(u'A list of coordinate points that define th path.'), value_type=attr.Measurement(), columns=2, required=True) close = attr.Boolean( title=u'Close Path', description=(u"A flag specifying whether the path should be closed."), default=False, required=False) clip = attr.Boolean( title=u'Clip Path', description=(u"A flag specifying whether the path should clip " u"overlapping elements."), default=False, required=False)
class ITemplate(interfaces.IRMLDirectiveSignature): """Define a page template.""" occurence.containing(occurence.OneOrMore('pageTemplate', IPageTemplate), ) pagesize = attr.PageSize(title=u'Page Size', description=u'The Page Size.', required=False) rotation = attr.Integer( title=u'Rotation', description=u'The rotation of the page in multiples of 90 degrees.', required=False) leftMargin = attr.Measurement( title=u'Left Margin', description=u'The left margin of the template.', default=0, required=False) rightMargin = attr.Measurement( title=u'Right Margin', description=u'The right margin of the template.', default=0, required=False) topMargin = attr.Measurement( title=u'Top Margin', description=u'The top margin of the template.', default=0, required=False) bottomMargin = attr.Measurement( title=u'Bottom Margin', description=u'The bottom margin of the template.', default=0, required=False) showBoundary = attr.Boolean( title=u'Show Boundary', description=u'A flag to show the boundary of the template.', required=False) allowSplitting = attr.Boolean( title=u'Allow Splitting', description=u'A flag to allow splitting over multiple templates.', required=False) title = attr.Text(title=u'Title', description=u'The title of the PDF document.', required=False) author = attr.Text(title=u'Author', description=u'The author of the PDF document.', required=False)
class IPieChart(IChart): """A pie chart.""" occurence.containing(occurence.One('data', ISingleData1D), occurence.ZeroOrOne('slices', ISlices), occurence.ZeroOrOne('labels', ISimpleLabels), *IChart.queryTaggedValue('directives', ())) startAngle = attr.Integer( title=u'Start Angle', description=u'The start angle in the chart of the first slice ' u'in degrees.', required=False) direction = attr.Choice( title=u'Direction', description=u'The direction in which the pie chart will be built.', choices=('clockwise', 'anticlockwise'), required=False) checkLabelOverlap = attr.Boolean( title=u'Check Label Overlap', description=(u'When true, check and attempt to fix standard ' u'label overlaps'), required=False) pointerLabelMode = attr.Choice( title=u'Pointer Label Mode', description=(u'The location relative to the slace the label should ' u'be placed.'), choices={ 'none': None, 'leftright': 'LeftRight', 'leftandright': 'LeftAndRight' }, required=False) sameRadii = attr.Boolean( title=u'Same Radii', description=u'When true, make x/y radii the same.', required=False) orderMode = attr.Choice(title=u'Order Mode', description=u'', choices=('fixed', 'alternate'), required=False) xradius = attr.Measurement(title=u'X-Radius', description=u'The radius of the X-directions', required=False) yradius = attr.Measurement(title=u'Y-Radius', description=u'The radius of the Y-directions', required=False)
class IImage(interfaces.IRMLDirectiveSignature): """Draws an external image on the canvas.""" file = attr.Image( title='File', description=('Reference to the external file of the iamge.'), required=True) x = attr.Measurement( title='X-Coordinate', description=('The X-coordinate of the lower-left position of the ' 'shape.'), required=True) y = attr.Measurement( title='Y-Coordinate', description=('The Y-coordinate of the lower-left position of the ' 'shape.'), required=True) width = attr.Measurement(title='Width', description='The width of the image.', required=False) height = attr.Measurement(title='Height', description='The height of the image.', required=False) showBoundary = attr.Boolean( title='Show Boundary', description=('A flag determining whether a border should be drawn ' 'around the image.'), default=False, required=False) preserveAspectRatio = attr.Boolean( title='Preserve Aspect Ratio', description=("A flag determining whether the image's aspect ration " "should be conserved under any circumstances."), default=False, required=False) mask = attr.Color( title='Mask', description= 'The color mask used to render the image, or "auto" to use the alpha channel if available.', default='auto', required=False, acceptAuto=True)
class IBlockTableStyle(interfaces.IRMLDirectiveSignature): """A style defining the look of a table.""" occurence.containing( occurence.ZeroOrMore('blockFont', IBlockFont), occurence.ZeroOrMore('blockLeading', IBlockLeading), occurence.ZeroOrMore('blockTextColor', IBlockTextColor), occurence.ZeroOrMore('blockAlignment', IBlockAlignment), occurence.ZeroOrMore('blockLeftPadding', IBlockLeftPadding), occurence.ZeroOrMore('blockRightPadding', IBlockRightPadding), occurence.ZeroOrMore('blockBottomPadding', IBlockBottomPadding), occurence.ZeroOrMore('blockTopPadding', IBlockTopPadding), occurence.ZeroOrMore('blockBackground', IBlockBackground), occurence.ZeroOrMore('blockRowBackground', IBlockRowBackground), occurence.ZeroOrMore('blockColBackground', IBlockColBackground), occurence.ZeroOrMore('blockValign', IBlockValign), occurence.ZeroOrMore('blockSpan', IBlockSpan), occurence.ZeroOrMore('lineStyle', ILineStyle)) id = attr.String(title=u'Id', description=u'The name/id of the style.', required=True) keepWithNext = attr.Boolean( title=u'Keep with Next', description=(u'When set, this paragraph will always be in the same ' u'frame as the following flowable.'), required=False)
class IKeepInFrame(interfaces.IRMLDirectiveSignature): """Ask a flowable to stay within the frame.""" maxWidth = attr.Measurement( title=u'Maximum Width', description=u'The maximum width the flowables are allotted.', default=None, required=False) maxHeight = attr.Measurement( title=u'Maximum Height', description=u'The maximum height the flowables are allotted.', default=None, required=False) mergeSpace = attr.Boolean( title=u'Merge Space', description=u'A flag to set whether the space should be merged.', required=False) onOverflow = attr.Choice( title=u'On Overflow', description=u'Defines what has to be done, if an overflow is detected.', choices=('error', 'overflow', 'shrink', 'truncate'), required=False) id = attr.Text(title=u'Name/Id', description=u'The name/id of the flowable.', required=False) frame = attr.StringOrInt( title=u'Frame', description=u'The frame to which the flowable should be fitted.', required=False)
class IDocument(interfaces.IRMLDirectiveSignature): occurence.containing( occurence.ZeroOrOne('docinit', IDocInit), occurence.ZeroOrOne('stylesheet', stylesheet.IStylesheet), occurence.ZeroOrOne('template', template.ITemplate), occurence.ZeroOrOne('story', template.IStory), occurence.ZeroOrOne('pageInfo', canvas.IPageInfo), occurence.ZeroOrMore('pageDrawing', canvas.IPageDrawing), ) filename = attr.String( title=u'File Name', description=(u'The default name of the output file, if no output ' u'file was provided.'), required=True) debug = attr.Boolean( title=u'Debug', description=u'A flag to activate the debug output.', required=False) compression = attr.BooleanWithDefault( title=u'Compression', description=(u'A flag determining whether page compression should ' u'be used.'), required=False) invariant = attr.BooleanWithDefault( title=u'Invariant', description=(u'A flag that determines whether the produced PDF ' u'should be invariant with respect to the date and ' u'the exact contents.'), required=False)
class ITextField(IField): """A text field within the PDF""" width = attr.Measurement( title=u'Width', description=u'The width of the text field.', required=True) height = attr.Measurement( title=u'Height', description=u'The height of the text field.', required=True) value = attr.Text( title=u'Value', description=u'The default text value of the field.', required=False) maxLength = attr.Integer( title=u'Maximum Length', description=u'The maximum amount of characters allowed in the field.', required=False) multiline = attr.Boolean( title=u'Multiline', description=u'A flag when set allows multiple lines within the field.', required=False)
class ICropMarks(interfaces.IRMLDirectiveSignature): """Crop Marks specification""" name = attr.Text(title='Name', description='The name of the index.', default='index', required=True) borderWidth = attr.Measurement( title='Border Width', description='The width of the crop mark border.', required=False) markColor = attr.Color(title='Mark Color', description='The color of the crop marks.', required=False) markWidth = attr.Measurement( title='Mark Width', description='The line width of the actual crop marks.', required=False) markLength = attr.Measurement( title='Mark Length', description='The length of the actual crop marks.', required=False) markLast = attr.Boolean( title='Mark Last', description='If set, marks are drawn after the content is rendered.', required=False) bleedWidth = attr.Measurement(title='Bleed Width', description=('The width of the page bleed.'), required=False)
class IYValueAxis(IValueAxis): """Y-Value Axis""" tickLeft = attr.Measurement( title='Tick Left', description='Length of tick left to the axis line.', required=False) tickRight = attr.Measurement( title='Tick Right', description='Length of tick right to the axis line.', required=False) joinAxis = attr.Boolean(title='Join Axis', description='Whether to join the axes.', required=False) joinAxisMode = attr.Choice(title='Join Axis Mode', description='Mode for connecting axes.', choices=('bottom', 'top', 'value', 'points', 'None'), required=False) joinAxisPos = attr.Measurement( title='Join Axis Position', description='The position in the plot at which to join the axes.', required=False)
class ISpoke(interfaces.IRMLDirectiveSignature): """A spoke in the spider diagram.""" strokeWidth = attr.Measurement( title='Stroke Width', description="The width of the spoke's line.", required=False) fillColor = attr.Color(title='Fill Color', description="The fill color of the spoke's area.", required=False) strokeColor = attr.Color(title='Stroke Color', description='The color of the spoke line.', required=False) strokeDashArray = attr.Sequence( title='Stroke Dash Array', description='The dash array of the spoke line.', value_type=attr.Float(), required=False) labelRadius = attr.Measurement( title='Label Radius', description='The radius of the label arouns the spoke.', required=False) visible = attr.Boolean(title='Visible', description='When true, the spoke line is drawn.', required=False)
class IXValueAxis(IValueAxis): """X-Value Axis""" tickUp = attr.Measurement( title='Tick Up', description='Length of tick above the axis line.', required=False) tickDown = attr.Measurement( title='Tick Down', description='Length of tick below the axis line.', required=False) joinAxis = attr.Boolean(title='Join Axis', description='Whether to join the axes.', required=False) joinAxisMode = attr.Choice(title='Join Axis Mode', description='Mode for connecting axes.', choices=('bottom', 'top', 'value', 'points', 'None'), required=False) joinAxisPos = attr.Measurement( title='Join Axis Position', description='The position in the plot at which to join the axes.', required=False)
class IValueAxis(IAxis): forceZero = attr.Boolean( title=u'Force Zero', description=u'When set, the range will contain the origin.', required=False) minimumTickSpacing = attr.Measurement( title=u'Minimum Tick Spacing', description=u'The minimum distance between ticks.', required=False) maximumTicks = attr.Integer( title=u'Maximum Ticks', description=u'The maximum number of ticks to be shown.', required=False) labelTextFormat = attr.String( title=u'Label Text Format', description=u'Formatting string for axis labels.', required=False) labelTextPostFormat = attr.Text( title=u'Label Text Post Format', description=u'An additional formatting string.', required=False) labelTextScale = attr.Float( title=u'Label Text Scale', description=u'The sclaing factor for the label tick values.', required=False) valueMin = attr.Float(title=u'Minimum Value', description=u'The smallest value on the axis.', required=False) valueMax = attr.Float(title=u'Maximum Value', description=u'The largest value on the axis.', required=False) valueStep = attr.Float(title=u'Value Step', description=u'The step size between ticks', required=False) valueSteps = attr.Sequence( title=u'Step Sizes', description=u'List of step sizes between ticks.', value_type=attr.Float(), required=False) rangeRound = attr.Choice( title=u'Range Round', description=u'Method to be used to round the range values.', choices=('none', 'both', 'ceiling', 'floor'), required=False) zrangePref = attr.Float(title=u'Zero Range Preference', description=u'Zero range axis limit preference.', required=False)
class IFrame(interfaces.IRMLDirectiveSignature): """A frame on a page.""" x1 = attr.Measurement( title=u'X-Position', description=u'The X-Position of the lower-left corner of the frame.', allowPercentage=True, required=True) y1 = attr.Measurement( title=u'Y-Position', description=u'The Y-Position of the lower-left corner of the frame.', allowPercentage=True, required=True) width = attr.Measurement(title=u'Width', description=u'The width of the frame.', allowPercentage=True, required=True) height = attr.Measurement(title=u'Height', description=u'The height of the frame.', allowPercentage=True, required=True) id = attr.Text(title=u'Id', description=u'The id of the frame.', required=False) leftPadding = attr.Measurement( title=u'Left Padding', description=u'The left padding of the frame.', default=0, required=False) rightPadding = attr.Measurement( title=u'Right Padding', description=u'The right padding of the frame.', default=0, required=False) topPadding = attr.Measurement(title=u'Top Padding', description=u'The top padding of the frame.', default=0, required=False) bottomPadding = attr.Measurement( title=u'Bottom Padding', description=u'The bottom padding of the frame.', default=0, required=False) showBoundary = attr.Boolean( title=u'Show Boundary', description=u'A flag to show the boundary of the frame.', required=False)
class IImage(interfaces.IRMLDirectiveSignature): """Draws an external image on the canvas.""" file = attr.Image( title=u'File', description=(u'Reference to the external file of the iamge.'), required=True) x = attr.Measurement( title=u'X-Coordinate', description=(u'The X-coordinate of the lower-left position of the ' u'shape.'), required=True) y = attr.Measurement( title=u'Y-Coordinate', description=(u'The Y-coordinate of the lower-left position of the ' u'shape.'), required=True) width = attr.Measurement(title=u'Width', description=u'The width of the image.', required=False) height = attr.Measurement(title=u'Height', description=u'The height of the image.', required=False) showBoundary = attr.Boolean( title=u'Show Boundary', description=(u'A flag determining whether a border should be drawn ' u'around the image.'), default=False, required=False) preserveAspectRatio = attr.Boolean( title=u'Preserve Aspect Ratio', description=(u"A flag determining whether the image's aspect ration " u"should be conserved under any circumstances."), default=False, required=False)
class IDocument(interfaces.IRMLDirectiveSignature): occurence.containing( occurence.ZeroOrOne('docinit', IDocInit), occurence.ZeroOrOne('stylesheet', stylesheet.IStylesheet), occurence.ZeroOrOne('template', template.ITemplate), occurence.ZeroOrOne('story', template.IStory), occurence.ZeroOrOne('pageInfo', canvas.IPageInfo), occurence.ZeroOrMore('pageDrawing', canvas.IPageDrawing), ) filename = attr.Text( title='File Name', description=('The default name of the output file, if no output ' 'file was provided.'), required=True) title = attr.Text( title='Title', description=('The "Title" annotation for the PDF document.'), required=False) subject = attr.Text( title='Subject', description=('The "Subject" annotation for the PDF document.'), required=False) author = attr.Text( title='Author', description=('The "Author" annotation for the PDF document.'), required=False) creator = attr.Text( title='Creator', description=('The "Creator" annotation for the PDF document.'), required=False) debug = attr.Boolean(title='Debug', description='A flag to activate the debug output.', default=False, required=False) compression = attr.BooleanWithDefault( title='Compression', description=('A flag determining whether page compression should ' 'be used.'), required=False) invariant = attr.BooleanWithDefault( title='Invariant', description=('A flag that determines whether the produced PDF ' 'should be invariant with respect to the date and ' 'the exact contents.'), required=False)
class ICategoryAxis(IAxis): """An axis displaying categories (instead of numerical values).""" occurence.containing(occurence.ZeroOrOne('categoryNames', ICategoryNames), *IAxis.queryTaggedValue('directives', ())) categoryNames = attr.Sequence( title='Category Names', description='A simple list of category names.', value_type=attr.Text(), required=False) joinAxis = attr.Boolean(title='Join Axis', description='When true, both axes join together.', required=False) joinAxisPos = attr.Measurement( title='Join Axis Position', description='The position at which the axes should join together.', required=False) reverseDirection = attr.Boolean( title='Reverse Direction', description='A flag to reverse the direction of category names.', required=False) labelAxisMode = attr.Choice( title='Label Axis Mode', description='Defines the relative position of the axis labels.', choices=('high', 'low', 'axis'), required=False) tickShift = attr.Boolean( title='Tick Shift', description=('When true, place the ticks in the center of a ' 'category instead the beginning and end.'), required=False)
class IBarChart(IChart): """Creates a two-dimensional bar chart.""" occurence.containing(occurence.One('data', IData1D), occurence.ZeroOrOne('bars', IBars), occurence.ZeroOrOne('categoryAxis', ICategoryAxis), occurence.ZeroOrOne('valueAxis', IValueAxis), occurence.ZeroOrOne('barLabels', IBarLabels), *IChart.queryTaggedValue('directives', ())) direction = attr.Choice( title=u'Direction', description=u'The direction of the bars within the chart.', choices=('horizontal', 'vertical'), default='horizontal', required=False) useAbsolute = attr.Boolean( title=u'Use Absolute Spacing', description=u'Flag to use absolute spacing values.', default=False, required=False) barWidth = attr.Measurement(title=u'Bar Width', description=u'The width of an individual bar.', default=10, required=False) groupSpacing = attr.Measurement( title=u'Group Spacing', description=u'Width between groups of bars.', default=5, required=False) barSpacing = attr.Measurement( title=u'Bar Spacing', description=u'Width between individual bars.', default=0, required=False) barLabelFormat = attr.String( title=u'Bar Label Text Format', description=u'Formatting string for bar labels.', required=False)
class IBarCode(IBarCodeBase): """A barcode graphic.""" x = attr.Measurement( title=u'X-Position', description=u'The x-position of the lower-left corner of the barcode.', default=0, required=False) y = attr.Measurement( title=u'Y-Position', description=u'The y-position of the lower-left corner of the barcode.', default=0, required=False) isoScale = attr.Boolean( title=u'Isometric Scaling', description=u'When set, the aspect ration of the barcode is enforced.', required=False)
class IImage(interfaces.IRMLDirectiveSignature): """An image.""" src = attr.Image( title=u'Image Source', description=u'The file that is used to extract the image data.', onlyOpen=True, required=True) width = attr.Measurement( title=u'Image Width', description=u'The width of the image.', required=False) height = attr.Measurement( title=u'Image Height', description=u'The height the image.', required=False) preserveAspectRatio = attr.Boolean( title=u'Preserve Aspect Ratio', description=(u'If set, the aspect ratio of the image is kept. When ' u'both, width and height, are specified, the image ' u'will be fitted into that bounding box.'), default=False, required=False) mask = attr.Color( title=u'Mask', description=u'The color mask used to render the image.', required=False) align = attr.Choice( title=u'Alignment', description=u'The alignment of the image within the frame.', choices=interfaces.ALIGN_TEXT_CHOICES, required=False) vAlign = attr.Choice( title=u'Vertical Alignment', description=u'The vertical alignment of the image.', choices=interfaces.VALIGN_TEXT_CHOICES, required=False)
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)
class IOutlineAdd(interfaces.IRMLDirectiveSignature): """Add a new entry to the outline of the PDF.""" title = attr.TextNode(title=u'Title', description=u'The text displayed for this item.', required=True) key = attr.String(title=u'Key', description=u'The unique key of the item.', required=False) level = attr.Integer(title=u'Level', description=u'The level in the outline tree.', required=False) closed = attr.Boolean( title=u'Closed', description=(u'A flag to determine whether the sub-tree is closed ' u'by default.'), required=False)
class IChart(interfaces.IRMLDirectiveSignature): occurence.containing(occurence.ZeroOrOne('texts', ITexts), ) # Drawing Options dx = attr.Measurement( title='Drawing X-Position', description='The x-position of the entire drawing on the canvas.', required=False) dy = attr.Measurement( title='Drawing Y-Position', description='The y-position of the entire drawing on the canvas.', required=False) dwidth = attr.Measurement(title='Drawing Width', description='The width of the entire drawing', required=False) dheight = attr.Measurement(title='Drawing Height', description='The height of the entire drawing', required=False) angle = attr.Float( title='Angle', description='The orientation of the drawing as an angle in degrees.', required=False) # Plot Area Options x = attr.Measurement( title='Chart X-Position', description='The x-position of the chart within the drawing.', required=False) y = attr.Measurement( title='Chart Y-Position', description='The y-position of the chart within the drawing.', required=False) width = attr.Measurement(title='Chart Width', description='The width of the chart.', required=False) height = attr.Measurement(title='Chart Height', description='The height of the chart.', required=False) strokeColor = attr.Color(title='Stroke Color', description='Color of the chart border.', required=False) strokeWidth = attr.Measurement(title='Stroke Width', description='Width of the chart border.', required=False) fillColor = attr.Color(title='Fill Color', description='Color of the chart interior.', required=False) debug = attr.Boolean( title='Debugging', description='A flag that when set to True turns on debug messages.', required=False)
class IBaseParagraphStyle(ISpanStyle): leading = attr.Measurement( title=u'Leading', description=(u'The height of a single paragraph line. It includes ' u'character height.'), required=False) leftIndent = attr.Measurement( title=u'Left Indentation', description=u'General indentation on the left side.', required=False) rightIndent = attr.Measurement( title=u'Right Indentation', description=u'General indentation on the right side.', required=False) firstLineIndent = attr.Measurement( title=u'First Line Indentation', description=u'The indentation of the first line in the paragraph.', required=False) alignment = attr.Choice(title=u'Alignment', description=u'The text alignment.', choices=interfaces.ALIGN_CHOICES, required=False) spaceBefore = attr.Measurement( title=u'Space Before', description=u'The vertical space before the paragraph.', required=False) spaceAfter = attr.Measurement( title=u'Space After', description=u'The vertical space after the paragraph.', required=False) bulletFontName = attr.String( title=u'Bullet Font Name', description=u'The font in which the bullet character will be rendered.', required=False) bulletFontSize = attr.Measurement( title=u'Bullet Font Size', description=u'The font size of the bullet character.', required=False) bulletIndent = attr.Measurement( title=u'Bullet Indentation', description=u'The indentation that is kept for a bullet point.', required=False) bulletColor = attr.Color( title=u'Bullet Color', description=u'The color in which the bullet will appear.', required=False) wordWrap = attr.Choice( title=u'Word Wrap Method', description=( u'When set to "CJK", invoke CJK word wrapping. LTR RTL use ' u'left to right / right to left with support from pyfribi2 if ' u'available'), choices=interfaces.WORD_WRAP_CHOICES, required=False) borderWidth = attr.Measurement( title=u'Paragraph Border Width', description=u'The width of the paragraph border.', required=False) borderPadding = attr.Padding(title=u'Paragraph Border Padding', description=u'Padding of the paragraph.', required=False) borderColor = attr.Color( title=u'Border Color', description=u'The color in which the paragraph border will appear.', required=False) borderRadius = attr.Measurement( title=u'Paragraph Border Radius', description=u'The radius of the paragraph border.', required=False) allowWidows = attr.Boolean(title=u'Allow Widows', description=(u'Allow widows.'), required=False) allowOrphans = attr.Boolean(title=u'Allow Orphans', description=(u'Allow orphans.'), required=False) endDots = attr.String( title=u'End Dots', description=u'Characters/Dots at the end of a paragraph.', required=False) splitLongWords = attr.Boolean( title=u'Split Long Words', description=(u'Try to split long words at the end of a line.'), default=True, required=False) justifyLastLine = attr.Integer( title=u'Justify Last Line', description=( u'Justify last line if there are more then this number of words. ' u'Otherwise, don\'t bother.'), default=0, required=False) justifyBreaks = attr.Boolean( title=u'Justify Breaks', description=( u'A flag, when set indicates that a line with a break should be ' u'justified as well.'), default=False, required=False) spaceShrinkage = attr.Float( title=u'Allowed Whitespace Shrinkage Fraction', description=( u'The fraction of the original whitespace by which the ' u'whitespace is allowed to shrink to fit content on the same ' u'line.'), required=False) bulletAnchor = attr.Choice( title=u'Bullet Anchor', description=u'The place at which the bullet is anchored.', choices=interfaces.BULLET_ANCHOR_CHOICES, default='start', required=False) # Attributes not part of the official style attributes, but are accessed # by the paragraph renderer. keepWithNext = attr.Boolean( title=u'Keep with Next', description=(u'When set, this paragraph will always be in the same ' u'frame as the following flowable.'), required=False) pageBreakBefore = attr.Boolean( title=u'Page Break Before', description=(u'Specifies whether a page break should be inserted ' u'before the directive.'), required=False) frameBreakBefore = attr.Boolean( title=u'Frame Break Before', description=(u'Specifies whether a frame break should be inserted ' u'before the directive.'), required=False)
class ILabelBase(interfaces.IRMLDirectiveSignature): dx = attr.Measurement(title='Horizontal Extension', description=('The width of the label.'), required=False) dy = attr.Measurement(title='Vertical Extension', description=('The height of the label.'), required=False) angle = attr.Float(title='Angle', description=('The angle to rotate the label.'), required=False) boxAnchor = attr.Choice( title='Box Anchor', description=('The position relative to the label.'), choices=('nw', 'n', 'ne', 'w', 'c', 'e', 'sw', 's', 'se', 'autox', 'autoy'), required=False) boxStrokeColor = attr.Color( title='Box Stroke Color', description=('The color of the box border line.'), required=False) boxStrokeWidth = attr.Measurement( title='Box Stroke Width', description='The width of the box border line.', required=False) boxFillColor = attr.Color( title='Box Fill Color', description=('The color in which the box is filled.'), required=False) boxTarget = attr.Text(title='Box Target', description='The box target.', required=False) fillColor = attr.Color( title='Fill Color', description=('The color in which the label is filled.'), required=False) strokeColor = attr.Color(title='Stroke Color', description=('The color of the label.'), required=False) strokeWidth = attr.Measurement(title='Stroke Width', description='The width of the label line.', required=False) fontName = attr.Text(title='Font Name', description='The font used to print the value.', required=False) fontSize = attr.Measurement(title='Font Size', description='The size of the value text.', required=False) leading = attr.Measurement( title='Leading', description=('The height of a single text line. It includes ' 'character height.'), required=False) width = attr.Measurement(title='Width', description='The width the label.', required=False) maxWidth = attr.Measurement(title='Maximum Width', description='The maximum width the label.', required=False) height = attr.Measurement(title='Height', description='The height the label.', required=False) textAnchor = attr.Choice( title='Text Anchor', description='The position in the text to which the coordinates refer.', choices=('start', 'middle', 'end', 'boxauto'), required=False) visible = attr.Boolean(title='Visible', description='A flag making the label text visible.', required=False) leftPadding = attr.Measurement( title='Left Padding', description='The size of the padding on the left side.', required=False) rightPadding = attr.Measurement( title='Right Padding', description='The size of the padding on the right side.', required=False) topPadding = attr.Measurement( title='Top Padding', description='The size of the padding on the top.', required=False) bottomPadding = attr.Measurement( title='Bottom Padding', description='The size of the padding on the bottom.', required=False)
class IAxis(interfaces.IRMLDirectiveSignature): occurence.containing(occurence.ZeroOrMore('labels', ILabels)) visible = attr.Boolean( title='Visible', description='When true, draw the entire axis with all details.', required=False) visibleAxis = attr.Boolean(title='Visible Axis', description='When true, draw the axis line.', required=False) visibleTicks = attr.Boolean( title='Visible Ticks', description='When true, draw the axis ticks on the line.', required=False) visibleLabels = attr.Boolean( title='Visible Labels', description='When true, draw the axis labels.', required=False) visibleGrid = attr.Boolean( title='Visible Grid', description='When true, draw the grid lines for the axis.', required=False) strokeWidth = attr.Measurement( title='Stroke Width', description='The width of axis line and ticks.', required=False) strokeColor = attr.Color( title='Stroke Color', description='The color in which the axis line and ticks are drawn.', required=False) strokeDashArray = attr.Sequence( title='Stroke Dash Array', description='The dash array that is used for the axis line and ticks.', value_type=attr.Float(), required=False) gridStrokeWidth = attr.Measurement( title='Grid Stroke Width', description='The width of the grid lines.', required=False) gridStrokeColor = attr.Color( title='Grid Stroke Color', description='The color in which the grid lines are drawn.', required=False) gridStrokeDashArray = attr.Sequence( title='Grid Stroke Dash Array', description='The dash array that is used for the grid lines.', value_type=attr.Float(), required=False) gridStart = attr.Measurement( title='Grid Start', description=('The start of the grid lines with respect to the ' 'axis origin.'), required=False) gridEnd = attr.Measurement( title='Grid End', description=('The end of the grid lines with respect to the ' 'axis origin.'), required=False) style = attr.Choice(title='Style', description='The plot style of the common categories.', choices=('parallel', 'stacked', 'parallel_3d'), required=False)
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)