<s> from atom . api import ( <EOL> List , Enum , Unicode , Bool , Event , Typed , ForwardTyped , observe <EOL> ) <EOL> from enaml . core . declarative import d_ <EOL> from . container import Container <EOL> from . widget import Widget , ProxyWidget <EOL> class ProxyDockPane ( ProxyWidget ) : <EOL> """<STR_LIT>""" <EOL> declaration = ForwardTyped ( lambda : DockPane ) <EOL> def set_title ( self , title ) : <EOL> raise NotImplementedError <EOL> def set_title_bar_visible ( self , visible ) : <EOL> raise NotImplementedError <EOL> def set_title_bar_orientation ( self , orientation ) : <EOL> raise NotImplementedError <EOL> def set_closable ( self , closable ) : <EOL> raise NotImplementedError <EOL> def set_movable ( self , movable ) : <EOL> raise NotImplementedError <EOL> def set_floatable ( self , floatable ) : <EOL> raise NotImplementedError <EOL> def set_floating ( self , floating ) : <EOL> raise NotImplementedError <EOL> def set_dock_area ( self , area ) : <EOL> raise NotImplementedError <EOL> def set_allowed_dock_areas ( self , areas ) : <EOL> raise NotImplementedError <EOL> class DockPane ( Widget ) : <EOL> """<STR_LIT>""" <EOL> title = d_ ( Unicode ( ) ) <EOL> title_bar_visible = d_ ( Bool ( True ) ) <EOL> title_bar_orientation = d_ ( Enum ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> closable = d_ ( Bool ( True ) ) <EOL> movable = d_ ( Bool ( True ) ) <EOL> floatable = d_ ( Bool ( True ) ) <EOL> floating = d_ ( Bool ( False ) ) <EOL> dock_area = d_ ( Enum ( '<STR_LIT:left>' , '<STR_LIT:right>' , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> allowed_dock_areas = d_ ( List ( <EOL> Enum ( '<STR_LIT:left>' , '<STR_LIT:right>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:all>' ) , [ '<STR_LIT:all>' ] , <EOL> ) ) <EOL> closed = d_ ( Event ( ) , writable = False ) <EOL> proxy = Typed ( ProxyDockPane ) <EOL> def dock_widget ( self ) : <EOL> """<STR_LIT>""" <EOL> for child in reversed ( self . children ) : <EOL> if isinstance ( child , Container ) : <EOL> return child <EOL> @ observe ( '<STR_LIT:title>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def _update_proxy ( self , change ) : <EOL> """<STR_LIT>""" <EOL> super ( DockPane , self ) . _update_proxy ( change ) <EOL> def open ( self ) : <EOL> self . show ( ) <EOL> def close ( self ) : <EOL> self . hide ( ) </s>
