IUP
view release on metacpan or search on metacpan
lib/IUP.pod view on Meta::CPAN
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>
lib/IUP/Dialog.pod view on Meta::CPAN
=item B<MINSIZE>
Minimum size for the dialog in raster units (pixels). The
windowing system will not be able to change the size beyond this limit.
Default: 1x1. Some systems define a very minimum size greatter than
this. Typically Windows has an horizontal minimum size that includes
the window decoration buttons.
=item B<MODAL>
I<(read-only)> Returns the popup state. It is "YES" if the
dialog was shown using L<Popup|IUP::Manual::02_Elements/"Popup()">. It is "NO" if L<Show|IUP::Manual::02_Elements/"Show()"> was used
or it is not visible.
=item B<NATIVEPARENT>
I<(creation only)> Native handle of a dialog to be used
as parent. Used only if PARENTDIALOG is not defined.
=item L<PARENTDIALOG|IUP::Manual::03_Attributes/PARENTDIALOG>
lib/IUP/FileDlg.pod view on Meta::CPAN
=head1 NOTES
The L<IUP::FileDlg|IUP::FileDlg> is a native pre-defined dialog that is not altered by
L<SetLanguage|IUP/"SetLanguage()">.
To show the dialog, use function L<Popup|IUP::Manual::02_Elements/"Popup()">.
The dialog is mapped only inside L<Popup|IUP::Manual::02_Elements/"Popup()">, L<Map|IUP::Manual::02_Elements/"Map()"> does nothing.
The L<GetFile|IUP/"GetFile()"> function simply creates and popup a L<IUP::FileDlg>.
In Windows, the FILE and the DIRECTORY attributes also accept strings
containing "/" as path separators, but the VALUE attribute will always
return strings using the "\" character.
In Windows, the dialog will be modal relative only to its parent or to
the active dialog.
=head1 EXAMPLES
lib/IUP/Internal/Element.pm view on Meta::CPAN
#int IupHide(Ihandle *ih); [in C]
#iup.Hide(ih: ihandle) -> (ret: number) [in Lua]
my $self = shift;
IUP::Internal::LibraryIup::_IupHide($self->ihandle);
return $self;
}
sub Popup {
#int IupPopup(Ihandle *ih, int x, int y); [in C]
#iup.Popup(ih: ihandle[, x, y: number]) -> (ret: number) [in Lua]
#or ih:popup([x, y: number]) -> (ret: number) [in Lua]
my ($self, $x, $y) = @_;
$x = IUP_CURRENT unless defined $x;
$y = IUP_CURRENT unless defined $y;
return IUP::Internal::LibraryIup::_IupPopup($self->ihandle, $x, $y);
}
sub Show {
#int IupShow(Ihandle *ih); [in C]
#iup.Show(ih: ihandle) -> (ret: number) [in Lua]
#or ih:show() -> (ret: number) [in IupLua]
lib/IUP/Item.pod view on Meta::CPAN
=head2 CALLBACKS
For more info about concept of callbacks (setting callback handlers etc.)
see L<IUP::Manual::04_Callbacks|IUP::Manual::04_Callbacks>. Callbacks specific to this element:
=over
=item L<ACTION|IUP::Manual::04_Callbacks/ACTION>
Action generated when the item is
selected. IUP_CLOSE will be processed. Even if inside a popup menu when
IUP_CLOSE is returned, the current popup dialog or the main loop will
be closed.
=item L<HIGHLIGHT_CB|IUP::Manual::04_Callbacks/HIGHLIGHT_CB>
Action generated when the item is highlighted.
=back
The following L<common callbacks|IUP::Manual::04_Callbacks/Common Callbacks> are also accepted:
lib/IUP/Manual/02_Elements.pod view on Meta::CPAN
L<IUP::List|IUP::List>,
L<IUP::Tree|IUP::Tree>.
=back
=head3 Destroy()
=over
Destroys an interface element and all its children. Only dialogs,
timers, popup menus and images should be normally destroyed, but
B<detached> controls can also be destroyed.
$element->Destroy();
B<Notes:>
It will automatically B<unmap> and B<detach> the element if necessary,
and then B<destroy> the element.
This function also deletes the main names associated to the interface
lib/IUP/Manual/02_Elements.pod view on Meta::CPAN
=head3 Popup()
=over
Shows a dialog or menu and restricts user interaction only to the
specified element. It is equivalent of creating a Modal dialog is some
tooklits.
If another dialog is shown after L<Popup|/"Popup()"> using L<Show|/"Show()">, then its
interaction will not be inhibited. Every L<Popup|/"Popup()"> call creates a new
popup level that inhibits all previous dialogs interactions, but does
not disable new ones. IMPORTANT: The popup levels must be closed in the
reverse order they were created or unpredictable results will occur.
For a dialog this function will only return the control to the
application after a callback returns IUP_CLOSE, L<ExitLoop|IUP/"ExitLoop()"> is
called, or when the popup dialog is hidden, for exemple using
L<Hide|/"Hide()">. For a menu it returns automatically after a menu item is
selected. IMPORTANT: If a menu item callback returns IUP_CLOSE, it will
ends the current popup level dialog.
$dialog->Popup($x, $y);
#or
$dialog->Popup();
B<$ih:> Identifier of a dialog or a menu.
B<$x>: horizontal position of the dialog or menu relative to the origin
of the main screen. The following constants (see L<IUP::Constants|IUP::Constants>)
are valid:
lib/IUP/Menu.pod view on Meta::CPAN
=over
=item L<MAP_CB|IUP::Manual::04_Callbacks/MAP_CB>, L<UNMAP_CB|IUP::Manual::04_Callbacks/UNMAP_CB>
=back
=head1 NOTES
A menu can be a menu bar of a dialog, defined by the dialog's MENU
attribute, or a popup menu.
A popup menu is displayed for the user using the L<Popup|IUP::Manual::02_Elements/"Popup()"> function
(usually on the mouse position) and disappears when an item is
selected.
L<Destroy|IUP::Manual::02_Elements/"Destroy()"> should be called only for popup menus. Menu bars
associated with dialogs are automatically destroyed when the dialog is
destroyed. But if you change the menu of a dialog for another menu, the
previous one should be destroyed using L<Destroy|IUP::Manual::02_Elements/"Destroy()">. If you replace a
menu bar of a dialog, the previous menu is unmapped.
Any item inside a menu bar can retrieve attributes from the dialog
using L<GetAttribute|IUP::Manual::02_Elements/"GetAttribute()">. It is not necessary to call L<GetDialog|IUP::Manual::02_Elements/"GetDialog()">.
The menu can be created with no elements and be dynamic filled using
L<Append|IUP::Manual::02_Elements/"Append()"> or L<Insert|IUP::Manual::02_Elements/"Insert()">.
lib/IUP/MessageDlg.pod view on Meta::CPAN
L<SetLanguage|IUP/"SetLanguage()">.
To show the dialog, use function L<Popup|IUP::Manual::02_Elements/"Popup()">.
function.
The dialog is mapped only inside L<Popup|IUP::Manual::02_Elements/"Popup()">, L<Map|IUP::Manual::02_Elements/"Map()"> does nothing.
In Windows the position (x,y) used in L<Popup|IUP::Manual::02_Elements/"Popup()"> is ignored and the
dialog is always centered on screen.
The L<Message|IUP/"Message()"> function simply creates and popup a L<IUP::MessageDlg|IUP::MessageDlg>.
In Windows each different dialog type is always associated with a different beep sound.
In Windows, if PARENTDIALOG is specified then it will be modal relative only to its parent.
=head1 EXAMPLES
The element B<IUP::MessageDlg> is used in the following sample scripts:
( run in 3.999 seconds using v1.01-cache-2.11-cpan-364913b4093 )