[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Widgets - IWidget.py:1.1.4.1 Widget.py:1.1.4.1 __init__.py:1.1.4.1 widgets.zcml:1.1.4.1

Stephan Richter srichter@cbu.edu
Mon, 1 Apr 2002 21:10:23 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Widgets
In directory cvs.zope.org:/tmp/cvs-serv6377/Formulator/Widgets

Added Files:
      Tag: Zope-3x-branch
	IWidget.py Widget.py __init__.py widgets.zcml 
Log Message:
Issue 25: Resolved by janko & srichter

This checkin fixes all the license headers of all the files that needed
fixing it. :) This was made possible by Janko Hauser's script, which is now
available in the ZopeRoot/utilities directory.

Also, cleaned up the Formualtor tag insanity!


=== Added File Zope3/lib/python/Zope/App/Formulator/Widgets/IWidget.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""

$Id: IWidget.py,v 1.1.4.1 2002/04/02 02:10:22 srichter Exp $
"""

from Interface import Interface


class IWidget(Interface):
    """Generically describes the behavior of a widget.

    The widget defines a list of propertyNames, which describes
    what properties of the widget are available to use for
    constructing the widget render output.

    Note that this level must be still presentation independent.
    """

    def getValue(name):
        """Look up a Widget setting (value) by name."""


    def getContext():
        """Get the context of the widget, namely the Field."""


=== Added File Zope3/lib/python/Zope/App/Formulator/Widgets/Widget.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""

$Id: Widget.py,v 1.1.4.1 2002/04/02 02:10:22 srichter Exp $
"""
from IWidget import IWidget


class Widget:
    """I do not know what will be in this class, but it provides
    an extra layer.
    """

    __implements__ = IWidget

    propertyNames = []


    def __init__(self, field):
        """ """
        self._field = field


    def getValue(self, name):
        """ """
        if name in self.propertyNames:
            return getattr(self, name, None)


    def getContext(self):
        """ """
        return self._field


=== Added File Zope3/lib/python/Zope/App/Formulator/Widgets/__init__.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""

$Id: __init__.py,v 1.1.4.1 2002/04/02 02:10:22 srichter Exp $
"""


=== Added File Zope3/lib/python/Zope/App/Formulator/Widgets/widgets.zcml ===
<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
>

  <include package="Zope.App.Formulator.Widgets.Browser" file="browser.zcml" />
  <include package="Zope.App.Formulator.Widgets.XUL" file="xul.zcml" />

</zopeConfigure>