~divmod-dev/divmod.org/dangling-1091

« back to all changes in this revision

Viewing changes to Mantissa/xmantissa/ixmantissa.py

  • Committer: glyph
  • Date: 2005-07-28 22:09:16 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:2
move this repository to a more official-looking URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
from zope.interface import Interface
 
3
 
 
4
class IWebTheme(Interface):
 
5
    """
 
6
    Represents a directory full of theme information.
 
7
    """
 
8
 
 
9
 
 
10
class ISiteRootPlugin(Interface):
 
11
    """
 
12
    Plugin Interface for functionality provided at the root of the website.
 
13
    """
 
14
 
 
15
    def resourceFactory(segments):
 
16
        """Get an object that provides IResource
 
17
 
 
18
        @type segments: list of str, representing decoded requested URL
 
19
        segments
 
20
 
 
21
        @return: None or a two-tuple of the IResource provider and the segments
 
22
        to pass to its locateChild.
 
23
        """
 
24
 
 
25
class ISessionlessSiteRootPlugin(Interface):
 
26
    """
 
27
    Extremely similar to ISiteRootPlugin except access is not mediated by
 
28
    nevow.guard.
 
29
    """
 
30
 
 
31
 
 
32
class INavigableElement(Interface):
 
33
    """Tag interface used by the web navigation plugin system.
 
34
 
 
35
    Plugins for this interface are retrieved when generating the navigation
 
36
    user-interface.  Each result has C{getTabs} invoked, after which the
 
37
    results are merged and the result used to construct various top- and
 
38
    secondary-level \"tabs\" which can be used to visit different parts of
 
39
    the application.
 
40
    """
 
41
 
 
42
    def getTabs():
 
43
        """Retrieve data about this elements navigation.
 
44
 
 
45
        This returns a list of C{quotient.appnav.Tab}s.
 
46
 
 
47
        For example, a powerup which wanted to install navigation under the
 
48
        Divmod tab would return this list:::
 
49
 
 
50
        [Tab("Divmod", quotient.iquotient.ISummaryPage, 1.0
 
51
             children=[
 
52
                    Tab("Summary", quotient.iquotient.ISummaryPage, 1.0),
 
53
                    Tab("Inbox", lambda x:
 
54
                        IRootPool(x).getNamedElement(
 
55
                            'Mail Folders').getNamedElement('Inbox'),
 
56
                        0.8)
 
57
                    ])]
 
58
        """
 
59
 
 
60
 
 
61
class ITab(Interface):
 
62
    """
 
63
    Abstract, non-UI representation of a tab that shows up in the UI.  The only
 
64
    concrete representation is xmantissa.webnav.Tab
 
65
    """
 
66