<s> from atom . api import Bool , Range , Value , Typed , ForwardTyped , observe <EOL> from enaml . core . declarative import d_ <EOL> from . container import Container <EOL> from . widget import Widget , ProxyWidget <EOL> class ProxySplitItem ( ProxyWidget ) : <EOL> """<STR_LIT>""" <EOL> declaration = ForwardTyped ( lambda : SplitItem ) <EOL> def set_stretch ( self , stretch ) : <EOL> raise NotImplementedError <EOL> def set_collapsible ( self , collapsible ) : <EOL> raise NotImplementedError <EOL> class SplitItem ( Widget ) : <EOL> """<STR_LIT>""" <EOL> stretch = d_ ( Range ( low = <NUM_LIT:0> , value = <NUM_LIT:1> ) ) <EOL> collapsible = d_ ( Bool ( True ) ) <EOL> preferred_size = d_ ( Value ( ) ) <EOL> proxy = Typed ( ProxySplitItem ) <EOL> def split_widget ( self ) : <EOL> """<STR_LIT>""" <EOL> for child in reversed ( self . children ) : <EOL> if isinstance ( child , Container ) : <EOL> return child <EOL> @ observe ( ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> def _update_proxy ( self , change ) : <EOL> """<STR_LIT>""" <EOL> super ( SplitItem , self ) . _update_proxy ( change ) </s>
