#NEWLINE# def apply_layout_op( self , op , direction , * item_names ) : #NEWLINE# #INDENT# ' This method is deprecated.\n\n            ' #NEWLINE# assert ( op in ( 'split_item' , 'tabify_item' , 'split_area' ) ) #NEWLINE# assert ( direction in ( 'left' , 'right' , 'top' , 'bottom' ) ) #NEWLINE# if ( not self . proxy_is_active ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# from enaml.layout.dock_layout import InsertItem , InsertBorderItem , InsertTab #NEWLINE# ops = [ ] #NEWLINE# item_names = list ( op ) #NEWLINE# if ( op == 'split_item' ) : #NEWLINE# #INDENT# target = item_names . pop ( 0 ) #NEWLINE# for name in item_names : #NEWLINE# #INDENT# l_op = InsertItem ( target = target , item = name , position = direction ) #NEWLINE# ops . append ( l_op ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( op == 'split_area' ) : #NEWLINE# #INDENT# for name in item_names : #NEWLINE# #INDENT# l_op = InsertBorderItem ( item = name , position = direction ) #NEWLINE# ops . append ( l_op ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# target = item_names . pop ( 0 ) #NEWLINE# for name in item_names : #NEWLINE# #INDENT# l_op = InsertTab ( target = target , item = name , tab_position = direction ) #NEWLINE# ops . append ( l_op ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . proxy . update_layout ( ops )