GtkDialog
Widget that eases creation of popup dialogs.
Object Hierarchy
Direct subclasses
Description
GtkDialog is used to create a popup window
for presenting or requesting small amounts of information. It is
composed of two containers separated by a
GtkHSeparator. The top container is a
GtkVBox, and would typically contain
GtkLabel and
GtkEntry widgets to present the user with
information and allow input. The bottom container is a
GtkHBox and would usually contain dialog
buttons, e.g. OK, Cancel,
Help and so on.
Note that widgets should not be added to the
GtkDialog itself but to the containers, which
can be accessed as vbox
and action_area respectively.
Dialogs can be made modal (in effect freezing input to the rest of
the application) by calling the GtkWindow
method set_modal() on the
GtkDialog object.
Note that making a GtkDialog modal does not
stop execution of the code that calls it. In the example below, the
call to 'echo' will still get executed even though the main application
may not respond to user input. To stop execution of the code the
GtkDialog must contain a call to a nested
gtk::main() function. Execution will then
continue when the corresponding gtk::main_quit()
function is called.
Example 12. Using set_modal()
<?php
$dialog = &new GtkDialog();
$dialog->set_modal(TRUE);
echo "This message will still be printed \n";
?>
|
Constructor
--
Creates the basis for a popup dialog window.
Properties
vbox:
Upper container.
action_area:
Lower container.