#NEWLINE# def create_toolbar_handler( is_long_option , is_fuzzy ) : #NEWLINE# #INDENT# assert callable ( get_toolbar_items ) #NEWLINE# assert callable ( is_fuzzy ) #NEWLINE# def get_toolbar_items( _ ) : #NEWLINE# #INDENT# '\n        Return bottom menu items\n        :param _: cli instance\n        :return: list of Token.Toolbar\n        ' #NEWLINE# if is_long_option ( ) : #NEWLINE# #INDENT# option_mode_token = Token . Toolbar . On #NEWLINE# option_mode = 'Long' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# option_mode_token = Token . Toolbar . Off #NEWLINE# option_mode = 'Short' #NEWLINE# #UNINDENT# if is_fuzzy ( ) : #NEWLINE# #INDENT# fuzzy_token = Token . Toolbar . On #NEWLINE# fuzzy = 'ON' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fuzzy_token = Token . Toolbar . Off #NEWLINE# fuzzy = 'OFF' #NEWLINE# #UNINDENT# return [ ( Token . Toolbar , ' [F2] Help ' ) , ( option_mode_token , ' [F3] Options: {0} ' . format ( option_mode ) ) , ( fuzzy_token , ' [F4] Fuzzy: {0} ' . format ( fuzzy ) ) , ( Token . Toolbar , ' [F10] Exit ' ) ] #NEWLINE# #UNINDENT# return get_toolbar_items