
"""
__version__ = "$Revision:$"
__date__ = "$Date:$"
"""

import wx
from Pycard import event, widget, model

class ContainerSpec( widget.WidgetSpec ) :
   def __init__( self ) :
      events = [ event.MouseClickEvent ]
      attributes = {}
      widget.WidgetSpec.__init__( self, 'Container', 'Widget', events, attributes )
 

class Container( widget.Widget, model.Scriptable, wx.Panel ) :
   """
   A container panel for composite components.
   """

   _spec = ContainerSpec()

   def __init__( self, aParent,  aResource ) :
      model.Scriptable.__init__( self, aParent )      
      wx.Panel.__init__(
         self, aParent, widget.makeNewId(aResource.id), 
         aResource.position,
         aResource.size,
         style = wx.CLIP_SIBLINGS,
         name = aResource.name
      )
      widget.Widget.__init__( self, aParent, aResource )
      

import sys
from Pycard import registry
registry.Registry.getInstance().register(sys.modules[__name__].Container)
