Exemplo n.º 1
0
class ITableStyleCommand(interfaces.IRMLDirectiveSignature):

    start = attr.Sequence(
        title=u'Start Coordinates',
        description=u'The start table coordinates for the style instruction',
        value_type=attr.Combination(
            value_types=(attr.Integer(),
                         attr.Choice(choices=interfaces.SPLIT_CHOICES))
            ),
        default=[0, 0],
        min_length=2,
        max_length=2,
        required=True)

    stop = attr.Sequence(
        title=u'End Coordinates',
        description=u'The end table coordinates for the style instruction',
        value_type=attr.Combination(
            value_types=(attr.Integer(),
                         attr.Choice(choices=interfaces.SPLIT_CHOICES))
            ),
        default=[-1, -1],
        min_length=2,
        max_length=2,
        required=True)
Exemplo n.º 2
0
class IBaseListStyle(IMinimalListStyle):

    start = attr.Combination(
        title=u'Start Value',
        description=u'The counter start value.',
        value_types=(attr.Integer(),
                     attr.Choice(choices=interfaces.UNORDERED_BULLET_VALUES)),
        required=False)
Exemplo n.º 3
0
class IBaseListStyle(IMinimalListStyle):

    start = attr.Combination(
        title=u'Start Value',
        description=u'The counter start value.',
        value_types=(
            # Numeric start value.
            attr.Integer(),
            # Bullet types.
            attr.Choice(choices=interfaces.UNORDERED_BULLET_VALUES),
            # Arbitrary text.
            attr.String(),
        ),
        required=False)
Exemplo n.º 4
0
class IValueAxis(IAxis):

    forceZero = attr.Boolean(
        title='Force Zero',
        description='When set, the range will contain the origin.',
        required=False)

    minimumTickSpacing = attr.Measurement(
        title='Minimum Tick Spacing',
        description='The minimum distance between ticks.',
        required=False)

    maximumTicks = attr.Integer(
        title='Maximum Ticks',
        description='The maximum number of ticks to be shown.',
        required=False)

    labelTextFormat = attr.Combination(
        title='Label Text Format',
        description=(
            'Formatting string or Python path to formatting function for '
            'axis labels.'),
        value_types=(
            # Python path to function.
            attr.ObjectRef(),
            # Formatting String.
            attr.Text(),
        ),
        required=False)

    labelTextPostFormat = attr.Text(
        title='Label Text Post Format',
        description='An additional formatting string.',
        required=False)

    labelTextScale = attr.Float(
        title='Label Text Scale',
        description='The sclaing factor for the label tick values.',
        required=False)

    valueMin = attr.Float(title='Minimum Value',
                          description='The smallest value on the axis.',
                          required=False)

    valueMax = attr.Float(title='Maximum Value',
                          description='The largest value on the axis.',
                          required=False)

    valueStep = attr.Float(title='Value Step',
                           description='The step size between ticks',
                           required=False)

    valueSteps = attr.Sequence(title='Step Sizes',
                               description='List of step sizes between ticks.',
                               value_type=attr.Float(),
                               required=False)

    rangeRound = attr.Choice(
        title='Range Round',
        description='Method to be used to round the range values.',
        choices=('none', 'both', 'ceiling', 'floor'),
        required=False)

    zrangePref = attr.Float(title='Zero Range Preference',
                            description='Zero range axis limit preference.',
                            required=False)