src/pyams_default_theme/component/illustration/interfaces.py
changeset 319 29ffc22ece57
parent 123 9638eaef9d34
equal deleted inserted replaced
318:088a31dbed81 319:29ffc22ece57
       
     1 #
       
     2 # Copyright (c) 2008-2017 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 
       
    20 # import packages
       
    21 from zope.interface import Interface, Attribute
       
    22 from zope.schema import Bool, Choice
       
    23 
       
    24 from pyams_default_theme import _
       
    25 
       
    26 
       
    27 ILLUSTRATION_BEFORE_TITLE = 'before-title'
       
    28 ILLUSTRATION_BEFORE_BODY = 'before-body'
       
    29 ILLUSTRATION_AFTER_BODY = 'after-body'
       
    30 
       
    31 
       
    32 class IIllustrationRenderer(Interface):
       
    33     """Illustration renderer interface"""
       
    34 
       
    35     position = Attribute("Illustration position related to it's attached content")
       
    36 
       
    37 
       
    38 class IIllustrationWithZoomSettings(Interface):
       
    39     """Illustration with zoom interface"""
       
    40 
       
    41     zoom_on_click = Bool(title=_("Zoom on click?"),
       
    42                          description=_("If 'yes', a click on illustration thumbnail is required to zoom"),
       
    43                          required=True,
       
    44                          default=True)