Function newt::windows::win_entries
source · [−]pub fn win_entries(
title: &str,
text: &str,
suggested_width: i32,
flex_down: i32,
flex_up: i32,
data_width: i32,
entries: &mut [WinEntry],
buttons: &[&str]
) -> i32
Expand description
Open a window containing a number of text Entry
s.
Requires that the asm
feature be enabled.
title
- The window title.text
- The message to display in the window.suggested_width
- The preferred width for the window.flex_down
- The minimum allowed difference betweensuggested_width
and actual width.flex_up
- The maximum allowed difference betweensuggested_width
and actual width.data_width
- The field width for allEntry
s.entries
- A slice containing a list ofWinEntry
s providing initial settings for eachEntry
field.buttons
- A slice containing the text for a number of buttons to display in the window.
Returns the number of the button pressed to close the window.
Each WinEntry
in the entries
array will be modified to contain the
data entered by the user. This can be accessed via the
WinEntry.value()
function.