class IOption(interfaces.IRMLDirectiveSignature): """An option in the select field.""" value = attr.TextNode( title=u'Value', description=u'The value of the option.', required=True)
class IParam(interfaces.IRMLDirectiveSignature): """Sets one paramter for the text annotation.""" name = attr.String(title=u'Name', description=u'The name of the paramter.', required=True) value = attr.TextNode(title=u'Value', description=(u'The parameter value.'), required=True)
class IStrandLabel(IStrandLabelBase): """A label for a strand.""" _text = attr.TextNode(title='Text', description='The label text of the strand.', required=False) dR = attr.Float(title='Radial Shift', description='The radial shift of the label.', required=False)
class IStrandLabelBase(ILabelBase): _text = attr.TextNode(title=u'Text', description=u'The label text of the strand.', required=False) row = attr.Integer(title=u'Row', description=u'The row of the strand label', required=False) col = attr.Integer(title=u'Column', description=u'The column of the strand label.', required=False) format = attr.String(title=u'Format', description=u'The format string for the label.', required=False)
class IPlugInGraphic(interfaces.IRMLDirectiveSignature): """Inserts a custom graphic developed in Python.""" module = attr.String( title=u'Module', description=u'The Python module in which the flowable is located.', required=True) function = attr.String( title=u'Function', description=(u'The name of the factory function within the module ' u'that returns the custom flowable.'), required=True) params = attr.TextNode( title=u'Parameters', description=(u'A list of parameters encoded as a long string.'), required=False)
class IText(interfaces.IRMLDirectiveSignature): """Draw a text on the chart.""" x = attr.Measurement( title='X-Coordinate', description=('The X-coordinate of the lower-left position of the ' 'text.'), required=True) y = attr.Measurement( title='Y-Coordinate', description=('The Y-coordinate of the lower-left position of the ' 'text.'), required=True) angle = attr.Float( title='Rotation Angle', description=('The angle about which the text will be rotated.'), required=False) text = attr.TextNode(title='Text', description='The text to be printed.', required=True) fontName = attr.Text(title='Font Name', description='The name of the font.', required=False) fontSize = attr.Measurement(title='Font Size', description='The font size for the text.', required=False) fillColor = attr.Color( title='Fill Color', description='The color in which the text will appear.', 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)
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 IDrawString(interfaces.IRMLDirectiveSignature): """Draws a simple string (left aligned) onto the canvas at the specified location.""" x = attr.Measurement( title=u'X-Coordinate', description=(u'The X-coordinate of the lower-left position of the ' u'string.'), required=True) y = attr.Measurement( title=u'Y-Coordinate', description=(u'The Y-coordinate of the lower-left position of the ' u'string.'), required=True) text = attr.TextNode( title=u'Text', description=(u'The string/text that is put onto the canvas.'), required=True)
class ISliceLabel(ILabelBase): """The label of a slice within a bar chart.""" text = attr.TextNode(title='Text', description='The label text to be displayed.', required=True)
class IName(interfaces.IRMLDirectiveSignature): """A category name""" text = attr.TextNode(title='Text', description='The text value that is the name.', required=True)
class ILabel(IPositionLabelBase): """A label for the chart on an axis.""" text = attr.TextNode(title='Text', description='The label text to be displayed.', required=True)
class ISpokeLabel(ISpokeLabelBase): """A label for a spoke.""" _text = attr.TextNode(title='Text', description='The text of the spoke (label).', required=False)
class IBarCodeBase(interfaces.IRMLDirectiveSignature): """Create a bar code.""" code = attr.Choice(title=u'Code', description=u'The name of the type of code to use.', choices=reportlab.graphics.barcode.getCodeNames(), required=True) value = attr.TextNode(title=u'Value', description=u'The value represented by the code.', required=True) width = attr.Measurement(title=u'Width', description=u'The width of the barcode.', required=False) height = attr.Measurement(title=u'Height', description=u'The height of the barcode.', required=False) barStrokeColor = attr.Color( title=u'Bar Stroke Color', description=(u'The color of the line strokes in the barcode.'), required=False) barStrokeWidth = attr.Measurement( title=u'Bar Stroke Width', description=u'The width of the line strokes in the barcode.', required=False) barFillColor = attr.Color( title=u'Bar Fill Color', description=(u'The color of the filled shapes in the barcode.'), required=False) gap = attr.Measurement( title=u'Gap', description=u'The width of the inter-character gaps.', required=False) # Bar code dependent attributes # I2of5, Code128, Standard93, FIM, POSTNET, Ean13B barWidth = attr.Measurement( title=u'Bar Width', description=u'The width of the smallest bar within the barcode', required=False) # I2of5, Code128, Standard93, FIM, POSTNET barHeight = attr.Measurement(title=u'Bar Height', description=u'The height of the symbol.', required=False) # I2of5 ratio = attr.Float( title=u'Ratio', description=(u'The ratio of wide elements to narrow elements. ' u'Must be between 2.0 and 3.0 (or 2.2 and 3.0 if the ' u'barWidth is greater than 20 mils (.02 inch)).'), min=2.0, max=3.0, required=False) # I2of5 # Should be boolean, but some code want it as int; will still work checksum = attr.Integer( title=u'Ratio', description=(u'A flag that enables the computation and inclusion of ' u'the check digit.'), required=False) # I2of5 bearers = attr.Float( title=u'Bearers', description=(u'Height of bearer bars (horizontal bars along the top ' u'and bottom of the barcode). Default is 3 ' u'x-dimensions. Set to zero for no bearer bars.' u'(Bearer bars help detect misscans, so it is ' u'suggested to leave them on).'), required=False) # I2of5, Code128, Standard93, FIM, Ean13 quiet = attr.Boolean( title=u'Quiet Zone', description=(u'A flag to include quiet zones in the symbol.'), required=False) # I2of5, Code128, Standard93, FIM, Ean13 lquiet = attr.Measurement( title=u'Left Quiet Zone', description=(u"Quiet zone size to the left of code, if quiet is " u"true. Default is the greater of .25 inch or .15 times " u"the symbol's length."), required=False) # I2of5, Code128, Standard93, FIM, Ean13 rquiet = attr.Measurement( title=u'Right Quiet Zone', description=(u"Quiet zone size to the right of code, if quiet is " u"true. Default is the greater of .25 inch or .15 times " u"the symbol's length."), required=False) # I2of5, Code128, Standard93, FIM, POSTNET, Ean13 fontName = attr.String(title=u'Font Name', description=(u'The font used to print the value.'), required=False) # I2of5, Code128, Standard93, FIM, POSTNET, Ean13 fontSize = attr.Measurement(title=u'Font Size', description=(u'The size of the value text.'), required=False) # I2of5, Code128, Standard93, FIM, POSTNET, Ean13 humanReadable = attr.Boolean( title=u'Human Readable', description=(u'A flag when set causes the value to be printed below ' u'the bar code.'), required=False) # I2of5, Standard93 stop = attr.Boolean( title=u'Show Start/Stop', description=(u'A flag to specify whether the start/stop symbols ' u'are to be shown.'), required=False) # FIM, POSTNET spaceWidth = attr.Measurement( title=u'Space Width', description=u'The space of the inter-character gaps.', required=False) # POSTNET shortHeight = attr.Measurement(title=u'Short Height', description=u'The height of the short bar.', required=False) # Ean13 textColor = attr.Color(title=u'Text Color', description=(u'The color of human readable text.'), required=False) # USPS4S routing = attr.String(title=u'Routing', description=u'The routing information string.', required=False) # QR barLevel = attr.Choice( title=u'Bar Level', description=u'The error correction level for QR code', choices=['L', 'M', 'Q', 'H'], required=False) barBorder = attr.Measurement( title=u'Bar Border', description=u'The width of the border around a QR code.', required=False)