Low verbosity update
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 to0
by default (0
corresponding to the white on black color pair initialized by default bycurses
). -
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.04
s instead of0.05
s forchar_by_char
method.
Renaming
-
Renaming class
TextBox
toBaseTextBox
. -
Renaming parameter
stdscr
towin
. -
Renaming parameter
length
toheight
. -
Renaming parameter
text_attributes
totext_attr
for methodschar_by_char
andword_by_word
. -
Renaming parameter
box_width
towidth
andbox_length
tolength
. -
color_pair_nb
parameter now optional inchar_by_char
andword_by_word
methods (set by default to0
). -
Renaming parameter
title_text_attributes
totitle_text_attr
. -
Renaming parameter
end_dialog_indicator
toend_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.