<s> from atom . api import Enum , Bool , Typed , ForwardTyped , observe , set_default <EOL> from enaml . core . declarative import d_ <EOL> from . constraints_widget import ConstraintsWidget , ProxyConstraintsWidget <EOL> from . page import Page <EOL> class ProxyNotebook ( ProxyConstraintsWidget ) : <EOL> """<STR_LIT>""" <EOL> declaration = ForwardTyped ( lambda : Notebook ) <EOL> def set_tab_style ( self , style ) : <EOL> raise NotImplementedError <EOL> def set_tab_position ( self , position ) : <EOL> raise NotImplementedError <EOL> def set_tabs_closable ( self , closable ) : <EOL> raise NotImplementedError <EOL> def set_tabs_movable ( self , movable ) : <EOL> raise NotImplementedError <EOL> class Notebook ( ConstraintsWidget ) : <EOL> """<STR_LIT>""" <EOL> tab_style = d_ ( Enum ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> tab_position = d_ ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:left>' , '<STR_LIT:right>' ) ) <EOL> tabs_closable = d_ ( Bool ( True ) ) <EOL> tabs_movable = d_ ( Bool ( True ) ) <EOL> hug_width = set_default ( '<STR_LIT:ignore>' ) <EOL> hug_height = set_default ( '<STR_LIT:ignore>' ) <EOL> proxy = Typed ( ProxyNotebook ) <EOL> def pages ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ c for c in self . children if isinstance ( c , Page ) ] <EOL> @ observe ( ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> def _update_proxy ( self , change ) : <EOL> """<STR_LIT>""" <EOL> super ( Notebook , self ) . _update_proxy ( change ) </s>
