<s> from atom . api import ( <EOL> Enum , Range , Coerced , Typed , ForwardTyped , observe , set_default <EOL> ) <EOL> from enaml . core . declarative import d_ <EOL> from enaml . layout . geometry import Box <EOL> from . frame import Frame , ProxyFrame , Border <EOL> from . flow_item import FlowItem <EOL> class ProxyFlowArea ( ProxyFrame ) : <EOL> """<STR_LIT>""" <EOL> declaration = ForwardTyped ( lambda : FlowArea ) <EOL> def set_direction ( self , direction ) : <EOL> raise NotImplementedError <EOL> def set_align ( self , align ) : <EOL> raise NotImplementedError <EOL> def set_horizontal_spacing ( self , spacing ) : <EOL> raise NotImplementedError <EOL> def set_vertical_spacing ( self , spacing ) : <EOL> raise NotImplementedError <EOL> def set_margins ( self , margins ) : <EOL> raise NotImplementedError <EOL> class FlowArea ( Frame ) : <EOL> """<STR_LIT>""" <EOL> direction = d_ ( Enum ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' <EOL> ) ) <EOL> align = d_ ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> horizontal_spacing = d_ ( Range ( low = <NUM_LIT:0> , value = <NUM_LIT:10> ) ) <EOL> vertical_spacing = d_ ( Range ( low = <NUM_LIT:0> , value = <NUM_LIT:10> ) ) <EOL> margins = d_ ( Coerced ( Box , ( <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:10> , <NUM_LIT:10> ) ) ) <EOL> hug_width = set_default ( '<STR_LIT:ignore>' ) <EOL> hug_height = set_default ( '<STR_LIT:ignore>' ) <EOL> proxy = Typed ( ProxyFlowArea ) <EOL> def flow_items ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ c for c in self . children if isinstance ( c , FlowItem ) ] <EOL> def _default_border ( self ) : <EOL> """<STR_LIT>""" <EOL> return Border ( style = '<STR_LIT>' , line_style = '<STR_LIT>' ) <EOL> @ observe ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> def _update_proxy ( self , change ) : <EOL> """<STR_LIT>""" <EOL> super ( FlowArea , self ) . _update_proxy ( change ) </s>
