Skip to content

Low verbosity update

Compare
Choose a tag to compare
@Tim-ats-d Tim-ats-d released this 29 Mar 18:52
· 79 commits to main since this release
b9d50b5

Efforts have been made to reduce verbosity of Visual-dialog.
Fewer parameters are now required at instantiation of text boxes
for example.

Also, API has undergone many changes. Code written with visualdialog v0.6 will have little chance to be compatible with v0.7 (mainly because of change of name of many variables).

Before this update, version numbering followed a rather chaotic order.
This will no longer be the case from this update.

Major changes

  • Adding and improving examples.

  • Rewriting of the documentation in reStructuredText and new way to generate it (via Sphinx).

New features

  • A single textual attribute curses can now be passed instead of a tuple containing several in parameters finishing by _attr.

The following changes apply to the DialogBox class:

  • Added two new properties:
    • DialogBox.position which returns the x;y position of the dialog box.
    • DialogBox.dimensions which returns the height;width dimensions of the dialog box.

API changes

  • title parameter is no longer required at instantiation.
    It is now set to an empty string by default.

  • title_colors_pair_nb parameter is no longer required at instantiation.
    It is now set to 0 by default (0 corresponding to the white on black color pair initialized by default by curses).

  • When an empty string is passed to title parameter, the title of dialog box is not displayed.

  • The delay between the writing of each character is now 0.04s instead of 0.05s for char_by_char method.

Renaming

  • Renaming class TextBox to BaseTextBox.

  • Renaming parameter stdscr to win.

  • Renaming parameter length to height.

  • Renaming parameter text_attributes to text_attr for methods char_by_char and word_by_word.

  • Renaming parameter box_width to width and box_length to length.

  • color_pair_nb parameter now optional in char_by_char and word_by_word methods (set by default to0).

  • Renaming parameter title_text_attributes to title_text_attr.

  • Renaming parameter end_dialog_indicator to end_indicator.

Minor changes

  • Fixed a bug that displayed text boxes two characters below when DialogBox.title was empty.
  • Improvement of examples.
  • Improvement of type hinting.