menus.radio module¶
Provides ShowMenu based functionality.
-
class
menus.radio.
ListRadioMenu
(data=None, select_callback=None, build_callback=None, close_callback=None, description=None, title=None, top_separator='------------------------------', bottom_separator='------------------------------', fill=True, parent_menu=None, items_per_page=10)[source]¶ Bases:
menus.radio.PagedRadioMenu
Creates a list-like radio menu.
Navigation options are added automatically.
-
__init__
(data=None, select_callback=None, build_callback=None, close_callback=None, description=None, title=None, top_separator='------------------------------', bottom_separator='------------------------------', fill=True, parent_menu=None, items_per_page=10)[source]¶ Initialize the object.
Parameters: - data (iterable|None) – See
menus.base._BaseMenu.__init__()
. - select_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - build_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - close_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - description (str|None) – See
PagedRadioMenu.__init__()
. - title (str|None) – See
PagedRadioMenu.__init__()
. - top_separator (str) – See
PagedRadioMenu.__init__()
. - bottom_separator (str) – See
PagedRadioMenu.__init__()
. - fill (bool) – See
PagedRadioMenu.__init__()
. - parent_menu (_BaseMenu) – See
PagedRadioMenu.__init__()
. - items_per_page (int) – Number of options that should be displayed on a single page.
- data (iterable|None) – See
-
-
class
menus.radio.
ListRadioOption
(text, highlight=True, enumerated=True)[source]¶ Bases:
menus.radio.PagedRadioOption
Provides options for
ListRadioMenu
objects.
-
class
menus.radio.
PagedRadioMenu
(data=None, select_callback=None, build_callback=None, close_callback=None, description=None, title=None, top_separator='------------------------------', bottom_separator='------------------------------', fill=True, parent_menu=None)[source]¶ Bases:
menus.radio.SimpleRadioMenu
,menus.base._PagedMenuBase
Create menus with an unlimited number of options.
Navigation options will be added automatically.
-
__init__
(data=None, select_callback=None, build_callback=None, close_callback=None, description=None, title=None, top_separator='------------------------------', bottom_separator='------------------------------', fill=True, parent_menu=None)[source]¶ Initialize the object.
Parameters: - data (iterable|None) – See
menus.base._BaseMenu.__init__()
. - select_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - build_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - close_callback (callable|None) – See
menus.base._BaseMenu.__init__()
. - description (str|None) – A description that is displayed under the title.
- title (str|None) – A title that is displayed at the top of the menu.
- top_separator (str) – A separator that is displayed right after the title/description.
- bottom_separator (str) – A separator that is displayed right after the body.
- fill (bool) – If True the menu will be filled so that it will always have the same size.
- parent_menu (_BaseMenu) – A menu that will be displayed when hitting ‘Back’ on the first page.
- data (iterable|None) – See
-
-
class
menus.radio.
PagedRadioOption
(text, value=None, highlight=True, selectable=True)[source]¶ Bases:
menus.radio._BaseRadioOption
Provides options for
PagedRadioMenu
objects.
-
class
menus.radio.
SimpleRadioMenu
(data=None, select_callback=None, build_callback=None, close_callback=None)[source]¶ Bases:
menus.base._BaseMenu
This class creates a basic radio menu.
-
class
menus.radio.
SimpleRadioOption
(choice_index, text, value=None, highlight=True, selectable=True)[source]¶ Bases:
menus.radio._BaseRadioOption
Provides options for
SimpleRadioMenu
objects.