#NEWLINE# def right_up( self , event ) : #NEWLINE# #INDENT# ' Handles the right mouse button being released.\n        ' #NEWLINE# sizer = self . sizer #NEWLINE# if ( sizer is not None ) : #NEWLINE# #INDENT# object = sizer . ObjectAt ( event . GetX ( ) , event . GetY ( ) , True ) #NEWLINE# if ( object is not None ) : #NEWLINE# #INDENT# popup_menu = None #NEWLINE# window = self . control #NEWLINE# is_dock_control = isinstance ( object , DockControl ) #NEWLINE# if ( is_dock_control and ( object . dockable is not None ) and ( event . ShiftDown ( ) or event . ControlDown ( ) or event . AltDown ( ) ) ) : #NEWLINE# #INDENT# self . _menu_self = group . dockable #NEWLINE# popup_menu = object . dockable . dockable_menu ( object , event ) #NEWLINE# #UNINDENT# if ( popup_menu is None ) : #NEWLINE# #INDENT# self . _menu_self = self #NEWLINE# section = self . sizer . GetContents ( ) #NEWLINE# is_splitter = isinstance ( object , DockSplitter ) #NEWLINE# self . _object = object #NEWLINE# if is_splitter : #NEWLINE# #INDENT# self . _object = object = object . parent #NEWLINE# #UNINDENT# group = object #NEWLINE# if is_dock_control : #NEWLINE# #INDENT# group = group . parent #NEWLINE# #UNINDENT# if sizer . IsMaximizable ( ) : #NEWLINE# #INDENT# min_max_action . name = 'Maximize' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# min_max_action . name = 'Restore' #NEWLINE# #UNINDENT# min_max_action . enabled = is_dock_control #NEWLINE# undock_action . enabled = is_dock_control #NEWLINE# edit_action . enabled = ( not is_splitter ) #NEWLINE# controls = section . get_controls ( False ) #NEWLINE# lock_action . checked = ( ( len ( controls ) > 0 ) and controls [ 0 ] . locked ) #NEWLINE# save_action . enabled = ( self . id != '' ) #NEWLINE# feature_menu = self . _get_feature_menu ( ) #NEWLINE# ( restore_menu , delete_menu ) = self . _get_layout_menus ( ) #NEWLINE# popup_menu = Menu ( min_max_action , undock_action , Separator ( ) , feature_menu , Separator ( ) , lock_action , layout_action , Separator ( ) , save_action , restore_menu , delete_menu , Separator ( ) , edit_action , name = 'popup' ) #NEWLINE# #UNINDENT# window . PopupMenuXY ( popup_menu . create_menu ( window , self ) , ( event . GetX ( ) - 10 ) , ( event . GetY ( ) - 10 ) ) #NEWLINE# self . _object = None