NAME
EBook::Gutenberg::Dialog - Interface to dialog command.
SYNOPSIS
use EBook::Gutenberg::Dialog;
my $dialog = EBook::Gutenberg::Dialog->new(backtitle => 'gutenberg');
DESCRIPTION
EBook::Gutenberg::Dialog is the gutenberg interface to the Unix dialog(1) program. This is developer documentation, for user documentation you should consult the gutenberg manual.
METHODS
- $dialog = EBook::Gutenberg::Dialog->new(%params)
 - 
Returns a newly blessed EBook::Gutenberg::Dialog object.
The following are valid
%paramsfields.- backend
 - 
The backend dialog command to use. Defaults to dialog(1).
 - backtitle
 - 
String to use for the
--backtitleoption. Unset by default. 
 
Accessors
- $backend = $dialog->backend
 - $dialog->set_backend($backend)
 - 
Getter/setter for the backend attribute.
 - $backtitle = $dialog->backtitle
 - $dialog->set_backtitle($backtitle)
 - 
Getter/setter for the backtitle attribute.
 
Widgets
These methods correspond to dialog(1) widget options. Each method accepts a hashref as an optional final argument that can contain the following fields:
- title
 - ok_label
 - yes_label
 - cancel_label
 - no_label
 - extra_label
 - help_label
 - erase_on_exit
 
Each correspond to a dialog(1) option.
- ($rv, $forms) = $dialog->form($text, $height, $width, $list_height, [ $ly, $lx, $i1, $iy, $ix, $flen, $ilen ] ..., [ \%param ])
 - $rv = $dialog->infobox($text, $height, $width, [ $init ], [ \%param ])
 - $rv = $dialog->msgbox($text, $height, $width, [ \%param ])
 - $rv = $dialog->textbox($file, $height, $width, [ \%param ])
 - $rv = $dialog->yesno($text, $height, $width, [ \%param ])
 - $rv = $dialog->pager($file, [ $pgr ])
 - 
pager()uses a given pager to read$file. It does not actually correspond to adialog(1)widget. 
EXPORTS
- :codes
 - 
dialog(1)return code constants.- DIALOG_OK
 - DIALOG_CANCEL
 - DIALOG_HELP
 - DIALOG_EXTRA
 - DIALOG_ITEM_HELP
 - DIALOG_TIMEOUT
 - DIALOG_ERROR
 - DIALOG_ESC
 
 
AUTHOR
Written by Samuel Young, <samyoung12788@gmail.com>.
This project's source can be found on its Codeberg page. Comments and pull requests are welcome!
COPYRIGHT
Copyright (C) 2025 Samuel Young
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.