IUP
view release on metacpan or search on metacpan
lib/IUP.pod view on Meta::CPAN
=back
=head3 ListDialog()
=over
Shows a modal dialog to select items from a simple or multiple
selection list.
=begin html
<p><img src="http://kmx.github.io/perl-iup/img-3.9/dlg/listdialog.png"></p>
=end html
my $list = ["Blue", "Red", "Green", "Yellow", "Black", "White", "Gray", "Brown"];
#simple selection
my $status = IUP->ListDialog($title, $list, $mark, $max_lin, $max_col);
#multi selection
my $status = IUP->ListDialog($title, $list, [0, 1, 0, 0, 1, 1, 0, 0], $max_lin, $max_col);
B<$title:> Text for the dialog's title
B<$list:> A reference to array of list items.
B<$mark:> Initial selected item. For simple selection - has to be a scalar value (0-based index into $list array).
For multiple selection - has to be an arrayref (must have the same numer of elements as $list size)
with values "1" for selected items, "0" for unselected items.
B<$max_col:> Maximum number of columns in the list.
B<$max_lin:> Maximum number of lines in the list.
B<Returns:> When simple selection, the function returns the index of the selected
option (starts at 0), or -1 if the user cancels the operation.
When multiple selection, the function returns -1 when the user cancels the
operation. If the user does not cancel the operation the function
returns arrayref with a list of values "1" for selected items, "0" for non-selected items.
B<Notes:>
The dialog uses a global attribute called "PARENTDIALOG" as the parent
dialog if it is defined. It also uses a global attribute called "ICON"
as the dialog icon if it is defined.
B<See Also:>
L<Message|/"Message()"> (global function),
L<GetFile|/"GetFile()"> (global function),
L<Alarm|/"Alarm()"> (global function).
=back
=head3 Message()
=over
Shows a modal dialog containing a message. It simply creates and popup
a L<IUP::MessageDlg|IUP::MessageDlg>.
=begin html
<p>
<table border="1">
<tbody align="left">
<tr>
<th>MS Windows</th>
<td><img src="http://kmx.github.io/perl-iup/img-3.9/dlg/messagedlg_win.png"></td>
</tr>
<tr>
<th>GTK</th>
<td><img src="http://kmx.github.io/perl-iup/img-3.9/dlg/messagedlg_gtk.png"></td>
</tr>
<tr>
<th>Motif</th>
<td><img src="http://kmx.github.io/perl-iup/img-3.9/dlg/messagedlg_mot.png"></td>
</tr>
</tbody>
</table>
</p>
=end html
IUP->Message($message);
#or
IUP->Message($title, $message);
B<$title:> dialog title
B<$message:> text message contents
B<Notes:>
The L<Message|/"Message"> function shows a dialog centralized on the screen,
showing the message and the "OK" button. The "\n" character can be added
to the message to indicate line change.
The dialog uses a global attribute called "PARENTDIALOG" as the parent
dialog if it is defined. It also uses a global attribute called "ICON"
as the dialog icon if it is defined (used only in Motif, in Windows
MessageBox does not have an icon in the title bar).
B<See Also:>
L<GetFile|/"GetFile()"> (global function),
L<ListDialog|/"ListDialog()"> (global function),
L<Alarm|/"Alarm()"> (global function),
L<IUP::MessageDlg|IUP::MessageDlg> (pre-defined dialog).
=back
=head2 Recording and Re-playing User Input
=head3 PlayInput()
=over
Reproduces all mouse and keyboard input from a given file.
( run in 0.929 second using v1.01-cache-2.11-cpan-364913b4093 )