<s> from casuarius import ConstraintVariable <EOL> class BoxModel ( object ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = ( <EOL> '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT:width>' , '<STR_LIT>' , '<STR_LIT:right>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> def __init__ ( self , owner ) : <EOL> """<STR_LIT>""" <EOL> self . left = ConstraintVariable ( '<STR_LIT:left>' ) <EOL> self . top = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . width = ConstraintVariable ( '<STR_LIT:width>' ) <EOL> self . height = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . right = self . left + self . width <EOL> self . bottom = self . top + self . height <EOL> self . v_center = self . top + self . height / <NUM_LIT> <EOL> self . h_center = self . left + self . width / <NUM_LIT> <EOL> class ContentsBoxModel ( BoxModel ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' <EOL> ) <EOL> def __init__ ( self , owner ) : <EOL> """<STR_LIT>""" <EOL> super ( ContentsBoxModel , self ) . __init__ ( owner ) <EOL> self . contents_left = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . contents_right = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . contents_top = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . contents_bottom = ConstraintVariable ( '<STR_LIT>' ) <EOL> self . contents_width = self . contents_right - self . contents_left <EOL> self . contents_height = self . contents_bottom - self . contents_top <EOL> self . contents_v_center = self . contents_top + self . contents_height / <NUM_LIT> <EOL> self . contents_h_center = self . contents_left + self . contents_width / <NUM_LIT> </s>
