Scroll to navigation

Prima::Dialog::PrintDialog(3) User Contributed Perl Documentation Prima::Dialog::PrintDialog(3)

NAME

Prima::Dialog::PrintDialog - standard printer setup dialog

DESCRIPTION

Provides the standard dialog that allows the user to select the printer and its options. The toolkit does not provide the in-depth management of the printer options; this can only be accessed by executing the printer-specific setup window, called by the "Prima::Printer::setup_dialog" method. The class invokes this method when the user presses the 'Properties' button. Otherwise the class provides only selection from the printer list.

When the dialog finishes successfully the selected printer is set as current by setting the "Prima::Printer::printer" property. This technique allows direct use of the user-selected printer and its properties without prior knowledge of the selection process.

SYNOPSIS

        use Prima qw(Dialog::PrintDialog Application);
        my $dlg = Prima::Dialog::PrintDialog-> new;
        if ( $dlg-> execute) {
                my $p = $dlg-> printer;
                if ( $p-> begin_doc ) {
                        $p-> text_out( 'Hello world', 10, 10);
                        $p-> end_doc;
                }
        }
        $dlg-> destroy;

AUTHOR

Dmitry Karasik, <dmitry@karasik.eu.org>.

SEE ALSO

Prima, Prima::Window, Prima::Printer.

2024-08-20 perl v5.40.0