<s> from atom . api import ( <EOL> Bool , Unicode , Coerced , Event , Typed , ForwardTyped , observe , set_default <EOL> ) <EOL> from enaml . core . declarative import d_ <EOL> from enaml . icon import Icon <EOL> from enaml . layout . geometry import Size <EOL> from . control import Control , ProxyControl <EOL> class ProxyAbstractButton ( ProxyControl ) : <EOL> """<STR_LIT>""" <EOL> declaration = ForwardTyped ( lambda : AbstractButton ) <EOL> def set_text ( self , text ) : <EOL> raise NotImplementedError <EOL> def set_icon ( self , icon ) : <EOL> raise NotImplementedError <EOL> def set_icon_size ( self , size ) : <EOL> raise NotImplementedError <EOL> def set_checkable ( self , checkable ) : <EOL> raise NotImplementedError <EOL> def set_checked ( self , checked ) : <EOL> raise NotImplementedError <EOL> class AbstractButton ( Control ) : <EOL> """<STR_LIT>""" <EOL> text = d_ ( Unicode ( ) ) <EOL> icon = d_ ( Typed ( Icon ) ) <EOL> icon_size = d_ ( Coerced ( Size , ( - <NUM_LIT:1> , - <NUM_LIT:1> ) ) ) <EOL> checkable = d_ ( Bool ( False ) ) <EOL> checked = d_ ( Bool ( False ) ) <EOL> clicked = d_ ( Event ( bool ) , writable = False ) <EOL> toggled = d_ ( Event ( bool ) , writable = False ) <EOL> hug_width = set_default ( '<STR_LIT>' ) <EOL> proxy = Typed ( ProxyAbstractButton ) <EOL> @ observe ( '<STR_LIT:text>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def _update_proxy ( self , change ) : <EOL> """<STR_LIT>""" <EOL> super ( AbstractButton , self ) . _update_proxy ( change ) </s>
