#NEWLINE# def UI( ) : #NEWLINE# #INDENT# 'The UI\n    ' #NEWLINE# if pm . window ( 'selectionManagerWindow' , ex = True ) : #NEWLINE# #INDENT# pm . deleteUI ( 'selectionManagerWindow' , wnd = True ) #NEWLINE# #UNINDENT# selection_manager_window = pm . window ( 'selectionManagerWindow' , wh = ( 300 , 200 ) , title = ( 'Selection Manager %s' % __version__ ) ) #NEWLINE# form_layout1 = pm . formLayout ( 'selectionManager_formLayout1' , nd = 100 ) #NEWLINE# with form_layout1 : #NEWLINE# #INDENT# button1 = pm . button ( l = 'Add selection to List' ) #NEWLINE# scroll_layout1 = pm . scrollLayout ( 'selectionManager_scrollLayout1' , cr = True ) #NEWLINE# with scroll_layout1 : #NEWLINE# #INDENT# pm . gridLayout ( 'selectionManager_gridLayout1' , nc = 1 , cwh = ( ( ( 17 * 4 ) + 204 ) , 22 ) , aec = False , cr = False ) #NEWLINE# #UNINDENT# #UNINDENT# pm . formLayout ( form_layout1 , edit = True , attachForm = [ ( button1 , 'left' , 0 ) , ( button1 , 'right' , 0 ) , ( button1 , 'top' , 0 ) , ( scroll_layout1 , 'left' , 0 ) , ( scroll_layout1 , 'right' , 0 ) , ( scroll_layout1 , 'bottom' , 0 ) ] , attachControl = [ ( scroll_layout1 , 'top' , 0 , button1 ) ] , attachNone = [ ( button1 , 'bottom' ) ] ) #NEWLINE# def create_row( parent ) : #NEWLINE# #INDENT# row = SelectionRowFactory . create_row ( parent ) #NEWLINE# row . _draw ( ) #NEWLINE# #UNINDENT# button1 . setCommand ( pm . Callback ( create_row , scroll_layout1 ) ) #NEWLINE# for row in SelectionRowFactory . restore_rows ( scroll_layout1 ) : #NEWLINE# #INDENT# row . _draw ( ) #NEWLINE# #UNINDENT# pm . showWindow ( selection_manager_window )