3 """The `panel` module provides optional submodules that add GUI panels.
\r
6 from ....util.pluggable import IsSubclass, construct_odict
\r
21 """List of panel modules. TODO: autodiscovery
\r
24 class Panel (object):
\r
25 """Base class for Hooke GUI panels.
\r
27 :attr:`name` identifies the request type and should match the
\r
30 def __init__(self, name=None, callbacks=None, **kwargs):
\r
31 super(Panel, self).__init__(**kwargs)
\r
33 self.managed_name = name.capitalize()
\r
34 self._hooke_frame = kwargs.get('parent', None)
\r
35 if callbacks == None:
\r
37 self._callbacks = callbacks
\r
40 PANELS = construct_odict(
\r
41 this_modname=__name__,
\r
42 submodnames=PANEL_MODULES,
\r
43 class_selector=IsSubclass(Panel, blacklist=[Panel]),
\r
45 """:class:`hooke.compat.odict.odict` of :class:`Panel`
\r
46 instances keyed by `.name`.
\r