class Term::Prompt::MultiList
- Term::Prompt::MultiList
- Term::Prompt::List
- Reference
- Object
Overview
A class responsible for rendering multi select list menu. Used by {Prompt} to display interactive choice menu.
Defined in:
prompt/multi_list.crConstant Summary
-
HELP =
"(Use %s arrow%s keys, press Space to select and Enter to finish%s)"
Constructors
-
.new(prompt, **options)
Create instance of TTY::Prompt::MultiList menu.
Instance Method Summary
-
#answer
All values for the choices selected
-
#keyenter
Callback fired when enter/return key is pressed
-
#keyspace
Callback fired when space key is pressed
- #max : Int32 | Nil
- #max=(max : Int32 | Nil)
- #min : Int32 | Nil
- #min=(min : Int32 | Nil)
-
#minmax_help
Header part showing the minimum/maximum number of choices
-
#render_header
Render initial help text and then currently selected choices
-
#render_menu
Render menu with choices to select from
-
#selected_names
Generate selected items names
-
#setup_defaults
Setup default options and active selection
Instance methods inherited from class Term::Prompt::List
arrows_help
arrows_help,
call(question : Nil | String, possibilities, &block : List -> )call(question, possibilities) call, choice(*args, **kwargs) choice, choices
choices(*values) choices, default default, default=(value) default=, default_help default_help, enumerate? enumerate?, help help, help=(help : String | Nil) help=, keybackspace keybackspace, keydelete keydelete, keydown keydown, keyleft keyleft, keynum(key) keynum, keypress(key, event) keypress, keyreturn keyreturn, keyright keyright, keyup keyup, page_size : Int32 page_size, page_size=(page_size : Int32) page_size=, paginated? paginated?, paginator paginator, search_choice_in(searchable) search_choice_in, separator : String | Nil separator, separator=(separator : String | Nil) separator=, symbols : Hash(Symbol, String) symbols, symbols=(symbols : Hash(Symbol, String)) symbols=, sync_paginators sync_paginators
Constructor methods inherited from class Term::Prompt::List
new(prompt : Term::Prompt, **options)
new
Constructor Detail
Instance Method Detail
def minmax_help
#
Header part showing the minimum/maximum number of choices
@return [String]
@api private