.. _widgets: Widgets Module -------------- The `tacotui.widgets` module has simple user interface widgets, such as message boxes, list selection boxes, and forms. These widgets are displayed one-at-a-time, creating a linear user interface. All widgets use the :ref:`themes` for coloring. To adjust the widget colors, the theme color must be changed. .. figure:: images/message.png :alt: message box Message box .. autofunction:: tacotui.widgets.box .. autofunction:: tacotui.widgets.message Geting values from the user *************************** The `line_edit` function returns a string entered by the user. Other widgets `get_int`, `get_float`, `get_char`, and `get_date` restrict the input to a specific type, and print an error if an invalid value is entered. .. figure:: images/lineedit.png :alt: line edit Line Edit box .. autofunction:: tacotui.widgets.line_edit .. autofunction:: tacotui.widgets.get_int .. autofunction:: tacotui.widgets.get_float .. autofunction:: tacotui.widgets.get_char .. autofunction:: tacotui.widgets.get_date Selecting from a list ********************* List select and multiselect allow selection from a predefined list of items. .. figure:: images/listselect.png :alt: list select List Select Widget .. autofunction:: tacotui.widgets.list_select .. autofunction:: tacotui.widgets.multi_select Selecting files and folders *************************** The `file_select` widget can be used to select an existing file, name a new file, or select an existing folder. .. figure:: images/fileselect.png :alt: file select File select widget .. autofunction:: tacotui.widgets.file_select Progress and slider ******************* .. figure:: images/slider.png :alt: slider Slider Widget .. autofunction:: tacotui.widgets.slider .. figure:: images/progress.png :alt: progress Progress bar .. autofunction:: tacotui.widgets.progress Forms ***** The form widget allows for multiple widgets at once in a single form. The form returns a list of responses for each item. .. figure:: images/form.png :alt: form widget Form widget .. autofunction:: tacotui.widgets.form Data visualization ****************** Quick and dirty plotting is available in the command line. While limited, these functions provide basic line and bar plotting functionality without requiring large plotting packages. .. figure:: images/txtplot.png :alt: textplot Textplot .. figure:: images/barplot.png :alt: barplot Bar plot .. autofunction:: tacotui.widgets.textplot .. autofunction:: tacotui.widgets.barplot